|
|||||||
![]() |
|
|
Thread Tools | Search this Thread | Display Modes |
|
|
#1 |
![]() Join Date: Dec 2004
Location: College Station, TX
Posts: 1
![]() |
Title: Fixing session save path
For: Mambo Set Up on Local Testing Server (details below) ****************************************** My Local Computer Details: Operating System: Windows 2000 PHP Version 4.3.9 ...obtained from "phpinfo();" ... in index.php file in local root server directory: System Windows NT COMPUTERNAME 5.0 build 2195 Build Date Sep 21 2004 14:03:10 Server API Apache 2.0 Handler Virtual Directory Support enabled Configuration File (php.ini) Path C:\WINNT PHP API 20020918 PHP Extension 20020429 Zend Extension 20021010 Debug Build no Thread Safety enabled Registered PHP Streams php, http, ftp, compress.zlib Apache System: Apache/2.0.52 (Win32) ****************************************** Problem: On Mambo Web Installer Screen (index.php) displayed for session save path: Session save path Not set, unwriteable ****************************************** Solution: For my local testing server setup as indicated above, I used the all default Apache and PHP install settings for the versions listed. Please note, I am also using Windows 2000 OS. --------------------------------------------------------------- 1. Find out where your temp directory is for your windows account. Go to Start->Run. In the run field, enter: %temp% A new explorer window should open revealing your temp directory for your windows user's account. If you can't see the full path in the address bar of this new explorer window, go to: Tools->Folder Options… The Folder Options window should open. Click on the 'View' tab. From the list, choose: Display the full path in the address bar Hit 'Apply' and then 'Ok' to close the Folder Options window. The full path to your temp directory should be displayed in your address bar of the Temp explorer window. --------------------------------------------------------------- 2. Create a folder in your Temp directory called: Mambo --------------------------------------------------------------- 3. Open Mambo file by double-clicking on new folder. The full path in the address bar should now show something similar to this: C:\Documents and Settings\username\Local Settings\Temp\Mambo --------------------------------------------------------------- 4. Copy the path. We will paste this later. --------------------------------------------------------------- 5. To get this to work on my computer with the above settings, I had to add a line of code to the bottom of my httpd.conf file. My httpd.conf file was located here: C:\Program Files\Apache Group\Apache2\conf !!!!Back up this file before making any changes to the original. I called my back up file: httpd-backup.conf Open httpd.conf, and scroll to the bottom of the file. Add this line of code: php_value session.save_path "C:\Documents and Settings\username\Local Settings\Temp\Mambo" ***Note: To further explain this line of code….. There are 3 values separated, each separated by one space!!!! php_value session.save_path and the path to my temp mambo directory, that I created above enclosed in double quotes: "C:\Documents and Settings\username\Local Settings\Temp\Mambo" --------------------------------------------------------------- 7. Save httpd.conf file and close. --------------------------------------------------------------- 8. Stop Apache and Start Apache. I use the Apache Service Monitor app which can be opened by double clicking on the Apache Service Monitor icon in my system tray (lower right hand side of the screen)…to stop and start my local Apache server. --------------------------------------------------------------- 9. Open your Mambo Web Installation Screen (be sure to reload this page) and check to see if session save path can write to the above temp directory. Mine displayed the following: Session save path C:\Documents and Settings\username\Local Settings\Temp\Mambo, Writeable --------------------------------------------------------------- Hope this helped with your session save path problems. If you can't get this to work, I apologize. This fix was only specific to my set up. Please try at least once more if you have a similar testing set up. If not, then do a search for "session save path" in the Mambo forums: http://forum.mamboserver.com/ Thanks and gig' em! Treye Rice :-D |
|
|
|
|
|
#2 |
![]() Join Date: Jan 2005
Posts: 2
![]() |
dude...your the MAN. thanks you soooo much for posting such a good fix for this problem. members like you are what make community forums work so good, and insure that open source software is here to stay. again....your my own personal jesus christ.
|
|
|
|
|
|
#3 |
![]() Join Date: Feb 2005
Posts: 1
![]() |
I had a same problem and did what u said.... but after that I cant open any file as on localhost... connection refused!!
any ideas?...I'm running Win XPSP2 , on standalone Vertigo (PHP+MySQL+Appache) server and was able to run Wordpress before trying this. If u have any ideas please reply , its kinda urgent! Any help greatly appreciated * Apache 1.3.33 * PHP 5.0.3 * MySQL 4.1.9 * PhpMyAdmin 2.6.1 * ZendOptimizer 2.5.7 |
|
|
|
|
|
#4 |
![]() Join Date: Feb 2005
Posts: 1
![]() |
Yeah man, thanx for that info. :-D Well done
|
|
|
|
|
|
#5 |
![]() Join Date: Jan 2004
Posts: 1
![]() |
This is awesome... I did what you said and it worked absolutly fine on my local system...
Thanks a bunch - HS - |
|
|
|
|
|
#6 |
![]() Join Date: Feb 2005
Posts: 2
![]() |
Hey, I don't normally like to post a "me, too" post, but not only did your instructions work, they are very well-written -- so I think I will (indulge me, please!).
Thanks for not only contributing, but for doing so in a manner that makes it very easy to follow. Best regards, Tom |
|
|
|
|
|
#7 |
![]() Join Date: Feb 2005
Posts: 1
![]() |
Hello:
First, Treye's post was excellent and really helped me out. It is responsible for my finding an additional solution. Thank you for the great detail and information. Here's what I found: ======================== SLIGHTLY DIFFERENT MESSAGE: ======================== The error message I received was slightly different than the one described in the initial post. Mine said: Session save path ".;C:\Program Files\apachefriends\xampp\tmp" unwriteable instead of Session save path Not set, unwriteable So my 'path' was set, but to something invalid. ======== SOLUTION: ======== Summary: As I was reading through treye's post with a friend of mine, we noticed that it the essence of the problem seems to be the lack of the PHP component's ability to validate the 'session save path' variable. Then we checked out the active PHP.ini file, and sure enough, there is an entry in it for this variable. The entry contains a comment that indicates it must be changed for windows users. The entry does not contain instructions on what to change, but further searching helped clarify that the leading .; must be removed, and the backslashes changed to forward slashes (and of course the whole statement has to reflect a real location on the computer). **Modifying the session.save_path entry in php.ini to a properly "windows formatted" and valid temp folder path solved the problem.** INFO: My webserver is currently the integrated XAMPP system, version 1.4.11 with PHP 5.0.3 active. System Windows NT 5.1 build 2600 Server API Apache 2.0 Handler Virtual Directory Support enabled PHP API 20031224 PHP Extension 20041030 Zend Extension 220040412 Debug Build no Thread Safety enabled IPv6 Support enabled Registered PHP Streams php, file, http, ftp, compress.zlib, https, ftps Registered Stream Socket Transports tcp, udp, ssl, sslv3, sslv2, tls Details: Here is the original entry from my "active" php.ini file. ***I located the active php file by checking phpInfo(), which, in XAMPP web-gui is a simple link. My web installation has 3 or 4 copies of php.ini stashed away in different places. ; Argument passed to save_handler. In the case of files, this is the pathAnd here is the modification I made: ; Argument passed to save_handler. In the case of files, this is the pathI removed the .; from the head of the value, and switched the backslashes to forward slashes. This was suggested by an article found in a search for php session variable formatting on the web by my friend Felipe (sorry I do not have the exact reference anymore). Because the specified path in my file is an actual valid folder on my dev machine (with appropriate write permissions), saving this change and restarting the web server fixed the problem and I opted to use this folder. If you want to set the temp directory for php to be equal to the temp directory of the logged on user, a very wise idea incorporated in treye's initial post, then try this: 1) Follow steps 1 - 4 of the original post to get the path to the existing user's temp directory copied into the clip board. 2) Locate yor active php.ini file ..phpInfo() will tell you where it is if you are not sure. 3) Backup, then edit php.ini 4) Search for 'session.save'. 5) Alter the original value to reflect the new path by pasting in the clipboard value...like this: session.save_path= "[your pasted path here]"***using the path from the original post example, you would get: session.save_path= "C:\Documents and Settings\username\Local Settings\Temp\Mambo"now flip the backslashes, so the entry becomes (using same example) session.save_path= "C:/Documents and Settings/username/Local Settings/Temp/Mambo" 6. Save the file and restart the web server. I hope this helps someone as much as the original post helped me. Thanks !! -Mike p.s. - thanks to super guru Felipe Vidal for helping with background searches and general info on this one. |
|
|
|
|
|
#8 |
![]() Join Date: Mar 2005
Location: USA
Posts: 1
![]() |
Man, you rock. I had exactly same problem
Session save path Not set, unwriteable and your instructions helped me so much. Very easy to follow and what is most important, it worked for me. Thanks a lot. Tigerasya |
|
|
|
|
|
#9 |
![]() Join Date: Mar 2005
Posts: 3
![]() |
I'm using webspace for mambo so i can't change anything in the webserver...
PHP version >= 4.1.0 Yes - zlib compression support Available - XML support Available - MySQL support Available configuration.php Writeable Session save path /raid/tmp/httpd, Unwriteable on another webspace I have, are other probs, but the path is only /tmp why is it so complex like raid....? how can i change? |
|
|
|
|
|
#10 |
![]() Join Date: Feb 2005
Posts: 8
![]() |
I'm learning a bit from you all, thanks! I'm trying to figure out how to set the session.save_path for my Mambo install. The issue is that I'm on a shared host and need to edit my mambo.php file and set it there. I can't change the httpd.conf or php.ini stuff.
Server is Mambo 4.5.2.1 on Linux. PHP 4.10. |
|
|
|
|
|
#11 |
![]() Join Date: Mar 2005
Posts: 1
![]() |
I have the exact same problem with my host, where I can't edit the php.ini.
Any tips would be extremely welcome please. |
|
|
|
|
|
#12 |
![]() Join Date: Apr 2005
Posts: 3
![]() |
thanks again for your support man, you are greatest
![]() |
|
|
|
|
|
#13 |
![]() Join Date: Apr 2005
Posts: 15
![]() |
can you say this in more simplier words, i dont know where you guys are looking ...
|
|
|
|
|
|
#14 |
![]() Join Date: Apr 2005
Posts: 15
![]() |
well i did a search of my computer and i have 11 different php.ini files which ones am i suppose to be changing and what am i suppose to be changing it to...i tried both ways...still nothin i'm using xampp too my hosting is e2u.cc its not on my computer does tha matter? i dont know what a server does anyhow. |
|
|
|
|
|
#15 |
![]() Join Date: May 2005
Posts: 75
![]() |
With more people like treye, the world can be a much better place!
Worked just as it said it will on my system. So if you're working on a: WinXP Pro (SP2) Apache 2.0 PHP 5 then it will most probably work for you ![]() |
|
|
|
|
|
#16 |
![]() Join Date: Aug 2005
Posts: 6
![]() |
I just installed Mambo under Linux/Apache and it was a breeze except for this message about my session save path being unwriteable.
I'm using web space for my site and can't alter my php.ini so I tried ignoring the message and carrying on with the install and found that everything works. Except that it runs like a dog. About 8 seconds per page (and yes, I am on broadband; very broad). Could the two be connected? Allen |
|
|
|
|
|
#17 |
![]() Join Date: Aug 2005
Posts: 2
![]() |
i've tried so many times but still get unwriteable in session.save_path ...anybody help me to check my php.ini.....i'm very new in this...i'm using Mac OSX...
[Session] ; Handler used to store/retrieve data. session.save_handler = files ; Argument passed to save_handler. In the case of files, this is the path ; where data files are stored. Note: Windows users have to change this ; variable in order to use PHP's session functions. ; As of PHP 4.0.1, you can define the path as: ; session.save_path = "N;/path" ; where N is an integer. Instead of storing all the session files in ; /path, what this will do is use subdirectories N-levels deep, and ; store the session data in those directories. This is useful if you ; or your OS have problems with lots of files in one directory, and is ; a more efficient layout for servers that handle lots of sessions. ; NOTE 1: PHP will not create this directory structure automatically. ; You can use the script in the ext/session dir for that purpose. ; NOTE 2: See the section on garbage collection below if you choose to ; use subdirectories for session storage session.save_path = "/Users/gizmoo/Sites/mambo/tmp" ; Whether to use cookies. session.use_cookies = 1 ; This option enables administrators to make their users invulnerable to ; attacks which involve passing session ids in URLs; defaults to 0. ; session.use_only_cookies = 1 ; Name of the session (used as cookie name). session.name = PHPSESSID ; Initialize session on request startup. session.auto_start = 0 ; Lifetime in seconds of cookie or, if 0, until browser is restarted. session.cookie_lifetime = 0 Regards, Gizmoo ![]() |
|
|
|
|
|
#18 |
![]() Join Date: Aug 2005
Posts: 6
![]() |
Maybe there's another way to solve this problem.
I have installed Mambo but it runs like a dog and I'm guessing that's to do with the "writability" of session.save_path. If creating our own PHP.INI files is too hard, is there a place in Mambo that we can add a line reassigning session.save_path? I'd love to use this CMS and I've been very impressed by the other 99% of it. BUT... |
|
|
|
|
|
#19 |
![]() Join Date: Sep 2005
Posts: 5
![]() |
I too am experiencing extreme difficulties in installing Mambo on my shared Windows host platform. The tips I seem to find, all relate to installng a a localhost
My session save path is unwriteable, I cant access php.ini....etc tec How do I get MamBo to insatall on a shared host? Any help would be gratefully accepted. |
|
|
|
|
|
#20 |
![]() Join Date: May 2005
Posts: 33
![]() |
Fixing session.save_path from within mambo can be done, but you have to modify 3 files :
1 - Create an appropriate folder (using ftp if remote host) : For example: /home/www/myaccount/www.mysite.com/sessions 2 - in files administrator/index.php, administrator/index2.php and administrator/index3.php, add the following line : //Change for session.save_path ini_set("session.save_path","/home/www/myaccount/www.mysite.com/sessions"); just after the line: require_once( '../configuration.php' ); That's about it. I have not done it, but I assume that if you are running windows, just use the regular Windows syntax ( ie : "c:\WAMP\www\Mysite\sessions" for example) That should fix it
__________________
www.holiform.com, diététique et mieux-être à Bordeaux |
|
|
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|