Forums | Mahara Community

Developers /
Newbie Question on - repeated authentication.


anonymous profile picture
Deleted user
Posts: 6

27 July 2011, 11:04 PM

Hi I am a newbie in Mahara. I just installed mahara 1.4;

after I logged in, Its asking me username and password for every link  (mouse click).

Can you please tell me what problem it is?

How can i Solve this?

 

Issac

anonymous profile picture
Deleted user
Posts: 214

28 July 2011, 2:54 AM

Hi Issac,

It sounds like you have a session cookie problem. Can you make sure that your mahara dataroot is writeable by your web user?

What operating system and database are you running mahara on? If you can find them, take a look at your web server's error logs. In a linux environment running apache2, these will be under /var/log/apache2/error.log or /var/log/httpd/error.log

Hope that this ielps,

Andrew

anonymous profile picture
Deleted user
Posts: 6

28 July 2011, 4:03 AM

Andrew Many thanks for the valuable input/

Ya I am sure that the data root is writable (i made it as 777).

I am using linux cpanel, MySQL 5, PHP 5.2

I got the following error log (may be this will associated with mahara)

 

[28-Jul-2011 13:30:02] PHP Warning:  Module 'PDO' already loaded in Unknown on line 0

[28-Jul-2011 13:30:02] PHP Warning:  Module 'pdo_sqlite' already loaded in Unknown on line 0

[28-Jul-2011 13:30:02] PHP Warning:  Module 'SQLite' already loaded in Unknown on line 0

[28-Jul-2011 13:30:02] PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20060613/imagick.so' - /usr/local/lib/php/extensions/no-debug-non-zts-20060613/imagick.so: cannot open shared object file: No such file or directory in Unknown on line 0

[28-Jul-2011 13:30:02] PHP Warning:  Module 'pdo_mysql' already loaded in Unknown on line 0

[28-Jul-2011 14:00:01] PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20060613/imagick.so' - /usr/local/lib/php/extensions/no-debug-non-zts-20060613/imagick.so: cannot open shared object file: No such file or directory in Unknown on line 0


I just tried to change the php.ini file. But its not available. I need to get that provision from my hosting provider.

Issac Johny

anonymous profile picture
Deleted user
Posts: 214

28 July 2011, 8:26 AM

Hi Issac,

That's just misconfiguration in the php.ini producing warnings. Those aren't related to Mahara.

Is there anything in the dataroot/sessions directory? There should be sixteen folders...

I wonder whether the time on the server is somehow incorrect? I've seen issues where data is stored over NFS and the NFS server had the wrong time.

Andrew

anonymous profile picture
Deleted user
Posts: 6

28 July 2011, 11:23 AM

In dataroot directory I didn't find none. Its empty

anonymous profile picture
Deleted user
Posts: 10

28 July 2011, 2:05 PM

Need to back pedal a little here.

What you need to check first is 'phpinfo();' , always useful to have a page with that on in your root webs directory. When running that php will tell you where it thinks the session stuff should be storing the temporary files.

http://lsces.co.uk/PHP/testphpinfo.php is an example, and the session.save_path here is /var/lib/php5

anonymous profile picture
Deleted user
Posts: 6

29 July 2011, 12:27 AM

Hi Lester,

Ya I was able to get the info

The session saves here in

session.save_path /tmp /tmp

What to do next?

Thanks

 

Issac

anonymous profile picture
Deleted user
Posts: 214

29 July 2011, 3:02 AM

Hi Lester,

Sorry, but in Mahara, we overwrite the session save path. We always set the session.save_path to $CFG->dataroot . 'sessions'. The session handling is all controlled by htdocs/auth/session.php and you'll see this ini_set on line 34 if you're running Mahara 1.4.0.

So if your dataroot is /srv/data/mahara, then your sessions will be stored in /srv/data/mahara/sessions.

Therefore, we need to check whether the session is being stored correctly within the dataroot.

Hope that this clears things up,

Andrew

anonymous profile picture
Deleted user
Posts: 214

29 July 2011, 3:14 AM

Just to clarify, you've got a dataroot directory (e.g. /srv/data/mahara) and inside that directory, you have a sessions directory. You should also have folders including artefact, dwoo, htmlpurifier, images, langpacks, log, smarty, and temp.

Inside your sessions directory, you should have folders 0-9, and a-f, but these are missing?

Are you in a position to make a few changes to the code so that we can try and track down the issue? If so, could you open auth/session.php and remove the @ from lines 87 (@session_start in the constructor); and again at line 215 (@session_start() in the ensure_session() function).

Just to double-check, have you tried clearing your database and re-installing mahara?

My gut feeling here is that there's an issue with either your host, or with your database.

Andrew

anonymous profile picture
Deleted user
Posts: 6

29 July 2011, 11:16 PM

Hi Andrew,

I din't try clearing the database and reinstall mahara. In the first step itself I got it.

In the same server I am using wordpress, Joomla too. I didn't  face any problem in wordpress and joomla. I don't think so I have problem in host too (I may be wrong)

I just change the code too in 87th and 215th line. Its not working again.

In my site administration page I am getting this message.

You have dangerous PHP settings, magic_quotes_gpc is on. Mahara is trying to work around this, but you should really fix it. If you are using shared hosting and your host allows for it, you should include the following line in your .htaccess file: php_flag magic_quotes_gpc off

Issac

12 results