Path Problems

From phpCMS

Jump to: navigation, search

[edit] Solving Path Problems

When phpCMS is started it tries to find out automatically in which subdirectory it is installed. On most servers this works fine, but on some servers this auto-detection might fail because of some special environment settings phpCMS can't handle. This problem can be seen often when php is running inside a CGI-wrapper etc. pp.

Also when the website runs under other webservers than the Apache phpCMS might not be able to determine the correct subdirectory.

But the automatic detection can be bypassed and the subdirectory can be set manually in the configuration file of phpCMS.

Edit the file parser/include/default.php and search for the lines

 $this->DOCUMENT_ROOT = $PHP->GetDocRoot();
 $this->SCRIPT_PATH = $PHP->GetScriptPath();
 $this->SCRIPT_NAME = $PHP->GetScriptName();

Change these lines to

 $this->DOCUMENT_ROOT = '/web/mydomain.com/htdocs/';
 $this->SCRIPT_PATH = '/subdirectory/parser';
 $this->SCRIPT_NAME = 'parser.php';

where

$DEFAULTS->DOCUMENT_ROOT is the path in the filesystem to the directory which is accessed when http://www.mydomain.com/ is called

$DEFAULTS->SCRIPT_PATH is the path from the document root to the directory where the phpCMS parser is installed (starting with "/")

and

$DEFAULTS->SCRIPT_NAME is the filename of the phpCMS parser (which is parser.php if you not renamed this file manually).

These three variables concatenated together are

 /home/foobar/public_html/subdirectory/parser/parser.php

which should be the complete path to the parser in the filesystem.


Main Page: Tutorials MainPage | Top Page: MiniHowTos MainPage

Diese Seite in anderen Sprachen: Deutsch

Personal tools