I have been developing code on a local machine, running a local web server, for about 10 weeks or so. Last week, my supervisor asked if I could put my code out on the development server to give them an idea of what I've done. Well, as Murphy would have it, I'm running PHP 5.3.3 on my local server and the development server is running 5.1.6 - and a lot of stuff BREAKS when deployed to the older server version. I could explain the entire situation, but it's long and boring - but suffice it to say that the IT department involved with administering the development and production servers move with glacial speed. So, my BEST option (not the best solution) is to write my code to work with their older server version.
Right now, I am having problems with the following code:
Code: Select all
try{
$conn = new PDO($dsn, ORA_USER, ORA_PWD);
DBConnection::$connection = $conn;
DBConnection::$instantiated = true;
}catch(Exception $e){
$this->setErrorMsg("- ERROR: constructing DBConnection <br />\n".
$e."<br />\n");
die("Database connection failed. ".$e);
}
Code: Select all
Database connection failed. Object id #4
Code: Select all
try{
$conn = new PDO($dsn, ORA_USER, ORA_PWD);
DBConnection::$connection =& $conn;
DBConnection::$instantiated =& true; <<<----- This is line 23 referenced in the results below
}catch(Exception $e){
$this->setErrorMsg("- ERROR: constructing DBConnection <br />\n".
$e."<br />\n");
die("Database connection failed. ".$e);
}
Code: Select all
Parse error: syntax error, unexpected ';', expecting T_PAAMAYIM_NEKUDOTAYIM in <pathToMyApp>/DBConnection.php on line 23