Session Problem When Adding

Post your Click counter digestion problems here
Post Reply
radiobob
Posts: 3
Joined: Mon Jul 17, 2006 7:18 pm

Session Problem When Adding

Post 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.
Klemen
Site Admin
Posts: 10116
Joined: Fri Feb 11, 2005 4:04 pm

Post 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
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
radiobob
Posts: 3
Joined: Mon Jul 17, 2006 7:18 pm

Post 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
Klemen
Site Admin
Posts: 10116
Joined: Fri Feb 11, 2005 4:04 pm

Post by Klemen »

You can try setting session.save_path to /tmp
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
radiobob
Posts: 3
Joined: Mon Jul 17, 2006 7:18 pm

Post 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.
Post Reply