session.save_path problem


#1

hi guys

Firstly (and briefly):

I am very new to PHP, MySQL and Apache (2 days new) so I may sound very dumb at times and need things explained to me in ‘idiot proof’ however please do bare with me because I realy do want to get to grips with this.

ok, heres my problem:

I have downloaded apache, MySQL, PHP and a tool to see the MySQL databases in a GUI, and have also found a PHP News utility which I am trying to get up and running, however having successfully installed it, whenever I log on it takes me back to the logon page.

I looked in my Apache log and have found plenty of errors (all appearing simmultaneously, time wise) however each error knuckles down to the following:

[Tue Dec 19 14:22:41 2006] [error] [client 81.86.100.9] PHP Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (E:\DOCUME~1\Steve\LOCALS~1\Temp\php\upload) in Unknown on line 0, referer: http://81.86.100.9/news/1.3.0/upload/index.php

I have been looking around quite franticly trying to remedy this. I have made sure I have all the extensions for PHP, have reconfigured SQL (although I now know its a PHP error, god knows how i know that but thats what all the signs boil down to), reinstalled apache… to be quite honest now im starting to doubt I have any idea what i’m doing.

I have looked around and DID find this:

http://www.phpfreaks.com/forums/index.p#msg484668

This looks like it could be the answer to all my problems, however now is where im gonna sound like a real dip. The resolution is to change the session.start_path from a readable location to a writable location. The problem poster stated he done this using IIS, however i’m using apache and cannot find a way to do this. I am using windows and (as embarrasing as this could sound) I have created a folder and changed my php.ini file to point session.start_path to E:PROGRA~1Apache~1Apache~1htdocsphpwrite and have gone into the windows propperties for the folder and have unticked ‘read only’.

I had a feeling this wouldnt work, however now im absolutely stuck on what to do next and was hoping someone would be able to help me remedy this.

Thanks in advance.


#2

I don’t have any Windows configurations at hand, but I usually just use a very simple folder, like /Temp or /tmp, which usually resolves to C:Temp and C:tmp. I have never really encountered the message you have there.

Before going too far, make sure the php.ini you modify is the right one.

  • With a phpinfo() script, check the ‘Configuration File (php.ini) Path’. Depending on the configuration, I’ve seen Windows install looking up for the file in C:Windows, so it used default values silently.
  • Make sure you restart Apache for the changes in php.ini to apply.

Tell me how things go.

BTW: It’s good to see you made some research before asking.


#3

Hi

firstly, thanks for replying.

I have tried to change it to the following:

session.save_path="/tmp"

however receive:

[Tue Dec 19 18:37:47 2006] [error] [client 81.86.100.9] PHP Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/tmp) in Unknown on line 0, referer: http://81.86.100.9/news/1.3.0/upload/login.php

Thanks for trying to help. I am still having this problem so if anyone else has any suggestions they will be welcomed :)

p.s. I have just found something which MIGHT help me… http://bugs.php.net/bug.php?id=23580 ill let you know if this resolves my problem.

Regards

UPDATE - No luck from that site


#4

Does Apache run under a specific user? Does the user have the required rights on the folder?


#5

Hi… I just fixed the problem… turns out I was being blond.

I changed to session.save_path=“E:PROGRA~1APACHE~1APACHE~1htdocsphpmod” to to session.save_path=“E:PROGRA~1APACHE~1APACHE2.2htdocsphpmod”