LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 05-15-2006, 05:09 PM   #1
43r05p4c3
Member
 
Registered: Mar 2005
Location: Ontario, Canada
Distribution: Mandrake 10.0/XP Dual Boot Desktop & Gentoo 2005.1 Laptop
Posts: 79

Rep: Reputation: 15
Testing PHP Website without Server/Internet


Hi all,

I'm trying to test a php website, but the computer I'm using doesn't have a network to test over.
The other key part of this website is that it will be accessing and writing to a MySQL Database.
So what I'm looking for is some way to set up my computer so I can test the site right there, preferably through Firefox.

I'm using Mandrake 10.0 Community, and any packages I use will probably come from the CDs unless that's impossible. (If need be I also have Knoppix, and will be getting Gentoo once my CD-Rs come in)

Let me know how to do this if it's possible, or if you need more information.

Thanks in advance,
Steve
 
Old 05-15-2006, 05:15 PM   #2
paulsm4
LQ Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
You absolutely do *not* need to be on the Internet - or even connected to a network - to use a web server or develop and test PHP.

Provided:
1. PHP, Apache and mySQL are installed and configured
2. The Apache and mysql daemons are running
... then all you have to do is point your browser at:
3. http://localhost

That is, instead of some URL like "www.google.com" (IP address 66.102.7.99), you instead point to "localhost" - your computer's loopback address (IP address 127.0.0.1).

It's really as simple as that!
 
Old 05-15-2006, 10:29 PM   #3
43r05p4c3
Member
 
Registered: Mar 2005
Location: Ontario, Canada
Distribution: Mandrake 10.0/XP Dual Boot Desktop & Gentoo 2005.1 Laptop
Posts: 79

Original Poster
Rep: Reputation: 15
Ah, sweet

Thanks a lot,

Steve
 
Old 05-16-2006, 05:41 AM   #4
cppansi
LQ Newbie
 
Registered: May 2006
Distribution: debian,slackware,Knoppix
Posts: 8

Rep: Reputation: 0
hi
php files have to saved to htdoc directory,as i know,where is it?
how may i b sure mysql is running?
is thr any GUI to manage mysql as can b find out for M$sql?
i installed my debian as workstation/web server/sql sever but there was no PHP module installed,i installed apache2/php4/mysql manually and the local host in address bar loaded .....localhost...apache2-default page but i can not save any php to apache2 dirctory too cause an error cann not be seve ..b sure thr is enough emty...yes the disk-hdd- is not full i can not understand wot doz it mean!
thnx
 
Old 05-16-2006, 08:01 AM   #5
graemef
Senior Member
 
Registered: Nov 2005
Location: Hanoi
Distribution: Fedora 13, Ubuntu 10.04
Posts: 2,379

Rep: Reputation: 148Reputation: 148
from the console you can enter the following command
Code:
ps aux
This will list all the processes that are running. If you see mysql in that list then you wil know that it is running. However it is quite a long list and it is possible to miss it. So an improvement is to send to output of this command into the grep command and tell grep to look for mysql as follows:
Code:
ps aux | grep "mysql"
If you wanted to look for another service, such as answer the question "is apache running?" you just need to change mysql with apache.
 
Old 05-16-2006, 12:15 PM   #6
Ryuji Yamazaki
Member
 
Registered: Oct 2004
Location: Singapore
Distribution: Slackware, FreeBsd
Posts: 43

Rep: Reputation: 15
http://www.hostlibrary.com/installin...l_php_on_linux has everything you need to help you set up php, mysql and apache and in simple steps too.. good luck
 
Old 05-17-2006, 02:53 AM   #7
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Slackware 10.1/10.2/12, Ubuntu 12.04, Crunchbang Statler
Posts: 3,786

Rep: Reputation: 282Reputation: 282Reputation: 282
Quote:
Originally Posted by cppansi
hi
php files have to saved to htdoc directory,as i know,where is it?
how may i b sure mysql is running?
is thr any GUI to manage mysql as can b find out for M$sql?
i installed my debian as workstation/web server/sql sever but there was no PHP module installed,i installed apache2/php4/mysql manually and the local host in address bar loaded .....localhost...apache2-default page but i can not save any php to apache2 dirctory too cause an error cann not be seve ..b sure thr is enough emty...yes the disk-hdd- is not full i can not understand wot doz it mean!
thnx
I suppose this is a question. If so:
I think it's confusing when you start asking questions in a thread that you did not start. Next time, please start a new thread.

With regards to the questions
1)
use find / -name htdocs -print to locate the htdocs directory
or use find / -name httpd.conf -print to find the apache configuration file and check it's contents
2)
see graemef's reply
3)
phpmyadmin is a webbased gui for MySQL; others can be found with google
results for 'mysql gui'
4)
don't know


One further comment:
Please try to write normal english; it's difficult to read when you use all kinds of 'abbreviations' (at least for me)
 
Old 05-17-2006, 03:41 AM   #8
cppansi
LQ Newbie
 
Registered: May 2006
Distribution: debian,slackware,Knoppix
Posts: 8

Rep: Reputation: 0
hi
Thank you for attention and im sorry if i asked questions -as i thought related to the topic and may be useful for other members,- and if i asked about myqsl GUI under Debian i am sure most of programmers use some special gui then i think i may use your experiences, allover the answers and advises are useful and Yes and Ok sir i try start a new topic each time, thank you again , and i wish find out more reply about "PHP Website without Server/Internet" in this thread or other threads,
Regrades
CppAnsi
 
Old 05-17-2006, 04:39 AM   #9
muha
Member
 
Registered: Nov 2005
Distribution: xubuntu, grml
Posts: 451

Rep: Reputation: 37
Quote:
Originally Posted by Ryuji Yamazaki
http://www.hostlibrary.com/installin...l_php_on_linux has everything you need to help you set up php, mysql and apache and in simple steps too.. good luck
Please note that this tutorial is installing from source, which is ok but
i found it easier to install php and mysql by using package-managers, like YasT for Suse.
Also note that some distributions pre-install these packages like apache for you, so always start by checking what's already installed (and probably running as well).
This link does provide usefull info on configuring apache/php/mysql.

Last edited by muha; 05-17-2006 at 04:41 AM.
 
Old 05-17-2006, 07:15 AM   #10
Ryuji Yamazaki
Member
 
Registered: Oct 2004
Location: Singapore
Distribution: Slackware, FreeBsd
Posts: 43

Rep: Reputation: 15
Thanx for reminding me muha, most disto comes with php, mysql and apache packages but usually its not the latest version
(my slack came with apache1 and php 4)and if you are planning to install a new version it would be best if you removed the old ones else youll run into a lot of complications. I couldnt find a package for slack so i had to compile for source.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't sending email to testing website .... vbsoftware Linux - Networking 2 04-02-2006 03:50 AM
help with testing a website on a linux box from a standerd pc in a browser tittosimu Linux - General 1 10-24-2005 02:37 AM
Cannot get PHP to install in debian testing MissMetal Linux - Newbie 2 10-22-2004 10:54 AM
Website testing with Apache BinaryLinux Linux - Software 5 08-19-2004 06:45 PM
Website CMS without running Web Server, mySQL, PHP etc. derddera Linux - Software 1 08-15-2004 02:45 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 05:48 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration