Hi,
Es sind alle Pfadangaben rot......
Hast du denn auch die /setup/setup.conf.inc.php nach /config/phpwcms/conf.inc.php kopiert?
Hier die Datei document_root.php (War, glaube ich bis 1.2.6 dabei).
Aber bitte nach den Tests wieder aus dem Root-Verzeichnis entfernen.
Weslhalb installierst du nicht die 1.33 ????
Code: Select all
<?php
/*************************************************************************************
Copyright notice
(c) 2002-2003 Oliver Georgi (oliver@phpwcms.de) // All rights reserved.
This script is part of PHPWCMS. The PHPWCMS web content management system is
free software; you can redistribute it and/or modify it under the terms of
the GNU General Public License as published by the Free Software Foundation;
either version 2 of the License, or (at your option) any later version.
The GNU General Public License can be found at http://www.gnu.org/copyleft/gpl.html
A copy is found in the textfile GPL.txt and important notices to the license
from the author is found in LICENSE.txt distributed with these scripts.
This script is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE. See the GNU General Public License for more details.
This copyright notice MUST APPEAR in all copies of the script!
*************************************************************************************/
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>phpwcms DOCUMENT_ROOT test</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><style type="text/css">
<!--
body,td,th {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
color: #000000;
}
body { background-color: #FFFFFF;}
h1 {font-size: 24px;}
h2 {font-size: 21px;}
pre {font-size: 14px;}
-->
</style></head>
<body>
<h2>phpwcms DOCUMENT_ROOT test</h2>
<p>This file has to be placed in your web root - do not <br>put it into any subdir of your webspace</p>
<?php
$doc_root = str_replace("\\", '/', $_SERVER['DOCUMENT_ROOT']);
echo "<pre>";
echo '1) your default $_SERVER[\'DOCUMENT_ROOT\']: <span style="color:#009933">'.$doc_root;
echo "</span>\n";
echo '2) real DOCUMENT_ROOT based on this file : <span style="color:#CC3300">';
$path = preg_replace('/(.*)[\/|\\\].(.*)/', '$1', $_SERVER['PATH_TRANSLATED']);
echo $path;
echo "</span></pre>";
?>
If <strong>(1)</strong> and <strong>(2)</strong> not equal then add following<br>
line at the end of your <strong>conf.inc.php</strong> but before ending "?>":
<pre style="color:#CC3300">
$_SERVER['DOCUMENT_ROOT'] = '<?php echo $path ?>';
</pre>
Check if this is corresponding with the subdir<br>
in which phpwcms is installed:
<pre style="color:#CC3300">$phpwcms['root'] = "<?php
$subdir = str_replace($doc_root, '', $path);
if(trim($subdir)) {
echo preg_replace('/^\/(.*)/', '$1', $subdir);
}
?>";</pre>
If so - everything is fine too, also if this is empty.<br>
Maybe some leading/ending slash "/" is there.<br>
That's no problem here, but remove leading or<br>
ending slashes.
Do never use the backslash "\"<br>
in paths on Windows - this may fail.
<hr size="1" noshade>
<span style="font-size:11px">Copyright © 2004 Oliver
Georgi, <a href="http://www.phpwcms.de">http://www.phpwcms.de</a></span>
</body>
</html>
Gruß Knut