cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Go to solution
Highlighted

Warning: Unknown: Failed to write session data (files).

After Godaddy change my Server IP address I have been receiving this error Messages all the web application hosted on godaddy. Please help me on how to resolve this issue.
Warning: Unknown: open(/home/content/65/4189965/tmp/sess_o0bf67f2oc0qo970c9jrd9n2k4, O_RDWR) failed: No such file or directory (2) 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 () in Unknown on line 0

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Solution

Re: Warning: Unknown: Failed to write session data (files).

STEP 1

I created a php file and named it test.php and wrote this code inside

<?php phpinfo();  ?>

uploaded to the remote server via ftp.

Access the file via my browser www.yourdomainname.com/test.php

this return the php configuration information on the remote server.

I check the section session.save_path is was set to "no value"  [godaddy's faulty area]

this shows that the default  variable value  for session.save_path in the php.ini file wasn't specified, and I do not have access to modify the php.ini file in the remote server.

STEP 2

Next is to know your remote server directory path by creating another file with the below php script

 mkdir( $_SERVER['DOCUMENT_ROOT'].'/tmp'); save and upload to the remote server. Access the file from your browser and this will automatically create the folder "tmp" in the appropriate directory.

OR create the directory using this php script and upload to the remote server. mkdir(/var/chroot/home/content/65/4189965/tmp); if the folder name "tmp" exist in that directory you will get a php warning message if not no warning message, run it the second to get a warning message to be sure the first you ran it created the directory.

STEP 3

Now back to all your web application just include this php script ini_set('session.save_path',/var/chroot/home/content/65/4189965/tmp); 

on any where on your other script where you start a session .i.e session_start();

BINGO and you are good to go.

All you session variable are saved in the default tmp directory that was suppose to be specified on the php.ini.

Int he future if Godaddy rectify this you are still safe.

 

This worked for me like charm on godaddy after several support chat that couldnt help me. But Im migrating away from godaddy soon.

 

View solution in original post

1 REPLY 1
Highlighted
Solution

Re: Warning: Unknown: Failed to write session data (files).

STEP 1

I created a php file and named it test.php and wrote this code inside

<?php phpinfo();  ?>

uploaded to the remote server via ftp.

Access the file via my browser www.yourdomainname.com/test.php

this return the php configuration information on the remote server.

I check the section session.save_path is was set to "no value"  [godaddy's faulty area]

this shows that the default  variable value  for session.save_path in the php.ini file wasn't specified, and I do not have access to modify the php.ini file in the remote server.

STEP 2

Next is to know your remote server directory path by creating another file with the below php script

 mkdir( $_SERVER['DOCUMENT_ROOT'].'/tmp'); save and upload to the remote server. Access the file from your browser and this will automatically create the folder "tmp" in the appropriate directory.

OR create the directory using this php script and upload to the remote server. mkdir(/var/chroot/home/content/65/4189965/tmp); if the folder name "tmp" exist in that directory you will get a php warning message if not no warning message, run it the second to get a warning message to be sure the first you ran it created the directory.

STEP 3

Now back to all your web application just include this php script ini_set('session.save_path',/var/chroot/home/content/65/4189965/tmp); 

on any where on your other script where you start a session .i.e session_start();

BINGO and you are good to go.

All you session variable are saved in the default tmp directory that was suppose to be specified on the php.ini.

Int he future if Godaddy rectify this you are still safe.

 

This worked for me like charm on godaddy after several support chat that couldnt help me. But Im migrating away from godaddy soon.

 

View solution in original post