?
Solved

PHP mySQL support help

Posted on 2007-08-08
12
Medium Priority
?
255 Views
Last Modified: 2008-02-01
I am trying to determine if my php install is fully supporting mysql. I am thinking it is not...

Here is the phpinfo(); for the server I am testing:
http://rossvillechristian.com/adminedit/admin/check2.php

Here is the phpinfo(); for another server already setup:
http://www.nexuslaunch.com/rcawebedit/html/check2.php

I see MYSQL with its info on the second, not on the first...am I missing something? I have ensured the php.ini file has the mysql.dlls uncommented and the dlls are in the correct folder.
0
Comment
Question by:guy4graphics
  • 4
  • 4
  • 3
  • +1
12 Comments
 
LVL 11

Expert Comment

by:AlexanderR
ID: 19659718
check your dlls again.
commong mistake  libmysql.dll must be in system path. Put it in c:\windows
Check that mysql.dll and mysqli.dll are in the directory outlined in your extenstion dir in your php.ini.
Check
extension_dir = "C:\php\ext\" should be pointing to where you php extensions are (mysql and myslqi are to be there)
0
 
LVL 11

Assisted Solution

by:AlexanderR
AlexanderR earned 450 total points
ID: 19659726
Just noticied. One is php4 the other is php 5. Make sure that you get the appropriate version specific dlls.
http://dev.mysql.com/downloads/connector/php/
0
 
LVL 1

Author Comment

by:guy4graphics
ID: 19659734
so I am right in thinking there should be a MYSQL section listed in the PHP5 phpinfo(); just like for PHP4?
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 4

Accepted Solution

by:
orbic1 earned 600 total points
ID: 19660601
yes. here are some things to try:

1. Put ext and php directories in system path (System -> Environmental Variables -> Path). Put this at the beginning of the path!!!
2. make sure php.ini is in windir
3. make sure php.ini has sufficient privileges (try by giving access to "everyone" and then reduce as required. permissions + security = your friend!)

if this doesn;t work check this:

The problem may be caused by the mySQL installs bin folder being included in the PATH before PHP's install folder. That caused mySQL's libmysql.dll file to be loaded before PHP's libmysql.dll file when PHP went looking for a libmysql.dll file upon loading its mySQL extension. Putting PHP's install folder in the PATH prior to mySQL's bin folder enabled PHP to find its own libmysql.dll file. Alternately, you can put PHP's libmysql.dll in %systemroot%\system32. That will have the same effect of putting it in the PATH before mySQL's bin folder.
0
 
LVL 4

Assisted Solution

by:rschoenbach
rschoenbach earned 450 total points
ID: 19661816
Goto this directory:

C:\WINDOWS\php.ini

and make sure that there is no ";" in front of extension=php_mysql.dll and restart the server.

This will make sure that mysql will work.
0
 
LVL 1

Author Comment

by:guy4graphics
ID: 19662813
rschoenbach: i already checked that, thx

orbic1: trying what you suggested

should I not have both of these uncommented at the same time?
extension=php_mysql.dll
extension=php_mysqli.dll

just to be sure this is OK, I have php and the site on one server 148 and the mysql installed on server 147. PHP is not installed on 147.

0
 
LVL 1

Author Comment

by:guy4graphics
ID: 19662876
These are the dlls I have loaded. Could one or more be interfering with the mysql loading?


;extension=php_bz2.dll
extension=php_curl.dll
extension=php_dba.dll
extension=php_dbase.dll
extension=php_dbx.dll
;extension=php_exif.dll
;extension=php_fdf.dll
extension=php_filepro.dll
extension=php_gd2.dll
extension=php_gettext.dll
;extension=php_gmp.dll
;extension=php_ifx.dll
extension=php_iisfunc.dll
extension=php_imap.dll
;extension=php_interbase.dll
extension=php_ldap.dll
extension=php_java.dll
extension=php_mbstring.dll
;extension=php_mcrypt.dll
;extension=php_mhash.dll
;extension=php_mime_magic.dll
;extension=php_ming.dll
extension=php_msql.dll
extension=php_mssql.dll
extension=php_mysql.dll
;extension=php_mysqli.dll
;extension=php_oci8.dll
;extension=php_openssl.dll
;extension=php_pdo.dll
;extension=php_pdo_firebird.dll
;extension=php_pdo_mssql.dll
;extension=php_pdo_mysql.dll
;extension=php_pdo_oci.dll
;extension=php_pdo_oci8.dll
;extension=php_pdo_odbc.dll
;extension=php_pdo_pgsql.dll
;extension=php_pdo_sqlite.dll
extension=php_pdf.dll
extension=php_pgsql.dll
;extension=php_pspell.dll
;extension=php_shmop.dll
;extension=php_snmp.dll
;extension=php_soap.dll
extension=php_sockets.dll
;extension=php_sqlite.dll
;extension=php_sybase_ct.dll
;extension=php_tidy.dll
extension=php_xmlrpc.dll
extension=php_xsl.dll
extension=php_zip.dll
0
 
LVL 11

Expert Comment

by:AlexanderR
ID: 19662932
Forgot this:
This must be somewhere in your httpd.conf (like at the end)
PHPIniDir "C:/php"
change that to wherever your php.ini is
0
 
LVL 1

Author Comment

by:guy4graphics
ID: 19663148
does mysql need to be installed on the same server?
0
 
LVL 11

Expert Comment

by:AlexanderR
ID: 19663757
No, those dlls are just connectors, they are extensions for php.  They are not a part of mysql.
0
 
LVL 4

Expert Comment

by:orbic1
ID: 19682659
it is a lot easier if mysql is installed on the same server, though. How did you get on with my suggestions?
0
 
LVL 4

Expert Comment

by:orbic1
ID: 19682662
easier as in - just to see if it works!
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

3 proven steps to speed up Magento powered sites. The article focus is on optimizing time to first byte (TTFB), full page caching and configuring server for optimal performance.
The title says it all. Writing any type of PHP Application or API code that provides high throughput, while under a heavy load, seems to be an arcane art form (Black Magic). This article aims to provide some general guidelines for producing this typ…
The viewer will learn how to dynamically set the form action using jQuery.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
Suggested Courses
Course of the Month14 days, 2 hours left to enroll

807 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question