PHP, MYSQL and Apache

PHP, MYSQL and Apache

am 06.08.2007 22:58:36 von km

------=_NextPart_000_0003_01C7D84B.09F4BF50
Content-Type: text/plain;
charset="windows-1250"
Content-Transfer-Encoding: quoted-printable

I am attempting to use the following together=85.

=20

MYSQL 5.0

Apache 2.2.4

PHP 5.2.3

=20

PHP info I can get. I get the following statement whenever trying to =
get to
mysql

=20

=20

Here is the PHP code for what I=92m trying to do=85

=20


// Connect to the database

$dbhost =3D 'localhost';

$dbusername =3D 'root';

$dbpasswd =3D 'joker';

$database_name =3D 'simple';

$connection =3D mysql_connect("$dbhost","$dbusername","$dbpasswd")

or die ('Couldn\'t connect to server.');

$db =3D mysql_select_db("$database_name", $connection)

or die('Couldn\'t select database.');

=20

// Generate SQL code to store data on database.

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

=20

// Execute SQL code.

mysql_query( $insert_sql )

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

=20

// Tell User we are done.

echo 'Code Inserted';

?>

=20

=20

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

=20

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

=20

Keith


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

------=_NextPart_000_0003_01C7D84B.09F4BF50--

RE: PHP, MYSQL and Apache

am 06.08.2007 23:08:42 von Bill Bolte

Looks like the mysql extension isn't enable in your php.ini. Make sure
it is enabled in the .ini and that the extension is in the appropriate
folder.



-----Original Message-----
From: KM [mailto:thalor@comcast.net]=20
Sent: Monday, August 06, 2007 3:59 PM
To: php-windows@lists.php.net
Subject: [PHP-WIN] PHP, MYSQL and Apache

I am attempting to use the following together....

=20

MYSQL 5.0

Apache 2.2.4

PHP 5.2.3

=20

PHP info I can get. I get the following statement whenever trying to
get to
mysql

=20

=20

Here is the PHP code for what I'm trying to do...

=20


// Connect to the database

$dbhost =3D 'localhost';

$dbusername =3D 'root';

$dbpasswd =3D 'joker';

$database_name =3D 'simple';

$connection =3D mysql_connect("$dbhost","$dbusername","$dbpasswd")

or die ('Couldn\'t connect to server.');

$db =3D mysql_select_db("$database_name", $connection)

or die('Couldn\'t select database.');

=20

// Generate SQL code to store data on database.

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

=20

// Execute SQL code.

mysql_query( $insert_sql )

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

=20

// Tell User we are done.

echo 'Code Inserted';

?>

=20

=20

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

=20

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

=20

Keith


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

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

Re: PHP, MYSQL and Apache

am 06.08.2007 23:10:50 von carlton.whitehead

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_conn=
ect command to work. You may need to edit your php.ini and enable the php_=
mysql.dll module. =20

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"
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â€=A6.

=20

MYSQL 5.0

Apache 2.2.4

PHP 5.2.3

=20

PHP info I can get. I get the following statement whenever trying to get t=
o
mysql

=20

=20

Here is the PHP code for what Iâ€=99m trying to doâ€=A6

=20


// Connect to the database

$dbhost =3D 'localhost';

$dbusername =3D 'root';

$dbpasswd =3D 'joker';

$database_name =3D 'simple';

$connection =3D mysql_connect("$dbhost","$dbusername","$dbpasswd")

or die ('Couldn\'t connect to server.');

$db =3D mysql_select_db("$database_name", $connection)

or die('Couldn\'t select database.');

=20

// Generate SQL code to store data on database.

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

=20

// Execute SQL code.

mysql_query( $insert_sql )

or die ( 'It Didn\â€=99t Work: ' . mysql_error() );

=20

// Tell User we are done.

echo 'Code Inserted';

?>

=20

=20

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

=20

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

=20

Keith


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

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

RE: PHP, MYSQL and Apache

am 07.08.2007 01:42:31 von km

Here is the section of my php.ini that contains the information

;extension=3Dphp_bz2.dll
;extension=3Dphp_curl.dll
;extension=3Dphp_dba.dll
;extension=3Dphp_dbase.dll
;extension=3Dphp_exif.dll
;extension=3Dphp_fdf.dll
;extension=3Dphp_gd2.dll
;extension=3Dphp_gettext.dll
;extension=3Dphp_gmp.dll
;extension=3Dphp_ifx.dll
;extension=3Dphp_imap.dll
;extension=3Dphp_interbase.dll
;extension=3Dphp_ldap.dll
;extension=3Dphp_mbstring.dll
;extension=3Dphp_mcrypt.dll
;extension=3Dphp_mhash.dll
;extension=3Dphp_mime_magic.dll
;extension=3Dphp_ming.dll
;extension=3Dphp_msql.dll
;extension=3Dphp_mssql.dll
extension=3Dphp_mysql.dll
extension=3Dphp_mysqli.dll
;extension=3Dphp_oci8.dll
;extension=3Dphp_openssl.dll
;extension=3Dphp_pdo.dll
;extension=3Dphp_pdo_firebird.dll
;extension=3Dphp_pdo_mssql.dll
;extension=3Dphp_pdo_mysql.dll
;extension=3Dphp_pdo_oci.dll
;extension=3Dphp_pdo_oci8.dll
;extension=3Dphp_pdo_odbc.dll
;extension=3Dphp_pdo_pgsql.dll
;extension=3Dphp_pdo_sqlite.dll
;extension=3Dphp_pgsql.dll
;extension=3Dphp_pspell.dll
;extension=3Dphp_shmop.dll
;extension=3Dphp_snmp.dll
;extension=3Dphp_soap.dll
;extension=3Dphp_sockets.dll
;extension=3Dphp_sqlite.dll
;extension=3Dphp_sybase_ct.dll
;extension=3Dphp_tidy.dll
;extension=3Dphp_xmlrpc.dll
;extension=3Dphp_xsl.dll
;extension=3Dphp_zip.dll

Is there something else I am missing?

Keith


-----Original Message-----
From: Carlton Whitehead [mailto:carlton.whitehead@cebesius.com]=20
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. =20

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"
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â€=A6.

=20

MYSQL 5.0

Apache 2.2.4

PHP 5.2.3

=20

PHP info I can get. I get the following statement whenever trying to =
get to
mysql

=20

=20

Here is the PHP code for what Iâ€=99m trying to doâ€=A6

=20


// Connect to the database

$dbhost =3D 'localhost';

$dbusername =3D 'root';

$dbpasswd =3D 'joker';

$database_name =3D 'simple';

$connection =3D mysql_connect("$dbhost","$dbusername","$dbpasswd")

or die ('Couldn\'t connect to server.');

$db =3D mysql_select_db("$database_name", $connection)

or die('Couldn\'t select database.');

=20

// Generate SQL code to store data on database.

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

=20

// Execute SQL code.

mysql_query( $insert_sql )

or die ( 'It Didn\â€=99t Work: ' . mysql_error() );

=20

// Tell User we are done.

echo 'Code Inserted';

?>

=20

=20

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

=20

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

=20

Keith


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

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

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

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

Re: PHP, MYSQL and Apache

am 07.08.2007 03:01:21 von carlton.whitehead

Keith,

Are you sure that's the same php.ini that is referenced by your=20
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
>=20
> ;extension=3Dphp_bz2.dll
> ;extension=3Dphp_curl.dll
> ;extension=3Dphp_dba.dll
> ;extension=3Dphp_dbase.dll
> ;extension=3Dphp_exif.dll
> ;extension=3Dphp_fdf.dll
> ;extension=3Dphp_gd2.dll
> ;extension=3Dphp_gettext.dll
> ;extension=3Dphp_gmp.dll
> ;extension=3Dphp_ifx.dll
> ;extension=3Dphp_imap.dll
> ;extension=3Dphp_interbase.dll
> ;extension=3Dphp_ldap.dll
> ;extension=3Dphp_mbstring.dll
> ;extension=3Dphp_mcrypt.dll
> ;extension=3Dphp_mhash.dll
> ;extension=3Dphp_mime_magic.dll
> ;extension=3Dphp_ming.dll
> ;extension=3Dphp_msql.dll
> ;extension=3Dphp_mssql.dll
> extension=3Dphp_mysql.dll
> extension=3Dphp_mysqli.dll
> ;extension=3Dphp_oci8.dll
> ;extension=3Dphp_openssl.dll
> ;extension=3Dphp_pdo.dll
> ;extension=3Dphp_pdo_firebird.dll
> ;extension=3Dphp_pdo_mssql.dll
> ;extension=3Dphp_pdo_mysql.dll
> ;extension=3Dphp_pdo_oci.dll
> ;extension=3Dphp_pdo_oci8.dll
> ;extension=3Dphp_pdo_odbc.dll
> ;extension=3Dphp_pdo_pgsql.dll
> ;extension=3Dphp_pdo_sqlite.dll
> ;extension=3Dphp_pgsql.dll
> ;extension=3Dphp_pspell.dll
> ;extension=3Dphp_shmop.dll
> ;extension=3Dphp_snmp.dll
> ;extension=3Dphp_soap.dll
> ;extension=3Dphp_sockets.dll
> ;extension=3Dphp_sqlite.dll
> ;extension=3Dphp_sybase_ct.dll
> ;extension=3Dphp_tidy.dll
> ;extension=3Dphp_xmlrpc.dll
> ;extension=3Dphp_xsl.dll
> ;extension=3Dphp_zip.dll
>=20
> Is there something else I am missing?
>=20
> Keith
>=20
>=20
> -----Original Message-----
> From: Carlton Whitehead [mailto:carlton.whitehead@cebesius.com]=20
> Sent: Monday, August 06, 2007 5:11 PM
> To: KM
> Cc: php-windows@lists.php.net
> Subject: Re: [PHP-WIN] PHP, MYSQL and Apache
>=20
> Keith,
>=20
> 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 mysq=
l_connect command to work. You may need to edit your php.ini and enable =
the php_mysql.dll module. =20
>=20
> Refer to the results of phpinfo(); for the path to the active php.ini f=
ile, since sometimes this can be an unexpected location on Windows machin=
es, at least in my experience.
>=20
> Regards,
> Carlton Whitehead
>=20
> ----- Original Message -----
> From: "KM"
> 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
>=20
> I am attempting to use the following togetherâ€=A6.
>=20
> =20
>=20
> MYSQL 5.0
>=20
> Apache 2.2.4
>=20
> PHP 5.2.3
>=20
> =20
>=20
> PHP info I can get. I get the following statement whenever trying to g=
et to
> mysql
>=20
> =20
>=20
> =20
>=20
> Here is the PHP code for what Iâ€=99m trying to doâ€=A6
>=20
> =20
>=20
> >=20
> // Connect to the database
>=20
> $dbhost =3D 'localhost';
>=20
> $dbusername =3D 'root';
>=20
> $dbpasswd =3D 'joker';
>=20
> $database_name =3D 'simple';
>=20
> $connection =3D mysql_connect("$dbhost","$dbusername","$dbpasswd")
>=20
> or die ('Couldn\'t connect to server.');
>=20
> $db =3D mysql_select_db("$database_name", $connection)
>=20
> or die('Couldn\'t select database.');
>=20
> =20
>=20
> // Generate SQL code to store data on database.
>=20
> $insert_sql =3D 'INSERT INTO simple_table (text) VALUES (\'test text,
> 1,2,3\')';
>=20
> =20
>=20
> // Execute SQL code.
>=20
> mysql_query( $insert_sql )
>=20
> or die ( 'It Didn\â€=99t Work: ' . mysql_error() );
>=20
> =20
>=20
> // Tell User we are done.
>=20
> echo 'Code Inserted';
>=20
> ?>
>=20
> =20
>=20
> =20
>=20
> 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
>=20
> =20
>=20
> Anyone had this before and have a solution, it would be appreciated.
>=20
> =20
>=20
> Keith
>=20
>=20
> No virus found in this outgoing message.
> Checked by AVG Free Edition.=20
> Version: 7.5.476 / Virus Database: 269.11.6/938 - Release Date: 8/5/200=
7
> 4:16 PM
> =20
>=20
> No virus found in this incoming message.
> Checked by AVG Free Edition.=20
> Version: 7.5.476 / Virus Database: 269.11.6/938 - Release Date: 8/5/200=
7 4:16 PM
> =20
>=20
> No virus found in this outgoing message.
> Checked by AVG Free Edition.=20
> Version: 7.5.476 / Virus Database: 269.11.6/938 - Release Date: 8/5/200=
7 4:16 PM
> =20
>=20

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

RE: PHP, MYSQL and Apache

am 07.08.2007 03:21:56 von km

Configuration File (php.ini) Path C:\WINDOWS =20
Loaded Configuration File C:\WINDOWS\php.ini =20

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:carlton.whitehead@cebesius.com]=20
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=20
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
>=20
> ;extension=3Dphp_bz2.dll
> ;extension=3Dphp_curl.dll
> ;extension=3Dphp_dba.dll
> ;extension=3Dphp_dbase.dll
> ;extension=3Dphp_exif.dll
> ;extension=3Dphp_fdf.dll
> ;extension=3Dphp_gd2.dll
> ;extension=3Dphp_gettext.dll
> ;extension=3Dphp_gmp.dll
> ;extension=3Dphp_ifx.dll
> ;extension=3Dphp_imap.dll
> ;extension=3Dphp_interbase.dll
> ;extension=3Dphp_ldap.dll
> ;extension=3Dphp_mbstring.dll
> ;extension=3Dphp_mcrypt.dll
> ;extension=3Dphp_mhash.dll
> ;extension=3Dphp_mime_magic.dll
> ;extension=3Dphp_ming.dll
> ;extension=3Dphp_msql.dll
> ;extension=3Dphp_mssql.dll
> extension=3Dphp_mysql.dll
> extension=3Dphp_mysqli.dll
> ;extension=3Dphp_oci8.dll
> ;extension=3Dphp_openssl.dll
> ;extension=3Dphp_pdo.dll
> ;extension=3Dphp_pdo_firebird.dll
> ;extension=3Dphp_pdo_mssql.dll
> ;extension=3Dphp_pdo_mysql.dll
> ;extension=3Dphp_pdo_oci.dll
> ;extension=3Dphp_pdo_oci8.dll
> ;extension=3Dphp_pdo_odbc.dll
> ;extension=3Dphp_pdo_pgsql.dll
> ;extension=3Dphp_pdo_sqlite.dll
> ;extension=3Dphp_pgsql.dll
> ;extension=3Dphp_pspell.dll
> ;extension=3Dphp_shmop.dll
> ;extension=3Dphp_snmp.dll
> ;extension=3Dphp_soap.dll
> ;extension=3Dphp_sockets.dll
> ;extension=3Dphp_sqlite.dll
> ;extension=3Dphp_sybase_ct.dll
> ;extension=3Dphp_tidy.dll
> ;extension=3Dphp_xmlrpc.dll
> ;extension=3Dphp_xsl.dll
> ;extension=3Dphp_zip.dll
>=20
> Is there something else I am missing?
>=20
> Keith
>=20
>=20
> -----Original Message-----
> From: Carlton Whitehead [mailto:carlton.whitehead@cebesius.com]=20
> Sent: Monday, August 06, 2007 5:11 PM
> To: KM
> Cc: php-windows@lists.php.net
> Subject: Re: [PHP-WIN] PHP, MYSQL and Apache
>=20
> Keith,
>=20
> 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. =20
>=20
> 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.
>=20
> Regards,
> Carlton Whitehead
>=20
> ----- Original Message -----
> From: "KM"
> 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
>=20
> I am attempting to use the following togetherâ€=A6.
>=20
> =20
>=20
> MYSQL 5.0
>=20
> Apache 2.2.4
>=20
> PHP 5.2.3
>=20
> =20
>=20
> PHP info I can get. I get the following statement whenever trying to =
get to
> mysql
>=20
> =20
>=20
> =20
>=20
> Here is the PHP code for what Iâ€=99m trying to doâ€=A6
>=20
> =20
>=20
> >=20
> // Connect to the database
>=20
> $dbhost =3D 'localhost';
>=20
> $dbusername =3D 'root';
>=20
> $dbpasswd =3D 'joker';
>=20
> $database_name =3D 'simple';
>=20
> $connection =3D mysql_connect("$dbhost","$dbusername","$dbpasswd")
>=20
> or die ('Couldn\'t connect to server.');
>=20
> $db =3D mysql_select_db("$database_name", $connection)
>=20
> or die('Couldn\'t select database.');
>=20
> =20
>=20
> // Generate SQL code to store data on database.
>=20
> $insert_sql =3D 'INSERT INTO simple_table (text) VALUES (\'test text,
> 1,2,3\')';
>=20
> =20
>=20
> // Execute SQL code.
>=20
> mysql_query( $insert_sql )
>=20
> or die ( 'It Didn\â€=99t Work: ' . mysql_error() );
>=20
> =20
>=20
> // Tell User we are done.
>=20
> echo 'Code Inserted';
>=20
> ?>
>=20
> =20
>=20
> =20
>=20
> 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
>=20
> =20
>=20
> Anyone had this before and have a solution, it would be appreciated.
>=20
> =20
>=20
> Keith
>=20
>=20
> No virus found in this outgoing message.
> Checked by AVG Free Edition.=20
> Version: 7.5.476 / Virus Database: 269.11.6/938 - Release Date: =
8/5/2007
> 4:16 PM
> =20
>=20
> No virus found in this incoming message.
> Checked by AVG Free Edition.=20
> Version: 7.5.476 / Virus Database: 269.11.6/938 - Release Date: =
8/5/2007 4:16 PM
> =20
>=20
> No virus found in this outgoing message.
> Checked by AVG Free Edition.=20
> Version: 7.5.476 / Virus Database: 269.11.6/938 - Release Date: =
8/5/2007 4:16 PM
> =20
>=20

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

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

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

RE: PHP, MYSQL and Apache

am 07.08.2007 03:45:47 von km

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â€=99t have all those double \ should it?

-----Original Message-----
From: Carlton Whitehead [mailto:carlton.whitehead@cebesius.com]=20
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=20
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
>=20
> ;extension=3Dphp_bz2.dll
> ;extension=3Dphp_curl.dll
> ;extension=3Dphp_dba.dll
> ;extension=3Dphp_dbase.dll
> ;extension=3Dphp_exif.dll
> ;extension=3Dphp_fdf.dll
> ;extension=3Dphp_gd2.dll
> ;extension=3Dphp_gettext.dll
> ;extension=3Dphp_gmp.dll
> ;extension=3Dphp_ifx.dll
> ;extension=3Dphp_imap.dll
> ;extension=3Dphp_interbase.dll
> ;extension=3Dphp_ldap.dll
> ;extension=3Dphp_mbstring.dll
> ;extension=3Dphp_mcrypt.dll
> ;extension=3Dphp_mhash.dll
> ;extension=3Dphp_mime_magic.dll
> ;extension=3Dphp_ming.dll
> ;extension=3Dphp_msql.dll
> ;extension=3Dphp_mssql.dll
> extension=3Dphp_mysql.dll
> extension=3Dphp_mysqli.dll
> ;extension=3Dphp_oci8.dll
> ;extension=3Dphp_openssl.dll
> ;extension=3Dphp_pdo.dll
> ;extension=3Dphp_pdo_firebird.dll
> ;extension=3Dphp_pdo_mssql.dll
> ;extension=3Dphp_pdo_mysql.dll
> ;extension=3Dphp_pdo_oci.dll
> ;extension=3Dphp_pdo_oci8.dll
> ;extension=3Dphp_pdo_odbc.dll
> ;extension=3Dphp_pdo_pgsql.dll
> ;extension=3Dphp_pdo_sqlite.dll
> ;extension=3Dphp_pgsql.dll
> ;extension=3Dphp_pspell.dll
> ;extension=3Dphp_shmop.dll
> ;extension=3Dphp_snmp.dll
> ;extension=3Dphp_soap.dll
> ;extension=3Dphp_sockets.dll
> ;extension=3Dphp_sqlite.dll
> ;extension=3Dphp_sybase_ct.dll
> ;extension=3Dphp_tidy.dll
> ;extension=3Dphp_xmlrpc.dll
> ;extension=3Dphp_xsl.dll
> ;extension=3Dphp_zip.dll
>=20
> Is there something else I am missing?
>=20
> Keith
>=20
>=20
> -----Original Message-----
> From: Carlton Whitehead [mailto:carlton.whitehead@cebesius.com]=20
> Sent: Monday, August 06, 2007 5:11 PM
> To: KM
> Cc: php-windows@lists.php.net
> Subject: Re: [PHP-WIN] PHP, MYSQL and Apache
>=20
> Keith,
>=20
> 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. =20
>=20
> 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.
>=20
> Regards,
> Carlton Whitehead
>=20
> ----- Original Message -----
> From: "KM"
> 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
>=20
> I am attempting to use the following togetherâ€=A6.
>=20
> =20
>=20
> MYSQL 5.0
>=20
> Apache 2.2.4
>=20
> PHP 5.2.3
>=20
> =20
>=20
> PHP info I can get. I get the following statement whenever trying to =
get to
> mysql
>=20
> =20
>=20
> =20
>=20
> Here is the PHP code for what Iâ€=99m trying to doâ€=A6
>=20
> =20
>=20
> >=20
> // Connect to the database
>=20
> $dbhost =3D 'localhost';
>=20
> $dbusername =3D 'root';
>=20
> $dbpasswd =3D 'joker';
>=20
> $database_name =3D 'simple';
>=20
> $connection =3D mysql_connect("$dbhost","$dbusername","$dbpasswd")
>=20
> or die ('Couldn\'t connect to server.');
>=20
> $db =3D mysql_select_db("$database_name", $connection)
>=20
> or die('Couldn\'t select database.');
>=20
> =20
>=20
> // Generate SQL code to store data on database.
>=20
> $insert_sql =3D 'INSERT INTO simple_table (text) VALUES (\'test text,
> 1,2,3\')';
>=20
> =20
>=20
> // Execute SQL code.
>=20
> mysql_query( $insert_sql )
>=20
> or die ( 'It Didn\â€=99t Work: ' . mysql_error() );
>=20
> =20
>=20
> // Tell User we are done.
>=20
> echo 'Code Inserted';
>=20
> ?>
>=20
> =20
>=20
> =20
>=20
> 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
>=20
> =20
>=20
> Anyone had this before and have a solution, it would be appreciated.
>=20
> =20
>=20
> Keith
>=20
>=20
> No virus found in this outgoing message.
> Checked by AVG Free Edition.=20
> Version: 7.5.476 / Virus Database: 269.11.6/938 - Release Date: =
8/5/2007
> 4:16 PM
> =20
>=20
> No virus found in this incoming message.
> Checked by AVG Free Edition.=20
> Version: 7.5.476 / Virus Database: 269.11.6/938 - Release Date: =
8/5/2007 4:16 PM
> =20
>=20
> No virus found in this outgoing message.
> Checked by AVG Free Edition.=20
> Version: 7.5.476 / Virus Database: 269.11.6/938 - Release Date: =
8/5/2007 4:16 PM
> =20
>=20

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

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

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

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

RE: PHP, MYSQL and Apache

am 07.08.2007 03:55:46 von Jeff White

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:thalor@comcast.net]
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:carlton.whitehead@cebesius.com]
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:carlton.whitehead@cebesius.com]
> 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"
> 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.
>
> $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
>
>

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

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

RE: PHP, MYSQL and Apache

am 07.08.2007 03:59:00 von km

Yes the directory is in the PATH....
And yes on the second as well....

Keith

-----Original Message-----
From: Jeff White [mailto:bitslayer@comcast.net]
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:thalor@comcast.net]
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:carlton.whitehead@cebesius.com]
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:carlton.whitehead@cebesius.com]
> 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"
> 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.
>
> $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
>
>

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

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

RE: PHP, MYSQL and Apache

am 07.08.2007 09:31:39 von hburton

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:carlton.whitehead@cebesius.com]
> 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:carlton.whitehead@cebesius.com]
>> 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"
>> 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.
>>
>> $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
>
> 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
>
>

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

RE: PHP, MYSQL and Apache

am 07.08.2007 13:19:03 von Keith Mervine

WWVzIGl0IGlzIGV4YWN0bHkgbGlrZSB0aGF0IGFzIGEgbWF0dGVyIG9mIGZh Y3QuICBJdCBwb2ludH
MgdG8gdGhlIGNvcnJlY3QgDQpkaXJlY3Rvcnkgd2hlcmUgdGhlIGRsbHMgYX JlLg0KDQotLS0tLSBP
cmlnaW5hbCBNZXNzYWdlIC0tLS0tDQpGcm9tOiBoYnVydG9uQG1yYWVudGVy dGFpbm1lbnQuY29tDQ
pUbzogIktNIiA8dGhhbG9yQGNvbWNhc3QubmV0Pg0KQ2M6ICInQ2FybHRvbi BXaGl0ZWhlYWQnIiA8
Y2FybHRvbi53aGl0ZWhlYWRAY2ViZXNpdXMuY29tPiwgIA0KcGhwLX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C 0gUmVsZWFzZSBEYXRl
OiA4LzUvMjAwNw0KPiA+PiA0OjE2IFBNDQo+ID4+DQo+ID4+DQo+ID4NCj4g PiAtLQ0KPiA+IFBIUC
BXaW5kb3dzIE1haWxpbmcgTGlzdCAoaHR0cDovL3d3dy5waHAubmV0LykNCj 4gPiBUbyB1bnN1YnNj
cmliZSwgdmlzaXQ6IGh0dHA6Ly93d3cucGhwLm5ldC91bnN1Yi5waHANCj4g Pg0KPiA+IE5vIHZpcn
VzIGZvdW5kIGluIHRoaXMgaW5jb21pbmcgbWVzc2FnZS4NCj4gPiBDaGVja2 VkIGJ5IEFWRyBGcmVl
IEVkaXRpb24uDQo+ID4gVmVyc2lvbjogNy41LjQ3NiAvIFZpcnVzIERhdGFi YXNlOiAyNjkuMTEuNi
85MzggLSBSZWxlYXNlIERhdGU6IDgvNS8yMDA3DQo+ID4gNDoxNiBQTQ0KPi A+DQo+ID4NCj4gPiBO
byB2aXJ1cyBmb3VuZCBpbiB0aGlzIG91dGdvaW5nIG1lc3NhZ2UuDQo+ID4g Q2hlY2tlZCBieSBBVk
cgRnJlZSBFZGl0aW9uLg0KPiA+IFZlcnNpb246IDcuNS40NzYgLyBWaXJ1cy BEYXRhYmFzZTogMjY5
LjExLjYvOTM4IC0gUmVsZWFzZSBEYXRlOiA4LzUvMjAwNw0KPiA+IDQ6MTYg UE0NCj4gPg0KPiA+DQ
o+ID4gLS0NCj4gPiBQSFAgV2luZG93cyBNYWlsaW5nIExpc3QgKGh0dHA6Ly 93d3cucGhwLm5ldC8p
DQo+ID4gVG8gdW5zdWJzY3JpYmUsIHZpc2l0OiBodHRwOi8vd3d3LnBocC5u ZXQvdW5zdWIucGhwDQ
o+ID4NCj4gPg0KPiANCj4g

