Joomla!
http://forum.joomla.org/

unwriteable configuration.php file and unwriteable Session save path
http://forum.joomla.org/viewtopic.php?f=35&t=57553
Page 1 of 1

Author:  mkabwilliams [ Tue Apr 25, 2006 10:20 pm ]
Post subject:  unwriteable configuration.php file and unwriteable Session save path

I've got a godaddy.com virtual dedicated server. I have plesk and on it I can use the auto install to install mambo just fine but i want joomla. During the first part of the install of joomla I had a bunch of errors but I got them all fix except these ones. I've searched the forum but can't find the answer that will fix it.

First I get that the configuration.php is unwriteable. I've CMOD 777 the file  configuration.php-dist because its the only file i can find in the install pack that has configuration it it.

the other problem i get is that the Session Save path is unwriteable I've gone into my php.ini file and changed it to /var/tmp/ thinking that would fix it but it didn't I'm not sure if it needs to be /mydomain.com/var/tmp/ but that didn't work.

Author:  mkabwilliams [ Tue Apr 25, 2006 11:18 pm ]
Post subject:  Re: unwriteable configuration.php file and unwriteable Session save path

Well i figured out how to get to /var/lib/php/session and i set the session folder to 777 but its still getting that error on the joomla installer

Author:  DeanMarshall [ Tue Apr 25, 2006 11:32 pm ]
Post subject:  Re: unwriteable configuration.php file and unwriteable Session save path

configuration.php-dist is a sample configuration.php file that can be edited directly (and then renamed) as a last gasp solution if nothing else works.  It has little relevance to your situation unless nothing else works.

Firstly configuration.php will be created at the end of the installation routine - if all goes well.
You need to ensure that permissions on the containing folder are adequate, usually 755 is adequate, but with GoDaddy - who knows.

The session_save_path is a whole other can of worms.
Do you have access to php.ini ?  If you do, then you can edit the folder that is set as the session save path.
Failing that, do you have access to the folder currently designated as the session folder - it could be an ownership thing, or 777 may be explicitly disallowed try reducing the permissions slightly.

Other solutions to the session_save_path include setting it to a different folder via .htaccess, setting in httpd.conf (I think)
php_value session.save_path '/path/where/it/should/be'

Or setting the session_save_path in php early in the scripts execution.  I have advised people to do this in configuration.php (because it works) but this file is 'volatile' changes to the configuration lose the session_save_path setting.
session_save_path('/path/where/it/should/be');

Some hosts allow for the creation of 'local' php.ini files that can override the 'main' php.ini file.

Anyway you pays your money you takes your choice.

I believe that GoDaddy hosting has other issues - search the forum for 'GoDaddy issues' or 'GoDaddy problems' for more info.

Dean

Author:  lada [ Wed Apr 26, 2006 8:24 am ]
Post subject:  Re: unwriteable configuration.php file and unwriteable Session save path

Quote:

First I get that the configuration.php is unwriteable. I've CMOD 777 the file  configuration.php-dist because its the only file i can find in the install pack that has configuration it it.




Hi,

you can create an empty configuration.php for avoiding error messages.

Author:  karelkraai [ Tue May 09, 2006 3:57 pm ]
Post subject:  Re: unwriteable configuration.php file and unwriteable Session save path

I also get an unwriteable configuration.php file at the end of the installation script (the umpteenth - failed - installation attempt, I might add).

BUT in addition to that, the final page of the four=step scrip does not load at all.

After uploading to a directory on my server, I use the install script to install Joomla! 1.0.8.

Script runs pefectly, giving only one red light  (Register Globals = "on") all the way to Step 4, the last page of the browser setup script. There I get:

The XML page cannot be displayed
Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.


--------------------------------------------------------------------------------

Only one top level element is allowed in an XML document. Error processing resource 'http://www.MYSITE.org/Admin/instal...

Warning:  fopen(../configuration.php): failed to open stream: Permission denied in E:\home\Defau...

(And yes, the trailing dots are for real - so helpful!)

The result is that I have no record of what the installation script did to all the files and settings and. of course, I have no easy bit of script to copy and paste into the configuration.php

Any advice would be greatly appreciated.

Author:  DeanMarshall [ Tue May 09, 2006 4:08 pm ]
Post subject:  Re: unwriteable configuration.php file and unwriteable Session save path

That permission denied is fairly conclusive on the cause of the issue.
Try the installation again - but this time place an empty file called configuration.php in the joomla 'root' folder BEFORE you start the installation procedure.

Make sure that the public_html folder ( or whatever your webroot is called) has appropriate permissions.

BTW: if you get the invalid xml file - warning again you should still be able to click 'view -> source' in your browser - and thus see the full error message, as well as the data for pasting into your configuration.php file.

Dean

Author:  karelkraai [ Tue May 09, 2006 8:59 pm ]
Post subject:  Re: unwriteable configuration.php file and unwriteable Session save path

Thanks, Dean!

I created an empty configuration.php file in my php editor and uploaded to the root as you advised.

That worked, to some extent. The error(s) are becoming more specific now :-) There is no longer a corrupt XML file. The error (the entire source code of the page) reads:



Warning:  fopen(../configuration.php): failed to open stream: Permission denied in E:\home\Default\MYSITE\htdocs\Admin\installation\install4.php on line 214


So this time, she bombed out in line 214 of the install4.php file, which (apparently) tests whether configuration.php is writable.

It did not get round to compiling the page for Step 4 of the installation script, i.e. no code was generated that I can manually paste into configuration.php.

Now to find out how to make the configuration.php writable - from the number of reads on topics related to this - and the number of such topics on the forum, it seems that will be a daunting task.

Thanks again.

Author:  DeanMarshall [ Tue May 09, 2006 10:16 pm ]
Post subject:  Re: unwriteable configuration.php file and unwriteable Session save path

If this is IIS then you might find something useful here:
http://forum.joomla.org/index.php?topic=52721.0

I don't really understand permissions on IIS. The only other possibiilty is that Joomla gets its paths wrong because IIS has problems with environment variables such as the current working directory which scripts often use to locate files relative to their own location.

I am not sure I have much more to offer - sorry.
I hope someone can step in with something more specific.

Dean

Author:  karelkraai [ Wed May 10, 2006 6:18 am ]
Post subject:  Re: unwriteable configuration.php file and unwriteable Session save path

Thanks again, Dean,

No, the relative path from the location of the install script to the location of configuration.php is quite correct (even for windows).

Seems the solution is probably quite straight forward - the CHMOD permissions on the configuration file are set to 666 (ha-ha) but, according to various references on the forum (I spent three days reading those :-) that needs to be set to 777.

Now to get my host to either give me the permissions I need to set those permissions, or to change them for me. Since the host computer is about 10 time zones away from me, I'll have to wait for them to wake up :-). Then I'll be able to see if that works.

Author:  DeanMarshall [ Wed May 10, 2006 9:57 am ]
Post subject:  Re: unwriteable configuration.php file and unwriteable Session save path

As far as I know CHMOD doesn't exist on Windows.

This is what is throwing me.
The backslashes in paths (which are a windows thing) can cause havoc in programs.
They are best replaced with forward slashes.

If you do need to change permissions:
644 is usually okay for configuration.php

777 is sometimes required but this seems to only be when *Safe Mode* is
on - and safe mode brings its own issues.

You seem to be installing your whole site into a folder called 'Admin' is this correct?
Your Joomla site would be www..com/Admin/
Is this what you intend?

Dean

Author:  karelkraai [ Wed May 10, 2006 10:23 am ]
Post subject:  Re: unwriteable configuration.php file and unwriteable Session save path

Hi Dean,

Nope, CHMOD does indeed exist in Windows (at least in XP)

If permissions of 644 are suffiecient for configuration.php, I am greatly confused. The present permissions on the file are 666, and I nevertheless get the error.

Your conclusions about the install directory are correct. I have my present site in another directory, with a static page in root, pointing to the current site (about 300 static pages). When (if) I get Joomla! running in the Admin directory, I can simply direct visitors to it from the present page in root.

Author:  DeanMarshall [ Wed May 10, 2006 10:36 am ]
Post subject:  Re: unwriteable configuration.php file and unwriteable Session save path

I have absolutely no knowledge of CHMOD style permissions on Windows XP - the file system doesn't support any serious attempt at security.
Some of the later Windows Server OS's *may* have changed this - but I have no experience of this.

Permissions, where they are used, cascade down through the file tree.
Permissions will be inherited from the parent folder - and from its parent, etc.

Dean

Author:  karelkraai [ Fri May 12, 2006 11:52 am ]
Post subject:  Re: unwriteable configuration.php file and unwriteable Session save path

Hi Dean,

You are right - no CHMOD on Windows servers - seems they maintain the permissions the file was written with.

HOWEVER, I discovered the problem - FrontPage!

Seems that one has to disable FrontPage extensions on the site. They overrule whatever permissions your files have. Except FontPage Files, that is.

Thanks again for the comments and info

Author:  meedja [ Tue May 30, 2006 9:29 pm ]
Post subject:  Re: unwriteable configuration.php file and unwriteable Session save path

I've hit this several times at my hosting provider. Solution for me was to drop the attached text file into my root/joomla install folder as '.htaccess' and set the permissions of the parent directory to 777 (temporarily!)

Peter

Author:  oshun55 [ Tue May 30, 2006 10:08 pm ]
Post subject:  Re: unwriteable configuration.php file and unwriteable Session save path

DeanMarshall wrote:

The session_save_path is a whole other can of worms.
Do you have access to php.ini ?  If you do, then you can edit the folder that is set as the session save path.

Dean


This may be my last hope as nothing else works. I do have access to php.ini. Should I just create a new folder, titled "anything I want" and have it point there??

Author:  DeanMarshall [ Tue May 30, 2006 11:58 pm ]
Post subject:  Re: unwriteable configuration.php file and unwriteable Session save path

oshun55 wrote:
This may be my last hope as nothing else works. I do have access to php.ini. Should I just create a new folder, titled "anything I want" and have it point there??

For those with access to php.ini - this is indeed the best course of action.
Next best is .htaccess
Last ditch is the session_save_path('/path/to/some/folder'); command in php.

Dean

Author:  phobuz [ Tue Nov 27, 2007 8:23 am ]
Post subject:  Re: unwriteable configuration.php file and unwriteable Session save path

I am using Windows and I had the session save path problem.

In php.ini, session.save_path defaults to "/tmp" so I thought setting session.save_path in php.ini wouldn't work.  I set the session_save_path('/path/where/it/should/be'); in configuration.php and it worked.  However, one month later I changed Time Offset in Site->Global Configuration->Locale and I couldn't log into the Administration Console. I got confused when I couldn't login that I reinstalled Joomla. It took me 2 hours before I figured out what really went wrong.

What happened was the system overwrote configuration.php when I changed the Time Offset so the session_save_path setting was gone. As Dean points out, configuration.php is very volatile so it is best not to rely on it.

So I was determined to make it work with php.ini.  What I found was that on Windows, relative path values do not work for session.save_path in php.ini.  I tried "/tmp", "./tmp", "\tmp" and ".\tmp" and they all didn't work and gave me the "Invalid Session" error when I tried to login into the Administration Console.  I then set session.save_path to "C:\Windows\Temp."  And just like magic, it worked.

Page 1 of 1 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/