Page 1 of 1
Unable to run as PHP web page
Posted: Fri Jul 22, 2011 4:57 am
by gvnkcoolguy
Hi,
I'm new to PHP coding. As of now, I have configured Eclipse Helios 3.6 in my machine to work with PHP 5. I have configured Xend Debugger as the default debugger. When I run a simple code as shown below as a PHP web page, I get a "This program cannot display the webpage" message in the internal Eclipse browser. But I get the output when I run it as a PHP Script.
Can you suggest what changes/corrections should I make to make my PHP code run as a web page.
Sample code:
Code: Select all
<?php
echo "Welcome to ";
print("PHP Coding");
?>
Re: Unable to run as PHP web page
Posted: Fri Jul 22, 2011 6:35 am
by social_experiment
gvnkcoolguy wrote:But I get the output when I run it as a PHP Script.
It works when you view the page in an external browser like firefox?
Re: Unable to run as PHP web page
Posted: Mon Jul 25, 2011 12:04 pm
by gvnkcoolguy
No, I don't get the output in an external browser also. Any suggestions to make it run in a Web page?
Re: Unable to run as PHP web page
Posted: Tue Jul 26, 2011 5:22 am
by social_experiment
gvnkcoolguy wrote:No, I don't get the output in an external browser also. Any suggestions to make it run in a Web page?
Maybe the php configuration is incorrect

I don't know anything about the IDE that you are using so im speculating here. As for the second part of your question, webpage is a generic term for a page (regardless of extension) that can be viewed using a browser. Technically you have already created a webpage :/
Re: Unable to run as PHP web page
Posted: Tue Jul 26, 2011 8:49 am
by masterblaster
Re: Unable to run as PHP web page
Posted: Wed Jul 27, 2011 12:31 am
by gvnkcoolguy
I meant, running it as a web page. In the Eclipse IDE, I get two options - Run as a PHP script or Run as a PHP Web page. The first option gives me the output but only in the IDE Console. The second option of displaying the stuff in a Web page doesn't work. So, what configuration changes should I make to get it running as a PHP Web page? As of now, I have downloaded the Zend debugger and configured it by specifying the paths of the php.exe and .ini files in the IDE. Anything else that I should do?
Re: Unable to run as PHP web page
Posted: Wed Jul 27, 2011 4:05 am
by social_experiment
social_experiment wrote:I don't know anything about the IDE that you are using so im speculating here
Download XAMPP or WAMPP and set it up on your computer, once that is done you will have a server on your computer that will enable to you to display php pages as webpages