Voldemort Posted April 13, 2007 Share Posted April 13, 2007 (Yes, I've searched and searched everywhere for a solution to this) I just coded a chatbox/tagbox and an admin system, but when I AddType'd it to PHP4 instead of the usualy PHP5, the admin system doesn't work. It works with a session, started immediately at the top of the page with no whitespace or printed lines whatsoever. It's on PHP4.4.4, Apache 1.3.37 Code works fine in PHP5, but I wanted to make sure it would work on servers without it. Warning: session_start() [function.session-start]: open(/tmp/sess_c93fa10096807ad43debe82e4288e87e, O_RDWR) failed: Permission denied (13) in /home/hoffman/public_html/chatcubed/regular/admin.php on line 2 Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/hoffman/public_html/chatcubed/regular/admin.php:2) in /home/hoffman/public_html/chatcubed/regular/admin.php on line 2 Warning: Unknown(): open(/tmp/sess_c93fa10096807ad43debe82e4288e87e, 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 Link to comment https://forums.phpfreaks.com/topic/46825-solved-php4-sessions/ Share on other sites More sharing options...
Guest prozente Posted April 13, 2007 Share Posted April 13, 2007 you don't have permission to write to /tmp so the session cannot save the information. Set your session_save_path to a location you have write permissions. Link to comment https://forums.phpfreaks.com/topic/46825-solved-php4-sessions/#findComment-228250 Share on other sites More sharing options...
Voldemort Posted April 13, 2007 Author Share Posted April 13, 2007 Okay, I know that I have to do session_save_path("home/.../regular/tmp") but how can I make it so anyone who downloads it doesn't have to modify the script? Link to comment https://forums.phpfreaks.com/topic/46825-solved-php4-sessions/#findComment-228254 Share on other sites More sharing options...
Voldemort Posted April 13, 2007 Author Share Posted April 13, 2007 Argh... can't edit the last post. This code, placed before the staart_session, worked: <?php error_reporting(0); @chmod("./tmp", 0777); $path = str_replace("admin.php","tmp",$_SERVER['SCRIPT_FILENAME']); session_save_path($path); session_start(); <more code> Link to comment https://forums.phpfreaks.com/topic/46825-solved-php4-sessions/#findComment-228269 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.