Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have PHP installed properly from the Remi repo on CentOS 6 (64 bit).

enter image description here

As shown in the image above, the PHP information page shows sessions as working and installed, yet I get this error:

Fatal error: Call to undefined function session_create() in /var/www/lighttpd/index.php on line 1

I've tried multiple reinstalls, different PHP RPM's, and yet nothing will get sessions going. How can I get PHP sessions working?

share|improve this question
add comment

1 Answer

up vote 2 down vote accepted

You're looking for session_start(). "session_create()" is a phpBB function.

share|improve this answer
    
Haha, oops! I got another error message once I changed to _start(): Warning: session_start(): open(/var/lib/php/session/sess_k00cap6jt0ktu52k1ui3qdi7c7, O_RDWR) failed: Permission denied (13) in /var/www/lighttpd/index.php on line 1 bool(true) Warning: Unknown: open(/var/lib/php/session/sess_k00cap6jt0ktu52k1ui3qdi7c7, 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 (/var/lib/php/session) in Unknown on line 0 - but this should be easy to fix - thanks! –  Blake Apr 12 '12 at 4:13
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.