944,004 Members | Top Members by Rank

Ad:
  • PHP Discussion Thread
  • Unsolved
  • Views: 1616
  • PHP RSS
Mar 12th, 2006
0

testing php

Expand Post »
hi everyone,

say i have a php code that works fine. How would i test it? can i use tomcat server to run the code or there is another way?

ps im new to php :p

thank you
Similar Threads
Reputation Points: 10
Solved Threads: 1
Posting Whiz
sam1 is offline Offline
300 posts
since Nov 2004
Mar 12th, 2006
0

Re: testing php

tomcat is typically used with Java Servlets not PHP, besides opening the file in a browser how else are you supposed to test it?

I don't know, you'll have to explain your situation a little more

here is a verry simple php file:
[php]<? phpinfo(); ?>[/php]
when you run that and you get a lot of PHP info then you will know PHP is working on your server
Reputation Points: 13
Solved Threads: 4
Posting Whiz
paradox814 is offline Offline
351 posts
since Oct 2004
Mar 13th, 2006
0

Re: testing php

Paradox, his question is clear enough I think. His point is that you can't simply double-click a PHP file on your local disk and expect it to pop open and run in the browser---like you would an HTML page.

Sam, you are on the right track--you can only test PHP against a webserver configured to process PHP. The defacto standard web server for use with PHP is Apache. However, IIS works fine, too. I don't know about Tomcat.

My recommendation is to install Apache and PHP on your local workstation and use that. The process is not too difficult, but not exactly intuitive to the first-timer either! I have a slightly dated WAMP HOWTO that should get you where you need to be.
http://www.troywolf.com/articles/wamp_howto.htm

If you want to use a Linux server to test against instead of Windows, then look for a LAMP guide. Actually, most Linux flavors come with Apache ready to process PHP, so it could be as simple as starting your Apache process and plopping your PHP files into the webroot dir.
Reputation Points: 36
Solved Threads: 6
Posting Whiz
Troy is offline Offline
354 posts
since Jun 2005
Mar 17th, 2006
0

Re: testing php

thank you guys!!!
Reputation Points: 10
Solved Threads: 1
Posting Whiz
sam1 is offline Offline
300 posts
since Nov 2004
Mar 19th, 2006
0

Re: testing php

hey, i'm new to php too. i'm even worse off. the question i have is:

is there a way to install the IIS on your pc without the microsoft service cd if you use windows?
Reputation Points: 10
Solved Threads: 0
Newbie Poster
bbb777b7 is offline Offline
14 posts
since Mar 2006

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in PHP Forum Timeline: PHP Help - Display forum online and total members on main page
Next Thread in PHP Forum Timeline: help!





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC