Learning/Testing PHP without a server?

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

Post Reply
Acidic
Forum Newbie
Posts: 1
Joined: Fri Aug 14, 2009 2:55 pm

Learning/Testing PHP without a server?

Post by Acidic »

I'm new to PHP and to this site, and although I'm versed in HTML and I find it hard to find a starting place to learn PHP.
(sorry if this isn't the right forum for this)

I downloaded PHP 5.3 x86 Non-Thread Safe (whatever that means) Installer from its "official" site and started reading the manual, but it keeps saying (like other places) that I must have a server to try out the code.

So my question is - is this true, or can I basically simulate my computer (Vista 64 / XP 32) as a server which I can test my PHP stuff personally?

Thanks in advance :)
I really want to learn and I've been searching whole day for a place to start learning PHP from and I just can't find a decent start-from-scratch guide.
User avatar
jackpf
DevNet Resident
Posts: 2119
Joined: Sun Feb 15, 2009 7:22 pm
Location: Ipswich, UK

Re: Learning/Testing PHP without a server?

Post by jackpf »

No, you need a server. PHP is a server side language....it'd be pretty hard to run without a server :P

I'd suggest Apache: open source, free server software. Ahhh...I love apache :roll:
User avatar
McInfo
DevNet Resident
Posts: 1532
Joined: Wed Apr 01, 2009 1:31 pm

Re: Learning/Testing PHP without a server?

Post by McInfo »

You don't need a separate, dedicated machine to run a server. You can run it from your personal computer.

If you want to make PHP scripts that display their output in a Web browser, you need a Web server like Apache or IIS. For development, I suggest downloading a pre-configured package like XAMPP that includes Apache, PHP, and MySQL.

If you want to make command-line PHP scripts, you don't need a Web server. See Command Line PHP on Microsoft Windows and Using PHP from the command line.

You can even make compiled executables (*.exe) with PHP. You just need a compiler like Bamcompile or Roadsend.

Edit: This post was recovered from search engine cache.
Post Reply