testing php

Reply

Join Date: Nov 2004
Posts: 259
Reputation: sam1 is an unknown quantity at this point 
Solved Threads: 1
sam1's Avatar
sam1 sam1 is offline Offline
Posting Whiz in Training

testing php

 
0
  #1
Mar 12th, 2006
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
Reply With Quote Quick reply to this message  
Join Date: Oct 2004
Posts: 348
Reputation: paradox814 is an unknown quantity at this point 
Solved Threads: 4
paradox814's Avatar
paradox814 paradox814 is offline Offline
Posting Whiz

Re: testing php

 
0
  #2
Mar 12th, 2006
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
Reply With Quote Quick reply to this message  
Join Date: Jun 2005
Posts: 354
Reputation: Troy is an unknown quantity at this point 
Solved Threads: 5
Troy's Avatar
Troy Troy is offline Offline
Posting Whiz

Re: testing php

 
0
  #3
Mar 13th, 2006
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.
Troy Wolf is the author of SnippetEdit. "Website editing as easy as it gets." IX Web Hosting
Reply With Quote Quick reply to this message  
Join Date: Nov 2004
Posts: 259
Reputation: sam1 is an unknown quantity at this point 
Solved Threads: 1
sam1's Avatar
sam1 sam1 is offline Offline
Posting Whiz in Training

Re: testing php

 
0
  #4
Mar 17th, 2006
thank you guys!!!
Reply With Quote Quick reply to this message  
Join Date: Mar 2006
Posts: 14
Reputation: bbb777b7 is an unknown quantity at this point 
Solved Threads: 0
bbb777b7 bbb777b7 is offline Offline
Newbie Poster

Re: testing php

 
0
  #5
Mar 19th, 2006
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?
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



Tag cloud for PHP
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC