Can't open Php file

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

Post Reply
ying06
Forum Newbie
Posts: 2
Joined: Mon Feb 22, 2010 2:37 pm

Can't open Php file

Post by ying06 »

I'm totally new about PHP. My machine is server 2003 and PHP 5.0 was installed. However, when I tried to open a .php file in window Explorer, I was prompted as do you want open, save .. the file. If I choose open file, nothing happened.

It seems the machine doesn't recognize the .php at all. What configuration I should do now ?
User avatar
AbraCadaver
DevNet Master
Posts: 2572
Joined: Mon Feb 24, 2003 10:12 am
Location: The Republic of Texas
Contact:

Re: Can't open Php file

Post by AbraCadaver »

You need to install a web server with PHP and then browse to your file in IE or another browser using http://localhost/path/to/my/file.php. You can download a WAMP (Windows, Apache, MySQL, PHP) stack and install it easily.

Other than that you can run the PHP from the CLI. Start > Run > cmd

C:\> \path\to\php.exe \path\to\my\file.php
mysql_function(): WARNING: This extension is deprecated as of PHP 5.5.0, and will be removed in the future. Instead, the MySQLi or PDO_MySQLextension should be used. See also MySQL: choosing an API guide and related FAQ for more information.
ying06
Forum Newbie
Posts: 2
Joined: Mon Feb 22, 2010 2:37 pm

Re: Can't open Php file

Post by ying06 »

Thank you for reply. The machine has IIS installed. The php choose IIS CGI as web server. Is there any other thing needs installed?
User avatar
AbraCadaver
DevNet Master
Posts: 2572
Joined: Mon Feb 24, 2003 10:12 am
Location: The Republic of Texas
Contact:

Re: Can't open Php file

Post by AbraCadaver »

ying06 wrote:Thank you for reply. The machine has IIS installed. The php choose IIS CGI as web server. Is there any other thing needs installed?
I'm not really sure about IIS. The PHP installer should do it correctly and tell you if you need to do more.
mysql_function(): WARNING: This extension is deprecated as of PHP 5.5.0, and will be removed in the future. Instead, the MySQLi or PDO_MySQLextension should be used. See also MySQL: choosing an API guide and related FAQ for more information.
Post Reply