I have been trying to get this E-commerce application to work that I got from devshed.com called mymarket it states that php4 RC1 or greater is required. The server that I am trying to get it to run on is running php4.0.6 which from the information that I have been able to find is greater then php4 RC1.
When I try to run it I get the following error
Warning: Undefined variable: qualified_me in /home/www/ecsbi/lmu/robert/mymarket/application.php on line 49
Fatal error: Call to undefined function: () in /home/www/ecsbi/lmu/robert/mymarket/application.php on line 49
This is the line in the application.php file
/ setup some global variables /
$ME = qualified_me();
These are the functions in the stdlid file the only thing that I been able to find as possibly being the problem is that in the function the me is lower case and in the application.php file the ME is upper case could this be the cause of the undefined error.
function me() {
/ returns the name of the current script, without the querystring portion.
this function is necessary because PHP_SELF and REQUEST_URI and PATH_INFO
return different things depending on a lot of things like your OS, Web
server, and the way PHP is compiled (ie. as a CGI, module, ISAPI, etc.) */
if (getenv("REQUEST_URI")) {
$me = getenv("REQUEST_URI");
} elseif (getenv("PATH_INFO")) {
$me = getenv("PATH_INFO");
} elseif ($GLOBALS["PHP_SELF"]) {
$me = $GLOBALS["PHP_SELF"];
}
return strip_querystring($me);
}
function qualified_me() {
/ like me() but returns a fully URL /
$HTTPS = getenv("HTTPS");
$SERVER_PROTOCOL = getenv("SERVER_PROTOCOL");
$HTTP_HOST = getenv("HTTP_HOST");
$protocol = (isset($HTTPS) && $HTTPS == "on") ? "https://" : "http://";
$url_prefix = "$protocol$HTTP_HOST";
return $url_prefix . me();
}
function match_referer($good_referer = "") {
/ returns true if the referer is the same as the good_referer. If
good_refer is not specified, use qualified_me as the good_referer */
if ($good_referer == "") { $good_referer = qualified_me(); }
return $good_referer == get_referer();
}
function redirect($url, $message="", $delay=0) {
/ redirects to a new URL using meta tags /
echo "<meta http-equiv='Refresh' content='$delay; url=$url'>";
if (!empty($message)) echo "<div style='font-family: Arial, Sans-serif; font-size: 12pt;' align=center>$message</div>";
die;
}