aeroswat Posted April 19, 2010 Share Posted April 19, 2010 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 is that right? It just started happening Quote Link to comment https://forums.phpfreaks.com/topic/199007-from-what-im-reading-this-is-a-problem-with-my-host/ Share on other sites More sharing options...
teamatomic Posted April 19, 2010 Share Posted April 19, 2010 Sounds like something your host did caused the problem. Most likely due to an upgrade. If you have your own php.ini file just set it to a folder the same level as your document root and see what happens. If it does work just remember to do some garbage collection. HTH Teamatomic Quote Link to comment https://forums.phpfreaks.com/topic/199007-from-what-im-reading-this-is-a-problem-with-my-host/#findComment-1044581 Share on other sites More sharing options...
aeroswat Posted April 19, 2010 Author Share Posted April 19, 2010 Sounds like something your host did caused the problem. Most likely due to an upgrade. If you have your own php.ini file just set it to a folder the same level as your document root and see what happens. If it does work just remember to do some garbage collection. HTH Teamatomic Unfortunately I don't believe they allow support for our own php ini's on the free hosting :/ Otherwise I would do that. I'm having a hell of a time with my sessions on this server. Anyone very familiar with 000webhost? Or do they have an idea for a better webhost out there that is free? Quote Link to comment https://forums.phpfreaks.com/topic/199007-from-what-im-reading-this-is-a-problem-with-my-host/#findComment-1044582 Share on other sites More sharing options...
teamatomic Posted April 19, 2010 Share Posted April 19, 2010 Set up a folder the ntry something like this: ini_set('session.gc_maxlifetime', '10800'); ini_set('session.gc_divisor', '1'); ini_set('session.gc_probability', '1'); ini_set('session.cookie_lifetime', '0'); ini_set('session.save_path', /path/to/sessions/app_name); session_name('app_name'); session_start(); HTH Teamatomic Quote Link to comment https://forums.phpfreaks.com/topic/199007-from-what-im-reading-this-is-a-problem-with-my-host/#findComment-1044597 Share on other sites More sharing options...
aeroswat Posted April 19, 2010 Author Share Posted April 19, 2010 Set up a folder the ntry something like this: ini_set('session.gc_maxlifetime', '10800'); ini_set('session.gc_divisor', '1'); ini_set('session.gc_probability', '1'); ini_set('session.cookie_lifetime', '0'); ini_set('session.save_path', /path/to/sessions/app_name); session_name('app_name'); session_start(); HTH Teamatomic ini_set = disabled Quote Link to comment https://forums.phpfreaks.com/topic/199007-from-what-im-reading-this-is-a-problem-with-my-host/#findComment-1044600 Share on other sites More sharing options...
aeroswat Posted April 19, 2010 Author Share Posted April 19, 2010 So does anyone have recommendations for a free host that has at least 2 mysql databases, good bandwidth, decent storage space and the ability for me to either use ini_set or create my own ini file Quote Link to comment https://forums.phpfreaks.com/topic/199007-from-what-im-reading-this-is-a-problem-with-my-host/#findComment-1044667 Share on other sites More sharing options...
taquitosensei Posted April 19, 2010 Share Posted April 19, 2010 I think you might be getting a bit picky for free hosting. Hostmonster is cheap hosting. $4.95 a month. Has everything you're after. They're who I use. Quote Link to comment https://forums.phpfreaks.com/topic/199007-from-what-im-reading-this-is-a-problem-with-my-host/#findComment-1044674 Share on other sites More sharing options...
aeroswat Posted April 19, 2010 Author Share Posted April 19, 2010 I think you might be getting a bit picky for free hosting. Hostmonster is cheap hosting. $4.95 a month. Has everything you're after. They're who I use. I just need something that's temporary so everything works before we convert. This is for my organization and our hands are tied because most places that offer worthwhile hosting do not accept purchase orders. I certainly am not shelling out my own $$ for hosting for them either. Thanks for the advice but it has to be free. Quote Link to comment https://forums.phpfreaks.com/topic/199007-from-what-im-reading-this-is-a-problem-with-my-host/#findComment-1044677 Share on other sites More sharing options...
aeroswat Posted April 19, 2010 Author Share Posted April 19, 2010 So I used this code on 000 webhost just for sh**s and giggles to see if they were telling the truth... <?php session_save_path("/home/a1925824/sessions"); ini_set("session.gc_maxlifetime", 47000); ini_set("session.gc_probability", 100); session_start(); $session_life = ini_get("session.gc_maxlifetime"); $session_path = session_save_path(); echo $session_life . "<br />"; echo $session_path; ?> and it outputs 47000 and /home/a1925824/sessions! This should mean that I do in fact have access to the ini_set function! Does that necessarily mean that my changes are permanent tho? Also I have never done this before but I have read about it... is it possible to create my own php ini file to override the settings in their php ini for my site only? That way I wouldn't have to set the path/lifetime/etc everytime i start a session. If so does anyone know of a good tutorial page on how to do this? Quote Link to comment https://forums.phpfreaks.com/topic/199007-from-what-im-reading-this-is-a-problem-with-my-host/#findComment-1044750 Share on other sites More sharing options...
taquitosensei Posted April 19, 2010 Share Posted April 19, 2010 ini_set is for the script you're running. Definitely not permanent. The only way to know for sure if a custom php.ini will work is to try it. Copy a php.ini from somewhere else to your root, change a couple of things then use ini_get to get the values and see if it shows your changes. Quote Link to comment https://forums.phpfreaks.com/topic/199007-from-what-im-reading-this-is-a-problem-with-my-host/#findComment-1044770 Share on other sites More sharing options...
aeroswat Posted April 19, 2010 Author Share Posted April 19, 2010 ini_set is for the script you're running. Definitely not permanent. The only way to know for sure if a custom php.ini will work is to try it. Copy a php.ini from somewhere else to your root, change a couple of things then use ini_get to get the values and see if it shows your changes. K i will try that. I was reading that it inherits all the settings of the global ini. Does that mean that I can remove everything in there except what I am changing and it should inherit the rest? Quote Link to comment https://forums.phpfreaks.com/topic/199007-from-what-im-reading-this-is-a-problem-with-my-host/#findComment-1044775 Share on other sites More sharing options...
aeroswat Posted April 19, 2010 Author Share Posted April 19, 2010 Ok I have tried uploading a php ini file with the following entered into it in both the folder that is outside the public_html which is my highest level directory I can access and my public_html folder. Neither will change the values when I use the aforementioned functions. [code=php:0] [session] session.save_path = "/home/a1925824/sessions" session.gc_probability = 1 session.gc_divisor = 1000 session.gc_maxlifetime = 45000 Quote Link to comment https://forums.phpfreaks.com/topic/199007-from-what-im-reading-this-is-a-problem-with-my-host/#findComment-1044786 Share on other sites More sharing options...
PFMaBiSmAd Posted April 19, 2010 Share Posted April 19, 2010 So have you even asked your web host about fixing the default session.save_path setting or if you can use a local php.ini (some times it is named something else) or if you can use a .htaccess file for php settings (requires php to be running as an Apache Module)? Edit: And based on the 000webhost FAQ's that I just read, if you can set the php settings in question, you do it in a .htaccess file using php_flag or php_value statements. Quote Link to comment https://forums.phpfreaks.com/topic/199007-from-what-im-reading-this-is-a-problem-with-my-host/#findComment-1044788 Share on other sites More sharing options...
aeroswat Posted April 19, 2010 Author Share Posted April 19, 2010 So have you even asked your web host about fixing the default session.save_path setting or if you can use a local php.ini (some times it is named something else) or if you can use a .htaccess file for php settings (requires php to be running as an Apache Module)? Edit: And based on the 000webhost FAQ's that I just read, if you can set the php settings in question, you do it in a .htaccess file using php_flag or php_value statements. Yes I have before :/ They don't do a very good job of answering questions >< Sorry I've never handled my own installation of php before and I am fairly new to the language. I've never done this stuff before. I'll look into the php_flag/php_value. Could I put that in an htaccess on my public_html folder? Quote Link to comment https://forums.phpfreaks.com/topic/199007-from-what-im-reading-this-is-a-problem-with-my-host/#findComment-1044796 Share on other sites More sharing options...
aeroswat Posted April 19, 2010 Author Share Posted April 19, 2010 Got it! They do accept that! Thanks a million I placed it in my public_html folder and put the following inside of it php_value session.gc_maxlifetime 21600 php_value session.save_path /home/a1925824/sessions php_value session.gc_probability 100 Thanks everyone that helped me out Quote Link to comment https://forums.phpfreaks.com/topic/199007-from-what-im-reading-this-is-a-problem-with-my-host/#findComment-1044825 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.