Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    Regular Coder
    Join Date
    Jan 2006
    Location
    Finland, Hollola
    Posts
    285
    Thanks
    8
    Thanked 0 Times in 0 Posts

    Question Help with installing PHP, MySQL, phpMyAdmin, SMTP, GD library?

    Hi,

    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...
    PHP 5 & MySQL 5 (Y)

  • #2
    fci
    fci is offline
    Senior Coder
    Join Date
    Aug 2004
    Location
    Twin Cities
    Posts
    1,345
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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
    Last edited by fci; 06-16-2006 at 05:33 PM.

  • #3
    Regular Coder
    Join Date
    Jan 2006
    Location
    Finland, Hollola
    Posts
    285
    Thanks
    8
    Thanked 0 Times in 0 Posts
    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

    Help?
    Last edited by kaisellgren; 06-16-2006 at 05:56 PM.
    PHP 5 & MySQL 5 (Y)

  • #4
    fci
    fci is offline
    Senior Coder
    Join Date
    Aug 2004
    Location
    Twin Cities
    Posts
    1,345
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •