You are here: RE: [PHP] undefined mysql_connect() ??? « PHP « IT news, forums, messages
RE: [PHP] undefined mysql_connect() ???

Posted by Frank Whitsell on 10/17/63 11:19

Sheesh, the electric power has just been off for almost an hour!

Here's the result of running "rpm -qa | grep -i php":

php-4.3.9-3
php-ldap-4.3.9-3
php-pear-4.3.9-3

The o/s is Fedora Core 3, and I selected the Server installation, which also
automatically installed apache 2.0.52, php 4.3.9, and mysql 3.23.58, as I
wanted. And those are all rpm's.

I've installed a number of redhat's, suse's, debian, etc, and never had this
problem...but I have never used (or installed) apache2 before.

The .php files execute fine. That is, until I try to call the mysql_connect()
function. Then I get the undefined-function error.

On apache1.3, the phpinfo() function shows the apache modules loaded, and that
shows that mod_php4 is loaded. But on apache2, nothing is mentioned about php
in the list of loaded modules.

Nevertheless, if I add the LoadModule directive for php4 and restart apache2,
apache2 complains that the module is already loaded. And it must be, because
otherwise, the .php files wouldn't execute.

It's almost as if apache2 is loading it's php module from some other source
that doesn't contain the mysql functions. By "from some other source", I mean
that maybe it's not loading the libphp4.so that's in the apache2 modules
directory.

The httpd.conf file has the directive ServerRoot set to /etc/httpd, and the
modules all use the pathname "modules/<mod_name>". Thus,
"/etc/httpd/modules/<mod_name> should load the correct module. But there is no
mention at all of "libphp4.so" in the httpd.conf file, or anywhere else I can
find. In fact, a search for "php" in the httpd.conf file finds nothing. I'm
really stumped.

--frank--

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация