MySQL Configuration on Windows Box with Apache and PHP
MySQL Configuration on Windows Box with Apache and PHP
am 17.06.2009 16:43:50 von PK
--------------050904060708000007040701
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
I am new to PHP and as well as with MySQL,
I have installed PHP 5.28, on win XP (with Apache 2.09) and it is
installed properly (at least PHP and apache),
as when I call phpinfo (), through a script, it shows
the PHP Information.
then I installed MySQL 5.1.30,
and from MySQL command prompt I am able to creating tables, making
queries etc.
so i think it is also installed properly.
Now I want to use MySQL with PHP, but seems that *MySqli* is not
installed properly. as when I write a following script in a php page I
get a error,
that indicates that i have written the following script in a file say
*testmysql.php*.
*
$si = function_exists ( 'mysqli_connect' ) ;
if ( $si )
{
echo ' MySQLi appears to be installed correctly ' ;
}
else
{
echo 'MySQLi does not appears to be installed. ' ;
}
?>
I understand that it is a configuration error somewhere, as I am new
with PHP and MySQL, so i am feeling lost.
I have uncommented following two lines in the php.ini
*extension=php_mysql.dll
extension=php_mysqli.dll
*
and as well these two lines are also uncommented in the httpd.conf
(Apache config file ).
*LoadModule php5_module d:/programs/php528/php5apache2.dll
AddType application/x-httpd-php .php
*and theseb two files are also copied in windows folder (means available
with windows path).*
php5ts.dll
php5apache2.dll
*
any guess what i am doing wrong, i am sure that it is some configuration
error.
Prateek
--------------050904060708000007040701--
RE: MySQL Configuration on Windows Box with Apache and PHP
am 17.06.2009 17:48:04 von Will Fitch
It's a long shot, but have you restarted Apache?
--
Thanks,
Will Fitch
Zend Certified Engineer
Cell: 931.205.8242
Fax: 931.914.1206
-----Original Message-----
From: PK [mailto:kprateek002@gmail.com]=20
Sent: Wednesday, June 17, 2009 9:44 AM
To: php-windows@lists.php.net
Subject: [PHP-WIN] MySQL Configuration on Windows Box with Apache and PHP
I am new to PHP and as well as with MySQL,
I have installed PHP 5.28, on win XP (with Apache 2.09) and it is=20
installed properly (at least PHP and apache),=20
as when I call phpinfo (), through a script, it shows
the PHP Information.
then I installed MySQL 5.1.30,=20
and from MySQL command prompt I am able to creating tables, making=20
queries etc.
so i think it is also installed properly.
Now I want to use MySQL with PHP, but seems that *MySqli* is not =20
installed properly. as when I write a following script in a php page I=20
get a error,
that indicates that i have written the following script in a file say=20
*testmysql.php*.
*
$si =3D function_exists ( 'mysqli_connect' ) ;
if ( $si )
{
echo ' MySQLi appears to be installed correctly ' ;
}
else
{
echo 'MySQLi does not appears to be installed. ' ;
}
?>
I understand that it is a configuration error somewhere, as I am new=20
with PHP and MySQL, so i am feeling lost.
I have uncommented following two lines in the php.ini
*extension=3Dphp_mysql.dll
extension=3Dphp_mysqli.dll
*
and as well these two lines are also uncommented in the httpd.conf=20
(Apache config file ).
*LoadModule php5_module d:/programs/php528/php5apache2.dll
AddType application/x-httpd-php .php
*and theseb two files are also copied in windows folder (means available=20
with windows path).*
php5ts.dll
php5apache2.dll
*
any guess what i am doing wrong, i am sure that it is some configuration=20
error.
Prateek
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: MySQL Configuration on Windows Box with Apache and PHP
am 17.06.2009 17:50:35 von Antonio CS
--0016e6dbe74c8c2aac046c8d400f
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Don't know if this was sent correctly but here it goes again!!
See if the extension dir ini entry is set correctly.
Look for:
extension_dir = "./"
This is normally not set correctly in windows.
Also check Apache's error log files, they should say something about not
being able to load the drivers etc
Good Luck
On Wed, Jun 17, 2009 at 4:48 PM, Will Fitch wrote:
> It's a long shot, but have you restarted Apache?
>
> --
> Thanks,
>
> Will Fitch
> Zend Certified Engineer
> Cell: 931.205.8242
> Fax: 931.914.1206
>
> -----Original Message-----
> From: PK [mailto:kprateek002@gmail.com]
> Sent: Wednesday, June 17, 2009 9:44 AM
> To: php-windows@lists.php.net
> Subject: [PHP-WIN] MySQL Configuration on Windows Box with Apache and PHP
>
> I am new to PHP and as well as with MySQL,
>
> I have installed PHP 5.28, on win XP (with Apache 2.09) and it is
> installed properly (at least PHP and apache),
>
> as when I call phpinfo (), through a script, it shows
>
> the PHP Information.
>
> then I installed MySQL 5.1.30,
> and from MySQL command prompt I am able to creating tables, making
> queries etc.
>
> so i think it is also installed properly.
>
> Now I want to use MySQL with PHP, but seems that *MySqli* is not
> installed properly. as when I write a following script in a php page I
> get a error,
>
> that indicates that i have written the following script in a file say
> *testmysql.php*.
>
> *
> $si = function_exists ( 'mysqli_connect' ) ;
> if ( $si )
> {
> echo ' MySQLi appears to be installed correctly ' ;
> }
> else
> {
> echo 'MySQLi does not appears to be installed. ' ;
> }
> ?>
>
> I understand that it is a configuration error somewhere, as I am new
> with PHP and MySQL, so i am feeling lost.
>
> I have uncommented following two lines in the php.ini
>
> *extension=php_mysql.dll
> extension=php_mysqli.dll
> *
>
> and as well these two lines are also uncommented in the httpd.conf
> (Apache config file ).
>
> *LoadModule php5_module d:/programs/php528/php5apache2.dll
> AddType application/x-httpd-php .php
>
> *and theseb two files are also copied in windows folder (means available
> with windows path).*
>
> php5ts.dll
> php5apache2.dll
>
> *
> any guess what i am doing wrong, i am sure that it is some configuration
> error.
>
> Prateek
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--0016e6dbe74c8c2aac046c8d400f--
Re: MySQL Configuration on Windows Box with Apache and PHP
am 17.06.2009 17:51:58 von harlequin2
Hi Prateek,
Prateek wrote:
> Now I want to use MySQL with PHP, but seems that *MySqli* is not
> installed properly. as when I write a following script in a php page I
> get a error ...
>
> *
> any guess what i am doing wrong, i am sure that it is some configuration
> error.
>
> Prateek
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
Have a look at your XP's event log (if you don't know the way, type "eventvwr" at the "Run" prompt) and check your System tree for PHP errors; if you enabled the php_mysqli.dll in your php.ini, there is still a chance that your extension_dir is not properly set. If that's the case, you'll find some entries with "module could not be loaded" in your event log.
Then it could be possible that php_mysqli.dll is not able to find your libmysql.dll in your php ini; add the path to libmysql.dll to your PATH and restart your apache.
More information regarding php_mysqli can be found here:
http://de2.php.net/manual/en/mysqli.installation.php
Regards,
Sascha
--
GMX FreeDSL Komplettanschluss mit DSL 6.000 Flatrate und Telefonanschluss
für nur 17,95 Euro/mtl.!* http://portal.gmx.net/de/go/dsl02
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
RE: MySQL Configuration on Windows Box with Apache and PHP
am 17.06.2009 17:55:51 von Stephen.Brereton
I have to say that the extensions_dir setting is most likely the culprit
here.
Be explicit with its' value - c:\php\extensions - not './' - otherwise
you really don't know where its pointing.
Using phpinfo() in a simple file will tell you exactly what is working
and where things are. If the dlls are in the wrong place, move them and
restart apache
-----Original Message-----
From: Antonio CS [mailto:antoniocs@gmail.com]=0D
Sent: 17 June 2009 16:51
To: Will Fitch
Cc: kprateek002@gmail.com; php-windows@lists.php.net
Subject: Re: [PHP-WIN] MySQL Configuration on Windows Box with Apache
and PHP
Don't know if this was sent correctly but here it goes again!!
See if the extension dir ini entry is set correctly.
Look for:
extension_dir =3D "./"
This is normally not set correctly in windows.
Also check Apache's error log files, they should say something about not
being able to load the drivers etc
Good Luck
On Wed, Jun 17, 2009 at 4:48 PM, Will Fitch wrote:
> It's a long shot, but have you restarted Apache?
>
> --
> Thanks,
>
> Will Fitch
> Zend Certified Engineer
> Cell: 931.205.8242
> Fax: 931.914.1206
>
> -----Original Message-----
> From: PK [mailto:kprateek002@gmail.com]
> Sent: Wednesday, June 17, 2009 9:44 AM
> To: php-windows@lists.php.net
> Subject: [PHP-WIN] MySQL Configuration on Windows Box with Apache and=0D
> PHP
>
> I am new to PHP and as well as with MySQL,
>
> I have installed PHP 5.28, on win XP (with Apache 2.09) and it is
> installed properly (at least PHP and apache),
>
> as when I call phpinfo (), through a script, it shows
>
> the PHP Information.
>
> then I installed MySQL 5.1.30,
> and from MySQL command prompt I am able to creating tables, making
> queries etc.
>
> so i think it is also installed properly.
>
> Now I want to use MySQL with PHP, but seems that *MySqli* is not=0D
> installed properly. as when I write a following script in a php page I
> get a error,
>
> that indicates that i have written the following script in a file say=0D
> *testmysql.php*.
>
> *
> $si =3D function_exists ( 'mysqli_connect' ) ;
> if ( $si )
> {
> echo ' MySQLi appears to be installed correctly ' ;
> }
> else
> {
> echo 'MySQLi does not appears to be installed. '
;
> }
> ?>
>
> I understand that it is a configuration error somewhere, as I am new=0D
> with PHP and MySQL, so i am feeling lost.
>
> I have uncommented following two lines in the php.ini
>
> *extension=3Dphp_mysql.dll
> extension=3Dphp_mysqli.dll
> *
>
> and as well these two lines are also uncommented in the httpd.conf=0D
> (Apache config file ).
>
> *LoadModule php5_module d:/programs/php528/php5apache2.dll
> AddType application/x-httpd-php .php
>
> *and theseb two files are also copied in windows folder (means=0D
> available with windows path).*
>
> php5ts.dll
> php5apache2.dll
>
> *
> any guess what i am doing wrong, i am sure that it is some=0D
> configuration error.
>
> Prateek
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
* * * * * * * * * * * *=0D
Help protect the environment - please don't print this email unless you=
really need to.
* * * * * * * * * * * *
This communication is from City of York Council.
The information contained within, and in any attachment(s), is confidential=
and legally privileged. It is for the exclusive use of the intended=
recipient(s). If you are not the intended recipient(s), please note that=
any form of distribution, copying or use of this communication, or the=
information within, is strictly prohibited and may be unlawful. Equally,=
you must not disclose all, or part, of its contents to any other person.
If you have received this communication in error, please return it=
immediately to the sender, then delete and destroy any copies of it.
City of York Council disclaims any liability for action taken in reliance=
on the content of this communication.
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: MySQL Configuration on Windows Box with Apache and PHP
am 17.06.2009 17:57:19 von harlequin2
*doooh*
I forgot you use Apache instead of IIS ... if php is set up to log errors to the windows log (entry "error_log" with value "syslog" in php.ini), then you'll find errors and warnings in your event log, otherwise have a look at your apache logs (as mentioned by Antonio). And if you check you php.ini, take a look if "log_errors" is set to "1".
Regards, Sascha
--
GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT!
Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php