Welcome Guest. Please Login or Register  


You are here: Index > AMPPS > General Support > Topic : Cannot connect on my database through PHP?

1


Threaded Mode | Print  

 Cannot connect on my database through PHP? (19 Replies, Read 10725 times)
johncamorra
Group: Member
Post Group: Newbie
Posts: 10
Status:
I have created a database with some tables and inserted smthing there but when i try to establish a connection through PHP i receive an error such as "could not find driver".Does someone has an idea please?
IP: --   

Cannot connect on my database through PHP?
tidus
Group: Member
Post Group: Super Member
Posts: 1121
Status:
Hi,

On which OS are you using AMPPS ?

-----------------------
Follow AMPPS on,
Twitter : https://twitter.com/AMPPS_Stack
Facebook :  http://www.facebook.com/softaculousampps
Google+ : https://plus.google.com/+AmppsStack
IP: --   

Cannot connect on my database through PHP?
johncamorra
Group: Member
Post Group: Newbie
Posts: 10
Status:
I have Windows 7 x64.
Everything is working fine, i am running php scripts on my localhost,i can create databases i can use all mysql functions but when i try to connect to a database i get the following message : "Unable to connect to the database server.could not find driver "
Unable to connect is the output from my script and "Could not find driver" is the error that i am getting.Hope you can have a clue how to solve this issue
IP: --   

Cannot connect on my database through PHP?
tidus
Group: Member
Post Group: Super Member
Posts: 1121
Status:
Hi,

Check whether following extensions are enabled :
pdo_mysql
mysqli
mysql

You can check by running the following command in command prompt(cmd):
C:/> "path\to\Ampps\php\php.exe" -c "path\to\Ampps\apache\php.ini" -m

Note : Replace path\to with correct path and don't forget the double quotes.

-----------------------
Follow AMPPS on,
Twitter : https://twitter.com/AMPPS_Stack
Facebook :  http://www.facebook.com/softaculousampps
Google+ : https://plus.google.com/+AmppsStack
IP: --   

Cannot connect on my database through PHP?
johncamorra
Group: Member
Post Group: Newbie
Posts: 10
Status:
C:/> "ProgramFiles(x86)\Ampps\php\php.exe" -c "ProgramFiles(x86)\Ampps\php\php.exe" -m

This is the path. I typed it in command prompt and i received the following : The system cannot find the path specified.

I am getting really upset on this issue cauz i don`t know how to fix it
IP: --   

Cannot connect on my database through PHP?
tidus
Group: Member
Post Group: Super Member
Posts: 1121
Status:
Quote From : johncamorra December 14, 2012, 3:00 pm
C:/> "ProgramFiles(x86)\Ampps\php\php.exe" -c "ProgramFiles(x86)\Ampps\php\php.exe" -m

This is the path. I typed it in command prompt and i received the following : The system cannot find the path specified.

I am getting really upset on this issue cauz i don`t know how to fix it


Hi,

Type :
"C:\Program Files (x86)\Ampps\php\php.exe" -c "C:\Program Files (x86)\Ampps\apache\php.ini" -m

Edited by tidus : December 14, 2012, 3:03 pm

-----------------------
Follow AMPPS on,
Twitter : https://twitter.com/AMPPS_Stack
Facebook :  http://www.facebook.com/softaculousampps
Google+ : https://plus.google.com/+AmppsStack
IP: --   

Cannot connect on my database through PHP?
johncamorra
Group: Member
Post Group: Newbie
Posts: 10
Status:
C:/> "ProgramFiles(x86)\Ampps\php\php.exe" -c "ProgramFiles(x86)\Ampps\apache\php.ini" -m

Actually i wrote it wrong . But it does not work either , still the same issue "the system cannot find the path specified"
IP: --   

Cannot connect on my database through PHP?
tidus
Group: Member
Post Group: Super Member
Posts: 1121
Status:
Quote From : johncamorra December 14, 2012, 3:03 pm
C:/> "ProgramFiles(x86)\Ampps\php\php.exe" -c "ProgramFiles(x86)\Ampps\apache\php.ini" -m

