Reply to A PHP/MySQL Connnector Problem

Your name:

Reply:


Posted by TonyB on 10/23/10 11:40

I'm running the zip'd version of PHP (PHP 5.1.2 zip package) downloaded
from here: http://www.php.net/downloads.php. PHP won't connect with
MySQL.

>From docs and threads, it seems enabling PHP/MySQL connectivity on a
Windows XP machine requires three configuration edits. These are:

1. In php.ini, enable php_mysql.dll by uncommenting
"extension=php_mysql.dll".
2. In php.ini, set "extension_dir" to the folder containing
php_mysql.dll which on my PC is C:/core/web/php512/ext/
3. Windows system PATH. Add ";\%SystemRoot%\core\web\php512" which
places libmysql.dll on the PATH.

On my workstation, Apache and PHP are installed in the following
directorys:

C:\Program Files\Apache Group\Apache2
C:\Program Files\Apache Group\Apache2\conf
C:\Program Files\Apache Group\Apache2\conf\httpd.conf

C:\core\web\php512
C:\core\web\php512\php.ini
C:\core\web\php512\libmysql.dll
C:\core\web\php512\ext
C:\core\web\php512\ext/php_mysql.dll
C:\core\web\Apache2\htdocs
C:\core\web\Apache2\htdocs\hello.php

PHP was put into C:\core\web\php512 in order that phpMyAdmin could be
installed somewhere other than C:\Program Files\Apache
Group\Apache2\htdocs.

http.conf has the following four changes:

LoadModule php5_module "c:\core\web\php512\php5apache2.dll"
AddType application/x-httpd-php .php
PHPIniDir "C:\core\web\php512"
DocumentRoot "C:/core/web/Apache2/htdocs"

The workstation is running:
Windows XP Media Center Edition Service Pack 2
Apache 2.0.55
MySQL 5.0.18
PHP 5.1.2 (zip)

Apache works fine; MySQL is running; PHP works okay except it just
won't connect to MySQL.

As noted above, configuration changes were made as per online docs and
discussion threads. I set extension_dir to "extension_dir =
C:/core/web/php512/ext", uncommented extension=php_mysql.dll from
php.ini and added "c:\core\web\php512" to my PATH (followed by a PC
restart). However, the message "Unable to load dynamic library
'C:/core/web/php512/ext/php_mysql.dll'" continues to appear in the
apache error log when apache is started. Much tweaking of the
extension_dir entry has no effect.

Any thoughts would be greatly appreciated...... -Tony

I'm using the zip download of PHP as noted in an earlier post......

From: Tony Marston - view profile
Date: Fri, Dec 24 2004 12:17 am
Email: "Tony Marston" <t...@NOSPAM.demon.co.uk>
Groups: comp.lang.php

Use the zip download if you want to run PHP as an Apache module as the
msi
version is CLI only. Also be aware that the directory structure with
PHP 5
is different from PHP 4.

--
Tony Marston


http://www.tonymarston.net



"Dick Watson" <littlegreenge...@mindspring.com> wrote in message


news:nCOyd.8782$9j5.3025@newsread3.news.pas.earthlink.net...

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация