PHP examples picked from web not working

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

Post Reply
User avatar
nehrav
Forum Commoner
Posts: 38
Joined: Sun Sep 20, 2009 6:55 am
Location: New Delhi
Contact:

PHP examples picked from web not working

Post by nehrav »

Hi php develeopers :roll: ,

I am new to the php and this discussion forum. I am in learning process for PHP.
So, I pick tutorials from web.

But the basic point is, these examples also not working on my system........... :banghead:

possibly, This is b'coz my system not suppporting php...... :idea:

Can anybody help me to make my system php supported so that i can play tutorials and learn practically.

Please please help me in my first step..... :cry:
Eric!
DevNet Resident
Posts: 1146
Joined: Sun Jun 14, 2009 3:13 pm

Re: PHP examples picked from web not working

Post by Eric! »

Find out from your host provider if php is installed for your account.

You can also do the classic test.
Create test.php with the following lines:

Code: Select all

<?php
phpinfo();
?>
Then browse your test.php page. It should generate a ton of info about your php instalation if php is running.
User avatar
nehrav
Forum Commoner
Posts: 38
Joined: Sun Sep 20, 2009 6:55 am
Location: New Delhi
Contact:

Re: PHP examples picked from web not working

Post by nehrav »

Eric! wrote:Find out from your host provider if php is installed for your account.

You can also do the classic test.
Create test.php with the following lines:

Code: Select all

<?php
phpinfo();
?>
Then browse your test.php page. It should generate a ton of info about your php instalation if php is running.
First of all thanks Eric, for your reply. But my problem is not for online website. I want the script to be run on my local system first...... :roll:
and its not running yet.......... :cry: ,
which means my system is not configured to support php, just help me how i can make it workable for php??

ya, the info provided by u earlier, was really helpful.
I was not aware of that tooo...........
josh
DevNet Master
Posts: 4872
Joined: Wed Feb 11, 2004 3:23 pm
Location: Palm beach, Florida

Re: PHP examples picked from web not working

Post by josh »

I am assuming you are on windows, install wamp. Place the above code that was provided to you inside of your document root. Read the wamp documentation to acquaint yourself with the concept of a document root. You will be "running" the code via a browser by navigating to http://localhost/phpinfo.php ( after installing the wamp program, making sure it is up & running, and creating a script called phpinfo.php in your document root! )

- If you see your own code in the page the server is running but PHP did not execute, possibly because you used file:// instead of http://
- If you get a time out or 404 you do not have a webserver installed and or running.
- If you see a huge table of debug output, PHP is running.

Please try this and tell me which of the 3 situations you wind up in.
User avatar
nehrav
Forum Commoner
Posts: 38
Joined: Sun Sep 20, 2009 6:55 am
Location: New Delhi
Contact:

Re: PHP examples picked from web not working

Post by nehrav »

josh wrote:I am assuming you are on windows, install wamp. Place the above code that was provided to you inside of your document root. Read the wamp documentation to acquaint yourself with the concept of a document root. You will be "running" the code via a browser by navigating to http://localhost/phpinfo.php ( after installing the wamp program, making sure it is up & running, and creating a script called phpinfo.php in your document root! )

- If you see your own code in the page the server is running but PHP did not execute, possibly because you used file:// instead of http://
- If you get a time out or 404 you do not have a webserver installed and or running.
- If you see a huge table of debug output, PHP is running.

Please try this and tell me which of the 3 situations you wind up in.

Thanks Josh,

I am working now with WAMP, I can run the examples now......
I hope WAMP will help in long runs also.....

really thankful to u frnd..........and this forum too
Post Reply