title: PHP/Apache: PHP Fatal error: Call to undefined function mysql_connect()
body: <p>I have MySQL (5.5.23 Community Server), Apache (2.2), and PHP (5.3.13) running on a Fedora 15 machine (64-bit). Each works with no problem on their own.</p>
  
  <p>I thought that PHP was configured/compiled to work with MySQL, but when I try to load any PHP web page which makes a MySQL call then I get the above noted fatal error (in the Apache error log). PHP works okay on its own though, through Apache and at the command line.</p>
  
  <p>When I run php -i from the command line then sure enough it shows all the MySQL bits and pieces, but when I load a page displaying phpinfo() then there are no MySQL modules mentioned.</p>
  
  <p>I've also tried un-commenting "extension=mysql.so" in php.ini, but PHP then complains with "PHP Startup: Unable to load dynamic library <code>'/usr/lib64/php/modules/mysql.so'."</code> (even though the module does reside there). But then I'm not entirely certain whether that line is required to be un-commented or not. [correction: the error stated was actually due to a typo, but running from the command line shows that the module is already loaded anyway - there is a warning from PHP that says so.]</p>
  
  <p>I've also disabled SELinux; stopped/restarted Apache numerous times; yummed MySQL-Devel, in case it made any difference; and, it seems, every other possible thing.</p>
  
  <p>If I run a little PHP test script from the command line, to access the MySQL database, then it works with no problem, so PHP does know about MySQL, but when it runs under Apache it seems to have no clue that MySQL even exists.</p>
  
  <p>I've been trying on and off for months to solve this problem, and seem to have tried everything, but nothing seems to work.</p>
  
  <p>I don't mind having to re-install PHP if I really have to, if somebody can demonstrate the proper way to configure/compile with MySQL support, so that I can get it to work under Apache, although ideally I'd simply prefer to get the existing installation working.</p>