Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Issue with Apache 2.2.3 and PHP 5.2

Status
Not open for further replies.

manesh29

IS-IT--Management
Nov 20, 2006
4
ZA
I have Installed apache 2.2.3 and PHP 5.2 using the windows installer . when i run phpinfo page i do get all the settings and stuff like that . but when i try to run one of actual PHP page the php code just get displayed on the page as though apache didn't recognize PHP
Please some one help mw with this .
thanks in advance
 
Hi

I would take a closer look at the Apache configuration files. Maybe the PHP usage is enabled only locally for some directories/virtual hosts. I think asking if you use the correct extension is worthless.

Feherke.
 
hi Feherhe
the following are the conf entries


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 auth_digest_module modules/mod_auth_digest.so
#LoadModule authn_anon_module modules/mod_authn_anon.so
#LoadModule authn_dbm_module modules/mod_authn_dbm.so
LoadModule authn_default_module modules/mod_authn_default.so
LoadModule authn_file_module modules/mod_authn_file.so
#LoadModule authz_dbm_module modules/mod_authz_dbm.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 cern_meta_module modules/mod_cern_meta.so
LoadModule cgi_module modules/mod_cgi.so
#LoadModule dav_module modules/mod_dav.so
#LoadModule dav_fs_module modules/mod_dav_fs.so
#LoadModule deflate_module modules/mod_deflate.so
LoadModule dir_module modules/mod_dir.so
LoadModule env_module modules/mod_env.so
#LoadModule expires_module modules/mod_expires.so
#LoadModule file_cache_module modules/mod_file_cache.so
#LoadModule headers_module modules/mod_headers.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 mime_magic_module modules/mod_mime_magic.so
#LoadModule proxy_module modules/mod_proxy.so
#LoadModule proxy_ajp_module modules/mod_proxy_ajp.so
#LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
#LoadModule proxy_connect_module modules/mod_proxy_connect.so
#LoadModule proxy_http_module modules/mod_proxy_http.so
#LoadModule proxy_ftp_module modules/mod_proxy_ftp.so
LoadModule negotiation_module modules/mod_negotiation.so
#LoadModule rewrite_module modules/mod_rewrite.so
LoadModule setenvif_module modules/mod_setenvif.so
#LoadModule speling_module modules/mod_speling.so
#LoadModule status_module modules/mod_status.so
#LoadModule unique_id_module modules/mod_unique_id.so
LoadModule userdir_module modules/mod_userdir.so
#LoadModule usertrack_module modules/mod_usertrack.so
#LoadModule vhost_alias_module modules/mod_vhost_alias.so
#LoadModule ssl_module modules/mod_ssl.so
PHPIniDir "C:\PHP\"
LoadModule php5_module "C:\PHP\php5apache2_2.dll"
AddType application/x-httpd-php .php
AddType application/x-httpd .php-source .phps

what else do u require from the conf file
thnks
 
Hi

That is not enough to configure an Apache. Search more.

As far as I know, on Windows the Apache configuration is split into more configuration files. Do not ask me which.

Feherke.
 
hi
but is it just for apache 2.2.3 because i m currently working on apache 2.0.50 in which i just need to configure httpd.conf file only
 
manesh29,

I'd have a look at the documentation at
when i try to run one of actual PHP page the php code just get displayed on the page as though apache didn't recognize PHP

You have
AddType application/x-httpd-php .php
in your httpd.conf.

Does the file that is displayed as code end in .php? Does the code in the file have correct begin and end php tags?

Wishdiak
A+, Network+, Security+, MCSA: Security 2003
 
wishdiak,
yes it is a working PHP page . my site was working on PHP5.0 with apache 2.0.50.
i just wanted to try the same working pages on our new server with win 2003 /apache 2.2.3 /php5.2

manesh
 
manesh29,

If you can code a page similar to this
Code:
<html>
<head>
<title>Hello World!</title>
</head>
<body>
<?php
echo 'Hello World!';
?>
</body>
</html>
and Apache displays the code rather than the 'Hello World!' text, then you're probably best off re-reading the documentation as referenced above.

If you did an in-place upgrade from Apache 2.0.x to Apache 2.2.x, then it's possible that you have a httpd.conf for each installation.

Wishdiak
A+, Network+, Security+, MCSA: Security 2003
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top