Find the answer to your Linux question:
Results 1 to 5 of 5
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #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
    create a php script with the following then place this in your server root dir and then view with browser


    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
    you have to configure or edit the php.ini file.I think this will solve your problem.

  4. $spacer_open
  5. #4
    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

  6. #5
    In php.ini file,do you remove the comment( from this line??


Posting Permissions

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