LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Ubuntu (https://www.linuxquestions.org/questions/ubuntu-63/)
-   -   MySQL doesn't work with my PHP :-( (https://www.linuxquestions.org/questions/ubuntu-63/mysql-doesnt-work-with-my-php-420921/)

Fasn8n 03-02-2006 07:31 AM

MySQL doesn't work with my PHP :-(
 
I know my PHP works fine... Tested.
I know MySQL works fine... Tested.

But they don't work together. :( I'm using PHP5. I opened a phpinfo() and it shows under supported databases, MySQL.


My problem came here with this error...
"Call to undefined function mysql_connect()"

Should work, right? I'm trying to take a website I already created on another machine and put on mine. I already dumped the DB and put it on, copied all the files over, most files work but not the ones that require MySQL. Any help?

tangle 03-02-2006 08:11 AM

Did you set the permissions on the database?

this213 03-02-2006 08:49 AM

The entry under "Supported Databases" doesn't give it to you oddly enough. In your phpinfo() page, you should see a complete section for "mysql" showing module type, API version, socket, include path and libraries among other things. If you don't see this, you don't have mysql support. If you see "Call to undefined function mysql_connect()" you definitely don't have mysql support.

Use whatever package manager you're comfortable with to install the php-mysql package. The package might also be called php4-mysql or php5-mysql depending on your version of php and how Ubuntu decides to name their packages (I don't use Ubuntu so I couldn't say exactly)

Fasn8n 03-02-2006 01:33 PM

Okay well I didnt have php5-mysql installed but now I do... Still nothing. :(

this213 03-02-2006 01:36 PM

did you restart the web server then check phpinfo again?

Fasn8n 03-02-2006 01:45 PM

Quote:

Originally Posted by this213
did you restart the web server then check phpinfo again?

Awesome... you rock dude! I didnt know I had to restart even when I'm running it from my own machine. Thanks, all better now :)


All times are GMT -5. The time now is 08:08 AM.