Recently the host server of one of my clients change its PHP installation from the Apache mode to the CGI mode so because of this change i got some problems. For example, whatever page i view it shows these warnings at the top of the page:
Warning: session_start() [function.session-start]: open(/tmp/sess_b05e459fe625d81a303b59982be3da39, O_RDWR) failed: Permission denied (13) in /home/client_username/public_html/functions.php on line 9
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/client_username/public_html/functions.php:9) in /home/client_username/public_html/functions.php on line 9
Warning: Unknown(): open(/tmp/sess_b05e459fe625d81a303b59982be3da39, 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
After some tests and research at the PHP site i finally solve this problems by using the ini_set php function to set the url_rewriter.tags, the arg_separator.output and the session.save_path in every php page that you want to be valid xhtml1.1 as the following code:
<?php ini_set("session.save_path","/home/client_username/tmp/"); ini_set ("arg_separator.output", "&"); ini_set("url_rewriter.tags","a=href,area=href,frame=src,input=src"); if (session_id() == "") session_start(); ?>Because PHP is in CGI mode i notice that i can not use a .htaccess file so i add the previous code in a general php file and include it to my pages with the include() php function, and also, i change the permissions of the folder that i set in the session.save_path to be writable -chmod 750- and now every thing works perfectly and the page is a valid XHTML 1.1 file.
Hope that this helps someone.