|
|
| Author |
Message |
Ex0duS
Joined: 02 Sep 2003 Posts: 8
|
Posted: Tue Sep 02, 2003 6:04 am Post subject: Fatal error: Call to undefined function: mysql_connect() |
|
|
i installed cacti exactly as in the install instructions as root.
made chown rra and log vor the cactiuser.
but when i call the index.php i get the following msg.
"Fatal error: Call to undefined function: mysql_connect() in /var/www/html/cacti/include/adodb/drivers/adodb-mysql.inc.php on line 209"
whats wrong ??????? |
|
| Back to top |
|
 |
pestilence Cacti User
Joined: 25 Jul 2003 Posts: 207 Location: Athens/Greece
|
Posted: Tue Sep 02, 2003 6:32 am Post subject: |
|
|
Propably you have not installed a php version with mysql support.
If you use RPMS (my guess) find the php-mysql.rpm and install it.
If you have compiled php by source, recompile with:
./configure --with-mysql --with-snmp
The above command will compile php with mysql and SNMP support.
For more information about configuration options consult the php page at:
http://www.php.net |
|
| Back to top |
|
 |
Ex0duS
Joined: 02 Sep 2003 Posts: 8
|
Posted: Tue Sep 02, 2003 7:36 am Post subject: |
|
|
checking for net-snmp-config... no
configure: error: snmp.h not found. Check your SNMP installation.
this i get when making configure
my sys is RH9
i added everithing in the web-server software when installing  |
|
| Back to top |
|
 |
pestilence Cacti User
Joined: 25 Jul 2003 Posts: 207 Location: Athens/Greece
|
Posted: Tue Sep 02, 2003 7:39 am Post subject: |
|
|
| Just surf to http://freshrpms.net/index-main.html and grab the latest net-snmp and php-mysql RPM's install them and you should be ok. |
|
| Back to top |
|
 |
Ex0duS
Joined: 02 Sep 2003 Posts: 8
|
Posted: Tue Sep 02, 2003 7:41 am Post subject: |
|
|
snmpd is running ?????
hm a complicatet site with no search function |
|
| Back to top |
|
 |
Ex0duS
Joined: 02 Sep 2003 Posts: 8
|
Posted: Tue Sep 02, 2003 3:20 pm Post subject: |
|
|
installed everithing as you said .... but no change to the error msg  |
|
| Back to top |
|
 |
Coeus Cacti User
Joined: 04 Aug 2003 Posts: 51 Location: Perth - Western Australia
|
Posted: Wed Sep 03, 2003 12:58 am Post subject: |
|
|
RH 9 has snmp and mysql support in the php package - you should need to compile from source. - you will need net-snmp-devel if you do want to compile from source - its complaining about a missing header file.
I needed to add to /etc/php.ini
extension_dir = /usr/lib/php4
extension=mysql.so
To get php to connect.
Also kill the default firewall - service iptables stop
Hope that helps
Carl |
|
| Back to top |
|
 |
Ex0duS
Joined: 02 Sep 2003 Posts: 8
|
Posted: Wed Sep 03, 2003 3:02 am Post subject: |
|
|
iptables is stopped
extension=mysql.so
is located in the /etc/php.d/mysql.ini .... php.ini says this is right for RH systems
| Quote: |
RH 9 has snmp and mysql support in the php package - you should need to compile from source. - you will need net-snmp-devel if you do want to compile from source - its complaining about a missing header file.
|
what do you mean ?????
i downloadest net-snmp from the link in the installing instructuion and compiled it. ..... do i have to download something else ????
after "make install" i could install php-mysql without any error msg.
But cacti isnt running till now  |
|
| Back to top |
|
 |
Coeus Cacti User
Joined: 04 Aug 2003 Posts: 51 Location: Perth - Western Australia
|
Posted: Wed Sep 03, 2003 3:20 am Post subject: |
|
|
I think I misunderstood your last post - what error message are you getting now?
Try running test.php - this should be a file in the php source code. If it runs correctly at the top you will see the compile options used for your php installation.
If test.php runs and has --enable-mysql - You should get a different error message when you try to run cacti.
Carl |
|
| Back to top |
|
 |
Ex0duS
Joined: 02 Sep 2003 Posts: 8
|
Posted: Wed Sep 03, 2003 6:19 pm Post subject: |
|
|
| Code: |
<?
function blah($a)
{
return $a;
}
return "cool";
for ($for=0; $for<=100000;$for++)
{
if ("andi" != blah("andi"))
{
print "error";}
}
|
this is the only thing i get when i try to run it  |
|
| Back to top |
|
 |
Coeus Cacti User
Joined: 04 Aug 2003 Posts: 51 Location: Perth - Western Australia
|
Posted: Thu Sep 04, 2003 1:06 am Post subject: |
|
|
I've just set up a second cacti installation on my laptop using redhat 9, and ran into a few problems.
make sur ehte following rpms are installed (rpm -qa | grep mysql)
mysql-3.23.56-1.9
mysql-server-3.23.56-1.9
php-mysql-4.2.2-17.2
Versions dont need to be exactly the same, but the packages need to be there.
edit /etc/httpd/conf/httpd.conf and add
LoadModule php4_module modules/libphp4.so in the right section (there should be about 30 lines starting with LoadModule)
Assuming you have set up mysql correctly and edited include/config.php with the rght login and password it should "just work"
Make sure when you go to http://127.0.0.1/cacti/ the you force refresh the page, as your browser may have cached the page.
Please post any error messages you get nad how you made them happen.
Cheers
Carl |
|
| Back to top |
|
 |
Ex0duS
Joined: 02 Sep 2003 Posts: 8
|
Posted: Thu Sep 04, 2003 6:22 am Post subject: |
|
|
Fatal error: Call to undefined function: mysql_connect() in /var/www/html/cacti/include/adodb/drivers/adodb-mysql.inc.php on line 209
still
i am sure they are installed but
who can i make sure the packages are installed ???? is there a list ? |
|
| Back to top |
|
 |
pestilence Cacti User
Joined: 25 Jul 2003 Posts: 207 Location: Athens/Greece
|
Posted: Thu Sep 04, 2003 7:03 am Post subject: |
|
|
Create a file test.php
and writte into it:
| Code: |
<?php
phpinfo();
?>
|
Put the file into your Webserver's html directory and point your browser to it (eg. http://localhost/test.php).
This will produce an informational page with information regarding your php package.
Check if you see in the compiled flags and options somewhere the mysql statement.
If it doesn't appear it means you have php compiled without mysql support(or the rpm package was compiled and builded without mysql support).
If it does appear check your php.ini file (usually located inside /etc/php/) and mysql.ini file accordingly (also usually located inside /etc/php/).
If this files are missing something is not correct with your installation try and check the www.php.net and read also the README file. |
|
| Back to top |
|
 |
Ex0duS
Joined: 02 Sep 2003 Posts: 8
|
Posted: Fri Sep 05, 2003 6:58 am Post subject: |
|
|
got the following entrys with mysql
| Code: |
'--with-mysql=shared,/usr'
dbx support enabled
dbx version 1.0.0
supported databases MySQL
ODBC
PostgreSQL
Microsoft SQL Server
FrontBase
Oracle 8 (not really)
Sybase-CT
|
so mysql should be installed ? |
|
| Back to top |
|
 |
|