Hi,
I've got a strange query that I can't figure out. I've got a new
installation of Apache 1.3.28 and PHP 4.3.3 on my laptop, but it
doesn't appear to be processing URLs correctly. I've tried to do a
direct copy of my config on my desktop (which is Apache 1.3.27 and PHP
4.3.1, I think), but I don't have access to it any more to check the
config files.
Apache works fine, I installed it first and tested it with several
pages. They all get served nicely.
PHP itself works fine, it processes and serves files correctly, with
only one apparent problem.
If you pass a URL such as :
http://127.0.0.1/gallery/canada_0303...P02&mode=Photo
I still get the same result as if i'd typed in :
http://127.0.0.1/gallery/canada_0303/imgquery.php
I added a line to print out the variables at the top of the page, and
all of them are empty. Regardless of what you put in.
If you need an example :
http://www.novaldex.com/gallery/cana...3/imgquery.php
this is the same file (with only mods for usernames/passwords for
different servers) and it works perfectly on my webhost. Click on the
'Next' and 'Prev' photos on the right to scroll through the pictures.
Here is the primary code that is of concern :
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
<title>Image Viewer</title>
<base target="_self">
</head>
<body bgcolor="#000000" text="#0080FF" topmargin="5" leftmargin="5">
<table border="0" width="100%">
<?php
// Connect to the local server
$dbcnx = @mysql_connect("localhost", "Visitor", "galleryvisitor");
if (!$dbcnx)
{
echo( "<p>Database server unavailable<p>" );
exit();
}
// Connect to the Gallery database
if (! @mysql_select_db("gallery", $dbcnx) )
{
echo( "<p>Unable to access The Gallery database<p>" );
exit();
}
// test for optional selections
$query_str = "";
if ($PID != NULL)
{
$query_str = " WHERE PID LIKE \"" . $PID . "\"";
}
echo("<p>Query string '1' is : \"" . $query_str . "\" ¦ PID : \"" .
$PID . "\" ¦ Mode : \"" . $Mode . "\"<p>");
if ($PID == NULL)
{
$mode = "Photo";
$query_str = " WHERE PID LIKE \"F1P01\"";
}
$result = @mysql_query("SELECT * FROM canada_0303" . $query_str);
if (!$result)
{
echo("<p>Query for image data failed : " . mysql_error() . "<p>");
exit();
}
Does anyone have any suggestions or questions? I've tried these files
in both Mozilla and IE, and they both produce the same results.
Many thanks in advance.
Nick.