Apache Lounge



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.



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 5.2.0 & Apache 2.2.3] No compilation PHP after rest

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

View previous topic :: View next topic  
Author Message

Joined: 28 Dec 2006
Posts: 1

PostPosted: Thu 28 Dec '06 12:20    Post subject: [Php 5.2.0 & Apache 2.2.3] No compilation PHP after rest Reply with quote

I have installed Php 5.2.0 & Apache 2.2.3 on a Win32 XP Pro system. After installation the php pages look to compile fine (some don't) but after a system restart php doesn't compile anymore Sad

I've tried the following steps, and systematically shut down and started Apache to try to get php working during every step/change (path is added):
1. De-installation, restart, new install of Apache (works), restart and thereafter PHP + restart.
2. Adjust basic configuration (paths etc): Apache works, PHP does not
3. Adjust httpd.conf and php.ini configuration (paths etc): Apache works, PHP does not (shows <? and ?> in source)
- I've tried to change httpd.conf with the following lines (all posible combinations, without * of course Razz):
* AddType application/x-httpd-php. php (bottom as well as in '<IfModule mime_module>')
* PHPIniDir "C:\PHP" (tried with forward slash and caps/small as well)
* LoadModule php5_module "C:\PHP\php5apache2_2.dll"
* AddHandler application/x-httpd-php .php

- If I add "LoadFile "C:\PHP\php5ts.dll"" to httpd.conf browser wants to "Save PHP-file as..." (don't know if this is relevant info, shouldn't be)
4. Give up Wink

Does anybody know what I'm doing wrong or what I have to change to get PHP and Apache working on my system?

Some general info:
- Win XP Pro SP2
- Apache 2.2.3
- Path added to environment variables
- Path PHP: C:\PHP
- Path Apache: C:\Program Files\Apache Software Foundation\Apache2.2\htdocs (default)
- Changes in php.ini: only doc_root added. Extensions: gd2 and imagick


edit: I've already tried the tutorial (http://www.apachelounge.com/viewtopic.php?t=570)
Back to top
James Blond

Joined: 19 Jan 2006
Posts: 6604
Location: Germany, Next to Hamburg

PostPosted: Thu 28 Dec '06 12:26    Post subject: Reply with quote

Did you enable short tags in php.ini?

Please read http://www.apachelounge.com/viewtopic.php?t=570 there is a section about php.
Back to top

Joined: 09 Jan 2007
Posts: 2
Location: Croatia

PostPosted: Tue 09 Jan '07 23:18    Post subject: Reply with quote

I have precisely the same problem, but with SP1a installed, though, I don’t think that should be of any difference.
So far, I’ve tried every possible installation, with .msi and .zip files, likewise, while following manual/s and various on-line tutorials, including the one mentioned above.

None of it works, at least not for me Cool

Rather, result is always the same.
Apache works, php works, php –i in the command prompt gives back bunch of html. Comforting… And according to php faq, that means that php installation is all right, just, web server, somehow, doesn’t get it.
That is why I am posting this here.

Result of following index.php (Default.php or php5) is displaying it exactly in the web browser:
echo”Hello, World”;
Sometimes it doesn’t show anything in the browser, but in view source shows source.

Latest installation that I’ve tried, was with apache 2.2.3. msi , and with php5.2.0 .msi.

I’ve tried it, again, after following documentation for the n-th time. Same result. Then I tried web tutorials … Again.
During the installation I’ve accepted default values wherever I could, and after all the trouble, only changes that I’ve made are listed:

Changes I’ve made in php.ini:
doc_root = "C:\Program Files\Apache Software Foundation\Apache2.2\htdocs"
extension_dir = "C:\php\ext"

Changes I’ve made in httpd.conf:
LoadModule php5_module "c:/php/php5apache2_2.dll"
AddType application/x-httpd-php .php
PHPIniDir "c:/php"
LoadFile "c:/php/php5ts.dll"
AddHandler application/x-httpd-php .php

Ah, yes, I’ve almost forgot, PATH is set. I have been very carefull with /and \, I played with comments(“), putting them and deleting them, too, and I have deinstalled IIS. So, that’s not it.

All in all, a cute puzzler Wink

I’ve tried everything short of reinstalling the windows, I have done that, anyway, only a three weeks ago.

Could the problem be in Apache multithreading nature when installed as a win service, or, perhaps, in php cgi.force_redirect and/or in enable_dl?

I’am fairly new to php&apache on Windows, so my above question is nothing more than a hunch.

Being very curios, I would like to know has anyone tried, survived and succeed in installing php5.2 with apache 2.2.3 (WinXP pro), especially with above mentioned .msi files?

And if such person exist in known universe, would it be kind enough to post here, his or hers, php.ini and httpd.conf. I suspect it would not be easily feasible for the length of those files. Or simply to e-mail me that two files on vitez77@yahoo.com.

Much obligated Smile
Back to top

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