Find the answer to your Linux question:
Results 1 to 3 of 3
Hello, i installed Mnadrake 10.0 on my computer to act as a server. Now i have most of my things working, Apache is running fine (localhost is up), php is ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Feb 2005
    Location
    Canada
    Posts
    10

    mysql and php problems


    Hello,
    i installed Mnadrake 10.0 on my computer to act as a server. Now i have most of my things working, Apache is running fine (localhost is up), php is also working (phpinfo() displays).

    But not my problem lies with mysql. It works in the terminal i can use "mysql -u root -p" and it works no problem add ing tables and so forth. But it doens't seem to be configured with php.

    I tried a simple "$db = mysql_connect('localhost','user','pw')" and i get an error saying "Fatal Error: Call to function:mysql_connect in ..."

    i read the phpinfo() and tried using "urpmi php-mysql" i had to use an installation cd but still nothing.

    I went to the control center and looked up the software packages, but none of them seem relevant mysql (besides i believe it's installed properly since it works in the terminal).

    Can anyone point in the right direction as to what i should be looking or what i should do...

    thanks in advanced
    Steph

  2. #2
    Linux Guru kkubasik's Avatar
    Join Date
    Mar 2004
    Location
    Lat: 39:03:51N Lon: 77:14:37W
    Posts
    2,396
    I haven't used urpmi, but is it possible that you could try installing php and mod_php from source, and making sure that all mysql functions are enabled, and removing postgres functions and the like to prevent conflicts. I don't know enough php to spot anything wrong with your code or if php requires some initalizer for database connections and the like.
    Avoid the Gates of Hell. Use Linux
    A Penny for your Thoughts

    Formerly Known as qub333

  3. #3
    Just Joined!
    Join Date
    Feb 2005
    Location
    Canada
    Posts
    10
    thanks... i'll try that... but for a second, would you able to tell me why mysql doesn't automatically load went to reboot the computer?

    i got it to work last time, then i rebooted and now i dont remember what i did to get it to work.

    i keep gettin an Error 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock'

    and i really have no idea how to restart it...

    also, i know i'm getting anoying but i'm al inux newbie, if i am able to restart it, is there a way to set to run on boot?

    thanks

  4. $spacer_open
    $spacer_close

Posting Permissions

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