Jump to content
xisto Community
rockarolla

Apache Php With Mysql On Windows [solved]

Recommended Posts

I have problems running PHP MySQL function in a windows set web environment. PhP scripts are executed but if I try to use mysql connect and other like functions I get a blank window (while using the browser).The command line client is working...I've added the path to libmysql.dll and the extension=php_mysql.dll in the php.ini.

Share this post


Link to post
Share on other sites

Wich Apache PHP Mysql environment are you using ?
Personnally I use easyphp : very easy to install, it sets up anything, works fine each time I install it. I use for testing my phpbb3 sites, whether with the local mysql database or with a remote Oracle database. It's free, get it from here : http://www.easyphp.org/

EasyPHP is a complete package allowing to use all the power and the flexibility that offers the dynamic language PHP. Package includes an Apache server, a MySQL database, PHPMyAdmin as well as easy development tools for web sites and applications.

I tried other distros like XAMP, did not work or simply crashed my windows. ;)

Share this post


Link to post
Share on other sites

WAMP http://www.wampserver.com/en/, was easy to install and use also. I've been using for quite a few years, before I learn how to install each component individually. I need to do so due to the fact that sometime I need to use particular version of the component for my project, which these distros cannot provide.

Share this post


Link to post
Share on other sites

I bumped on this combo server applications but I preferred to use the raw distributions...I would appreciate if you could check for me the config files if there are any (e.g. httpd.conf of Apache and the php.ini ) and give me the lines including mysql, safe there are no personal or sequrity issue therewith!Thanks.

Share this post


Link to post
Share on other sites

the only problem I see with using WAMP is that they don't allow you to change the password for the mysql user, i remember me looking through lots of documentation to be able to change the password ;)they should have that option on the setup...other than that, super easy to set up and run!.. in less than 5min

Share this post


Link to post
Share on other sites

I used to go with installing everything myself, Apache, PHP, MySQL on Windows and Linux, it was quite easy, but now on Windows I am using Wampserver and I really think that it's great, it works, the default settings are good and what I like about it that in some mouse clicks you can change between PHP, MySQL and Apache versions, by doing that I still didn't get any really big errors, so it is kind of stable. :PUsed to use EasyPHP too, before I tried WAMP5 which now is called Wampserver, but EasyPHP wasn't updated frequently and somehow I didn't like it, but the main thing it worked.. So when you know what is Apache, Mysql and PHP and know how to install them yourself, I think that making your live easy, you could just go with Wampserver :P But if you don't know how to do it separately and are just using all in one software like Wampserver and aren't serious about it when you also can use it, but if you're a little bit serious, you should try to do it separately, who knows when you'll need it, even though to do it on Windows is quite easy all you need is to push next next next, change something and edit the conf or ini files a bit.. On Linux it is almost identical, but if you want to be even more serious, you should and try to compile everything yourself ;) and make it work.. :P

Share this post


Link to post
Share on other sites

REsolved.

The problem was the php.ini file - the automatic configuration done by mysql isn't working properly.

You need to add some extension caluses in the php.ini file to dynamic libraries that aren't present explicitely....I found an answer - rather a workaround here:

http://www.tanguay.info/wamp/installPhp5.php5?step=15

simply add the lines to php.ini:

extension=php_mysqli.dll

however, this libabry doesn't exists - its fictious in that it can be obtained by renaming php_mysql.dll to php_mysqli.dll (you may find them in the ext folder of your php installation directory)

I have them both in the extension clause - now cannot be bothered as to check which one is necessary(some forums say both anyway).

I don't know how such a bug can exists? Maybe its a third party stuff interested in promoting their software...

Share this post


Link to post
Share on other sites

I don't know how such a bug can exists? Maybe its a third party stuff interested in promoting their software...

It's not a bug. Maybe your copy or version of php doesn't have that file. Mine does. I'm using 5.2.0.0

Share this post


Link to post
Share on other sites

REsolved.
The problem was the php.ini file - the automatic configuration done by mysql isn't working properly.

You need to add some extension caluses in the php.ini file to dynamic libraries that aren't present explicitely....I found an answer - rather a workaround here:

http://www.tanguay.info/wamp/installPhp5.php5?step=15

simply add the lines to php.ini:

extension=php_mysqli.dll

however, this libabry doesn't exists - its fictious in that it can be obtained by renaming php_mysql.dll to php_mysqli.dll (you may find them in the ext folder of your php installation directory)

I have them both in the extension clause - now cannot be bothered as to check which one is necessary(some forums say both anyway).

I don't know how such a bug can exists? Maybe its a third party stuff interested in promoting their software...

You can use both extensions at the same time, i do it without problems, i never use both of them on the same script, but i use them on different scripts and never had problems.

Now, if i remember correctly you must use the php_mysqli extension if you want to use the complete functionality offered by MySql 4.1.0 and greater versions, if not you can still use the php_mysql extension because is compatible with it.

Best regards,

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.