Forum Moderators: coopster

Message Too Old, No Replies

PHP files execute in Command Window, not in IE

Double click PHP file - opens in Command Window

         

mlkarie

5:00 pm on Aug 19, 2003 (gmt 0)

10+ Year Member



I installed PWS and PHP, and followed the instructions in install.txt of the PHP manual.

However, when I double click on a PHP file in Windows Explorer the file executes in the Command Prompt window, after which the window closes immediately.
I did follow all the instructions about settings in the registry (phpfile - shell -- open -- command -- c:\php\php.exe -q %1).

What must I do to let PHP files execute in the browser window, not in the Command Prompt Window?

Looks like I'm managing to pass variables to a PHP file from a Flash movie; the code in the Flash movie then also loads the PHP file, but the same thing happens - it opens in the Command window.

Yesterday it opened correctly; I didn't change anything, but today it opens in the Command window.

What must I do?

jatar_k

5:07 pm on Aug 19, 2003 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



I would imagine you need to call it through the browser then as opposed to double clicking it. The flash movie should call it via a url to get it to open in the browser as well.

sorry, I may be over simplifying.

jonknee

5:45 pm on Aug 19, 2003 (gmt 0)

10+ Year Member



Normally you have to execute PHP through some sort of web server. For instance, if I have a .php file on my drive I can't just write file://path/to/file.php. I have to put it in my webserver DIR and use localhost/path/to/file.php.

mlkarie

6:37 pm on Aug 19, 2003 (gmt 0)

10+ Year Member



I'm glad to see that you say "normally one opens it through the web browser" - that method works fine for me, and at least I'm on the right track there.

The Flash movie should open the URL in the browser window, and I'm sure that yesterday it did exactly that. It's just that all of a sudden today it doesn't do that.

In the Flash movie I'm using the Loadvars object to send variables and specify the new URL. This does open the specified PHP file, but not in the browser window.

Flash code: loadnames("savedata.php", "_self", "POST");

Very puzzling - when it gets like this, I just say "Welcome to the world of computers..."

But I need to get past the problem, though.

mlkarie

5:25 pm on Aug 20, 2003 (gmt 0)

10+ Year Member



Dear jatar-K

You were not over-simplifying. I discovered today that I must only call the file through the browser (http://localhost/...etc ), and not double-click on the file name in Explorer. Such a simple issue, but when you're stuck, it isn't fun.

Thanks for the help.