New Install PHP Problem w/ Apache

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

Moderators: Developers, Moderators

Post Reply
smcintyre87
Posts: 3
Joined: Mon Feb 07, 2005 11:10 am

New Install PHP Problem w/ Apache

Post by smcintyre87 »

When I attempt to pull up http://servername/cacti I get an index of the /cacti directory instead of a login page.

It looks like Apache is installed correctly because http://servername pulls up the default Apache page, so I'm assuming php is not working properly.

I'm guessing I misconfigured something somewhere along the line, but I don't know what to check. Can anyone throw me a bone?
bdbrumm
Cacti User
Posts: 51
Joined: Mon Aug 12, 2002 3:16 pm

try this

Post by bdbrumm »

You can try this:
http://servername/cacti/index.php
If this works, then try adding the following entry (in red, below) to
your httpd.conf file (or whatever the equivalent is on win32).

#
# DirectoryIndex: sets the file that Apache will serve if a directory
# is requested.
#
# The index.html.var file (a type-map) is used to deliver content-
# negotiated documents. The MultiViews Option can be used for the
# same purpose, but it is much slower.
#
# added index.php, bdb, 12Jan2005
DirectoryIndex index.php index.html index.html.var
smcintyre87
Posts: 3
Joined: Mon Feb 07, 2005 11:10 am

Post by smcintyre87 »

Thanks for the tip

Trying to go straight to http://servername/cacti/index.php was one of the first things I checked. This just opened the .php file itself.

I also checked the httpd file to verify the correct additions to the directory index. To do some troubleshooting I rebooted the server and the apache service would not start up. Upon checking the event logs I viewed this:

Cannot load c:/php/sapi/php4apache2.dll into server: The specified module could not be found.

At this point, I also tried to reinstall PHP and apache and redid all the configuration changes. I still receive the same error in the event log. Any other bones?
bdbrumm
Cacti User
Posts: 51
Joined: Mon Aug 12, 2002 3:16 pm

ah-ha

Post by bdbrumm »

It sounds like the php module is not loaded for apache/IIS.
Cacti/php/apache on Win32 isn't really my forte, but I checked
the docs at this link:
http://www.cacti.net/downloads/docs/htm ... ndows.html

It appears that the php dll for apache isn't being loaded since your php
script is being displayed instead of executed. The link above
describes how to install and configure this dll.

In fact, you might just want to try re-running through all those steps.
I guess I'm assuming you used these instructions previously.

Are you using Apache or IIS?
smcintyre87
Posts: 3
Joined: Mon Feb 07, 2005 11:10 am

Post by smcintyre87 »

I am using Apache. I mentioned that in the subject but not in my message bode, sorry bout that.

Anyhow, I used the same link you provided for the two installs I've done so far trying to get this sucker to work. I followed each step to the letter both times...adding the LoadModule, AddType, and DirectoryIndex lines for PHP4 to the httd.conf file.

I guess I'll keep playing around with it a little more and maybe try a 3rd install before I attempt to get IIS 6 to work instead of using Apache.

Thanks
bdbrumm
Cacti User
Posts: 51
Joined: Mon Aug 12, 2002 3:16 pm

missing dll

Post by bdbrumm »

Sorry, I missed the Apache bit by not reading completely.

Which version of Apache are you using? I presume Apache 2.x
based on the dll version you reported.

Also, regardless of Apache version, does the .dll file
actually physically reside in the appropriate directory?

c:\php\sapi\php4apache2.dll

Did you get the right version of PHP? Maybe you accidentally downloaded
the apache 1.x version (php4apache.dll)? Beyond this, I don't have too many ideas on
what else might be the issue.
dig3doo
Posts: 6
Joined: Wed Feb 02, 2005 2:05 am

Had the same problem

Post by dig3doo »

Hi,

Had the same problem, I did not edit the php.ini correctly .
I had:
include_path = ".:c:\apache2\htdocs\cacti "
It should be:
include_path = "c:\apache2\htdocs\cacti "

Hope it helps
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests