Page 1 of 1
php mysql connection problem, just a blank screen
Posted: Sat Jun 30, 2007 8:10 pm
by reson
Hi, I cannot get php to connect to mysql. They both work individually, but when I run the connection script I just get a blank screen. It's not my script, it must be something in the configuration. Has anybody had this problem, or seen it posted here before? Any help/ideas would be greatly appreciated. Thanks, Matt
Posted: Sat Jun 30, 2007 8:18 pm
by John Cartwright
We cannot help if we cannot see your code
Moved to PHP-Code.
Posted: Sun Jul 01, 2007 4:48 am
by tapas_bahirbag
Use a library like php adodb
Posted: Sun Jul 01, 2007 10:04 am
by yacahuma
If you are starting use a library like phpadodb. It is really easy to switch databases. Also it has cache and debug features. adodb is my personal favorite. Use it for many years. It is extremely easy to use and the documentation is excellent. Even Oracle recommends it.
http://adodb.sourceforge.net/
dont waste your time using calls like mssql_connect() you will regret it in the future. I least I did.
Posted: Sun Jul 01, 2007 10:21 am
by Chris Corbyn
Code: Select all
<?php error_reporting(E_ALL); ini_set("display_errors", true); ?>
I'll bet 10 pence that you don't have the MySQL extension enabled in your PHP installation, so mysql_connect() is an undefined function causing a fatal error

Posted: Sun Jul 01, 2007 10:24 am
by idevlin
d11wtq wrote:Code: Select all
<?php error_reporting(E_ALL); ini_set("display_errors", true); ?>
I'll bet 10 pence that you don't have the MySQL extension enabled in your PHP installation, so mysql_connect() is an undefined function causing a fatal error

10 pence? You don't sound that confident!

got it
Posted: Thu Jul 05, 2007 7:06 pm
by reson
It was my code, not my extensions (sorry d11wtq, but your 10 pence are out the window). But I couldn't tell what was going on until I set my error reporting to on and reset my system. THanks for all your comments!