Jump to content

Recommended Posts

Hi,

 

I\'ve just installed Apache2 and php 4.3.1 on a Win2k PC and I\'m having a problem with it. Instead of Apache executing the PHP script it keeps downloading it and executing the script in a DOS window (because I created an association with php.exe). I think its a problem with the httpd.conf file but I\'m not sure. I have the following lines in the httpd.conf file to load the PHP module:

 

LoadModule php4_module \"c:/PHP/sapi/php4apache2.dll\"

ScriptAlias /php/ \"c:/php/\"

AddType application/x-httpd-php .php

 

Thanks,

 

Tony.

:?

Link to comment
https://forums.phpfreaks.com/topic/549-phpapache-problem/
Share on other sites

Thanks shivabharat,

 

I\'ve unassociated php with any application type. Now Apache tries to download the php script and asks me to choose/associate an aplication with it. Could it be something to do with php.ini. This is my first time installing PHP, so I\'m not too sure.

 

Thanks,

 

Tony.

Link to comment
https://forums.phpfreaks.com/topic/549-phpapache-problem/#findComment-1847
Share on other sites

I\'ve tried re-installing PHP and it\'s still the same. I think its something to do with Apache. If I save the same file with a html extension. The HTML is shown but not the PHP. The script is pasted below and saved to a file called phptest.php (and phptest.html, will display the header but ont hello world).

 

<html>

<head>

<title>PHP Test</title>

</head>

<body>

<H1>TEST</H1>

 

<?php

echo \"<p>Hello World</p>\";

?>

 

</body>

</html>

Link to comment
https://forums.phpfreaks.com/topic/549-phpapache-problem/#findComment-1851
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.