RE: [PHP-WIN] PHP, MYSQL and Apache
Yes it is exactly like that as a matter of fact. It points to the correct directory where the dlls are. - Original Message - From: [EMAIL PROTECTED] To: "KM" <[EMAIL PROTECTED]> Cc: "'Carlton Whitehead'" <[EMAIL PROTECTED]>, php-windows@lists.php.net Date: Tue, 7 Aug 2007 17:31:39 +1000 (EST) Subject: RE: [PHP-WIN] PHP, MYSQL and Apache > I always have 'small' issues configuring mysql extensions for PHP in > windows. > > What does you extension_dir directive look like in the php.ini config > file? is it something like this... > > extension_dir="C:\Program Files\PHP\ext" > > > Not sure if this is the cause but I get this error in my apache error log > > > > PHP Warning: PHP Startup: Unable to load dynamic library 'C:\\Program > > Files\\PHP\\ext\\php_mysql.dll' - The specified module could not be > > found.\r\n in Unknown on line 0 > > PHP Warning: PHP Startup: Unable to load dynamic library 'C:\\Program > > Files\\PHP\\ext\\php_mysqli.dll' - The specified module could not be > > found.\r\n in Unknown on line 0 > > > > The files are there but should it be trying to access them with the path? > > It shouldnât have all those double \ should it? > > > > -Original Message- > > From: Carlton Whitehead [mailto:[EMAIL PROTECTED] > > Sent: Monday, August 06, 2007 9:01 PM > > To: KM > > Cc: php-windows@lists.php.net > > Subject: Re: [PHP-WIN] PHP, MYSQL and Apache > > > > Keith, > > > > Are you sure that's the same php.ini that is referenced by your > > phpinfo(); script? > > > > Have you restarted Apache since you enabled the extensions? > > > > Regards, > > Carlton Whitehead > > > > > > KM wrote: > >> Here is the section of my php.ini that contains the information > >> > >> ;extension=php_bz2.dll > >> ;extension=php_curl.dll > >> ;extension=php_dba.dll > >> ;extension=php_dbase.dll > >> ;extension=php_exif.dll > >> ;extension=php_fdf.dll > >> ;extension=php_gd2.dll > >> ;extension=php_gettext.dll > >> ;extension=php_gmp.dll > >> ;extension=php_ifx.dll > >> ;extension=php_imap.dll > >> ;extension=php_interbase.dll > >> ;extension=php_ldap.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_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 > >> > >> Is there something else I am missing? > >> > >> Keith > >> > >> > >> -Original Message- > >> From: Carlton Whitehead [mailto:[EMAIL PROTECTED] > >> Sent: Monday, August 06, 2007 5:11 PM > >> To: KM > >> Cc: php-windows@lists.php.net > >> Subject: Re: [PHP-WIN] PHP, MYSQL and Apache > >> > >> Keith, > >> > >> Browse to your phpinfo(); page, and search it for mysql. Is it listed? > >> If not, the mysql module isn't enabled, and you shouldn't expect a > >> mysql_connect command to work. You may need to edit your php.ini and > >> enable the php_mysql.dll module. > >> > >> Refer to the results of phpinfo(); for the path to the active php.ini > >> file, since sometimes this can be an unexpected location on Windows > >> machines, at least in my experience. > >> > >> Regards, > >> Carlton Whitehead > >> > >> - Original Message - > >> From: "KM" <[EMAIL PROTECTED]> > >> To: php-windows@lists.php.net > >> Sent: Monday, August 6, 2007 4:58:36 PM (GMT-0500) America/New_York > >> Subject: [PHP-WIN] PHP, MYSQL and Apache > >> > >> I am attempting to use the following togetherâ¦. > >> > >> > >> > >> MYSQL 5.0 > >> > >> Apache 2.2.4 > >> > >> PHP 5.2.3 > >> > >> > >> > >> PHP info I can get. I get the following statement whenever trying to > >> get to > >> mysql > >> > >> > >> > >> > >> > >> Here is the PHP code for what Iâm trying to do⦠> >> > >> > >> > >> >> > >> // Connect to the database > >> > >> $dbhost = 'localhost'; > >> > >> $dbusername = 'root'; > >> > >> $dbpasswd = 'joker'; > >> > >> $database_name = 'simple'; > >> > >> $connection = mysql_connect("$dbhost","$dbusername","$dbpasswd") > >> > >> or die ('Couldn\'t connect to server.'); > >> > >> $db = mysql_select_db("$database_name", $connection) > >> > >> or die('Couldn\'t select database.'); > >> > >> > >> > >> // Generate SQL code to store data on database. > >> > >> $ins
Re: [PHP-WIN] PHP, MYSQL and Apache
This is from my apache error.log [Tue Aug 07 09:53:47 2007] [notice] Parent: Received shutdown signal -- Shutting down the server. [Tue Aug 07 09:53:47 2007] [notice] Child 2796: Exit event signaled. Child process is ending. [Tue Aug 07 09:53:48 2007] [notice] Child 2796: Released the start mutex [Tue Aug 07 09:53:49 2007] [notice] Child 2796: Waiting for 250 worker threads to exit. [Tue Aug 07 09:53:49 2007] [notice] Child 2796: All worker threads have exited. [Tue Aug 07 09:53:49 2007] [notice] Child 2796: Child process is exiting [Tue Aug 07 09:53:49 2007] [notice] Parent: Child process exited successfully. [Tue Aug 07 09:53:50 2007] [notice] Apache/2.2.4 (Win32) PHP/5.2.3 configured -- resuming normal operations [Tue Aug 07 09:53:50 2007] [notice] Server built: Jan 9 2007 23:17:20 [Tue Aug 07 09:53:50 2007] [notice] Parent: Created child process 4720 PHP Warning: PHP Startup: Unable to load dynamic library 'C:\\Apache2\\PHP5\\ext\\php_mysql.dll' - The specified module could not be found.\r\n in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library 'C:\\Apache2\\PHP5\\ext\\php_mysqli.dll' - The specified module could not be found.\r\n in Unknown on line 0 [Tue Aug 07 09:53:50 2007] [notice] Child 4720: Child process is running [Tue Aug 07 09:53:50 2007] [notice] Child 4720: Acquired the start mutex. [Tue Aug 07 09:53:50 2007] [notice] Child 4720: Starting 250 worker threads. [Tue Aug 07 09:53:50 2007] [notice] Child 4720: Starting thread to listen on port 80. The path doesnt look correct should there be double \ between each folder? - Original Message - From: Thomas Hearn <[EMAIL PROTECTED]> To: KM <[EMAIL PROTECTED]> Cc: [EMAIL PROTECTED], php-windows@lists.php.net Date: Tue, 07 Aug 2007 08:53:02 -0400 Subject: Re: [PHP-WIN] PHP, MYSQL and Apache > This sounds very typical of a problem with WHERE in your path MySQL is set. > > Open up your PATH env variable, and look to see if your PHP ext > directory (with the mysql ext) is listed in the path BEFORE your actual > MySQL installation. If it isn't, then add it. The dlls that are used > by PHP and MySQL have variation and are not actually the same DLL. The > path not found error with MySQL is generally a result of a mismatch > between dll versions of MySQL, often caused by the location in the > path. Same goes for MSSQL. > > Hopefully that helps. > > Tom > > KM wrote: > > Yes the directory is in the PATH > > And yes on the second as well > > > > Keith > > > > -Original Message- > > From: Jeff White [mailto:[EMAIL PROTECTED] > > Sent: Monday, August 06, 2007 9:56 PM > > To: 'KM' > > Cc: php-windows@lists.php.net > > Subject: RE: [PHP-WIN] PHP, MYSQL and Apache > > > > Hello Keith, > > > > I realize this may seem a bit tedious, but is your PHP directory in the > > Windows PATH environment variable? And, if so, is the "libmysql.dll" file > in > > the PHP directory? > > > > Jeff > > > > > > > > -Original Message- > > From: KM [mailto:[EMAIL PROTECTED] > > Sent: Monday, August 06, 2007 9:22 PM > > To: 'Carlton Whitehead' > > Cc: php-windows@lists.php.net > > Subject: RE: [PHP-WIN] PHP, MYSQL and Apache > > > > Configuration File (php.ini) Path C:\WINDOWS > > Loaded Configuration File C:\WINDOWS\php.ini > > > > This is indeed the ini file I am editing and saving. > > And yes, any time I've made changes to it, I have restarted apache. > > > > Thanks > > Keith > > > > > > > > -Original Message- > > From: Carlton Whitehead [mailto:[EMAIL PROTECTED] > > Sent: Monday, August 06, 2007 9:01 PM > > To: KM > > Cc: php-windows@lists.php.net > > Subject: Re: [PHP-WIN] PHP, MYSQL and Apache > > > > Keith, > > > > Are you sure that's the same php.ini that is referenced by your > > phpinfo(); script? > > > > Have you restarted Apache since you enabled the extensions? > > > > Regards, > > Carlton Whitehead > > > > > > KM wrote: > > > >> Here is the section of my php.ini that contains the information > >> > >> ;extension=php_bz2.dll > >> ;extension=php_curl.dll > >> ;extension=php_dba.dll > >> ;extension=php_dbase.dll > >> ;extension=php_exif.dll > >> ;extension=php_fdf.dll > >> ;extension=php_gd2.dll > >> ;extension=php_gettext.dll > >> ;extension=php_gmp.dll > >> ;extension=php_ifx.dll > >> ;extension=php_imap.dll > >> ;extension=php_interbase.dll > >> ;extension=php_ldap.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.d
Re: [PHP-WIN] PHP, MYSQL and Apache
Adding the path to the extension and reversing the slashes worked! Thanks to all who replied! K - Original Message - From: Carlton Whitehead <[EMAIL PROTECTED]> To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED], php-windows@lists.php.net, Thomas Hearn <[EMAIL PROTECTED]> Date: Tue, 7 Aug 2007 10:01:16 -0400 (EDT) Subject: Re: [PHP-WIN] PHP, MYSQL and Apache > Keith, > > Go in your php.ini and change that extension path to have / (forward > slashes) instead of \ (backslashes), save it, then restart Apache. > > Regards, > Carlton Whitehead > > - Original Message - > From: "Keith Mervine" <[EMAIL PROTECTED]> > To: "Thomas Hearn" <[EMAIL PROTECTED]> > Cc: [EMAIL PROTECTED], php-windows@lists.php.net > Sent: Tuesday, August 7, 2007 9:56:29 AM (GMT-0500) America/New_York > Subject: Re: [PHP-WIN] PHP, MYSQL and Apache > > > This is from my apache error.log > > [Tue Aug 07 09:53:47 2007] [notice] Parent: Received shutdown signal -- > Shutting down the server. > [Tue Aug 07 09:53:47 2007] [notice] Child 2796: Exit event signaled. Child > process is ending. > [Tue Aug 07 09:53:48 2007] [notice] Child 2796: Released the start mutex > [Tue Aug 07 09:53:49 2007] [notice] Child 2796: Waiting for 250 worker > threads to exit. > [Tue Aug 07 09:53:49 2007] [notice] Child 2796: All worker threads have > exited. > [Tue Aug 07 09:53:49 2007] [notice] Child 2796: Child process is exiting > [Tue Aug 07 09:53:49 2007] [notice] Parent: Child process exited > successfully. > [Tue Aug 07 09:53:50 2007] [notice] Apache/2.2.4 (Win32) PHP/5.2.3 > configured > -- resuming normal operations > [Tue Aug 07 09:53:50 2007] [notice] Server built: Jan 9 2007 23:17:20 > [Tue Aug 07 09:53:50 2007] [notice] Parent: Created child process 4720 > PHP Warning: PHP Startup: Unable to load dynamic library > 'C:\\Apache2\\PHP5\\ext\\php_mysql.dll' - The specified module could not be > found.\r\n in Unknown on line 0 > PHP Warning: PHP Startup: Unable to load dynamic library > 'C:\\Apache2\\PHP5\\ext\\php_mysqli.dll' - The specified module could not > be found.\r\n in Unknown on line 0 > [Tue Aug 07 09:53:50 2007] [notice] Child 4720: Child process is running > [Tue Aug 07 09:53:50 2007] [notice] Child 4720: Acquired the start mutex. > [Tue Aug 07 09:53:50 2007] [notice] Child 4720: Starting 250 worker threads. > [Tue Aug 07 09:53:50 2007] [notice] Child 4720: Starting thread to listen > on > port 80. > > > The path doesnt look correct should there be double \ between each folder? > > > > > - Original Message - > From: Thomas Hearn <[EMAIL PROTECTED]> > To: KM <[EMAIL PROTECTED]> > Cc: [EMAIL PROTECTED], php-windows@lists.php.net > Date: Tue, 07 Aug 2007 08:53:02 -0400 > Subject: Re: [PHP-WIN] PHP, MYSQL and Apache > > > This sounds very typical of a problem with WHERE in your path MySQL is > set. > > > > Open up your PATH env variable, and look to see if your PHP ext > > directory (with the mysql ext) is listed in the path BEFORE your actual > > MySQL installation. If it isn't, then add it. The dlls that are used > > by PHP and MySQL have variation and are not actually the same DLL. The > > path not found error with MySQL is generally a result of a mismatch > > between dll versions of MySQL, often caused by the location in the > > path. Same goes for MSSQL. > > > > Hopefully that helps. > > > > Tom > > > > KM wrote: > > > Yes the directory is in the PATH > > > And yes on the second as well > > > > > > Keith > > > > > > -Original Message- > > > From: Jeff White [mailto:[EMAIL PROTECTED] > > > Sent: Monday, August 06, 2007 9:56 PM > > > To: 'KM' > > > Cc: php-windows@lists.php.net > > > Subject: RE: [PHP-WIN] PHP, MYSQL and Apache > > > > > > Hello Keith, > > > > > > I realize this may seem a bit tedious, but is your PHP directory in the > > > Windows PATH environment variable? And, if so, is the "libmysql.dll" > file > > in > > > the PHP directory? > > > > > > Jeff > > > > > > > > > > > > -Original Message- > > > From: KM [mailto:[EMAIL PROTECTED] > > > Sent: Monday, August 06, 2007 9:22 PM > > > To: 'Carlton Whitehead' > > > Cc: php-windows@lists.php.net > > > Subject: RE: [PHP-WIN] PHP, MYSQL and Apache > > > > > > Configuration File (php.ini) Path C:\WINDOWS > > > Loaded