Re: Connect to MySQL via PHP with success!
Hello MySQL email listers, Success at last. The tips i received from the MySQL list, got me on track. Finally got the PHP and MySQL set up correctly, thanks to the help from this list. Thanks Again, Eric [EMAIL PROTECTED] wrote: On 11-Feb-2004 Eric W. Holzapfel wrote: Hello Listers, I have a problem with my PHP/redhat setup, and possible problem with my Mysql setup. I have Apache (2.0) and PHP (4.3.2) installed on a Red Hat 3.0 ES system. Apache 2.0 + PHP is a known buggy combination. I have MySql installed on a Slackware linux box. Server on a remote host? Gotcha. I want to be able to use Apache/PHP to connect to the mysql database on the slackware box. I "think" that PHP is set up ok, which may be a lie, because PHP says it does not recognize the commands like - mysql_pconnect and mysql_connect. No, wait, lemme guess. Like 'function not defined' ? (eat your heart out, Miss Cleo) Also if I try to connect to the database using something like this: mysql://user,[EMAIL PROTECTED] demodb this fails and the "or die getMessage()" returns DB: no such database. (I am trying to use the Pear DB here) Do I need to have mysql installed on the red hat machine? You'll need to compile in the client libs at least. I can connect to the slackware linux box from a Windows machine using ODBC. So your server is working and accepting remote connections. This is a good thing! Any ideas on what I have not done, or what I have done wrong? You haven't configured the Redhat PHP install to build in the MySQL client libraries. To verify this --try this script: --- --- Look for '--with-mysql' in the Configure Command section. Also look for a MySQL Support section. Regards,
Re: MySQL and PHP - At last and Thanks
Hello Guys (gals?) and the list, Thank you very much for the tips. Your help put me on the correct path, and I was able to install the products you suggested, and it seems that my "dummy" database demo is now working. Thank you for the help. I am a "smarter" newbie now! eric [EMAIL PROTECTED] wrote: You need to install the client side of mysql on the linux box (libmysql.*) then compile php with the mysql modules (I think they exist in RPMs) P -----"Eric W. Holzapfel" <[EMAIL PROTECTED]> wrote: ----- To: [EMAIL PROTECTED] From: "Eric W. Holzapfel" <[EMAIL PROTECTED]> Date: 02/10/2004 02:55PM Subject: MySQL and PHP Hello Mysql listers, I have a mysql db running on a Slackware Linux box. I have an Apache webserver running on a Red Hat Enterprise box. (Mysql 4.0.15a, apached 2.0, php 4.3.2). I think (!!?) I have php on the Red hat box, version 4.3.2. I have been trying without success to use php on apache to connect to the db on slackware box. I do not have MySQL installed on the Redhat box (but do have the mysql client installed). Do I need to install MySQL on the red hat machine to get commands like: mysql_connect, mysql_pconnect to work??? My php does not recognize these commands. Also my php will not connect to the database using a php script like: "mysql://user:[EMAIL PROTECTED] phpdemo" where user is the username, passwrd is the password, etc. I can log on locally to the Slackware box, and connect to the db using the user and password, etc. And I can also use ODBC from a windows box to connect. any ideas on how to set this beginner (me) straight Thanks, eric -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Connect to MySQL via PHP
Hello Listers, I have a problem with my PHP/redhat setup, and possible problem with my Mysql setup. I have Apache (2.0) and PHP (4.3.2) installed on a Red Hat 3.0 ES system. I have MySql installed on a Slackware linux box. I want to be able to use Apache/PHP to connect to the mysql database on the slackware box. I "think" that PHP is set up ok, which may be a lie, because PHP says it does not recognize the commands like - mysql_pconnect and mysql_connect. Also if I try to connect to the database using something like this: mysql://user,[EMAIL PROTECTED] demodb this fails and the "or die getMessage()" returns DB: no such database. (I am trying to use the Pear DB here) Do I need to have mysql installed on the red hat machine? I can connect to the slackware linux box from a Windows machine using ODBC. Any ideas on what I have not done, or what I have done wrong? eric -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
MySQL and PHP
Hello Mysql listers, I have a mysql db running on a Slackware Linux box. I have an Apache webserver running on a Red Hat Enterprise box. (Mysql 4.0.15a, apached 2.0, php 4.3.2). I think (!!?) I have php on the Red hat box, version 4.3.2. I have been trying without success to use php on apache to connect to the db on slackware box. I do not have MySQL installed on the Redhat box (but do have the mysql client installed). Do I need to install MySQL on the red hat machine to get commands like: mysql_connect, mysql_pconnect to work??? My php does not recognize these commands. Also my php will not connect to the database using a php script like: "mysql://user:[EMAIL PROTECTED] phpdemo" where user is the username, passwrd is the password, etc. I can log on locally to the Slackware box, and connect to the db using the user and password, etc. And I can also use ODBC from a windows box to connect. any ideas on how to set this beginner (me) straight Thanks, eric -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Unable to Log in to MySQL from Remote machine
Hello MySql Buffs, I have a problem. I am running mysql on slackware 9.0, version 4.0.15a. I have a web server running on a Red Hat Enterprise machine, and would like to access the mysql database thru php, etc. Nothing new here (except to me!). using a php script: like this: $dsn = "mysql://mie:[EMAIL PROTECTED]/phpbook"; $db_conn = DB::connect( $dsn ); if ( DB::isError( $db_conn ) ) { print $db_conn->getMessage( ) . "\n"; exit( 1 ); } else { print "Connected to database\n"; } $db_conn->disconnect( ); ?> I cannot connect, and get an error DB: no such database. this is thru a page on the RedHat machine. I can log on to the slackware mysql host machine, and log on to mysql as the user no problem, etc, and even add data to tables, etc. I am guessing that there may be something not correctly set in terms of my mysql, users, etc? any hints or help will help! Thanks, eric -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]