Nov 23, 2009

PHP Problems

free web hosting
Open Discussion & Free Web Hosting > Computers & Tech > Programming > Programming General > Misc. Programming Languages

PHP Problems

lonebyrd
O.K. I feel totally computer illiterate right now. I just downloaded PHP 5 with the installer, and I can't get the test page in the tutorial to come out. I was using WAMP but I couldn't figure that out. Let me explain my problem.

When using WAMP, it said to make a directory in the www folder which I did. After doing that, I did a test page from a tutorial in notepad and saved it in that directory then tried to open it using WAMP. That didn't work. Then I tried opening using http://mycomputername/filename/directory and that didnt work.

Now when using the PHP installer, it asks if I want to install with PWS windows 9x or some things called IIS 3,4, or 6. I don't know if I picked the right one. But once again, I did that test page, but when I went to open it, I browsed for something in PHP to open it with and there was nothing.

Shouldn't PHP just come up on the screen normally? Or do I have to open everything in a PHP folder? I'm confused and frustrated and can't get anything to work.

 

 

 


Comment/Reply (w/o sign-up)

jlhaslip
First of all, start-up the server and your Browser. Simple so far.
In the Browser Address bar, type in :
CODE

http://localhost/folder/[subfolder/]file_name.php

where the folder/[subfolder/]file_name.php is below the 'server-root' for the local installation.
I have an XAMPP set-up on my machine and the windows file path is something like :
c:/apache/xampp/htdocs/folder/filename, where c:/apache/xampp/htdocs is the server-root, so in my browser I type
CODE

http://localhost/folder/[subfolder/]filename

The stuff inside the square brackets is optional if the file path does not require it.

Comment/Reply (w/o sign-up)

Houdini
First off PHP is a server side language like Perl and must be run on a server. All web servers have a ROOT directory (in the case of WAMP I believe it is C:\wamp\www but could possibly be anywhere on your hard drive but the www directory (folder) will reside within the wamp directory folder wherever it might happen to be.

When you write a PHP file it must be placed on the webserver somewhere in the ROOT (www) and you may add subdirectories to this folder for your own organizational purposes. So lets take a simple Hello World script and do just that and then test it.

Create the below file as is and then save it on your hard drive to the www folder or directory (whatever you call it). Then open your favorite browser and type into the address bar http://localhost/hello.php.
CODE
<?php
echo "<center><h1>Hello World from PHP!</h1></center><br />";
echo "My PHP install is working correctly, now for bigger and better things!";
?>
This should ouput to the screen a centered large headline saying Hello World from PHP! and a line with left justification saying My PHP install is working correctly, now for bigger and better things! PHP can generate HTML and that is what the above code does. If after doing the above and the file is in the proper location of the webserver (Apache with WAMP) it should work, otherwise you have a corrupt install and need to uninstall and reinstall the program. Normally with WAMP or XAMPP or Triad and such if you just accept the default values you should have no problems provided that you place the PHP and HTML files in the proper directory.

 

 

 


Comment/Reply (w/o sign-up)

Jared
QUOTE(lonebyrd @ Mar 16 2006, 10:49 PM) *
Now when using the PHP installer, it asks if I want to install with PWS windows 9x or some things called IIS 3,4, or 6. I don't know if I picked the right one.


What did you pick? I'm not familiar with the PHP installer, but surely you didn't pick PWS or IIS? If you have WAMP, that means you're using Apache.

W - Windows
A - Apache
M - MySQL
P - PHP

If there was no Apache option, then you can't use the installer (or you just have to update your .conf files manually)... at least that's how it used to be. Last time I used the installer was back in the PHP3/early-PHP4 days...

- Jared

Comment/Reply (w/o sign-up)

Feelay
The thing houdini said should work. But if you did NOT create a index.php or index.html page, you can do this ( if you did, try to change the name to something else like test.php [only for testing, it is really recomended that you have an index page in the root folder, but now, just test]).

Try to type this in you web-browser when your server is on.
QUOTE


Now, you should see all the files and folders in the root folder (WWW). Now just search for the folder/file you created and press on it. that should work just fine.

Comment/Reply (w/o sign-up)

ygadiya2000
If yor are using Windows OS then you can use WAMP,XAMPP
which comes in package of PHP,Mysql and Apache server.
There may be one problem while installing this package
i.e there may IIS installed on your system using port 80 which will give problem.
As apache by default will be installed on port 80.
So easy way is to uninstall IIS or else change the port.
PHP can also be used with IIS as a server.
You need to install PHP and Mysql seprately and use IIS.

Hope this information helps.

Yogesh Gadiya
yogeshgadiya@gmail.com

Comment/Reply (w/o sign-up)


Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

This textarea will convert to Rich-Text automatically (IE, Firefox, Chrome)

Similar Topics

Keywords : Php Problems


    Looking for php, problems

See Also,

*SIMILAR VIDEOS*
Searching Video's for php, problems
advertisement



PHP Problems

Affordable Web Hosting, Low cost Web Hosting - ComputingHost.com