Page 1 of 1

Session Problem When Adding

Posted: Mon Jul 17, 2006 8:03 pm
by radiobob
Script URL: http://www.internetradioclub.com/cgi-bin/ccount/
Version of script: 1.1
Version of PHP: "The current PHP version running on PowWeb's servers is PHP 4.3.10."
Hosting company: Powweb
Have you searched THIS FORUM for your problem: Yes
(if not please do before posting)
If so, what terms did you try: manual
Write your message below:

Great script, thank you!

After successfully logging into Admin with a password, and then upon trying to Add a link, I get "You are not authorized to view this page!"

Here are the error messages from the CGI log, in reverse order:

PHP Warning: Unknown(): Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/var/php_sessions) in Unknown on line 0

PHP Warning: Unknown(): open(/var/php_sessions/sess_59815ade4ae839846c2537ca4cdc1409, O_RDWR) failed: No such file or directory (2) in Unknown on line 0

PHP Warning: session_start(): open(/var/php_sessions/sess_59815ade4ae839846c2537ca4cdc1409, O_RDWR) failed: No such file or directory (2) in /hermes/web03/b401/pow.internetradi/htdocs/cgi-bin/ccount/index.php on line 40

I uploaded your test scripts and got the following results:

Session started successfully!
CLICK HERE FOR PAGE 2

and...

$_SESSION['test'] is set to: FALSE

Do you have any suggestions?
Cheers,
Bob

PS: A different topic, and just FYI, but I got everything to work just fine under XAMPP for Windows on my PC.

Posted: Mon Jul 17, 2006 9:21 pm
by Klemen
Hi,

You're having problems with sessions in general.

Contact your hosting company and ask them to properly configure PHP sessions. Changing session.save_path in php.ini from the default value /var/php_sessions to a valid session folder should fix everything.

Regards

Posted: Tue Jul 18, 2006 3:48 pm
by radiobob
Thank you very much for responding. I contacted Powweb and they showed me how I can change my own php.ini through their interface. Here is the default setting:
[Session]
; Handler used to store/retrieve data.
session.save_handler = files

; Argument passed to save_handler. In the case of files, this is the path
; where data files are stored. Note: Windows users have to change this
; variable in order to use PHP's session functions.
session.save_path = /var/php_sessions

Since I don't know anything about sessions or PHP, I'm afraid I don't know how to determine a "valid session folder." I only know the path to my htdocs directory:
Path to your Web document root: /home/users/web/zyx/pow.xyz/htdocs

Bob

Posted: Tue Jul 18, 2006 7:31 pm
by Klemen
You can try setting session.save_path to /tmp

Posted: Tue Jul 18, 2006 11:04 pm
by radiobob
Thank you, that got it working.

I have intermittent problems where I either get the Not Authorized screen, or I am taken back to the login menu after clicking the Continue link, but these are rare enough that I was able to add a couple dozen links today without too many such interruptions.