ftrudeau
05-24-2001, 07:44 PM
I installed the PKG MSYQL package and now, if I call any basic mysql functions into PHP (mysql_connect($host,$user,$paswd), I get a 'function not defined' error message. Did I miss a step here ?
![]() | View Full Version : Installing MySQL /w PHP Support on a RaQ XTR ftrudeau 05-24-2001, 07:44 PM I installed the PKG MSYQL package and now, if I call any basic mysql functions into PHP (mysql_connect($host,$user,$paswd), I get a 'function not defined' error message. Did I miss a step here ? TheRazor 05-24-2001, 08:59 PM Check and make sure your php itself is working... Secondly telnet to your machine, login to mysql, and perform some basic commands to make sure mysql is working. If it is make sure your user information is setup correctly. If these are setup correctly I would say recheck your php-mysql statements... Basically php is setup to use mysql on a cobalt box, If your not sure, simply uninstall the mysql pkg and reinstall it, that should help as well... so you shouldn't have to mess with the php settings... Sorry so vague but I would need more info to help more... ftrudeau 05-24-2001, 09:04 PM what info do you need ?? I can -->**ASSURE**<-- that my PHP statement is correct, and mysql is well installed. Im used to install PHP + MySQL on Linux boxes .. an usually, you got to configure PHP with mysql (--with-mysql=[mysql path]. I noticed that PHP is indeed confiogured with PHP, but with the option --with-mysql=shared. i have no clue what's that suppose to mean.:angry: TheRazor 05-24-2001, 09:06 PM I am not sure exactly what you connect line looks like, but this is relatively what is should look like (depending on your programming style): $link = mysql_pconnect("localhost", "user_name", "user_password") or die("Error: " . mysql_error()); TheRazor 05-24-2001, 09:12 PM I don't mean to insult your intelligence, I just don't know your level of expertise. I would say the pkg may have not installed correctly. Like I said when you get a cobalt box the php install is geared up already for mysql, you just have to install mysql. Try reinstalling mysql, or try reinstalling php, I don't know if there is a package for that... jks 05-24-2001, 11:39 PM I think you're all looking in the wrong direction. When you get the "function undefined" error message in PHP, it cannot (!) have anything to do with your MySQL installation. As this is a RaQ XtR, the correct thing to do is: 1. Edit /etc/httpd/php.ini and insert this line: extension=mysql.so 2. Restart Apache using this command: /etc/rc.d/init.d/httpd restart That should correct the problem. -- Jens Kristian Søgaard, Mermaid Consulting I/S, jens@mermaidconsulting.dk, http://www.mermaidconsulting.com/ www.raqsupport.net/trafficlight.html -- Cheap Traffic Monitoring Software for RaQs Chicken 05-25-2001, 12:41 AM Would this be for a 4r too? I recently upgraded mysql to a newer version and have problems. The error seems to be the same as posted above, and I was thinking there must be something mucked up. I'm not all that familiar with mysql... jks 05-25-2001, 11:50 AM Originally posted by Chicken Would this be for a 4r too? I recently upgraded mysql to a newer version and have problems. The error seems to be the same as posted above, and I was thinking there must be something mucked up. I'm not all that familiar with mysql... The same procedure can be used on a RaQ4 too, if you've got a PHP compiled with MySQL as a shared library module. -- Jens Kristian Søgaard, Mermaid Consulting I/S, www.mermaidconsulting.com - jens@mermaidconsulting.com server.mermaidconsulting.com/raqserverupdates.html Chicken 05-26-2001, 01:11 AM Heck if I know, it is just what comes on the RaQ4 by default. I'll try this when I'm not overtired like now, and see if it works. *hopes* |