Fatal error: Call to undefined function mysql_connect() in C

Post support questions that relate to the Windows 2003/2000/XP operating systems.

Moderators: Developers, Moderators

djektro
Posts: 16
Joined: Wed Apr 13, 2005 8:31 am

Fatal error: Call to undefined function mysql_connect() in C

Post by djektro »

Hello,

Really help me please....
2 weeks I'm working on it and i've always this error :

Fatal error: Call to undefined function mysql_connect() in C:\Apache2\htdocs\cacti\lib\adodb\drivers\adodb-mysql.inc.php on line 338

I read all about that on the forum and I dont succeed in starting server...

My configuration is :

- apache_2.0.53-win32-x86-no_ssl
- cacti-0.8.6c
- cacti-cactid-0.8.6d
- mysql-4.1.10a-win32
- php-5.0.4-Win32
- mysql-administrator-1.0.3-alpha-win
- net-snmp-5.2.1-1.win32
- rrdtool-1.0.49-win32-bin

Really thanx for people who can help me
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Post by rony »

Php is missing mysql extention.

I don't know how to install it on windows, anyone else help?
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
djektro
Posts: 16
Joined: Wed Apr 13, 2005 8:31 am

Post by djektro »

Php is missing mysql extention.

--->> what do you mean exactly please ?
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

Did you enter in the user/pw for the mysql database in config.php?
djektro
Posts: 16
Joined: Wed Apr 13, 2005 8:31 am

Post by djektro »

yes, all files are edited with the good name and password....

That's why I don't understand...

I've done all operations written in the windows help...

Other idea ?

Thanx
djektro
Posts: 16
Joined: Wed Apr 13, 2005 8:31 am

Post by djektro »

in config.php I have :

$database_type = "mysql";
$database_default = "cacti";
$database_hostname = "192.168.0.2";
$database_username = "login";
$database_password = "password";

is that okay ?

192.168.0.2 is the local ip of the server
djektro
Posts: 16
Joined: Wed Apr 13, 2005 8:31 am

Post by djektro »

oh and in my browser i enter :

http://localhost/cacti/index.php

is that okay ?
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

We have a new release, please perform the following:

1) install the new release
2) run "php -m" from a command line
3) post the output of that command
4) if it does not include "mysql", then carefully re-read the install manual. You must modify the php.ini file and set the PHPRC environment variable.

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
djektro
Posts: 16
Joined: Wed Apr 13, 2005 8:31 am

Post by djektro »

okay thanx, i will reinstall with the new release and re post.
djektro
Posts: 16
Joined: Wed Apr 13, 2005 8:31 am

Post by djektro »

I unpack the new version.
Edit config.php

I made http://localhost/cacti/index.php
and i've the same error

The result of php -m is :




Microsoft Windows XP [version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\>php -m
PHP Warning: Module 'mysql' already loaded in Unknown on line 0
Cannot find module (IP-MIB): At line 0 in (none)
Cannot find module (IF-MIB): At line 0 in (none)
Cannot find module (TCP-MIB): At line 0 in (none)
Cannot find module (UDP-MIB): At line 0 in (none)
Cannot find module (SNMPv2-MIB): At line 0 in (none)
Cannot find module (SNMPv2-SMI): At line 0 in (none)
Cannot find module (UCD-SNMP-MIB): At line 0 in (none)
Cannot find module (UCD-DEMO-MIB): At line 0 in (none)
Cannot find module (SNMP-TARGET-MIB): At line 0 in (none)
Cannot find module (SNMP-VIEW-BASED-ACM-MIB): At line 0 in (none)
Cannot find module (SNMP-COMMUNITY-MIB): At line 0 in (none)
Cannot find module (UCD-DLMOD-MIB): At line 0 in (none)
Cannot find module (SNMP-FRAMEWORK-MIB): At line 0 in (none)
Cannot find module (SNMP-MPD-MIB): At line 0 in (none)
Cannot find module (SNMP-USER-BASED-SM-MIB): At line 0 in (none)
Cannot find module (SNMP-NOTIFICATION-MIB): At line 0 in (none)
Cannot find module (SNMPv2-TM): At line 0 in (none)
[PHP Modules]
bcmath
calendar
com_dotnet
ctype
dom
ftp
iconv
libxml
mysql
odbc
pcre
session
SimpleXML
snmp
sockets
SPL
SQLite
standard
tokenizer
wddx
xml
zlib

[Zend Modules]
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

These are problematic:
PHP Warning: Module 'mysql' already loaded in Unknown on line 0
Indicates you are trying to load the extension twice:
Cannot find module (IP-MIB): At line 0 in (none)
Cannot find module (IF-MIB): At line 0 in (none)
Cannot find module (TCP-MIB): At line 0 in (none)
Cannot find module (UDP-MIB): At line 0 in (none)
Cannot find module (SNMPv2-MIB): At line 0 in (none)
Cannot find module (SNMPv2-SMI): At line 0 in (none)
Cannot find module (UCD-SNMP-MIB): At line 0 in (none)
Cannot find module (UCD-DEMO-MIB): At line 0 in (none)
Cannot find module (SNMP-TARGET-MIB): At line 0 in (none)
Cannot find module (SNMP-VIEW-BASED-ACM-MIB): At line 0 in (none)
Cannot find module (SNMP-COMMUNITY-MIB): At line 0 in (none)
Cannot find module (UCD-DLMOD-MIB): At line 0 in (none)
Cannot find module (SNMP-FRAMEWORK-MIB): At line 0 in (none)
Cannot find module (SNMP-MPD-MIB): At line 0 in (none)
Cannot find module (SNMP-USER-BASED-SM-MIB): At line 0 in (none)
Cannot find module (SNMP-NOTIFICATION-MIB): At line 0 in (none)
Cannot find module (SNMPv2-TM): At line 0 in (none)
Indicates that PHP's builtin snmp support can not find the mib files. You should set the MIBDIRS environment variable and then try this again. In order to apply for Apache/IIS, you may have to reboot.

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
djektro
Posts: 16
Joined: Wed Apr 13, 2005 8:31 am

Post by djektro »

okay thanx I'm going to try
djektro
Posts: 16
Joined: Wed Apr 13, 2005 8:31 am

Post by djektro »

I start to believe I'm really silly !!!!!

MIBDIRS environment variable is added to windows PATH and with
php -m, i've always the same after a reboot.....
Indicates you are trying to load the extension twice:
and how can I load that only one time ?
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Try creating the following directory: c:\usr\mibs and copying your mibs there. Otherwise, download and install net-snmp per the installation instructions and see if that helps.

Look for extension=mysql.dll more than once in the php.ini file.

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
METZ-Germany
Posts: 3
Joined: Fri Apr 29, 2005 3:33 am

I Have the same eproblem

Post by METZ-Germany »

Hello,

I have the same Problem :

I have made all Steps from the installation in the Cacti-Manual and checked all thinks: php.ini and /include/config.php

Can anyone give me a tip what I have made wrong ?

After the installation I become the following error message on may browser:

Fatal error: Call to undefined function mysql_connect() in C:\Inetpub\wwwroot\cacti\lib\adodb\drivers\adodb-mysql.inc.php on line 338


I am using :

W2k Server ,
IIS5.0,
cacti-0.8.6d,
cacti-cactid-0.8.6e,
mysql-4.1.11,
net-snmp.5.2.1.-1
rdtool-1.0.4.5-win32


C:\>php -m
[PHP Modules]
bcmath
calendar
com_dotnet
ctype
dom
ftp
iconv
libxml
mysql
odbc
pcre
session
SimpleXML
snmp
sockets
SPL
SQLite
standard
tokenizer
wddx
xml
zlib
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest