From: Martin G. <gim...@gi...> - 2002-11-19 22:10:19
|
Hi everybody My provider upgraded to PHP 4.2.3 some time ago, and that broke PhpWiki with errors like this: lib/FileFinder.php:161: Warning[2]: SAFE MODE Restriction in effect. The script whose uid is 1332 is not allowed to access /usr/local/lib/php owned by uid 0 Line 161 corresponded to the 'elseif (file_exists("$dir/$file"))' line in _search() in FileFinder.php. I've now "solved" the problem my putting a '@' in front of the file_exists() call to suppress the warnings. The strange thing is, that I dont' get these warnings on my local server (running PHP 4.2.3 in Safe Mode)... I also don't understand why it's necessary for PhpWiki to search for PEAR files - doesn't PhpWiki provide it's own? Or is it done in the hope that a newer version is installed on the server? Oh, and then there was this little thing in stdlib.php where $i goes beyond the end of the array: Index: stdlib.php =================================================================== RCS file: /cvsroot/phpwiki/phpwiki/lib/stdlib.php,v retrieving revision 1.130 diff -u -3 -r1.130 stdlib.php --- stdlib.php 19 Oct 2002 21:04:58 -0000 1.130 +++ stdlib.php 19 Nov 2002 22:05:10 -0000 @@ -1089,7 +1089,7 @@ $list = explode(',',$input); // expand wildcards from list of $allnames if (preg_match('/[\?\*]/',$input)) { - for ($i = 0; $i <= sizeof($list); $i++) { + for ($i = 0; $i < sizeof($list); $i++) { $f = $list[$i]; if (preg_match('/[\?\*]/',$f)) { reset($allnames); -- Martin Geisler My GnuPG Key: 0xF7F6B57B See http://gimpster.com/ and http://phpweather.net/ for: PHP Weather => Shows the current weather on your webpage and PHP Shell => A telnet-connection (almost :-) in a PHP page. |