RSS Forums RSS
Please support our PHP advertiser: Lunarpages PHP Web Hosting
Views: 2460 | Replies: 2
Reply
Join Date: Jun 2005
Posts: 13
Reputation: thandermax is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 0
thandermax thandermax is offline Offline
Newbie Poster

Help How to test PHP code in offline in Linux + Apache 2

  #1  
Jun 18th, 2005
Dear all members,

I have a problem . As i use dial up network as a mean to get to the internet it is some times costly to upload my code to internet and then test . As i am learning PHP recently , if any body suggest any way to run my PHP code in ofline mode then it will be helpfull.

I have tested running from "localhost.localdomain" or "192.0.0.1" but got error that "localhost" can not be connected.

I have the following specifications: :!:
1. Fedora core 3
2. Apache 2.0.54
3. PHP 5.0.4
4. MySQL
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Jun 2005
Location: Kansas City, Missouri, USA
Posts: 345
Reputation: Troy is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 4
Troy's Avatar
Troy Troy is offline Offline
Posting Whiz

Re: How to test PHP code in offline in Linux + Apache 2

  #2  
Jun 18th, 2005
Originally Posted by thandermax
Dear all members,
I have the following specifications:
1. Fedora core 3
2. Apache 2.0.54
3. PHP 5.0.4
4. MySQL
Are these specs your local machine or the remote server?

On the local machine, is the httpd (Apache) service started? Is the mysqld service started? Have you created a database? Have you configured /etc/php.ini yet?
Troy Wolf is the author of SnippetEdit. "Website editing as easy as it gets." IX Web Hosting
Reply With Quote  
Join Date: Jun 2005
Location: Planet Earth
Posts: 26
Reputation: darklordsatan is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 1
darklordsatan's Avatar
darklordsatan darklordsatan is offline Offline
Light Poster

Re: How to test PHP code in offline in Linux + Apache 2

  #3  
Jun 19th, 2005
Theres no such thing as running php in "offline mode". All you do is changing some variables to the apache's conf file to be run in localhost...

Basically, install apache on your machine, and then configure this directive

ServerName 127.0.0.1

(And obviously, configure it to have support for php, google for it)
Also, If you need to access a DB, you need to install it in your machine, that way, you have a full local development environment, and wont need to connect to internet anymore...

You say you get an error that localhost cannot be connected, it means
"Sorry, but theres no application running at port 80", aka, theres no webserver installed (or started in case you already installed it)
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 12:05 pm.
Newsletter Archive - Sitemap - Privacy Statement - Acceptable Use Policy - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC