Discussion:
[jffnms-users] Call to undefined function: mysql_connect
Charlie Zeberlein
2003-07-08 10:26:02 UTC
Permalink
I just installed jffnms on Debian following the Debian Install Guide.

error message -----
Fatal error: Call to undefined function: mysql_connect() in
/opt/jffnms/lib/api.db.inc.php on line 137
-----

line 137 -----
case 'mysql' : $result = mysql_connect($dbhost, $dbuser, $dbpass) or
die ("DB($db_type): Could not connect");
-----

I've checked access and reset permssions. Any clues?

Charlie Zeberlein
Manager, Network Integration
S.C. Budget & Control Board
Division of the State CIO
4430 Broad River Road
Phone: 803.896.0381
E-Mail: ***@CIO.SC.GOV
Paul Stewart
2003-07-08 12:22:11 UTC
Permalink
We have JFFNMS up and running almost perfect :)

One question that I have is with TFTP. Right now I have 35 routers setup
to tftp their configs back to the JFFNMS machine. This part works fine
however a lot of them don't import into JFFNMS.

This relates to my previous emails from a while ago where I was trying to
get everything working in the first place. Since I have gotten syslog
working, only thing is that only a few of the routers actually import. The
data is showing up on the server itself in the /opt/jffnms/tftpd directory.

Can anyone shed some light on this? It was proposed previously that it's
an SNMP related issue, but since the configs are showing up on the tftp
server could it be something else?

Thanks for your time,

Paul
Javier Szyszlican
2003-07-08 14:19:03 UTC
Permalink
Hi Paul,

Can you send me the tftp_get_host_config.php output ?

Did you try with Both TFTP Methods in the routers with problems?

Are you sure the files in your /tftp are from the problem hosts?

Which IOS/Platform do they have?

Javier
Post by Paul Stewart
We have JFFNMS up and running almost perfect :)
One question that I have is with TFTP. Right now I have 35 routers setup
to tftp their configs back to the JFFNMS machine. This part works fine
however a lot of them don't import into JFFNMS.
This relates to my previous emails from a while ago where I was trying to
get everything working in the first place. Since I have gotten syslog
working, only thing is that only a few of the routers actually import. The
data is showing up on the server itself in the /opt/jffnms/tftpd directory.
Can anyone shed some light on this? It was proposed previously that it's
an SNMP related issue, but since the configs are showing up on the tftp
server could it be something else?
Thanks for your time,
Paul
-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100006ave/direct;at.asp_061203_01/01
_______________________________________________
jffnms-users mailing list
https://lists.sourceforge.net/lists/listinfo/jffnms-users
Javier Szyszlican
2003-07-08 13:55:07 UTC
Permalink
Hi Charlie,

You don't have the mysql.so (PHP MySQL) module loaded in your php.ini file.

Please check if you have the package installed.

Javier
Post by Charlie Zeberlein
I just installed jffnms on Debian following the Debian Install Guide.
error message -----
Fatal error: Call to undefined function: mysql_connect() in
/opt/jffnms/lib/api.db.inc.php on line 137
-----
line 137 -----
case 'mysql' : $result = mysql_connect($dbhost, $dbuser, $dbpass) or
die ("DB($db_type): Could not connect");
-----
I've checked access and reset permssions. Any clues?
Charlie Zeberlein
Manager, Network Integration
S.C. Budget & Control Board
Division of the State CIO
4430 Broad River Road
Phone: 803.896.0381
-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100006ave/direct;at.asp_061203_01/01
_______________________________________________
jffnms-users mailing list
https://lists.sourceforge.net/lists/listinfo/jffnms-users
Charlie Zeberlein
2003-07-08 19:36:01 UTC
Permalink
checked php.ini.

config-----
extension=gd.so
extension=mysql.so
extension=snmp.so
extension=sockets.so
----

Found extension_dir path error and corrected.

The php4-mysql package is installed.

path to mysql.so -> /usr/lib/php4/20010901/mysql.so

I still get the same error. Anything else I can look for?


Charlie Zeberlein
Manager, Network Integration
S.C. Budget & Control Board
Division of the State CIO
4430 Broad River Road
Phone: 803.896.0381
Hi Charlie,

You don't have the mysql.so (PHP MySQL) module loaded in your php.ini
file.

Please check if you have the package installed.

Javier
Post by Charlie Zeberlein
I just installed jffnms on Debian following the Debian Install
Guide.
Post by Charlie Zeberlein
error message -----
Fatal error: Call to undefined function: mysql_connect() in
/opt/jffnms/lib/api.db.inc.php on line 137
-----
line 137 -----
case 'mysql' : $result = mysql_connect($dbhost, $dbuser, $dbpass) or
die ("DB($db_type): Could not connect");
-----
I've checked access and reset permssions. Any clues?
Charlie Zeberlein
Manager, Network Integration
S.C. Budget & Control Board
Division of the State CIO
4430 Broad River Road
Phone: 803.896.0381
-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites
including
Post by Charlie Zeberlein
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100006ave/direct;at.asp_061203_01/01
Post by Charlie Zeberlein
_______________________________________________
jffnms-users mailing list
https://lists.sourceforge.net/lists/listinfo/jffnms-users
-------------------------------------------------------
This SF.Net email sponsored by: Parasoft
Error proof Web apps, automate testing & more.
Download & eval WebKing and get a free book.
www.parasoft.com/bulletproofapps
Craig Small
2003-07-10 02:29:10 UTC
Permalink
Post by Charlie Zeberlein
checked php.ini.
Which one? there's two of them.
Post by Charlie Zeberlein
The php4-mysql package is installed.
path to mysql.so -> /usr/lib/php4/20010901/mysql.so
I still get the same error. Anything else I can look for?
Check that the apis line up.
$ dpkg -s php4 | grep Provides
Provides: php4-xml, zendapi-20020429
$ dpkg -S mysql.so | grep php4
php4-mysql: /usr/lib/php4/20020429/mysql.so

Notice the zendapi and the directory are both 20020429 ?

Also try
http://yoursevername/jffnms/admin/adm/test.php

- Craig
--
Craig Small VK2XLZ GnuPG:1C1B D893 1418 2AF4 45EE 95CB C76C E5AC 12CA DFA5
Eye-Net Consulting http://www.enc.com.au/ <***@enc.com.au>
MIEEE <***@ieee.org> Debian developer <***@debian.org>
Javier Szyszlican
2003-07-09 02:08:08 UTC
Permalink
Paul,

I'm glad it worked right...

I'ld like to help you with the CatOS box also...

In the new Host Config system for 0.7.3 the different methods are modular, so
it's easier for me to add a new Copy Type. I found a Cisco page on how to do
this on CatOS:
http://www.cisco.com/warp/public/477/SNMP/move_files_images_snmp.html

Would it be possible for me to access a CatOS box via SNMP ?

Javier
That looks like it did the trick! I'll play around a bit more tomorrow
and see how it goes...:) I ran it just now and they all showed up in
JFFNMS and nothing in the tftp directory which is GREAT! :)
Thanks again,
Paul
Post by Javier Szyszlican
Hi Paul,
I'm rewriting all the TFTP code right now (for 0.7.3).
I think I found the problem with the OLD method in
0.7.2, the timeout was in the wrong unit (it is
microseconds rather than seconds).
Can you try to modify line 50 of
$aux =
snmpset($ip,$rwcommunity,$oid,"s",$filename,60);
$aux =
snmpset($ip,$rwcommunity,$oid,"s",$filename,(1000000*20));
Let me know if it works.
Javier
Craig Small
2003-07-10 02:26:05 UTC
Permalink
Post by Charlie Zeberlein
I just installed jffnms on Debian following the Debian Install Guide.
error message -----
Fatal error: Call to undefined function: mysql_connect() in
/opt/jffnms/lib/api.db.inc.php on line 137
Install php4-mysql and ensure that /etc/php4/cgi/php.ini and
/etc/php4/apache/php.ini both have

extension=mysql.so

in them.
You may also need to reload apache.

- Craig
--
Craig Small VK2XLZ GnuPG:1C1B D893 1418 2AF4 45EE 95CB C76C E5AC 12CA DFA5
Eye-Net Consulting http://www.enc.com.au/ <***@enc.com.au>
MIEEE <***@ieee.org> Debian developer <***@debian.org>
Charlie Zeberlein
2003-07-10 10:09:09 UTC
Permalink
Charlie Zeberlein
Manager, Network Integration
S.C. Budget & Control Board
Division of the State CIO
4430 Broad River Road
Phone: 803.896.0381
Post by Charlie Zeberlein
checked php.ini.
Which one? there's two of them.


checked both php.ini
Post by Charlie Zeberlein
The php4-mysql package is installed.
path to mysql.so -> /usr/lib/php4/20010901/mysql.so
I still get the same error. Anything else I can look for?
Check that the apis line up.
$ dpkg -s php4 | grep Provides
Provides: php4-xml, zendapi-20020429
$ dpkg -S mysql.so | grep php4
php4-mysql: /usr/lib/php4/20020429/mysql.so

Notice the zendapi and the directory are both 20020429 ?


***@smaug:~$ dpkg -s php4 | grep Provides
Provides: php4-xml, zendapi-20010901
***@smaug:~$ dpkg -S mysql.so | grep php4
php4-mysql: /usr/lib/php4/20010901/mysql.so


Also try
http://yoursevername/jffnms/admin/adm/test.php


PHP info comes up fine.


I'm going to scratch the box today and just install php and mysql to
make sure that works together. I've had it working under OpenBSD before,
but there seems to be something that I'm missing that isn't too
obvious.

Continue reading on narkive:
Loading...