0
votes

I am trying to help install a third party theme onto a WordPress installation and I get these three error codes when I click "live preview" or "activate" the theme:

Warning: session_start() [function.session-start]: open(/var/chroot/home/content/66/5232766/tmp/sess_1n0eifrftmjfu96hop17kihi35, O_RDWR) failed: No such file or directory (2) in /home/content/66/5232766/html/wp-content/themes/Drlawyer/functions.php on line 461

Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /home/content/66/5232766/html/wp-content/themes/Drlawyer/functions.php:461) in /home/content/66/5232766/html/wp-content/themes/Drlawyer/functions.php on line 461

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/content/66/5232766/html/wp-content/themes/Drlawyer/functions.php:461) in /home/content/66/5232766/html/wp-content/themes/Drlawyer/functions.php on line 461

How can I fix these things?

1
Here is the code that is causing the problem: function cp_admin_init() { if (!session_id()) session_start(); } I added this code to the above code: ini_set('session.save_path', 'tmp'); Now it is giving me this error code only in the dashboard and not on the actual site: Warning: session_start() [function.session-start]: open(tmp/sess_qrj5st7q63acsjrnsda545p6j2, O_RDWR) failed: No such file or directory (2) in /home/content/66/5232766/html/wp-content/themes/Drlawyer/functions.php on line 462 - Mike
This is another error code it is giving on Dashboard now: Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/content/66/5232766/html/wp-content/themes/Drlawyer/functions.php:462) in /home/content/66/5232766/html/wp-content/themes/Drlawyer/functions.php on line 462 - Mike

1 Answers

0
votes

try commenting the line out and removing your addition

function cp_admin_init() // { if (!session_id()) session_start(); }

If this is godaddy hosting you might need to do this (I run into this problem all the time) Add this to your php5.ini file then you will need to kill all processes from your godaddy hosting control panel and it will work. check your phpinfo.php file to make sure it took

upload_tmp_dir = /var/chroot/home/content/56/10594156/html/temp
session.save_path = /var/chroot/home/content/56/10594156/html/temp

of course change the pathto to yours and then create a /temp dir in your root and CHMOD 777 Godaddy has issues with the tmp/ dir for some reason