Fatal error: Call to undefined function mysql_connect
Patrick Newberry
PNewberry at habitat.org
Wed Feb 14 18:33:05 UTC 2007
I went through the response email as I am attempting to get apache,
php5, and mysql to all work talk and play together. I'd like to thank
all the help. I'm still working on it but just wanted everyone to know
my appreciation.
My work last night:
<snip_from_previous_email>
...but that too should have been installed as a dependency. It might not
hurt to double check though.
</snip_from_previous_email>
By double checking do you mean going into synaptic and looking at that
list, or is there some other way to check for dependencies for a
package.
<snip_from_previous_email>
There's also some entries in /etc/mime.types and
/etc/apache2/mods-enabled/php5.conf. ;)
</snip_from_previous_email>
/etc/mime.types as follows:
application/x-httpd-php phtml pht php
application/x-httpd-php-source phps
application/x-httpd-php3 php3
application/x-httpd-php3-preprocessed php3p
application/x-httpd-php4 php4
Should there be a php5 entry?
There is no /etc/apache2/mods-enabled/php5.conf file
there is a /etc/apache2/apache2.conf
which has the line:
AddType application/x-httpd-php .php
<snip_from_previous_email>
What do 'hostname' *and* 'hostname -f' output? They should both be the
same, and ideally a fully qualified domain name (FQDN) as you've set up
in /etc/hosts.
</snip_from_previous_email>
Results:
goshawk at gypsyfarm:~$ hostname
gypsyfarm
goshawk at gypsyfarm:~$ hostname -f
localhost
ok one has gypsyfarm, one had localhost.
<snip_from_previous_email>
Even if you don't have an "official" domain you should set up something
and make it consistent to prevent these errors and give things like
MySQL a "reference point" from which to work. A server really does need
a unique name or all sorts of strangeness can occur.
</snip_from_previous_email>
<snip_from_previous_email>
ideally a fully qualified domain name (FQDN) as you've set up in
/etc/hosts.
</snip_from_previous_email>
127.0.0.1 localhost gypsyfarm
127.0.1.1 gypsyfarm
Of course neither one is a FQDN (as in somehost.example.com) but not
sure where I change it or what it should be.
I am assuming I should not use www.gypsyfarm.com as that really is a
domain name on the web.
Maybe something like
127.0.0.1 localhost www.gypsyfarm.xxx
I did comment out the line "127.0.1.1 gypsyfarm" Line with a # in the
first column.
I restarted apache but it did not seem to fix that fact that php scripts
won't execute now but I am ask to download php scripts rather than
execute them.
I still when I restart I get the message:
* Forcing reload of apache 2.0 web server... apache2: Could not
determine the server's fully qualified domain name, using 127.0.0.1 for
ServerName
apache2: Could not determine the server's fully qualified domain name,
using 127.0.0.1 for ServerName
Well It's Valentines Day and I doubt my wife will let me play with this
tonight :-), so I'll continue working with it on Thursday. If anything
jumps out at anyone responses would be appreciated.
Thanks
Pat
More information about the ubuntu-users
mailing list