Cannot access mysql from php script

Discussion in 'PHP' started by jeboy, Dec 29, 2006.

  1. #1
    I received an error while trying to access mysql from my php script
    "Undefined function mysql_connect()"

    I installed php as a module in apache, placed the php.ini to C:\WINDOWS and libmysql.dll to C:\WINDOWS\system32 I also set the extension directory to extension_dir = "C:\php" and uncomment the extension=php_mysql.dll of php.ini
     
    jeboy, Dec 29, 2006 IP
  2. etdegraor

    etdegraor Peon

    Messages:
    8
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Hey body just install AppServ program and you wont have any problem whith apace, mysql, php!!!! Search for it and u will find it!!
     
    etdegraor, Dec 29, 2006 IP
  3. TwistMyArm

    TwistMyArm Peon

    Messages:
    931
    Likes Received:
    44
    Best Answers:
    0
    Trophy Points:
    0
    #3
    etdegraor is right: look for an all in one installation (AppServ, XAMPP, etc.) but regarding your question...

    Let me get this straight: you told PHP that the extension directory is "C:\PHP" but then copied your extension in to "C:\Windows\system32". Then you told PHP the extension is called "php_mysql.dll" but called the file "libmysql.dll".... and you can't work out why it doesn't work?

    Grab an all in one installer and be done with it, but surely you can see that you were going nowhere in the first place, right? I don't mean to offend: I'm more curious than anything.
     
    TwistMyArm, Dec 29, 2006 IP
  4. alarik

    alarik Active Member

    Messages:
    382
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    58
    #4
    why don`t you just download VERTRIGO SERVER and get rid of all problems regarding php/apache/mysql instalations.It is all in 1 pack,no configuration,no nothing,and it works 100%!
     
    alarik, Dec 29, 2006 IP