Normally SQL is not read from file like you have setup. If sql does come from a file it is commonly just the statements to execute but not the connector prepared statements or execution.
If you need to read from a file you would typically do something like:[LIST=1]
[]read sql statements from file into a variable, say $sql;
[]next, use this in your php page.
[/LIST]