first connection failed

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

Moderators: Developers, Moderators

Post Reply
terry.ble
Posts: 13
Joined: Fri Dec 29, 2006 8:20 am
Location: Paris

first connection failed

Post by terry.ble »

Hello,

I'm a newbie in Cacti.
Many friends of mine are using it.
I have installed it on a Win2k station
my php/sql/IIS is working.
I have imported the cacti base can be requested by mysql command.
The cactiuser is create and he have all grant permissons.
the cacti folder is authorised for interactive user of Win2k and anonymous connection too.

I have this error when a tried to request the index.php page.
Error

You have created a new database, but have not yet imported the 'cacti.sql' file. At the command line, execute the following to continue:


mysql -u cactiuser -p cacti < cacti.sql

This error may also be generated if the cacti database user does not have correct permissions on the cacti database. Please ensure that the cacti database user has the ability to SELECT, INSERT, DELETE, UPDATE, CREATE, ALTER, DROP, INDEX on the cacti database.
would somebody have a solution ?

using:
Win2k
PHP4
Mysql5.024a
Apache2.2.3
cacti-0.8.6i
net-snmp5.4.0.1
rrdtool1.2.15
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

Please follow the guide in http://forums.cacti.net/viewtopic.php?t=11747

Make sure you don't have MySQL in sql-strict mode (edit my.ini). Then delete the c:\mysql\data\cacti folder and re-do the MySQL steps in MY installation guide.
terry.ble
Posts: 13
Joined: Fri Dec 29, 2006 8:20 am
Location: Paris

Post by terry.ble »

many thanks for your help after followed YOUR installation i think i have past a step.
Here is what I have now.
BSOD2600 wrote: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 Warning: main(./include/config.php) [function.main]: failed to open stream: Permission denied in C:\Inetpub\wwwroot\cacti\include\auth.php on line 27 PHP Warning: main() [function.include]: Failed opening './include/config.php' for inclusion (include_path='.;c:\php4\pear') in C:\Inetpub\wwwroot\cacti\include\auth.php on line 27 PHP Fatal error: Call to undefined function: db_fetch_cell() in C:\Inetpub\wwwroot\cacti\include\auth.php on line 30
Any Idea ?
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

Those MIB errors are because you haven't properly defined your MIBDIRS system variable.

The php errors are because you didn't set the correct NTFS permissions on various cacti folders/files.
terry.ble
Posts: 13
Joined: Fri Dec 29, 2006 8:20 am
Location: Paris

Post by terry.ble »

It's strange because the MIBDIR point well to the directory


juste a line that I miss understood :
terry.ble wrote:in step 9
Give the user who will be running the scheduled task, modify rights to:

1. If using PHP 4: c:\php\mibs\.index
2. If using PHP 5: c:\php\extras\mibs\.index
It's mean under php.ini I add these line because in ntfs i have gived rights to the MIB dir and this file inherite the right.
do you think php4apache2.dll can be in cause ?

for the SQL error
the correct NTFS permissions on various cacti folders/files were made.
the interactive users have right to the cacti folder and subfolder/files.
I'm gentle with the folder and let all permissions to have a working programme after i will be more touchy with the permission.
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

terry.ble wrote:It's strange because the MIBDIR point well to the directory
Make sure you've created MIBDIRS. Also reboot the computer too for changes to take place.
terry.ble wrote: It's mean under php.ini I add these line because in ntfs i have gived rights to the MIB dir and this file inherite the right.
do you think php4apache2.dll can be in cause ?
That step means you need to change the NTFS permissions on that single file.
terry.ble
Posts: 13
Joined: Fri Dec 29, 2006 8:20 am
Location: Paris

Post by terry.ble »

BSOD2600 wrote:Also reboot the computer too for changes to take place.
Thaks :) the reboot have better result to the snmp query
BSOD2600 wrote: That step means you need to change the NTFS permissions on that single file.
Was done before all NTFS rights are give to interactive users but the problem still the same.
PHP Warning: main(./include/config.php) [function.main]: failed to open stream: Permission denied in C:\Inetpub\wwwroot\cacti\include\auth.php on line 27 PHP Warning: main() [function.include]: Failed opening './include/config.php' for inclusion (include_path='.;c:\php4\pear') in C:\Inetpub\wwwroot\cacti\include\auth.php on line 27 PHP Fatal error: Call to undefined function: db_fetch_cell() in C:\Inetpub\wwwroot\cacti\include\auth.php on line 30
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

terry.ble wrote:
PHP Warning: main(./include/config.php) [function.main]: failed to open stream: Permission denied in C:\Inetpub\wwwroot\cacti\include\auth.php on line 27 PHP Warning: main() [function.include]: Failed opening './include/config.php' for inclusion (include_path='.;c:\php4\pear') in C:\Inetpub\wwwroot\cacti\include\auth.php on line 27 PHP Fatal error: Call to undefined function: db_fetch_cell() in C:\Inetpub\wwwroot\cacti\include\auth.php on line 30
This indicates you still haven't properly set the NTFS permissions. Give the COMPUTERNAME\IUSR_XXXX users read & execute permissions to the file C:\Windows\system32\cmd.exe. Both users will also need read permissions on c:\inetpub\wwwroot\cacti\ and its subfolders. Give the IUSR_XXXX user modify permissions to the folders /cacti/log and /cacti/rra.

Fire up Sysinternals FileMon to see exactly what's getting denied.
terry.ble
Posts: 13
Joined: Fri Dec 29, 2006 8:20 am
Location: Paris

Post by terry.ble »

BSOD2600 wrote:
terry.ble wrote:
PHP Warning: main(./include/config.php) [function.main]: failed to open stream: Permission denied in C:\Inetpub\wwwroot\cacti\include\auth.php on line 27 PHP Warning: main() [function.include]: Failed opening './include/config.php' for inclusion (include_path='.;c:\php4\pear') in C:\Inetpub\wwwroot\cacti\include\auth.php on line 27 PHP Fatal error: Call to undefined function: db_fetch_cell() in C:\Inetpub\wwwroot\cacti\include\auth.php on line 30
This indicates you still haven't properly set the NTFS permissions. Give the COMPUTERNAME\IUSR_XXXX users read & execute permissions to the file C:\Windows\system32\cmd.exe. Both users will also need read permissions on c:\inetpub\wwwroot\cacti\ and its subfolders. Give the IUSR_XXXX user modify permissions to the folders /cacti/log and /cacti/rra.

Fire up Sysinternals FileMon to see exactly what's getting denied.
Ok BSOD2600 i'm going to check it again after this week, I will be off.
thanks for your support.
terry.ble
Posts: 13
Joined: Fri Dec 29, 2006 8:20 am
Location: Paris

Post by terry.ble »

terry.ble wrote:
BSOD2600 wrote:
terry.ble wrote:
This indicates you still haven't properly set the NTFS permissions. Give the COMPUTERNAME\IUSR_XXXX users read & execute permissions to the file C:\Windows\system32\cmd.exe. Both users will also need read permissions on c:\inetpub\wwwroot\cacti\ and its subfolders. Give the IUSR_XXXX user modify permissions to the folders /cacti/log and /cacti/rra.

Fire up Sysinternals FileMon to see exactly what's getting denied.
Ok I have double check and see that config.php did not inherit the rights damned :)
terry.ble
Posts: 13
Joined: Fri Dec 29, 2006 8:20 am
Location: Paris

Post by terry.ble »

Error

You have created a new database, but have not yet imported the 'cacti.sql' file. At the command line, execute the following to continue:


mysql -u cactiuser -p cacti < cacti.sql

This error may also be generated if the cacti database user does not have correct permissions on the cacti database. Please ensure that the cacti database user has the ability to SELECT, INSERT, DELETE, UPDATE, CREATE, ALTER, DROP, INDEX on the cacti database.
So now i'm seeing the same thing that which i have opened the post
I lose my mind and my latin :-?
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

Alright, so delete the c:\mysql\data\cacti folder, make sure MySQL doesn't have the mysql-strict mode enabled in my.ini, and then issue the mysql -u cactiuser -p cacti < cacti.sql command. Does it successfully get imported?
terry.ble
Posts: 13
Joined: Fri Dec 29, 2006 8:20 am
Location: Paris

Post by terry.ble »

BSOD2600 wrote:Alright, so delete the c:\mysql\data\cacti folder, make sure MySQL doesn't have the mysql-strict mode enabled in my.ini, and then issue the mysql -u cactiuser -p cacti < cacti.sql command. Does it successfully get imported?
in my.ini the only lines I have it's this:
# Set the SQL mode to strict
#sql-mode="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"
so it's not implemented.
I have erased the cacti folder in mysql

I will restore the base tomorow morning.
And cross my fingers that will work.

Many Thanks for your support BSOD2600 :wink:
Post Reply

Who is online

Users browsing this forum: No registered users and 18 guests