Problem creating a PDO Object with Rewriting On
-
Hi I'm having a weird situation here. I'm trying create a PDO object, like this:
$dbh = new PDO('mysql:host='.$hostname.';dbname='.$dbname,$username, $password);
I have rewriting ON in my .htaccess file. when I try to run the script using a URL that will trigger a rewrite rule, it shows me the following error:
Fatal error: Class 'PDO' not found
I have a exception rewrite rule for a directory where the script is, named PHP, like this:
RewriteRule ^(php)($|/) - [L]
if I run the scripting directly from the directory, it runs normally with no erros. I don't know why this is happening. any clues? Thank you
-
Hi I'm having a weird situation here. I'm trying create a PDO object, like this:
$dbh = new PDO('mysql:host='.$hostname.';dbname='.$dbname,$username, $password);
I have rewriting ON in my .htaccess file. when I try to run the script using a URL that will trigger a rewrite rule, it shows me the following error:
Fatal error: Class 'PDO' not found
I have a exception rewrite rule for a directory where the script is, named PHP, like this:
RewriteRule ^(php)($|/) - [L]
if I run the scripting directly from the directory, it runs normally with no erros. I don't know why this is happening. any clues? Thank you
just adding some info: the problem can be seen in the following URLs the rewrited one (where the problem occur) www.qualocep.com/dbc/ and the direct file, when it works www.qualocep.com/php/dbc.php I put a phpinfo() the to show more info about the server.
-
just adding some info: the problem can be seen in the following URLs the rewrited one (where the problem occur) www.qualocep.com/dbc/ and the direct file, when it works www.qualocep.com/php/dbc.php I put a phpinfo() the to show more info about the server.
Solve it. There was an empty php.ini in the public_html, I deleted it, and it worked. thank u all