Actually i wrote it wrong . But it does not work either , still the same issue "the system cannot find the path specified"


Hi,

Its still wrong. :)

Code
"C:\Program Files (x86)\Ampps\php\php.exe" -c "C:\Program Files (x86)\Ampps\apache\php.ini" -m


Copy the exact line.

-----------------------
Follow AMPPS on,
Twitter : https://twitter.com/AMPPS_Stack
Facebook :  http://www.facebook.com/softaculousampps
Google+ : https://plus.google.com/+AmppsStack
IP: --   

Cannot connect on my database through PHP?
johncamorra
Group: Member
Post Group: Newbie
Posts: 10
Status:
Ok , now i get the following warning from AMPPS , PHP Startup: Unable to load dynamic library "C:/Program FilesX86/Ampps/php/ext/php_sqlite.dll" = The specified module could not be found
IP: --   

Cannot connect on my database through PHP?
johncamorra
Group: Member
Post Group: Newbie
Posts: 10
Status:
And another one regarding the mongo.dll file extension
IP: --   

Cannot connect on my database through PHP?
tidus
Group: Member
Post Group: Super Member
Posts: 1121
Status:
Quote From : johncamorra December 14, 2012, 3:05 pm
Ok , now i get the following warning from AMPPS , PHP Startup: Unable to load dynamic library "C:/Program FilesX86/Ampps/php/ext/php_sqlite.dll" = The specified module could not be found


Hi,

Open a ticket here:
http://www.ampps.com/support

We will look into it.

-----------------------
Follow AMPPS on,
Twitter : https://twitter.com/AMPPS_Stack
Facebook :  http://www.facebook.com/softaculousampps
Google+ : https://plus.google.com/+AmppsStack
IP: --   

Cannot connect on my database through PHP?
johncamorra
Group: Member
Post Group: Newbie
Posts: 10
Status:
Also in command prompt it says the following after i type that line "Warning .. php startup unable to load " and i receive there [PHP Modules]:
bcmath
calendar
.
.
.
zip [End Modules]
IP: --   

Cannot connect on my database through PHP?
tidus
Group: Member
Post Group: Super Member
Posts: 1121
Status:
Quote From : johncamorra December 14, 2012, 3:08 pm
Also in command prompt it says the following after i type that line "Warning .. php startup unable to load " and i receive there [PHP Modules]:
bcmath
calendar
.
.
.
zip [End Modules]


Yes. In between can you find pdo_mysql, mysql, mysqli ??

-----------------------
Follow AMPPS on,
Twitter : https://twitter.com/AMPPS_Stack
Facebook :  http://www.facebook.com/softaculousampps
Google+ : https://plus.google.com/+AmppsStack
IP: --   

Cannot connect on my database through PHP?
johncamorra
Group: Member
Post Group: Newbie
Posts: 10
Status:
Only mysqli and mysql.
pdo_mysql is missing , there is only PDO
IP: --   

Cannot connect on my database through PHP?
tidus
Group: Member
Post Group: Super Member
Posts: 1121
Status:
Quote From : johncamorra December 14, 2012, 3:19 pm
Only mysqli and mysql.
pdo_mysql is missing , there is only PDO

Hi,
Go to Ampps Application - Php tab - php extension. Check pho_pro_mysql and apply. Restart apache. Then try connecting to mysql.

-----------------------
Follow AMPPS on,
Twitter : https://twitter.com/AMPPS_Stack
Facebook :  http://www.facebook.com/softaculousampps
Google+ : https://plus.google.com/+AmppsStack
IP: --   

« Previous    Next »

Threaded Mode | Print  

1


Jump To :


Users viewing this topic
1 guests, 0 users.


All times are GMT. The time now is May 25, 2024, 2:45 pm.

  Powered By AEF 1.0.8 © 2007-2008 Electron Inc.Queries: 10  |  Page Created In:0.301