Solved

Getting phpED to work

Posted on 2011-09-10
7
258 Views
Last Modified: 2012-05-12
I have just started using phpED and I'm having trouble.  

When I run in phpED:

<?php
    echo "Hello World";
?>

It displays:

Hello World

As it should.  But when I open the file(file:///C:/testing/hello_world.php) in FireFox, it simply displays as a text file:
<?php
    echo "Hello World";
?>

How to I get it to process the php?  Any ideas?
0
Comment
Question by:hrolsons
  • 4
  • 3
7 Comments
 
LVL 82

Accepted Solution

by:
Dave Baldwin earned 500 total points
ID: 36517282
That is correct behavior.  The PHP interpreter runs thru a web server, in your case, one included in phpED.  When you open it as a file, there is no server to know it should be interpreted by the PHP interpreter.

You must have a web server to execute PHP code in your browser.  You can run PHP from the command line but that will be a 'DOS' window, not a browser.
0
 

Author Comment

by:hrolsons
ID: 36517346
So there's no way I could call the file from a Visual Basic WebBrowser Control?
0
 
LVL 82

Expert Comment

by:Dave Baldwin
ID: 36517432
No, I don't think so.  You can set up IIS to run both ASP.NET and PHP and you might be able to do it there.  But you can't call it as just a file and have it work.
0
Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

 

Author Comment

by:hrolsons
ID: 36520691
0
 
LVL 82

Expert Comment

by:Dave Baldwin
ID: 36520938
Why did you post that link?
0
 

Author Comment

by:hrolsons
ID: 36523815
Just to reiterate, like you said, it can be run from the command line successfully.

0
 
LVL 82

Expert Comment

by:Dave Baldwin
ID: 36524706
And what do you mean by that?  There is nothing in this question about running anything from the command line.
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now