When I try to access phpMyAdmin I get the following error.

phpMyAdmin - Error
Cannot start session without errors, please check errors given in your PHP and/or webserver log file and configure your PHP installation properly.

Could this be a passward error causing this?
Any help would be appreciated as I will not be able to upload to a live environment until this is cleared up.

from:
/Applications/MAMP/logs/php_error.log

[28-Dec-2008 22:52:27] PHP Warning: session_start() [function.session-start]: open(/Applications/MAMP/tmp/php/sess_793587e78598101b4103d120494e8f4bdff1b36a7, O_RDWR) failed: No such file or directory (2) in /Applications/MAMP/bin/phpMyAdmin/libraries/session.inc.php on line 87

[28-Dec-2008 22:52:27] PHP Warning: Unknown: open(/Applications/MAMP/tmp/php/sess_793587e78598101b4103d120494e8f4bdff1b36a7, O_RDWR) failed: No such file or directory (2) in Unknown on line 0

[28-Dec-2008 22:52:27] PHP Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/Applications/MAMP/tmp/php) in Unknown on line 0

Line 87 in
/Applications/MAMP/bin/phpMyAdmin/libraries/session.inc.php
is
$r = session_start();

Comments

3duardo’s picture

btw -
The site seems to work fine otherwise.

Eduardo

yelvington’s picture

PHP "sessions" store variables so they can persist across multiple HTTP requests.

PHP sends your browser a single cookie that serves as a key. The key is used to retrieve the values from server-side storage.

By default, PHP uses files to store session data on the webserver (which in your case is actually your local PC). Your error indicates that your webserver can't retrieve the file, so it can't restore the variables, and phpMyAdmin can't proceed.

This is likely due to filesystem permissions issues on your local PC.

Drupal will not have this error because it overrides normal PHP behavior and stores the session data in MySQL. This is why your site works when using Drupal, and doesn't work when you try to use phpMyAdmin.

3duardo’s picture

Thanks yelvington

Indeed, I was a little baffled as to why the site was running despite the error.

I was able to access phpMyAdmin before and hav made several backup .sql files of my database so I am not sure why it just happened, seemingly out of the blue.

As far as filesystem permisions go:
Is there something specific in phpInfo that I should be looking at for for more clues?

A cursory look with Google has left me more confused in this issue :(

Thanks again.

Eduardo

yelvington’s picture

[28-Dec-2008 22:52:27] PHP Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/Applications/MAMP/tmp/php) in Unknown on line 0

This is a PHP configuration pointing to a directory that must exist on your Macintosh, and must be writable by the webserver process.

betarobot’s picture

Changing permissions for MAMP/tmp/php to 777 just worked for me.