php without webserver?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Patriot
Forum Commoner
Posts: 34
Joined: Tue Jun 18, 2002 1:36 pm

php without webserver?

Post by Patriot »

ok, now this may sound stupid.
is there a way to practice your php without having to upload them with a ftp, and keep refreshing your pages? i think i've heard some people talking about it, but i can't be possitive what it is or where to get it.
will
Forum Contributor
Posts: 120
Joined: Fri Jun 21, 2002 9:38 am
Location: Memphis, TN

Post by will »

not stupid at all... this is a problem many developers run into, and there are a number of IDEs (Integrated Development Environments) that include a PHP 'compiler'. I believe PHPEdit does.... might try a google search for "PHP IDE"
User avatar
BDKR
DevNet Resident
Posts: 1207
Joined: Sat Jun 08, 2002 1:24 pm
Location: Florida
Contact:

Err.....

Post by BDKR »

You could also run a webserver on your own machine. No uploading business involved. :idea:
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

You really need to run a webserver on your local machine. Apache can be used on both *nix and Windows. If you have Windows 9x there's PWS and Windows NT/2000/XP can run IIS. If you want to run one of the Windows web servers you can install them from your Windows installation CD. Apache can be found here. Then once you've got a web server you install PHP and can test without all that FTP malarky.

Mac
Zmodem
Forum Commoner
Posts: 84
Joined: Thu Apr 18, 2002 3:59 pm

Post by Zmodem »

Or, you could use Triplehash Serlient. Its a browser/web server/php interpreter combined.

http://www.triplehash.com
Patriot
Forum Commoner
Posts: 34
Joined: Tue Jun 18, 2002 1:36 pm

Post by Patriot »

when you mean run my own webserver, do you mean host my own domain? i'm not 100% clear on what Apache provides.
i did download phpdev4 from firepages.com.au, and it has Apache in it.
but when i open it, it looks like DOS and says Apache is running.
Now, i know this is supposed to happen (i'm not that dense on apache) i've researched some.

what really does hosting your own web server do? :?
honkyinc
Forum Newbie
Posts: 19
Joined: Tue Jun 04, 2002 10:30 am
Location: Maryland, USA

Post by honkyinc »

When you have Apache running (in the DOS like window) start up your favorite browser (NS/IE/Opera/Mozilla/ETC), and type in the following (default) address:

http://127.0.0.1/ which should correlate to your htdocs folder on your system. You are now running the webserver from that folder (which should be in your apache directory).

For example:

http://127.0.0.1/mypage/mydoc.html would be run from the windows path (depending on installation) C:/apache/htdocs/mypage/mydoc.html.

Hope this helps!
will
Forum Contributor
Posts: 120
Joined: Fri Jun 21, 2002 9:38 am
Location: Memphis, TN

Post by will »

once you have apache up and running, open your favorite browser and go to http://127.0.0.1 (this is known as the localhost). if your box is also connected to the internet, you can also access your site from whatever that ip address is (something like 65.188.19.38 ).

all that happens when you buy a domain is that the name (whatever.com) is tied to a specified IP address and posted somewhere (a public DNS server) for all the world to see. that way, when someone types in the name, it is translated to the IP and shoots the request to that server.
Patriot
Forum Commoner
Posts: 34
Joined: Tue Jun 18, 2002 1:36 pm

Post by Patriot »

can others access it by going to your IP address? (the 63.69.blah.blah one, not 127.0.0.1)?
will
Forum Contributor
Posts: 120
Joined: Fri Jun 21, 2002 9:38 am
Location: Memphis, TN

Post by will »

yes, unless you edit your apache config file to only listen to certain IPs.
Patriot
Forum Commoner
Posts: 34
Joined: Tue Jun 18, 2002 1:36 pm

Post by Patriot »

Warning: Can't connect to MySQL server on 'localhost' (10061) in c:\phpdev\www\phpmyadmin\lib.inc.php on line 308

Warning: MySQL Connection Failed: Can't connect to MySQL server on 'localhost' (10061) in c:\phpdev\www\phpmyadmin\lib.inc.php on line 308
Error
MySQL said: Can't connect to MySQL server on 'localhost' (10061)


this is what it says every time i try and connect to mysql using apache (this is on PHPDev)
i've looked in their forums and nobody seems to know the solution :(
User avatar
FireyIce01
Forum Newbie
Posts: 6
Joined: Fri Jun 21, 2002 2:16 pm
Contact:

Post by FireyIce01 »

do you have MySQL completely installed, and if so, did you start it? (c:\mysql\bin\mysqld-nt --install to make it a service in NT/2K/XP)
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

10061: Connection refused by remote network
This error occurs when the remote system actively rejects your attempt to connect with it, either because no server is listening on the specified port, it's unable to accept any additional connections or a firewall blocks it
ibelimb
Forum Newbie
Posts: 18
Joined: Wed Jun 19, 2002 2:59 pm
Location: New York, USA

Post by ibelimb »

use one of the PHP kits that is in the links section of PHP.net, i use one on my laptop and i can work offline with PHP, soem come with Apache, MySQL, PHP. All you need to do is liek start a batch file and work!
User avatar
sam
Forum Contributor
Posts: 217
Joined: Thu Apr 18, 2002 11:11 pm
Location: Northern California
Contact:

Post by sam »

You might want to give foxserv a try, I know some people that sware by it...

http://foxserv.sourceforge.com

Cheers Sam
Post Reply