Find the answer to your Linux question:
Results 1 to 5 of 5
I have mysql 4.1, apache2, and php5 installed. I installed phpmyadmin and used it just fine to create some dbases and tables. When i go to run a php page ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Oct 2005
    Posts
    1

    mysql and php not working together


    I have mysql 4.1, apache2, and php5 installed. I installed phpmyadmin and used it just fine to create some dbases and tables. When i go to run a php page I'm getting the following error:

    Call to undefined function mysql_query()

    How is it that phpmyadmin is working with mysql, but my custom pages aren't?????

  2. #2
    Just Joined!
    Join Date
    Jan 2005
    Location
    NZ
    Posts
    67
    create a php script with the following then place this in your server root dir and then view with browser

    <?phpinfo();?>

    I suspect mysql in not configured --with-mysql

    if it is you should see some output along the lines of

    MySQL Support enabled

  3. #3
    Just Joined!
    Join Date
    Sep 2005
    Posts
    44
    you have to configure or edit the php.ini file.I think this will solve your problem.

  4. #4
    Just Joined!
    Join Date
    Jan 2006
    Posts
    71
    im not sure what/where to edit/add the mysql option to the php.ini file, if you cant find it, you can alway just recompile php using the --with-mysql flag

  5. #5
    Just Joined!
    Join Date
    Sep 2005
    Posts
    44
    In php.ini file,do you remove the comment( from this line??

    extension=php_mysql.dll

Posting Permissions

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