Hello;
A PHP application that was working perfectly on a LAMP server can't require or include files at all after migrating to a Windows Server 2003 machine. For example, given the following file :
include("connectme.php");
echo "==== $SERVER_NAME, $USER, $PASSWORD";
$sql="SELECT id, model
FROM `products`
WHERE acc_code IS NULL
OR acc_code =0";
$prodset=mysql_query($sql);
while($prod=mysql_fetch_array($prodset,MYSQL_ASSOC))
{
echo $prod[id].",".$prod[model]."<br>";
}
The file will fail with a MySQL connection error, although the connection parameters are specified in the included connectme.php file. If I comment the include line and hard-code the connection parameters, it works.
Any ideas?
Thanks
Update: in the connectme.php connection parameters are defined and given values. But for some reason, the variables aren't visible in the including files scope. When I adding a line to echo the variables $SERVER_NAME, $USER, $PASSWORD all were empty.