Why is the Parse error displaying?
Posted: Sun Jan 07, 2007 5:08 pm
Greetings fellow programmers,
The following two (2) scripts are part of a software package that have been running perfectly on an Apache server for several years.
I am new to Linux. I recently loaded the entire software package onto a server running Linux and the following displays...
Parse error: parse error, unexpected T_VARIABLE in /www/path/to/the/php/script/dbconnection.php on line 1
The dbhostname,dbusername,dbpassword,WXYZ,/www/path/to/the/php/script/ have been changed to protect the innocent.
Why is the Parse error displaying?
Thank you in advance for your time and consideration.
JB1958
The following two (2) scripts are part of a software package that have been running perfectly on an Apache server for several years.
Code: Select all
<?php
/**
* This is the dbconnection script
*/
$Query = mysql_connect ("dbhostname", "dbusername", "dbpassword") or die ("WXYZ is not available at the moment. Please try again later.");
mysql_select_db("dbusername", $Query);
?>Code: Select all
<?php
/**
* This file loads the admin variables into an array called 'g_admin' for reuse
* And load the current time into the variable $g_time
*/
require "dbconnection.php";
$g_admin_query = mysql_query("SELECT * FROM admin", $Query);
$g_admin = mysql_fetch_array($g_admin_query);
$g_time_query = mysql_query("SELECT UNIX_TIMESTAMP() FROM admin", $Query);
$g_time = mysql_result($g_time_query, 0, 0);
?>Parse error: parse error, unexpected T_VARIABLE in /www/path/to/the/php/script/dbconnection.php on line 1
The dbhostname,dbusername,dbpassword,WXYZ,/www/path/to/the/php/script/ have been changed to protect the innocent.
Why is the Parse error displaying?
Thank you in advance for your time and consideration.
JB1958