Re: PHP, MYSQL and Apache

am 07.08.2007 14:53:02 von Tom Hearn

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:bitslayer@comcast.net]
> 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:thalor@comcast.net]
> 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:carlton.whitehead@cebesius.com]
> 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:carlton.whitehead@cebesius.com]
>> 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"
>> 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.
>>
>> $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
>
>>
>>
>>
>
> 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

Re: PHP, MYSQL and Apache

am 07.08.2007 15:56:29 von Keith Mervine

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
To: KM
Cc: bitslayer@comcast.net, 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:bitslayer@comcast.net]
> > 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:thalor@comcast.net]
> > 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:carlton.whitehead@cebesius.com]
> > 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:carlton.whitehead@cebesius.com]
> >> 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"
> >> 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.
> >>
> >> $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
> >
> >>
> >>
> >>
> >
> > 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

Re: PHP, MYSQL and Apache

am 07.08.2007 16:01:16 von carlton.whitehead

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"
To: "Thomas Hearn"
Cc: bitslayer@comcast.net, 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
To: KM
Cc: bitslayer@comcast.net, 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:bitslayer@comcast.net]
> > 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:thalor@comcast.net]
> > 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:carlton.whitehead@cebesius.com]
> > 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:carlton.whitehead@cebesius.com]
> >> 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"
> >> 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.
> >>
> >> $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
> >
> >>
> >>
> >>
> >
> > 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

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

Re: PHP, MYSQL and Apache

am 07.08.2007 16:44:06 von Keith Mervine

Adding the path to the extension and reversing the slashes worked! Thanks to
all who replied!

K

----- Original Message -----
From: Carlton Whitehead
To: thalor@comcast.net
Cc: bitslayer@comcast.net, php-windows@lists.php.net, Thomas Hearn

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"
> To: "Thomas Hearn"
> Cc: bitslayer@comcast.net, 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
> To: KM
> Cc: bitslayer@comcast.net, 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:bitslayer@comcast.net]
> > > 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:thalor@comcast.net]
> > > 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:carlton.whitehead@cebesius.com]
> > > 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:carlton.whitehead@cebesius.com]
> > >> 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"
> > >> 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.
> > >>
> > >> $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
> > >
> > >>
> > >>
> > >>
> > >
> > > 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
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

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

Re: PHP, MYSQL and Apache

am 08.08.2007 07:14:30 von Abhisek Dutta

KM,
Check this out:
http://forums.mysql.com/read.php?52,98383,98383
It may help you.
Regards
Abhisek


KM wrote:
> 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.
>
> $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
>
>
>

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