I read here the same named question topic, and a lot of other pages with this name, but I can't find any solution for my problem.
I have PHP 5.2.14.
I have Apache 2.2.17
I have MySQL 5.1.52 (32bit)
I use Win7 32bit.
After PHP+Apache installation, I tested php with phpinfo(), it work. Everything looks fine. I write any php code except using MySQL everything is fine.
I deleted in the php.ini the ; before the mysql.dll-s, and the ext folder is correc, Phpinfo() seems to be good (there is the mysql section); When I use MySQL in command line with pass it's fine. So they (PHP and MySQL) work separated OK but together NOT!
But when I write this code, doing nothing, I got a really blank page in Chorme, and IE, Firefox offer a downloadable blank php file... without any error messages.
Expand|Select|Wrap|Line Numbers
- <html>
- <body>
- <?php
- error_reporting(E_ALL);
- ini_set('display_errors', 'on');
- echo "Working?<br>";
- $config['host'] = '127.0.0.1'; //host name
- $config['user'] = 'user'; //database username
- $config['pass'] = 'pass'; //database password
- $link = mysql_connect($config['host'],$config['user'],$config['pass']) or die ('Something wrong : ' . mysql_error());
- echo "WORK!<br>";
- ?>
- </body>
- </html>
I didn't found any of solutions. I use 32 bit operation systems and 32 bit MySQL this is not a problem...
THANKS for Your help!
Bye,
Zoli