Forums
This topic is locked
Preview hangs with Apache+PHP
Posted 11 Aug 2001 02:50:17
1
has voted
11 Aug 2001 02:50:17 Bernhard Kruepl posted:
Hi,because of Phakt I am just evaluating UD4, so please forgive any ignorance.
When I run Apache + PHP (module) and I try to preview a page, UD4 hangs until I terminate (CTRL-C) Apache. UD4 also hangs when I try to invoke the online help (F1). It does not hang without the PHP module loaded.
Windows 98SE, UD-4.0, Phakt-1.0.1, Apache-1.3.19 + PHP-4.0.6 or easyphp (both tried).
Any help or RTFM for me?
Thanks a lot,
Bernhard
Edited by - gluc on 08/11/2001 02:52:04
Replies
Replied 11 Aug 2001 20:40:35
11 Aug 2001 20:40:35 Bruno Mairlot replied:
Hi gluc,
have you tried to see your page in a real browser ?
It looks like there's probably an infinite loop in your PHP page, and the computation of the page isn't possible. Could it be possible that you post the code of your page ?
Make a quick search on every loop you might have ? (for, while, ... keywords).
Bruno.
"First they laugh at you, then they fight you, then you Win..." Ghandi
have you tried to see your page in a real browser ?
It looks like there's probably an infinite loop in your PHP page, and the computation of the page isn't possible. Could it be possible that you post the code of your page ?
Make a quick search on every loop you might have ? (for, while, ... keywords).
Bruno.
"First they laugh at you, then they fight you, then you Win..." Ghandi
Replied 12 Aug 2001 13:10:38
12 Aug 2001 13:10:38 Bernhard Kruepl replied:
Hello Bruno,
thanks for your reply.
There is no PHP code at all in the page!
1. I start Apache with the PHP module loaded from a DOS box
2. I create a new and empty PHP page in UD4
3. I put in a line of HTML ("test"
4. I press F12 for preview
5. UD4 hangs
6. I press CTRL-C in the DOS box to stop Apache
7. IE5 comes up with an error message (Could not open localhost/ud4gluc/TMP96e2hyeav.php)
8. UD4 works again
9. I restart Apache
10. I press reload in IE5 and my page shows up
UD4 also hangs if instead of 2., 3., 4. I just press F1 to invoke the online help. The behaviour also seems to be browser-inpdependent, since this also occurs when I try to preview in Opera.
UD4 does not hang if I comment out LoadModule .. php in Apache's
httpd.conf (of course, thís is not satisfactory).
Also, for PHP code, Live Data does work from UD4.
???
Bernhard
thanks for your reply.
There is no PHP code at all in the page!
1. I start Apache with the PHP module loaded from a DOS box
2. I create a new and empty PHP page in UD4
3. I put in a line of HTML ("test"
4. I press F12 for preview
5. UD4 hangs
6. I press CTRL-C in the DOS box to stop Apache
7. IE5 comes up with an error message (Could not open localhost/ud4gluc/TMP96e2hyeav.php)
8. UD4 works again
9. I restart Apache
10. I press reload in IE5 and my page shows up
UD4 also hangs if instead of 2., 3., 4. I just press F1 to invoke the online help. The behaviour also seems to be browser-inpdependent, since this also occurs when I try to preview in Opera.
UD4 does not hang if I comment out LoadModule .. php in Apache's
httpd.conf (of course, thís is not satisfactory).
Also, for PHP code, Live Data does work from UD4.
???
Bernhard
Replied 12 Aug 2001 14:05:10
12 Aug 2001 14:05:10 Bruno Mairlot replied:
OK,
Could it be possible to see the part of your httpd.conf that contains the code which loads PHP module.
I've never been able to load PHP module into Apache under Win32 and I used the second way (Application/x-.... /php/php.exe) and it worked fine.
If you read the README from php distribution, you should see that there's two way to configure Apache to include PHP. Try the second one.
I'm not under my Win2k configuration right now, so I can't give you the code, but as soon as I restarted my computer I'll send you my config file.
"First they laugh at you, then they fight you, then you Win..." Ghandi
Could it be possible to see the part of your httpd.conf that contains the code which loads PHP module.
I've never been able to load PHP module into Apache under Win32 and I used the second way (Application/x-.... /php/php.exe) and it worked fine.
If you read the README from php distribution, you should see that there's two way to configure Apache to include PHP. Try the second one.
I'm not under my Win2k configuration right now, so I can't give you the code, but as soon as I restarted my computer I'll send you my config file.
"First they laugh at you, then they fight you, then you Win..." Ghandi
Replied 12 Aug 2001 17:18:03
12 Aug 2001 17:18:03 Bernhard Kruepl replied:
Bruno,
using the CGI version of PHP was the solution!
Previously, with PHP installed in d:\programme, my httpd.conf contained these two lines:
<pre id=code><font face=courier size=2 id=code>
LoadModule php4_module d:/programme/php/sapi/php4apache.dll
AddType application/x-httpd-php .php
</font id=code></pre id=code>
I had to use the php-4.0.6-Win32.zip version (with source files) instead of the installer php406-installer.exe, because some DLLs were missing.
If I would have paid more attention to the install.txt of PHP in the first place, I would have read that the PHP module support is experimental under Windows.
So I deleted these two lines and wrote:
<pre id=code><font face=courier size=2 id=code>
ScriptAlias /php/ "d:/programme/php/"
AddType application/x-httpd-php .php
Action application/x-httpd-php "/php/php.exe"
</font id=code></pre id=code>
Voila, preview works, no more hangs!
Since I use Windows only as a development platform and performance is not an issue here, this is a perfect solution for me.
Thanks a lot for helping out!
Bernhard
using the CGI version of PHP was the solution!
Previously, with PHP installed in d:\programme, my httpd.conf contained these two lines:
<pre id=code><font face=courier size=2 id=code>
LoadModule php4_module d:/programme/php/sapi/php4apache.dll
AddType application/x-httpd-php .php
</font id=code></pre id=code>
I had to use the php-4.0.6-Win32.zip version (with source files) instead of the installer php406-installer.exe, because some DLLs were missing.
If I would have paid more attention to the install.txt of PHP in the first place, I would have read that the PHP module support is experimental under Windows.
So I deleted these two lines and wrote:
<pre id=code><font face=courier size=2 id=code>
ScriptAlias /php/ "d:/programme/php/"
AddType application/x-httpd-php .php
Action application/x-httpd-php "/php/php.exe"
</font id=code></pre id=code>
Voila, preview works, no more hangs!
Since I use Windows only as a development platform and performance is not an issue here, this is a perfect solution for me.
Thanks a lot for helping out!
Bernhard
Replied 12 Aug 2001 17:54:36
12 Aug 2001 17:54:36 Bruno Mairlot replied:
Always glad to be of any help gluc <img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle>
"First they laugh at you, then they fight you, then you Win..." Ghandi
"First they laugh at you, then they fight you, then you Win..." Ghandi