Question

I'm trying to debug an older php site (from about 4-5 years ago), and php was recently upgraded on the server.

I've seen this issue before, but I cannot recall how I resolved it.

Basically the homepage shows up perfectly fine, but none of the page links are working or directing to the correct pages. For example:

.../index.php?page=latestadditions

.../index.php?page=usercat&catid=32

All links maintain the homepage content, but the browser URL path shows the correct link names.

As you can probably tell, there are MySQL queries that are resolving the URLs to dictate which page should display.

I've checked the server error logs for page requests and there are no errors being outputted. I also have a function:

function dbError($query,$error){
$page1=$_GET["page"];
$action1=$_GET["action"];
$dest=getConfigValue("logs");
$error="Database error on page-->$page1-- while doing action--->$action1<--- on date".date("d/m/Y")."-------->using query [$query]\n";
error_log($error,3,"dberrors.txt");
die ("Database error<!-- using query [$query] -->.System admin has been notified.  Please try again later.");

}

But there is no output going to the dberrors.txt..

I know the database connection is working because the record counts are being pulled into my categories and no MySQL errors are being throw. I am also checking

if(!$connect) dbError("Couldn't connect to MySQL Server","$mysqluser to db $dbname");

For some reason I believe this has to do with folder permissions problems, but I could be way off.

Thanks for any tips you can throw this way.

Cheers

Was it helpful?

Solution

Probably you should turn on register_globals in php.ini or .htaccess depending on your server support.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top