Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Mon Sep 29, 2003 6:56 pm 
Offline
Senior Newbie

Joined: Sun Jun 29, 2003 9:09 pm
Posts: 18
I installed apache-ssl, php4 and mysql 3.23.49 using apt-get. They all work fine by themselves, and apache has no problem with the usual php functions, e.g. phpinfo(). But when I try to connect to mysql with a script using

mysql_connect("localhost", "root", "*******") or exit();

I get the error message:

Fatal error: Call to undefined function: mysql_connect() in /var/www/htdocs/index.php on line 36

Then I tried:

apt-get install php4-mysql

but I still get the same error message.

Any ideas?? Thanks.


Top
   
 Post subject:
PostPosted: Mon Sep 29, 2003 11:12 pm 
Offline
Junior Member

Joined: Wed Aug 20, 2003 2:13 pm
Posts: 38
Website: http://www.kotalampi.com/
AOL: r1sto
Location: Hayward, CA
When you run phpinfo(), what do you get for "Configure Command" values? Sounds like you have php version in apache that don't have mysql built in.

Risto


Top
   
 Post subject:
PostPosted: Tue Sep 30, 2003 2:28 am 
Offline
Senior Newbie

Joined: Sun Jun 29, 2003 9:09 pm
Posts: 18
Here's what I get from phpinfo():

'../configure' '--prefix=/usr' '--with-apxs=/usr/bin/apxs' '--with-regex=php' '--with-config-file-path=/etc/php4/apache' '--disable-rpath' '--disable-debug' '--enable-memory-limit' '--enable-calendar' '--enable-sysvsem' '--enable-sysvshm' '--enable-track-vars' '--enable-trans-sid' '--enable-bcmath' '--with-bz2' '--enable-ctype' '--with-db2' '--with-iconv' '--with-ndbm' '--enable-exif' '--enable-filepro' '--enable-ftp' '--with-gettext' '--enable-mbstring' '--with-pcre-regex=/usr' '--enable-shmop' '--enable-sockets' '--enable-wddx' '--with-xml=/usr' '--with-expat-dir=/usr' '--enable-yp' '--with-zlib' '--without-pgsql' '--disable-static' '--with-layout=GNU' '--with-curl=shared,/usr' '--with-dom=shared,/usr' '--with-zlib-dir=/usr' '--with-gd=shared,/usr' '--with-jpeg-dir=shared,/usr' '--with-xpm-dir=shared,/usr/X11R6' '--with-png-dir=shared,/usr' '--with-freetype-dir=shared,/usr' '--with-imap=shared,/usr' '--with-ldap=shared,/usr' '--with-mcal=shared,/usr' '--with-mhash=shared,/usr' '--with-mm' '--with-mysql=shared,/usr' '--with-unixODBC=shared,/usr' '--with-recode=shared,/usr' '--enable-xslt' '--with-xslt-sablot=shared,/usr' '--with-snmp=shared' '--enable-ucd-snmp-hack' '--with-sybase-ct=shared,/usr' '--with-ttf=shared,/usr' '--with-t1lib=shared,/usr'

You can see it has '--with-mysql=shared,/usr' in there. Dunno if that's sufficient....


Top
   
 Post subject:
PostPosted: Tue Sep 30, 2003 1:12 pm 
Offline
Junior Member
User avatar

Joined: Wed Aug 13, 2003 1:25 pm
Posts: 27
In your php.ini, have you load the mysql.so extension?

I compiled php manually and I have to load the extension manually in php.ini in order to get it work.

You should have a line like:

Code:
extension=mysql.so


in your ini file. Be sure to point the extension_dir to the dir where your extensions are located.

Hope this help.

Kevin


Top
   
 Post subject:
PostPosted: Tue Sep 30, 2003 1:32 pm 
Offline
Senior Newbie

Joined: Sun Jun 29, 2003 9:09 pm
Posts: 18
I was sure that I had already put the

extension=mysql.so

line in php.ini. But when I just checked it, it wasn't there. I must have forgot to save it.....hmmm. It works fine now. Thanks.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group