DOCUMENT ROOT in Config / Setup - Poss Error and Solution

Get help with installation and running phpwcms here. Please do not post bug reports or feature requests here.
Post Reply
jsavage
Posts: 44
Joined: Sun 2. May 2004, 18:40

DOCUMENT ROOT in Config / Setup - Poss Error and Solution

Post by jsavage »

I think there is an error in the Config Script and the associated setup script. This may explain why a number of people have trouble with configuration. Let me explain the problem I was having and the solution. Even if this is only relevant to some hosted servers this will hopefuly make it easier for some to end up with a working configuration somewhat quicker.

I have spent much of the last 24 hours trying to set up DEV 123 on a new server my hosting company has just launched and at every step there seems to have been a problem not all the fault of phpwcms! All the more frustrating since I have already have 2 instances phpwcms working on my other hosted platform for some time. See recents posts for myself for some of the background - error messages and the like.

Anyway, the problem seemed to all boil down to the DOCUMENT_ROOT not being set correctly. All along I have been putting in the correct info but the error messages all indicated that the root was wrong. The reason turns out to be that the directives in the config file are in the wrong order.

It turns out that the following line is in the wrong place:

Code: Select all

$_SERVER['DOCUMENT_ROOT']     = '/files/home1/hp225tj';
It shoud be placed near the top and specifically before the phpwcms document root is set using

Code: Select all

$phpwcms['DOC_ROOT']          = $_SERVER['DOCUMENT_ROOT'];

This mod, has resolved all my current issues in 3 separate instances on two different servers.

Hope this helps someone else. If others who understand phpwcms agree with my analysis could I please ask that they promote this to a BUG and get a solution into the DEV version as soon as possible.

Thanks to all especially OG for a great product ( although for a few hours yesterday I was begining to think my enthusiasm may have been misplaced!)

James
earmonkey
Posts: 3
Joined: Thu 7. Oct 2004, 22:10

Post by earmonkey »

Thank you so much
Marko
Posts: 65
Joined: Tue 2. Dec 2003, 23:58
Location: Finland

Post by Marko »

Hi there,

I had this same problem but I managed to get my paths working. Still I learnt that dev-version made my site much slower and it kept giving me this weird internal server error message every now and then.

Fortunately I backed up my old site and went back to the old release. Well, they say: "don't fix it if it isn't broken", but I still had to try. :)

If you come up with this kind of behavior and find a solution, please keep us updated. In a mean time I'll be waiting for the next stable release.
Marko
Posts: 65
Joined: Tue 2. Dec 2003, 23:58
Location: Finland

Post by Marko »

Got it working. Trick I did was to run setup.php once again and leave path to my php-ini blank. Have no idea why but it worked. It still seems a bit slow, but I quess cache is doing what it is supposed to do, bacause cached pages a fastening up... :)
Pappnase

Post by Pappnase »

Marko wrote:Got it working. Trick I did was to run setup.php once again and leave path to my php-ini blank. Have no idea why but it worked. It still seems a bit slow, but I quess cache is doing what it is supposed to do, bacause cached pages a fastening up... :)
hello

sorry but did i miss something!? where is in the setup routine an path to the php.ini!?
Marko
Posts: 65
Joined: Tue 2. Dec 2003, 23:58
Location: Finland

Post by Marko »

It was about 6.00 am when I wrote my last one, my bad! I ment phpwcms-root dir, which pointed to php-bin directory by default, but after I changed it to none it started to work. (Have no idea where that php-bin-directory came from though).
Post Reply