Re: Errors

From: Date: Sun, 19 Aug 2001 19:42:28 +0000
Subject: Re: Errors
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-63411@lists.php.net to get a copy of this message
Well, since you're getting a PHP error, PHP is obviously parsing the page. My guess is that your error reporting (in php.ini, httpd.conf or .htaccess) is set very high, so that uninitialized variables generate a warning. You could either (1) initialize $page at the top of your program: $page = false; or (2) lower the warning level: http://www.php.net/manual/en/features.error-handling.php http://www.php.net/manual/en/configuration.php http://www.php.net/manual/en/ref.errorfunc.php If $page is coming from somewhere else (eg; GET/POST parameters) then you can test for its existence like so: if (!isset($page)) { $page = false; } or $page = 0...whatever's appropriate. -steve At 4:45 PM +0200 8/19/01, BRACK wrote:
Hi I'm getting strange errors if I add "LoadModule php4_module ../php/sapi/php4apache.dll" to http.conf If I don't load it everything is working with php.exe without any errors but as I load it as a modul I get for example - Warning: Undefined variable: page in d:\abria sql\apache\htdocs\inc\page.inc on line 2 here is the page.inc file: <?php  if (!$page):
    $page = 1;
endif; $limit = ($page * 10) - 10; ?> What is wrong? I need php as a modul but what do I do wrong, I did everything according to install.txt in php directory. Thank you Youri <>< <>< <>< <>< God is our provider ><> ><> ><> ><> http://www.body-builders.org
-- +------------------------ Open source questions? ------------------------+ | Steve Edberg University of California, Davis | | sbedberg@ucdavis.edu Computer Consultant | | http://aesric.ucdavis.edu/ http://pgfsun.ucdavis.edu/ | +----------- http://pgfsun.ucdavis.edu/open-source-tools.html -----------+

« previous php.general (#63411) next »