View Full Version : Help with installing PHP, MySQL, phpMyAdmin, SMTP, GD library?

06-16-2006, 05:30 PM

I'm currently installing the useful apps on my computer: PHP, MySQL, phpMyAdmin, SMTP Server, GD library, Apache Server...

I have already installed Apache 2.0 and PHP 5.something on my computer and I got them working ! :)

But anyways, I can't figure how do I install MySQL... if I write a php: $connect = mysql_connect("localhost","root","heehoo") or die(mysql_error());

It just stops executing the code. All echos below that line are not executed and I will not see even mysql errors :(

Help? I've heard it's easier to install mysql on php 4 than 5...

06-16-2006, 05:31 PM
is display_errors set to on in your php.ini? is this windows or *nix?
you may want to take a look at http://www.wampserver.com/ or http://www.apachefriends.org

06-16-2006, 05:36 PM
Okay. I changed the display errors to on, now I get:
Fatal error: Call to undefined function mysql_connect() in C:\Ohjelmat\Apache\Apache2\htdocs\index.php on line 6

I'm on Windows XP, SP2

EDIT: I just got Mail functions working, yeah! :), i'm using Free SMTP Server program...

Here's how I installed MySQL (not working still):
-Downloaded mysql 5.0
-unzipped to desktop
-started the setup
-i selected typical install
-didn't sign up
-configured mysql
-I chose Standard Configuration (not detailed configuration)
-I installed as Windows Service name MySQL (and selected the autostart for the service)
- I selected the 'include bin directory in win path'
- I made my password for root but didn't create anonymous users
-And then it installed succesfully.
- I started command promt and typed: mysqlshow -u root -p
- Then it asked for pass and I typed the pass I set before, it accepted it fine.
- then I wrote the php script to check mysql, but didn't work :(


06-16-2006, 07:13 PM
you need php_mysql.dll/php_mysqli.dll for php then in your php.ini you add or uncomment something like extension=php_mysql.dll
from here, http://php.net/mysql

PHP 5+

MySQL is no longer enabled by default, so the php_mysql.dll DLL must be enabled inside of php.ini. Also, PHP needs access to the MySQL client library. A file named libmysql.dll is included in the Windows PHP distribution and in order for PHP to talk to MySQL this file needs to be available to the Windows systems PATH. See the FAQ titled "How do I add my PHP directory to the PATH on Windows" for information on how to do this. Although copying libmysql.dll to the Windows system directory also works (because the system directory is by default in the system's PATH), it's not recommended.

As with enabling any PHP extension (such as php_mysql.dll), the PHP directive extension_dir should be set to the directory where the PHP extensions are located. See also the Manual Windows Installation Instructions. An example extension_dir value for PHP 5 is c:\php\ext

Note: If when starting the web server an error similar to the following occurs: "Unable to load dynamic library './php_mysql.dll'", this is because php_mysql.dll and/or libmysql.dll cannot be found by the system.