Forums
This topic is locked
error with PHP and Phakt
Posted 29 Jan 2002 22:25:58
1
has voted
29 Jan 2002 22:25:58 steve obedoza posted:
After searching through threads to find my solution I have had no success. I have no problem making an initial test connection to my MySQL database. In runtime is where I see an error Warning: open(/tmp\sess_e113b76573072f9bb5eaa6d35d6081c9, O_RDWR) failed: No such file or directory (2) in C:\Inetpub\wwwroot\login.php on line 11
Line 11 is "session_start( ) ;"
I am running the latest versions of PHP and MySQL on PWS 4.0
I've ran a test.php page and everything looks to be functioning.
Now because it can't start a session would that mean that I have a password and login problem?
any help is appreciated
Replies
Replied 30 Jan 2002 21:25:51
30 Jan 2002 21:25:51 Tim Green replied:
The problem is that you have an incorrectly configured PHP.ini, and that is causing the problem.
There is a clue in the error message, though it is easily missed.
Look at the path of :-
/tmp\sess_e113b76573072f9bb5eaa6d35d6081c9
It's a UNIX path.... so you need to open up your PHP.ini file in a text editor, and search for and entry called 'session.save_path'.
When you've found it, change it to the path of your Windows temporary directory, and it should work...
Hope this helps
Tim Green
Extension & PHP TalkZone Manager
<font size=1>-------------------------------------------
<i>Please read the Forum FAQ before posting
a question to this TalkZone.</i>
-------------------------------------------
www.UDzone.com : A dynamic Dreamweaver,
Ultradev and Fireworks site for developers
by developers.
-------------------------------------------</font id=size1>
There is a clue in the error message, though it is easily missed.
Look at the path of :-
/tmp\sess_e113b76573072f9bb5eaa6d35d6081c9
It's a UNIX path.... so you need to open up your PHP.ini file in a text editor, and search for and entry called 'session.save_path'.
When you've found it, change it to the path of your Windows temporary directory, and it should work...
Hope this helps
Tim Green
Extension & PHP TalkZone Manager
<font size=1>-------------------------------------------
<i>Please read the Forum FAQ before posting
a question to this TalkZone.</i>
-------------------------------------------
www.UDzone.com : A dynamic Dreamweaver,
Ultradev and Fireworks site for developers
by developers.
-------------------------------------------</font id=size1>
Replied 02 Feb 2002 19:56:16
02 Feb 2002 19:56:16 steve obedoza replied:
Well I decided to change my server to Apache instead of PWS( I head a friggin headache with this microsoft b.s) and changed the session_save path as you directed in your response. I still come up with errors on handling sessions. Do you know of other problems associated with handling sessions? I'm a print graphic designer, so I am new to this.
Replied 03 Feb 2002 13:02:03
03 Feb 2002 13:02:03 Bruno Mairlot replied:
Castaic,
could you please send your error message, if different from the previous. It will be easier for us to help you with the exact message <img src=../images/dmxzone/forum/icon_smile_wink.gif border=0 align=middle>
Anyway, I wrote a Faq specifically to get rid of this problem.
www.udzone.com/showDetail.asp?TypeId=7&NewsId=1849
Part of the content of the phpinfo() command are shown.
First, make sure you work with the correct php.ini file (shown on the first table),
Then make sure, your session_path is correct.
--- Better to die trying, than never try at all ---
could you please send your error message, if different from the previous. It will be easier for us to help you with the exact message <img src=../images/dmxzone/forum/icon_smile_wink.gif border=0 align=middle>
Anyway, I wrote a Faq specifically to get rid of this problem.
www.udzone.com/showDetail.asp?TypeId=7&NewsId=1849
Part of the content of the phpinfo() command are shown.
First, make sure you work with the correct php.ini file (shown on the first table),
Then make sure, your session_path is correct.
--- Better to die trying, than never try at all ---
Replied 07 Feb 2002 17:16:31
07 Feb 2002 17:16:31 steve obedoza replied:
This is really weird.... I noticed that my PHP.INI file was not reflecting the changes I had made concerning the SESSION_SAVE issue. I took the ini file and put it on my Mac and opened it with BB-Edit. After, I put it back on my windows machine. Sure enough, the damn thing worked! Thanks for the clues with the configuration.
Steve
Steve
Replied 07 Feb 2002 22:08:55
07 Feb 2002 22:08:55 Tim Green replied:
It's always worth remembering that you should stop Apache before making changes to the PHP.ini to prevent any issues.
Glad you're now up and running <img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle>
Tim Green
Extension & PHP TalkZone Manager
<font size=1>-------------------------------------------
<i>Please read the Forum FAQ before posting
a question to this TalkZone.</i>
-------------------------------------------
www.UDzone.com : A dynamic Dreamweaver,
Ultradev and Fireworks site for developers
by developers.
-------------------------------------------</font id=size1>
Glad you're now up and running <img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle>
Tim Green
Extension & PHP TalkZone Manager
<font size=1>-------------------------------------------
<i>Please read the Forum FAQ before posting
a question to this TalkZone.</i>
-------------------------------------------
www.UDzone.com : A dynamic Dreamweaver,
Ultradev and Fireworks site for developers
by developers.
-------------------------------------------</font id=size1>
Replied 08 Feb 2002 10:13:21
08 Feb 2002 10:13:21 Bruno Mairlot replied:
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
It's always worth remembering that you should stop Apache before making changes to the PHP.ini to prevent any issues.
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>
I have made extensive search on that specific point, and it seems that the PHP.ini is read by PHP each time you execute a PHP script AND that the file has changed.
So, (at least under Win32), you can change the PHP.ini file without restarting apache.
Bruno
--- Better to die trying, than never try at all ---
Edited by - Maehdros on 08 Feb 2002 10:14:24
It's always worth remembering that you should stop Apache before making changes to the PHP.ini to prevent any issues.
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>
I have made extensive search on that specific point, and it seems that the PHP.ini is read by PHP each time you execute a PHP script AND that the file has changed.
So, (at least under Win32), you can change the PHP.ini file without restarting apache.
Bruno
--- Better to die trying, than never try at all ---
Edited by - Maehdros on 08 Feb 2002 10:14:24
Replied 08 Feb 2002 11:00:15
08 Feb 2002 11:00:15 chief monkey replied:
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
It's always worth remembering that you should stop Apache before making changes to the PHP.ini to prevent any issues.
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>
I have made extensive search on that specific point, and it seems that the PHP.ini is read by PHP each time you execute a PHP script AND that the file has changed.
So, (at least under Win32), you can change the PHP.ini file without restarting apache.
Bruno
--- Better to die trying, than never try at all ---
Edited by - Maehdros on 08 Feb 2002 10:14:24
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>
Speaking from experience I have found this not to be the case
George
Everybody has got to be somewhere
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
It's always worth remembering that you should stop Apache before making changes to the PHP.ini to prevent any issues.
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>
I have made extensive search on that specific point, and it seems that the PHP.ini is read by PHP each time you execute a PHP script AND that the file has changed.
So, (at least under Win32), you can change the PHP.ini file without restarting apache.
Bruno
--- Better to die trying, than never try at all ---
Edited by - Maehdros on 08 Feb 2002 10:14:24
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>
Speaking from experience I have found this not to be the case
George
Everybody has got to be somewhere
Replied 08 Feb 2002 11:39:27
08 Feb 2002 11:39:27 Bruno Mairlot replied:
OK, we were both right <img src=../images/dmxzone/forum/icon_smile_wink.gif border=0 align=middle>
Here is an excerpt from php.net :
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
The configuration file (called php3.ini in PHP 3.0, and simply php.ini as of PHP 4.0) is read when PHP starts up. For the server module versions of PHP, this happens only once when the web server is started. For the CGI version, it happens on every invocation.
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>
The module loading system of Apache under win32 is not as stable as it is under Linux, it is recommended to use the CGI version of PHP. Therefore, in my case, I had noticed that PHP reload the file each time.
Bruno
--- Better to die trying, than never try at all ---
Here is an excerpt from php.net :
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
The configuration file (called php3.ini in PHP 3.0, and simply php.ini as of PHP 4.0) is read when PHP starts up. For the server module versions of PHP, this happens only once when the web server is started. For the CGI version, it happens on every invocation.
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>
The module loading system of Apache under win32 is not as stable as it is under Linux, it is recommended to use the CGI version of PHP. Therefore, in my case, I had noticed that PHP reload the file each time.
Bruno
--- Better to die trying, than never try at all ---