Hi all,

The problem: index.php downloads instead of actually executing the script. I used to have my machine setup with php/apache/mysql/WinXP and it worked. I downloaded the newest release of php 4 and now it won't work.

What happened?

Setup:
------
Windows XP SP 1
PHP 4.3.10
Apache 1.3.33
mySQL 4.1.8

Any and all help is appreciated.

-Derek Parnell

I can only think of two things,
Either you forgot to put the start/end of the script by usign the brackets/questionmarks

<?
  //some code goes here
?>

Or worse yet you forgot to configure php as an extension to apache, installing apache and then installing php is not enough to get php running in apache. You must configure apache to recognize php in a windows envioroment.

How to Install and Configure PHP4 to run with Apache on Windows
http://www.thesitewizard.com/archive/php4install.shtml

Not sure if it works the same in Windows as in Linux, but the .php file must have executable permissions.

Thanks for the responses, but I found a post somewhere (I can't remember where) that mentioned problems on the local box if you use localhost. Their suggestion was to use 127.0.0.1 and when I do that, it works fine. It wasn't mentioned on the other post, but is this a known bug/issue/technique?

Anyway, it works now.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.