View Full Version : php +apache2
yestom
06-12-2003, 02:22 PM
I have WindowsXP on my computer and Apache2. I install php 4.2.3, and I decide to install php as a modul.I did all thing that php site told me. But when I try to start my web server, it didn't start. Then I delete line :
LoadModule php4_module "c:/php/sapi/php4apache2.dll"
AddType application/x-httpd-php .php
from apache httpd.config file and I add:
ScriptAlias /php/ "c:/php/"
AddType application/x-httpd-php .php
Action application/x-httpd-php "/php/php.exe"
Apchache2 started, but then I wrote a simple script and it didn't work.
I look up at Apache error log:
C:/Program Files/Apache Group/Apache2/php/test.php is not executable; ensure interpreted scripts have "#!" first line
(9)Bad file descriptor: don't know how to spawn child process: C:/Program Files/Apache Group/Apache2/php/test.php
pls. Help Me.
I don't know where I wrong ..
ps. Sorry for my English.
jianneng
06-12-2003, 02:52 PM
Hi,
Have you referred to the materials at this link?
http://www.php.net/manual/en/install.apache2.php
They are saying that PHP 4.2.3 only works with Apache 2.0.39, so I am not sure if this could be the cause for your problem.
I have PHP 4.3.1 installed with Apache 2.0.46 (the latest version) on WinXP as well and they work fine.
Perhaps you might want to consider install the latest PHP version 4.3.2 with Apache 2.0.46.
Lim.
Hi,
I have Apache 2.0.45 and PHP/4.3.1 on WinXP, too and its working fine.
If you're interested, here i have the links of my php.ini (c:/windows) and http.conf (in the conf-directory of apche).
http://yeti-networks.gmxhome.de/files/httpd.conf
http://yeti-networks.gmxhome.de/files/php.ini
Of course you have to change some paths...
Saludo
piz
firepages
06-13-2003, 02:17 AM
go back to using ...
LoadModule php4_module "c:/php/sapi/php4apache2.dll"
AddType application/x-httpd-php .php
(remove the other stuff)
then move the php4ts.dll from
c:/php/php4ts.dll
to
c:/php/sapi/php4ts.dll
start apache & all should be fine , Apache 2.0.46 is recommended at the moment and is quite stable with 4.3.2
yestom
06-13-2003, 09:43 AM
10x for reply.
I start my web server, and finally php is linstalled as modul.
But I wrote this:
<html>
<form>
Please type your name here:<br>
<input type=text name="username"><br><br>
<input type=submit value="Submit data">
</form>
<br><br>
You typed:
<?php
echo($username);
?>
</html>
When I go to URL of the script everyting seem right. I write some name, but when I press "Submit" the name isn't show.
Only in url i see: bla-bla/test.php?/username=nameIadd
Help.
My icq: 68701700 /yestom
or
My AIM: yesstom
My MSN: vatcheva@hotmail.com
10x in advance.
jianneng
06-13-2003, 02:33 PM
To be frank, I think you should check if your PHP is really working with the web server.
There is nothing wrong with the scripts you have shown, and I have tested it on my computer and it works well, i.e. it shows whatever name you input.
Perhaps you would like to recheck if you have edited the php.ini and httpd.conf correctly according to the install.txt that comes with PHP distribution.
The php4ts.dll should be copied to your system32 of your windows directory as well.
If you are merely setting this PHP + Apache up just for your local testing and programming needs, I suggest you uninstall/delete all the current PHP and Apache installations and reinstall the PHP with Apache 1.3.27.
Nightfire
06-13-2003, 03:11 PM
<html>
<body>
<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post">
Please type your name here:<br>
<input type=text name="username"><br><br>
<input type=submit value="Submit data">
</form>
<br><br>
You typed:
<?php
echo($_POST['username']);
?>
</body>
</html>
asp123
10-27-2003, 04:30 AM
To :yestom
I have the same problem as you.
Does you solve this problem yet?
Thanks.
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.