session_start(): open(...) error

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
jslavin
Forum Newbie
Posts: 8
Joined: Fri Jun 17, 2005 3:52 pm

session_start(): open(...) error

Post by jslavin »

I Get the following errors when i run a simple php script on my page:
<?php session_start(); ?> <=== the whole script being run
(the first error is causing the rest)

(seems like maybe something wrong in my php.ini file)
Thanks in advance

Warning: session_start(): open(/tmp/sess_a2157f867feb16d7d98c33cabdd65e8d, O_RDWR) failed: Permission denied (13) in /home/cts/public_html/secoadmin/index.php on line 8

Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /home/cts/public_html/secoadmin/index.php:8) in /home/cts/public_html/secoadmin/index.php on line 8

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/cts/public_html/secoadmin/index.php:8) in /home/cts/public_html/secoadmin/index.php on line 8

Warning: Unknown(): open(/tmp/sess_a2157f867feb16d7d98c33cabdd65e8d, O_RDWR) failed: Permission denied (13) in Unknown on line 0

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
timvw
DevNet Master
Posts: 4897
Joined: Mon Jan 19, 2004 11:11 pm
Location: Leuven, Belgium

Post by timvw »

This question has been asked (and answered many times before).

Use the message below for a websearch.
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
jslavin
Forum Newbie
Posts: 8
Joined: Fri Jun 17, 2005 3:52 pm

Post by jslavin »

thanks for your help; although, the things i read didnt work

i'm on a unix/apache server... and i have a /tmp directory, this worked before perfectly.
i tried putting ./tmp still didnt work

any other ideas?

Thanks for your help!
jslavin
Forum Newbie
Posts: 8
Joined: Fri Jun 17, 2005 3:52 pm

Post by jslavin »

it looks like my directory is fine, i just need to make sure it has permission to read/write

how do i go about making sure that the directory has those permissions?

Thanks again, your help is appreciated
jslavin
Forum Newbie
Posts: 8
Joined: Fri Jun 17, 2005 3:52 pm

Post by jslavin »

figured it out, so thought i'd post the answer

i had to log into my account via SSH and run the command

chmod +1777 /tmp

that gives access to the /tmp directory, now how did it change in the first place since it worked before? no idea,

but after running that command on the /tmp directory, the errors disapeared

Thanks everyone for your help!
Post Reply