logo
Apache Lounge
Webmasters

 


About

Forum Index Downloads Search Register Log in  RSS Apache Lounge
 



Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Apache Lounge is not sponsored.

Your donations will help to keep this site alive and well, and continuing building binaries.



PHP pages not loading

 
Post new topic   Reply to topic    Apache Forum Index -> Other Software



View previous topic :: View next topic  
Author Message
trafalager



Joined: 20 Jun 2006
Posts: 1

PostPosted: Tue 20 Jun '06 5:02    Post subject: PHP pages not loading Reply with quote

I have been trying for some time to install PHP 5.1.4 to work with Apache 2.2.2 on a machine running Windows XP SP2, but to no avail. I have followed the instructions included with the download of php5apache2.dll verbatim. From what I can tell, there's nothing wrong aside from the fact that PHP won't run (apache seems happy, but the script won't execute).

I have:
-downloaded and unzipped the php5apache2.dll-php5.1.x.zip file from this website's download page.
-copied php5apache2.dll to my PHP folder (which is the default c:\php).
-copied httpd.exe.manifest to my Apache2.2\bin directory.
-downloaded and installed the VC++ redistirbutable package.
-added the lines
Code:
LoadModule php5_module "c:/php/php5apache2.dll"
AddType application/x-httpd-php .php

to my httpd.conf file as instructed.
-added ";c:\php" to the end of my PATH environmental variable. I've even created an environmental variable called "PHPIniDir" with the value "c:\php" for good measure. (Though the actual file, php.ini did not originally exist in my c:\php directory. A search revealed that it was in c:\windows, so I copied it to c:\php [retaining the copy in c:\windows]).

When I try to open a php file, however, none of the script is rendered. I can view the source and see that the script is in there, but nothing is passed to the browser. I'm sure this isn't a problem with the script, as the script is just

Code:
<?php echo "Random jibberish here"; ?>


and even that won't run. There is nothing notable in my error logs, just

Code:
[Mon Jun 19 22:46:32 2006] [notice] Server built: Apr 29 2006 18:32:31
[Mon Jun 19 22:46:32 2006] [notice] Parent: Created child process 1184
[Mon Jun 19 22:46:32 2006] [notice] Child 1184: Child process is running
[Mon Jun 19 22:46:32 2006] [notice] Child 1184: Acquired the start mutex.
[Mon Jun 19 22:46:32 2006] [notice] Child 1184: Starting 250 worker threads.
[Mon Jun 19 22:46:32 2006] [notice] Child 1184: Starting thread to listen on port 80.


over and over again... I'm out of ideas guys, and any help would be much appreciated.
Back to top
pnllan



Joined: 05 Dec 2005
Posts: 221

PostPosted: Tue 20 Jun '06 9:48    Post subject: Reply with quote

This is my entire CONF file (edited to arbitrary paths - but close enough to make sense):
Code:
ThreadsPerChild 250
MaxRequestsPerChild 0

ServerRoot "C:/Apache2"

Listen 80


LoadModule actions_module modules/mod_actions.so
LoadModule alias_module modules/mod_alias.so
LoadModule asis_module modules/mod_asis.so
LoadModule auth_basic_module modules/mod_auth_basic.so
LoadModule authn_default_module modules/mod_authn_default.so
LoadModule authn_file_module modules/mod_authn_file.so
LoadModule authz_default_module modules/mod_authz_default.so
LoadModule authz_groupfile_module modules/mod_authz_groupfile.so
LoadModule authz_host_module modules/mod_authz_host.so
LoadModule authz_user_module modules/mod_authz_user.so
LoadModule autoindex_module modules/mod_autoindex.so
LoadModule cgi_module modules/mod_cgi.so
LoadModule dir_module modules/mod_dir.so
LoadModule env_module modules/mod_env.so
LoadModule imagemap_module modules/mod_imagemap.so
LoadModule include_module modules/mod_include.so
LoadModule info_module modules/mod_info.so
LoadModule isapi_module modules/mod_isapi.so
LoadModule log_config_module modules/mod_log_config.so
LoadModule mime_module modules/mod_mime.so
LoadModule negotiation_module modules/mod_negotiation.so
LoadModule setenvif_module modules/mod_setenvif.so
LoadModule status_module modules/mod_status.so
LoadModule userdir_module modules/mod_userdir.so
LoadModule ssl_module modules/mod_ssl.so

# Load PHP as a module
LoadModule php5_module "c:/php/php5apache2.dll"

ServerAdmin @@ServerAdmin@@

ServerName localhost:80

DocumentRoot "d:/Web"

<Directory />
      Options FollowSymLinks
      AllowOverride None
      Order deny,allow
      Deny from all
      Satisfy all
</Directory>

<Directory "d:/Web">
      Options Indexes FollowSymLinks
      AllowOverride None
      Order allow,deny
      Allow from all
</Directory>

<IfModule dir_module>
      DirectoryIndex index.htm index.html index.php
</IfModule>

<IfModule log_config_module>
      LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
      LogFormat "%h %l %u %t \"%r\" %>s %b" common
      <IfModule logio_module>
            LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
      </IfModule>
      CustomLog logs/access.log combined
</IfModule>
<IfModule mime_module>
      TypesConfig conf/mime.types
      AddType application/x-compress .Z
      AddType application/x-gzip .gz .tgz

      # include the MIME TYPE for PHP
      AddType application/x-httpd-php .php
</IfModule>

DefaultType text/plain
<FilesMatch "^\.ht">
      Order allow,deny
      Deny from all
</FilesMatch>

ErrorLog logs/error.log

LogLevel crit

Include conf/extra/httpd-info.conf

Include conf/extra/httpd-manual.conf

Include conf/extra/httpd-default.conf

Include conf/extra/httpd-ssl.conf

Include conf/extra/httpd-vhosts.conf

PHPIniDir "C:/php"


I run PHP with an Apache CONF just like this without ANY problems - compare to what you have and note locations of PHP pertinent information. The extra CONF files set with Include contain nothing with regards to PHP.

Beyond this, I don't know what to tell you except that I'm using PHP 5.1.4 downloaded from PHP.net in conjunction with Steffen's php5apache2.dll. Also, in the PHP.INI file set error_reporting = E_ALL and display_errors = On until you have PHP working.

Good Luck
..
Back to top


Post new topic   Reply to topic    Apache Forum Index -> Other Software
Page 1 of 1