I'm not a PHP coder, but I have an application written in PHP (CMS Made
Simple) that stopped working when I upgraded postgres to 9.x. I seem to have
most of the problems fixed (those with adodb_lite) but now need to track
down why I get a "404 Page Not Found" error when I try to invoke the local
application. BTW, I'm running php-5.2.17 on Slackware-13.1.

  Running 'php index.php' from the application subdirectory to the document
root directory, I learn the code to search in the directory structure. It
turns out to be misc.functions.php, and the specific function in that file
is ErrorHandler404(). However, I have not been able to trace execution to
learn just where this function is being called.

  Looking at the PHP manual I see there's a function called
debug_print_backtrace(), but I have not found how to properly use it. When I
insert it at the top of ErrorHandler404(), php throws an error when I try to
run index.php:

function ErrorHandler404()
{
  debug_print_backtrace()
        #if ($errno == E_USER_WARNING) {
                @ob_end_clean();
                header("HTTP/1.0 404 Not Found");
                header("Status: 404 Not Found");
                echo '<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>404 Not Found</title>
</head><body>

produces:

PHP Parse error:  syntax error, unexpected '@' in
/var/www/htdocs/cmsms/lib/misc.functions.php on line 223

  How can I determine where ErrorHandler404() is being called so I can fix
the problem and get the application running again?

Rich



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to