poofacer Posted January 3, 2007 Share Posted January 3, 2007 Ok i installed Apache 2.0, PHP 5.2.0 and MySQL 5.0ok for functions in PHP to interact with MySQL like the mysql_connect(); function, what needs to be done to have this functionality? do i have to edit an .ini file or something?because here is what happens:<?php require($_SERVER['DOCUMENT_ROOT'] . '/config/ac_config.php'); mysql_connect($db_host, $db_user, $db_password) or die("poo"); echo "$db_host"; echo "connection made";?>I run this code. the require works. but when it gets to mysql_connect blanks out. Doesn't do anything. It wont get to the echo. However, if i place the echo before the mysql_connect(); it will echo, but will blank out at mysql_connect.What is wrong and why wont it execute the function? it wont even give me an error. just blank page.thanks. Link to comment https://forums.phpfreaks.com/topic/32667-need-serious-help/ Share on other sites More sharing options...
fert Posted January 3, 2007 Share Posted January 3, 2007 you need to do this[code]@mysql_connect($db_host, $db_user, $db_password) or die(mysql_error());[/code]for it to display the die clause Link to comment https://forums.phpfreaks.com/topic/32667-need-serious-help/#findComment-152025 Share on other sites More sharing options...
poofacer Posted January 3, 2007 Author Share Posted January 3, 2007 I think i have not configured PHP to MySQL. I am running windows. how can I configure it? Link to comment https://forums.phpfreaks.com/topic/32667-need-serious-help/#findComment-152028 Share on other sites More sharing options...
fert Posted January 3, 2007 Share Posted January 3, 2007 you have to edit php.ini to include the mysql extension or you could reinstall php Link to comment https://forums.phpfreaks.com/topic/32667-need-serious-help/#findComment-152029 Share on other sites More sharing options...
dansk Posted January 3, 2007 Share Posted January 3, 2007 @mysql_connect($db_host, $db_user, $db_password)did you create a root password, username etc?good luck, i am a noob, but i wanted to helpi am sure there are some php monstes here who will help ya out Link to comment https://forums.phpfreaks.com/topic/32667-need-serious-help/#findComment-152034 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.