[solved] HTTP Error 500.0 after new Cacti install

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

Moderators: Developers, Moderators

Post Reply
keever
Posts: 19
Joined: Tue Aug 22, 2006 6:10 pm

[solved] HTTP Error 500.0 after new Cacti install

Post by keever »

Trying to load Cacti the first time, and any browser returns a http 500 error. My suspicion is that IIS is set up correctly, but PHP is misconfigured somehow. Here's the background info:

Operating System: Server 2008 SP2 x64
Webserver: IIS 7
Cacti: cacti-0.8.7f
Spine: spine0.8.7e
MySQL: mysql-5.1.47-winx64
PHP: Version 5.3.2
RRDTool (Cygwin or Win32 version): Win32
Net-SNMP: not installed
Cygwin (cygwin1.dll version): 1000.5.0.0
Plugin Architecture: unsure of this category.. fastcgi?

I have followed these install guides/FAQs:

http://bsod2600.home.comcast.net/~bsod2 ... ndows.html

http://learn.iis.net/page.aspx/246/usin ... -on-iis-7/

http://www.iis-aid.com/articles/how_to_ ... page=0%2C1

http://www.iis-aid.com/articles/trouble ... _500_error

(I have check and rechecked: a) environment variables b) perms for IUSR and IIS_IUSRS c) php.ini paths and directives)

phpinfo.php loads just fine, and the cgi-fcgi module seems to be loaded correctly.

Logging:

Windows Event logs:

The only thing I could find that barely correlated to cacti was this:

Log Name: System
Source: Microsoft-Windows-WAS
Date: 6/15/2010 3:46:37 PM
Event ID: 5186
Task Category: None
Level: Information
Keywords: Classic
User: N/A
Computer: blade7.XX.XX.com
Description:
A worker process with process id of '3268' serving application pool 'cacti.XX.XX.com' was shutdown due to inactivity. Application Pool timeout configuration was set to 20 minutes. A new worker process will be started when needed.

PHP error_log:

Funny thing happened. I orginally had the directive go to a %systemroot%\system32\.. path, but then moved it to c:\php\logging, restarted IIS, and since then there have been no errors. Before I moved it, I got this error in the php-errors.log:

[15-Jun-2010 11:45:45] PHP Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Los_Angeles' for '-7.0/DST' instead in D:\cacti\include\global_arrays.php on line 639

In response to the above error, I added this line to the php.ini file:

date.timezone = "America/Los_Angeles"

So either the above line fixed the problem being logged to error_log, or for some lame reason, php can't create a new log file at the newly specified path. Either way, the error being recorded didnt' seem to explain why I"m getting a http 500 error when I try to load cacti's index.php default doc.

IIS log:

There are many entires in the form of the one below when index.php or / is requested:

2010-06-15 20:07:09 ::1 GET /index.php - 80 - ::1 Mozilla/4.0+(compatible;+MSIE+8.0;+Windows+NT+6.0;+WOW64;+Trident/4.0;+SLCC1;+.NET+CLR+2.0.50727;+.NET+CLR+3.5.21022;+.NET+CLR+3.5.30729;+.NET+CLR+3.0.30729) 500 0 0 15

Within IE on the server 2008 machine, it does have a little bit more for its error:

Error Summary
HTTP Error 500.0 - Internal Server Error
The page cannot be displayed because an internal server error has occurred.

Detailed Error Information
Module FastCgiModule
Notification ExecuteRequestHandler
Handler PHP via FastCGI
Error Code 0x00000000
Requested URL http://localhost:80/index.php
Physical Path D:\cacti\index.php
Logon Method Anonymous
Logon User Anonymous

Why is the logon user anonymous? Shouldn't it be IUSR?

Suspicoius Observations:

1) There's a difference in the php configuration when you look at the php.ini file or look at phpinfo.php versus looking at the output of php -info.

For instance:

php.ini&phpinfo.php:
Loaded Configuration File C:\PHP\php.ini

php -info:
Configuration File (php.ini) Path => C:\Windows

php.ini&phpinfo.php:
error_log="C:\php\logs\php-errors.log"

php -info:
error_log => no value => no value

php.ini&phpinfo.php:
extension_dir = "C:\PHP\ext"

php -info:
extension_dir => C:\php5 => C:\php5


php.ini&phpinfo.php:
open_basedir = "D:\cacti"

php -info:
open_basedir => no value => no value


Why are there differences between what php -info returns and what's in the php.ini file/what's returned by phpinfo.php?

Right now I have no clue why I'm getting a http 500, and there's nothing in the php/iis logs that point to a glaring error. Can I get more verbose logging? What other information do I need to obtain to troubleshoot this issue?
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

1) go back to cacti 0.8.7e. 0.8.7f is 'broken'. g is currently in beta...
2) php 5.3.x will give you headaches due to architecture changes that cacti doesn't cope with yet (g and 0.8.8 do though). I'd suggest going back to the latest 5.2.x.
3) as you're using FastCGI, did you install the non-threaded version of php? i.e. php-5.2.13-nts-win32-installer.msi. To use fastcgi, you MUST. Install the latest fastcgi update from Microsoft?
4) turn off IE's friendly error messages in settings to get a better sense what the error is.
5) search your system for php.ini -- it should only be living in c:\php\php.ini. other copies will only create headaches. Remove/rename them.
keever
Posts: 19
Joined: Tue Aug 22, 2006 6:10 pm

It's fixed

Post by keever »

Thanks homie. Downgrading to PHP 5.2.13 fixed the issue. I didn't even need to revert back to Cacti 0.8.7e, but later I did anyway.
Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests