EasyPHP is not working

Status
Not open for further replies.
I am new to easyPHP. I downloaded easy PHP and installed it on my PC on the C: drive, not in program files directory. Both Apache and MySQL have green lights. I used notepad and made a file called info.php and saved it in my www folder" (according to tutorial).
Then I went to Internet Explorer address bar and typed "//127.0.0.1/info.php".
It says "Object not found!, The requested URL was not found on server...".
Error 404.
I then tried entering "//localhost/info.php". It says, "Oops! We can't find the webpage you're looking for".
Both of the above addresses have http before them. This is my first post and evidently I can't use the whole address.
I am just starting to try and learn php and I'm not sure what to do. I tried to look up troubleshooting on Google, but no luck.
What do I do!
Thanks in advance.
 
two different issues;
  1. how to access your web server
  2. then how to config php and access a script

(?) Which webserver are you running? The config file will have a spec for
Listen *:80 or some such. This says any ip address on port 80.
If you're configure correctly, then http://127.0.0.1/ should result in the website default page (eg index.html). Until that works, forget php issues.
 
PHP problems getting started

Please bare with me getting started...
I am doing a free on line course, "PHP Tutorials for Beginners".
On the getting started page it says I want to make my computer pretend it has a server installed. So I guess my computer is my web server.
First, to test it out, they have you type into Internet Explorer browser "//127.0.0.1/home/index.php" ("hppt:" at beginning) to see a default index page. I assume this worked fine. On the title bar it says, "[EasyPHP] - administration". It basically displays 5 rows of information (APACHE 2.2.11..., PHP5.2.8..., PHPMyAdMiN 3.1.1..., SqLiTEMANAGER 1.2.0..., and MySqL 5.1.30...). There are also some dropdown menus at the top. One of these is "local web". When I go there, the files I created are listed (from the www subdirectory). The files I made with notepad all end with .php.txt. I didn't realize there are two extensions after the file name. Should they have .txt at the end of the file name? If I add the .txt after the file name and put it in the address bar and hit GO, a window does come up and the title bar says PHP Test, but there is nothing in the window. I also noticed a help menu. I read that and made another file called date.php, which is suppose to display the current date. When I click on ://date.php.txt it comes up, and the title bar says "My first page in PHP.", but all it says is, "Current date.:", but the date is not listed. If I click on either of these files from the "local web" drop down window, they do the same thing.
I have included both files below:
******************
<html>
<head>
<title>PHP Test</title>
</head>
<body>

<?php phpinfo(); ?>

</body>
</html>
*********************
<html>
<head>
<title>My first page in PHP.</title>
</head>
<body>

Current date. : <?php print (Date("l F d, Y")); ?>

</body>
</html>
**************************

I am running XP Home Edition.

Thank you for your patience.
 
oh boy ...

First, running php on your system in reality does not require a webserver (and no, your system is not a webserver; IIS or Apache are webservers).
Just because some title says "APACHE 2.2.11..., PHP5.2.8..., ..." does not say Apache is installed.

If you think you have installed Apache, you can prove it
run->services.msc
look for Apache2 in the list of services​
You can make it Autostart or use a manual start using
run->net start apache2​
from an admin account

If you install PHP at C:\PHP the the executable is \PHP\php.exe and php5apache2.dll
is what the Apache configuration needs to use.

In the Apache config you need
Code:
##### PHP hook ######
# For PHP 5 do something like this:
LoadModule php5_module "C:/PHP/php5apache2.dll"

#AddType    application/x-httpd-php .php .phtml
AddHandler application/x-httpd-php .php
AddHandler application/x-httpd-php .phtml
# For PHP 5
Action     application/x-httpd-php "C:/PHP/php-cgi.exe"

# configure the path to php.ini
PHPIniDir "C:\PHP"

ScriptAlias /PHP "C:/PHP/usrscripts/"

THEN, your php scripts should use xxx.phtml if you want dynamic page generation as in your examples OR
use xxx.php if you need a cgi script to process forms data
(and it then belongs in \Apache2\cgi-bin\)

If you launch a xxx.php script with a double-click on the file name, you are not
running thru your Apache webserver, but just running a script directly via PHP.

To run a webserver script, you use your browser and reference it with the url
Code:
http://localhost/[COLOR="Blue"]somepath[/COLOR]/script.phtml
\somepath is relative to the Docroot of the webserver,
in apache typically \Apache2\htdocs\somepath\

By definition, xxx.TXT never invokes any program like php or apache regardless of how it is launched.
 
You went way over my head, I am a beginner. I have both green lights on. I don't know where you run - "run->services.msc, look for Apache2 in the list of services". I don't know what phtml is either. Why would I want to change that. Most of what you replied I don't understand, Thanks though.
 
These are all fundamentals to using PHP within Apache.
Webserver administration is your first issue to learn. Once you can control Apache2,
then approach PHP.

On the other hand, you can still learn PHP, but don't use a URL to access your scripts, just get a command prompt.
 
Status
Not open for further replies.
Back