Cacti (home)ForumsRepositoryDocumentation
Cacti: offical forums and support  

 FAQFAQ   SearchSearch   MemberlistMemberlist    RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in    


Fatal error: undefined function: mysql_connect on line 19

 
Post new topic   Reply to topic    Cacti Forum Index -> Help: Linux/Unix Specific
Author Message
fruitfrog
Guest





PostPosted: Fri Jan 10, 2003 5:31 am    Post subject: Fatal error: undefined function: mysql_connect on line 19 Reply with quote

Hi Everyone

I seem to be having the same problem as PLEASE PLEASE.

Quote:
Fatal error: Call to undefined function: mysql_connect() in /var/www/html/cacti/include/database.php on line 19


I am running redhat 7.1 with generic php support through redhat RPM and mysql installed with Redhat RPM.

php is configured to support mysql.
mysql is running.
mysql.sock is located in /var/lib/mysql/mysql.sock
I tryed to link it to /tmp/mysql.sock with:
ln -s -f /var/lib/mysql/mysql.sock /tmp/mysql.sock
but still no joy. I would really like to avoid having to compile and install mysql binaries as RPMS gives me much more controll over which files belong to which package.
any sugestions?
Back to top
Guest






PostPosted: Fri Jan 10, 2003 12:25 pm    Post subject: Re: Fatal error: undefined function: mysql_connect on line 1 Reply with quote

fruitfrog wrote:
Hi Everyone

Quote:
Fatal error: Call to undefined function: mysql_connect() in /var/www/html/cacti/include/database.php on line 19


[/quote]

That means that php isn't configured with mysql support. that means you have to compile it with --with-mysql switch, or add the mysql module and modify php.ini accordingly.

If you wanna know if php supports mysql, just do a foo.php file with the line phpinfo(); in it, and it should show 'mysql' somewhere.
Back to top
fruitfrog
Guest





PostPosted: Fri Jan 10, 2003 3:20 pm    Post subject: checking for php - mysql support. Reply with quote

summary results of: <? phpinfo() ?>

Configure Command './configure' 'i386-redhat-linux' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib' '--libexecdir=/usr/libexec' '--localstatedir=/var' '--sharedstatedir=/usr/com' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--prefix=/usr' '--with-config-file-path=/etc' '--enable-force-cgi-redirect' '--disable-debug' '--enable-pic' '--disable-rpath' '--enable-inline-optimization' '--with-bz2' '--with-db3' '--with-exec-dir=/usr/bin' '--with-png-dir=/usr' '--with-gd' '--enable-gd-native-ttf' '--with-ttf' '--with-gdbm' '--with-gettext' '--with-ncurses' '--with-gmp' '--with-iconv' '--with-jpeg-dir=/usr' '--with-openssl' '--with-png' '--with-pspell' '--with-regex=system' '--with-ftp' '--with-zlib' '--with-layout=GNU' '--enable-bcmath' '--enable-debugger' '--enable-magic-quotes' '--enable-safe-mode' '--enable-sockets' '--enable-sysvsem' '--enable-sysvshm' '--enable-discard-path' '--enable-track-vars' '--enable-trans-sid' '--enable-yp' '--enable-wddx' '--without-oci8' '--with-imap=shared' '--with-imap-ssl' '--with-kerberos=/usr/kerberos' '--with-ldap=shared' '--with-mysql=shared,/usr' '--with-xml' '--with-pgsql=shared' '--with-snmp=shared,/usr' '--with-snmp=shared' '--enable-ucd-snmp-hack' '--with-unixODBC=shared' '--enable-memory-limit' '--enable-bcmath' '--enable-shmop' '--enable-versioning' '--enable-calendar' '--enable-dbx' '--enable-dio' '--enable-mbstring' '--enable-mbstr-enc-trans' '--with-apxs=/usr/sbin/apxs'

dbx
dbx support enabled
dbx version 1.0.0
supported databases MySQL<br />ODBC<br />PostgreSQL<br />Microsoft SQL Server<br />FrontBase

I think this means php was compiled with support for mysql.
Back to top
fruitfrog
Guest





PostPosted: Mon Jan 20, 2003 2:57 pm    Post subject: redhat default rpm sellection Reply with quote

sorry to have been such an idiot.
after some invistigation ( redhat reinstall ) I found that with the custom install of redhat the php-mysql module is not installed.
once you add this rpm everything works great.

thanks and cheers
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Cacti Forum Index -> Help: Linux/Unix Specific All times are GMT - 5 Hours
Page 1 of 1

 



Powered by phpBB © 2001, 2005 phpBB Group