SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Member bluebox39's Avatar
    Join Date
    Aug 2004
    Location
    Lagos, Nigeria
    Posts
    12
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Exclamation I'm having problems connecting MySQL with PHP

    Hello Developers,

    I'm quite new in this field of PHP & MySQL. I'm come to love it very much and I have now appreciated it's capabilities in helping me achieve what I have been trying to do for months.

    I got to know about PHP & MySQL just 3 months back! because it's very new and quite strange to people here in Nigeria. Most pple I ask have not heard of it at all. So, i've gotten nobody to assist me here.

    I downloaded the PHP engine from the site (www.php.net)as well as the MySQL Server and Client (Both version 5, from www.mysql.com) and I've been going on with them gradually. However, before I load a PHP page from the time my PC's on, it displays the warning (PHP Startup: cannot load or fine the dynamic libraries .... bla bla bla bla bla).

    That aside, I cannot connect to MySQL at all. All the example's I get from the PHP documentation of how to connect using mysql_connect() does not work at all. I even tried the examples in Kev's 4 sample chapters which I downloaded some time ago but it did not work at all. PHP works fine on it's own and MySQL is fine working independently too. But using the 2 together is not working for me here. Is there something I'm missing??? Please, I need your help .

    David
    Lagos, Nigeria

  2. #2
    SitePoint Enthusiast timtsf's Avatar
    Join Date
    Oct 2004
    Location
    england
    Posts
    30
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Do you have
    mysql_connect("localhost","username,"password")or die(mysql_error());

    The problem could be, you have mysql enabled but u aint created a database?
    wrong password?
    wrong section under localhost?

  3. #3
    SitePoint Zealot patrikG's Avatar
    Join Date
    Aug 2003
    Location
    Sussex, UK
    Posts
    129
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    A quick and easy solution would be to download a preconfigured, out-of-the-box Apache server that comes with PHP, MySQL and tons of other stuff: http://www.apachefriends.org/en/xampp.html

    That's just if you get bogged down by the complexities of setting it all up yourself.

  4. #4
    SitePoint Zealot asmictech's Avatar
    Join Date
    Oct 2004
    Location
    nigeria
    Posts
    151
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi colleague. it's nice to meet a nigerian here. yeah the problem is easy. from all indication, you haven't configured php,mysql over your server(Apache). well you can . an easy way out of all this is for u to get a software that installs and configure the three for you at once(believe me.) though i have those software configured for my pc at home, here in office i use easyphp(the software). with this, i run to servers on my system just that at different port numbers.

    to use the software, go to www.easyphp.com to get the software and install it. with that all the other software will be installed and configured(apache,php,mysql).

    then u are almost thru.
    from there, u just need to create ur database, then all queries can be executed perfectly.


Bookmarks

Posting Permissions

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