Forums | Mahara Community

Support /
.htaccess


anonymous profile picture
Account deleted
Posts: 13

20 November 2009, 17:44

I copied the htdocs into my mahara directory.  Should the .htaccess file be in this directory?

/home1/dawnquin/public_html/mahara/.htaccess

If so, it is not there.  I looked in the download of mahara and it's not located in the htdocs folder.

 Am I missing something?

Dawn

anonymous profile picture
Account deleted
Posts: 228

21 November 2009, 4:56

Hi Dawn,

Since that file begins with a dot, some file browsers will not display it in the file list.  Is there a "show hidden files" option somewhere that you can turn on?

How did you upload Mahara to your server? If you were using an ftp client, for example, it might have ignored hidden files.

anonymous profile picture
Account deleted
Posts: 13

23 November 2009, 14:19

Yes.  I used cpanel.

I can see the hidden files.  Westhost states that I need to disable the magic_quotes_gpc in the .htaccess file, create a php.ini file with this line and copy the php.ini file to all Mahara directories as needed.  

 I did this, but the .htaccess file crashes my mahara site.  I delete it.  The site comes up.  However I must login on each Mahara screen, again and again.

 The site looks like:

dawnquinn.com/mahara

[[homedefaultcontent/install]] 

Each screen looks like this:

[ENV] 44 You have dangerous PHP settings, magic_quotes_gpc is on. Mahara is trying to work around this, but you should really fix it
[X]
Call stack (most recent first):
  • log_message("You have dangerous PHP settings, magic_quotes_gpc ...", 1, true, true) at /home1/dawnquin/public_html/mahara/lib/errors.php:123
  • log_environ("You have dangerous PHP settings, magic_quotes_gpc ...") at /home1/dawnquin/public_html/mahara/lib/mahara.php:97
  • ensure_sanity() at /home1/dawnquin/public_html/mahara/init.php:80
  • require("/home1/dawnquin/public_html/mahara/init.php") at /home1/dawnquin/public_html/mahara/view/index.php:35

Log in to Mahara

I must login again.

I've spent several hours on this.  I must use a shared host since I don't have a dedicated server.  Can you help me?

Perhaps you could give me the contents of a recommended .htaccess file and php.ini file.

Thanks for your help.

Dawn

 

anonymous profile picture
Account deleted
Posts: 13

23 November 2009, 14:21

I also meant to show you the error in the log file:

 

[Mon Nov 23 10:09:42 2009] [error] [client 206.51.56.73] File does not exist: /home1/dawnquin/public_html/500.shtml
[Mon Nov 23 10:09:42 2009] [alert] [client 206.51.56.73] /home1/dawnquin/public_html/moodle/.htaccess: Invalid command 'php_flag', perhaps misspelled or defined by a module not included in the server configuration
[Mon Nov 23 10:09:42 2009] [error] [client 206.51.56.73] File does not exist: /home1/dawnquin/public_html/500.shtml
[Mon Nov 23 10:09:42 2009] [alert] [client 206.51.56.73] /home1/dawnquin/public_html/moodle/.htaccess: Invalid command 'php_flag', perhaps misspelled or defined by a module not included in the server configuration

 

But the .htaccess file does not exist.  I removed it because it crashes my site.

Thanks.

Dawn

anonymous profile picture
Account deleted
Posts: 13

23 November 2009, 16:19

I am finally past this problem - I think.

I removed the flag lines in .htaccess and created a php.ini file with the correct lines.

; Safe Mode
;
safe_mode = Off
register_globals = off
magic_quotes_runtime = off
magic_quotes_sybase = off
magic_quotes_gpc = off
log_errors = on
allow_call_time_pass_reference = off
upload_max_filesize = 50M
post_max_size = 50M
magic_quotes_gpc = Off

I also added the 

I added the line $cfg->log_environ_targets = 0;

to the config.php file.

The site no longer crashes.

I still have a problem.

When I go to my site - dawnquinn.com/mahara - i am presented with

[[loggedouthomedefaultcontent/install]] 

After I login, I am presented with -

[[homedefaultcontent/install]]

Each screen I access, I am presented with a new login:

Log in to Mahara

Username: *


Password:

I have read this somewhere but can't not find the solution.  Please help.

Dawn

 

anonymous profile picture
Account deleted
Posts: 1643

23 November 2009, 18:15

The installation troubleshooting page has some information about this problem and what might be causing it. Does it help for you?
anonymous profile picture
Account deleted
Posts: 13

23 November 2009, 19:31

I have read the file but it does not reflect my specific issue.

(1)  I go to dawnquinn.com/mahara

I am presented with:  [[loggedouthomedefaultcontent/install]]

I assume this is a template issue.

(2) I login with admin.

I am presented with:  [[homedefaultcontent/install]]

(3) I then click between the tabs.

I am presented with a new login.  I login again with Admin and password and presented with the selected tab screen.

This reminds me of session state not being kept between clicks and / or a browser cookie issue. 

I'm using firefox.  I'm also using a shared hosting service and mysql5.  Everything else seems to be working find.  Just this.

Can you help?

Dawn

__________

Ok. Now I see what you are referening in the troubleshooting file.  Let me try it again.

Thanks.

Dawn

anonymous profile picture
Account deleted
Posts: 1643

23 November 2009, 20:34

The language string issue looks like you're missing lang/en.utf8/install.php. You might want to check you've uploaded all the files in the lang/en.utf8 directory.

Having said that, the content was probably copied to the database on installation, so uploading the files might not even help now. At least you can change that content in Admin -> Edit Site Pages.

If you're having no luck, you might want to try re-installing from scratch maybe?

anonymous profile picture
Account deleted
Posts: 13

23 November 2009, 20:42

I tried to use the info in the troubleshooting file. 

Scenario 1:  can't do since i don't have access vhosts.  i am on a shared host.

Scenario 2:  my maharadata directory is correct.

$cfg->dbtype   = 'mysql5';
$cfg->dbhost   = 'localhost';
$cfg->dbport   = null;
$cfg->dbname   = 'dawnquin_maharadb';
$cfg->dbuser   = 'dawnquin';
$cfg->dbpass   = '<blank>';

$cfg->wwwroot   = 'http://www.dawnquinn.com/mahara/';
$cfg->dirroot   = '/home1/dawnquin/public_html/mahara';
$cfg->dataroot  = '/home1/dawnquin/maharadata';
$cfg->admin     = 'admin';

$cfg->log_environ_targets = 0;

I spoke with westhost.com and they stated i could write a mod_rewrite to create an alias if indeed needed.  This is beyond my skills.

Can you help?

Dawn

Edits to this post:

  • anonymous profile picture Account deleted 23 November 2009, 22:32
anonymous profile picture
Account deleted
Posts: 1643

23 November 2009, 22:35

Hmm, I'm not sure what might be going on there then. Your config settings look fine from what I can see. I edited your post and removed your database password by the way, you might want to change it now Wink

What is the $CFG->admin setting? Mahara doesn't use that.

Maybe you could try clearing your cache and cookies and restarting your browser, but I'm not sure how much that will help. 

11 results