orlox Posted May 7, 2009 Share Posted May 7, 2009 Hi! Im using a paid server wich fails anytime I do a query using PDO (the same sccript I test works on my personal server...). My test query is this: <?php echo "hi!"; $connection = new PDO("mysql:host=localhost;dbname=test", "user", "pass"); $res=$connection->query("Show databases;"); echo "bye!"; On my apache server on my computer, this works correctly, and show both messages. However, on the server Im trying to use to put my webpage, the script fails, it outputs nothing, and firefox asks me to download the php file which has 0 kb...Commenting on the query line gives me both messages though... I made a phpinfo() and the configure used to compile php has --disable-pdo in it. However, it also shows the pdo mysql driver version...Also the script doesnt fail on creating the PDO object, so pdo libraries are actually included... Is it just the server thats messed up?? Or perhaps some strange php variable needs to be changed??? Plz help! Quote Link to comment https://forums.phpfreaks.com/topic/157183-pdo-query-fails/ Share on other sites More sharing options...
RussellReal Posted May 7, 2009 Share Posted May 7, 2009 PDO not set up in your php installation.. to be honest I never used PDO or know what it is, but assuming it comes with PHP, the webhosting company you're using probably disables this functionality for whatever reasons.. maybe contact tech support. Quote Link to comment https://forums.phpfreaks.com/topic/157183-pdo-query-fails/#findComment-828273 Share on other sites More sharing options...
orlox Posted May 7, 2009 Author Share Posted May 7, 2009 I know the configure command says that PDo is not enabled, but I can use the PDO class, wich is strange... Quote Link to comment https://forums.phpfreaks.com/topic/157183-pdo-query-fails/#findComment-828276 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.