For Programmers: Free Programming Magazines  


Home > Archive > PHP Language > October 2007 > PHP cannot see MySQL!!!!!!!!









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author PHP cannot see MySQL!!!!!!!!
David

2007-10-20, 10:01 pm

I have php and mysql both working seperately but not together

<?php phpinfo(); ?> - Shows everything working fine but no mention of
Mysql in it.

Mysql is setup and working properly. Users and databases all connect fine

All my PHP scripts which have mysql connection info just show as a blank
page. No error messages.

Any ideas?!. Would appreciate any input, its driving my crazy.







Jibux

2007-10-21, 4:07 am

David a écrit :
> I have php and mysql both working seperately but not together
>
> <?php phpinfo(); ?> - Shows everything working fine but no mention of
> Mysql in it.
>
> Mysql is setup and working properly. Users and databases all connect fine
>
> All my PHP scripts which have mysql connection info just show as a blank
> page. No error messages.
>
> Any ideas?!. Would appreciate any input, its driving my crazy.
>

Hello
When I installed joomla, support of mysql is no but PhpMyadmin worked fine.

In /etc/php5/apache2
I added 3306 at this line
mysql.default_port =

After restart of apache, the support of mysql in joomla was Yes

I Hope this help you
C.

2007-10-22, 7:59 am

On 21 Oct, 01:45, "David" <m...@privacy.net> wrote:
> I have php and mysql both working seperately but not together
>
> <?php phpinfo(); ?> - Shows everything working fine but no mention of
> Mysql in it.
>


Good start.

> Mysql is setup and working properly. Users and databases all connect fine
>


That last sentence makes no sense.

> All my PHP scripts which have mysql connection info just show as a blank
> page. No error messages.
>


Are we trying to solve poor programming or a bad system config here?
Have you tried to enable error reporting? checked your log files?
Implemented your own error handler?

> Any ideas?!. Would appreciate any input, its driving my crazy.


You should probably start by installing and configuring MySQLAdmin
(http://www.phpmyadmin.net/home_page/index.php) which has better error
handling built in - if you can't get that to work then try reposting
with specific error messages, and which versions of each software you
are using on what platforms and examples of how your code tries to
connect.

Taking a wide stab in the dark, it maybe mysql's interpretation of
'localhost' - read this before reposting:

http://dev.mysql.com/doc/refman/5.0...-to-server.html

C.

David

2007-10-22, 7:59 am


"C." <colin.mckinnon@gmail.com> wrote in message
news:1193052238.463520.3460@z24g2000prh.googlegroups.com...
> On 21 Oct, 01:45, "David" <m...@privacy.net> wrote:
>
> Good start.
>
>
> That last sentence makes no sense.
>
>
> Are we trying to solve poor programming or a bad system config here?
> Have you tried to enable error reporting? checked your log files?
> Implemented your own error handler?
>
>
> You should probably start by installing and configuring MySQLAdmin
> (http://www.phpmyadmin.net/home_page/index.php) which has better error
> handling built in - if you can't get that to work then try reposting
> with specific error messages, and which versions of each software you
> are using on what platforms and examples of how your code tries to
> connect.
>
> Taking a wide stab in the dark, it maybe mysql's interpretation of
> 'localhost' - read this before reposting:
>
> http://dev.mysql.com/doc/refman/5.0...-to-server.html
>
> C.



C - you seem very knowledgeable and i would really appreciate your input on
this.

I tried phpmyadmin and this came back with: Cannot load mysql extensions.

I have already uncommented

extension=php_mysql.dll
extension=php_mysqli.dll

in my php.ini file

I have already also added c:\php to the path in windows to load the relevent
files first.

Any ideas why the extensions are still not loading or how to ascertain if
this is definately the problem.

thanks











Bill

2007-10-22, 7:00 pm

On Mon, 22 Oct 2007 11:23:58 +0000, C. wrote:

> On 21 Oct, 01:45, "David" <m...@privacy.net> wrote:
> Good start.
>
> That last sentence makes no sense.
>
> Are we trying to solve poor programming or a bad system config here? Have
> you tried to enable error reporting? checked your log files? Implemented
> your own error handler?
>
>
> You should probably start by installing and configuring MySQLAdmin
> (http://www.phpmyadmin.net/home_page/index.php) which has better error
> handling built in - if you can't get that to work then try reposting with
> specific error messages, and which versions of each software you are using
> on what platforms and examples of how your code tries to connect.
>
> Taking a wide stab in the dark, it maybe mysql's interpretation of
> 'localhost' - read this before reposting:
>
> http://dev.mysql.com/doc/refman/5.0...-to-server.html
>
> C.


This could be as simple as PHP not being compiled with MySQL support. I
think it is compiled in by default now. But if you use for instance the
yum installer that CentOS uses, mysql support has to be installed
specifically from the yum command. You mentioned that <?php phpinfo(); ?>
does not show MySQL support. I would start there.

BillP
David

2007-10-22, 7:00 pm


"Bill" <billp@rhondasworld.com> wrote in message
news:pan.2007.10.22.13.17.47.715688@rhondasworld.com...
> On Mon, 22 Oct 2007 11:23:58 +0000, C. wrote:
>
>
> This could be as simple as PHP not being compiled with MySQL support. I
> think it is compiled in by default now. But if you use for instance the
> yum installer that CentOS uses, mysql support has to be installed
> specifically from the yum command. You mentioned that <?php phpinfo(); ?>
> does not show MySQL support. I would start there.
>
> BillP


I downloaded the latest version (zip) and extracted it to c:/php.
Im totally stumped atm. I cant see any reason why php cant find/use mysql


C.

2007-10-23, 7:00 pm

On 22 Oct, 13:43, "David" <m...@privacy.net> wrote:
> C - you seem very knowledgeable and i would really appreciate your input on
> this.
>
> I tried phpmyadmin and this came back with: Cannot load mysql extensions.
>
> I have already uncommented
>
> extension=php_mysql.dll
> extension=php_mysqli.dll
>
> in my php.ini file
>
> I have already also added c:\php to the path in windows to load the relevent
> files first.
>
> Any ideas why the extensions are still not loading or how to ascertain if
> this is definately the problem.
>
> thanks


Flattery always works...

What does your ini file have for the extension_dir setting?

Are the relevant dlls in this directory? If not where are they?

C.

macca

2007-10-25, 7:01 pm

open php.ini

find this:

extension_dir =


set it to this:

extension_dir = "C:\php\ext"


find

;extension=php_mysql.dll

and uncomment it to this:

extension=php_mysql.dll

Open the c:\php\ext folder and make sure that it has the file
php_mysql.dll in it.

Restart the web server.

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com