Jump to content

PHP Newbie Help please


Recommended Posts

[b]Problem:[/b] I simply want to test my php (in order to see if its running properly) and when I try the simple script:

<?
phpinfo();
?>

a popup window "FILE DOWNLOAD - Would you like to open the file or save it on the computer..."

I'm pretty sure I've installed PHP properly (by following the install steps provided with the installation)
Can someone please point me to the right direction. Hopefully someone has seen this problem before.

Here's what i'm using:
- PHP v5.2
- Windows XP
- IIS v5
- I properly set the environmental variable path properly "C:\php"
- I properly included a system variable "PHPRC" to "C:\php"
- I properly downloaded the PECL scripts and put them in the php folder
(however I read I should take out the actionscript from that folder and put it in the php root folder, which i did)

so is there anything i forgot, please let me know. 
thanks

Link to comment
Share on other sites

thanks....i thought I did configure my IIS.  I'm assuming by adding to the variable path (in the environmental variable) to see the php directory i.e. "C:/php" is enough. Is there more to that?  Is there a specific place to configure the IIS that i'm missing?
Link to comment
Share on other sites

yes

Open your IIS console expande the left pane till you see your web site, right click and hit properties

Click the home directory tab
Click the configuration button
Scroll through the list. If you do not see the extension .php you have to add it

click add set the executable to the php-cgi.exe in you php folder(which should be php 5.x.x) and set the extension to .php
Click ok to everything

Restart your server and try it again

Ray
Link to comment
Share on other sites

unfortunately configuring iis to include executing the php_cgi.exe with the .php extension didn't work. I'm still getting the 'file download' pop up window (even after restarting iis 5)....

any suggestions anyone?  it doesnt seem to be a common problem based on my internet research for this problem.

(i bet the answer is right in front of me but i can't see it)
Link to comment
Share on other sites

did you restart IIS?

If you still have probs you could always try Apache - all you need to do is add the following to the httpd.conf file

[code]
ScriptAlias /php/ "c:/php/"
AddType application/x-httpd-php .php

# For PHP 4
Action application/x-httpd-php "/php/php.exe"
[/code]

Link to comment
Share on other sites

  • 1 month later...
I'm having exactly the same problem.  The only difference I can see is that in IIS the extension .php is mapped to php5isapi.dll --

I get the file download prompt every time I access a php page.  I've installed manually twice, and using msi once -- and double checked the installation procedure.  Nothing works.  Unfortunately, I'm stuck with IIS.

Any ideas?

Link to comment
Share on other sites

I am not sure if 5.2 is like 6 but if you expand your local computer on the left side and you see a folder called "Web service extension" you have to go in and allow php to run.

click the link to "Add a new web server extension"  for the extension name put in "php" (without the quotes) and then add the .exe or .dll files that php uses.

Ray
Link to comment
Share on other sites

this happens because mozilla does not know which server to use as IIS is not by default configured for mozilla ...so it gives u an option of opening it in some other program {php editors} or save options etc. for php extension......the solution is very simple just use internet explorer for it....[or use one editor to see how it would look in browser ..like i use php expert editor]..always chek that the server is running ....the much better option for running any script in php in windows is WAMP{short for Windows-Apache-MYSQL-PHP}...but then u should uninstall iis server as it sometimes conflict with apache while running ...u can download it from [url=http://www.wampserver.com/en/download.php]www.wampserver.com/en/download.php [/url]....hope this helpz !! ;)
Link to comment
Share on other sites

Well php has nothing to do with which browser you use. PHP is all server based so which browser the client is using is not why his server is not working. It may change some formating but the php script will work, I use IIS for 5 of my clients and they all work flawlessly no matter which web browser they use.

Back to your problem, You have a setting out of place somewhere.

try here first

http://us3.php.net/manual/en/install.windows.manual.php

Then go here

http://us3.php.net/manual/en/install.windows.iis.php

Ray
Link to comment
Share on other sites

  • 2 weeks later...
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.