Fatal error in first access

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

Moderators: Developers, Moderators

Post Reply
phantom_rgs
Posts: 41
Joined: Mon Jan 16, 2006 7:44 am
Location: Brasil
Contact:

Fatal error in first access

Post by phantom_rgs »

Hi! i need help:

In my first access, i´ve got this error:

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

cacti-0.8.6h
cacti-cactid-0.8.6g
mysql-4.1.16-win32
net-snmp-5.2.2-1.win32
php-5.1.2-Win32
rrdtool-cygwin-1.2.12

need help please!!! Thanks
s24sean
Posts: 14
Joined: Sun Dec 18, 2005 1:34 pm

Post by s24sean »

I have cacti running in linux without a hitch, having this same issue with windows though
cigamit
Developer
Posts: 3368
Joined: Thu Apr 07, 2005 3:29 pm
Location: B/CS Texas
Contact:

Post by cigamit »

Several things that could be causing this. Google is your friend in these matters.

Anyways, one of the first several matches on google has this little blurb. Hope it helps.

-------------------------
This problem appears because the MySQL module is not active into your PHP installation or because the MySQL module was not compiled with permanent connections support or probably because this function is in the list of not allowed functions to be used.

In the first case you should check that the php_mysql module is enabled into the php.ini file and if not to uncomment the line which enable this module. If you are running your PHP on Linux you have to compile this module first. (--with-mysql=shared) Also you should note that the MySQL module is not active by default any longer in PHP5 versions.

In the other case when you are working on Linux and your module don't have support for the permanent connection you should recompile the MySQL module too.

Also after you have checked that the module is present into your installation you have to check that the mysql.allow_persistent setting is turned on. and the disable_functions don't contain the 'mysql_pconnect' into its arguments.
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

From my install guide in my signature...
# If you're running MySQL 4.1 then you will need to apply the old password trick for user authentication to work with Cacti.

1. Stop the MySQL service, edit your my.ini file, and add the following:

#Use old password encryption method (needed for 4.0 and older clients).
old-passwords

2. You will also need to update the cactiuser account with the old password style:

shell> UPDATE mysql.user SET Password = OLD_PASSWORD('cactipw') WHERE Host = 'localhost' AND User = 'cactiuser';
mysql> FLUSH PRIVILEGES;
s24sean
Posts: 14
Joined: Sun Dec 18, 2005 1:34 pm

Post by s24sean »

hmm... it appears that it is more that PHP is not not running with mysql support.

the phpinfo page has no mention of mysql.

In the php.ini file:
extension_dir is set correctly,
mysq.allow_persistent = On is set
and the dll is uncommented...

I have been looking on google... This is my first attempt at Apache/ PHP on windows so i was just wondering if there was something simple i was overlooking...

Thanks in advance
s24sean
Posts: 14
Joined: Sun Dec 18, 2005 1:34 pm

Post by s24sean »

OK, what i had to do to get it to load the dll was actually copy the libmysql.dll file to c:\windows\system32 and restart apache...

It would not take it any other way, even tried updating the enviroment path...
dprabowo
Posts: 1
Joined: Wed Feb 08, 2006 4:58 am
Contact:

Post by dprabowo »

have u try to install php-mod...?
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests