Re: PHP, MYSQL and Apache

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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:carlton.whitehead@xxxxxxxxxxxx] Sent: Monday, August 06, 2007 5:11 PM
To: KM
Cc: php-windows@xxxxxxxxxxxxx
Subject: Re:  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" <thalor@xxxxxxxxxxx>
To: php-windows@xxxxxxxxxxxxx
Sent: Monday, August 6, 2007 4:58:36 PM (GMT-0500) America/New_York
Subject:  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…

<?php

 // 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.

 $insert_sql = 'INSERT INTO simple_table (text) VALUES (\'test text,
1,2,3\')';

 // Execute SQL code.

 mysql_query( $insert_sql )

  or die ( 'It Didn\’t Work: ' . mysql_error() );

 // Tell User we are done.

 echo 'Code Inserted';

?>

Fatal error: Call to undefined function mysql_connect() in C:\Program
Files\Apache Software Foundation\Apache2.2\htdocs\test_insert_mysql.php on
line 7

Anyone had this before and have a solution, it would be appreciated.

Keith


No virus found in this outgoing message.
Checked by AVG Free Edition. Version: 7.5.476 / Virus Database: 269.11.6/938 - Release Date: 8/5/2007
4:16 PM
No virus found in this incoming message.
Checked by AVG Free Edition. Version: 7.5.476 / Virus Database: 269.11.6/938 - Release Date: 8/5/2007 4:16 PM
No virus found in this outgoing message.
Checked by AVG Free Edition. Version: 7.5.476 / Virus Database: 269.11.6/938 - Release Date: 8/5/2007 4:16 PM

--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Database Programming]     [PHP Install]     [Kernel Newbies]     [Yosemite Forum]     [PHP Books]

  Powered by Linux