Question:
Starting on PHP?
anonymous
2008-01-11 19:15:15 UTC
Please help, I want to get into php coding, I downloaded the PHP 5.0 and Apache server, but when I try to make a php doc, it won't let me reopen it, because windows doesn't know what file created the doc.

I removed PHP and Apache, coming here for help. How can I set my computer up for PHP coding(Please provide links, with instrutions on where to put the files, etc..)
Five answers:
vox_atrophia
2008-01-11 19:19:30 UTC
You could try something like Xampp. It's a complete server package with PHP, Apache, MySQL, and some other stuff. It comes pre-configured so it should be simple to use for a novice.



http://www.apachefriends.org/en/xampp.html
Zurahn
2008-01-11 19:23:28 UTC
Firstly, it sounds as though Windows doesn't have an application set for opening a file with the extension .php. If that's the case, right-click and choose Properties, then hit the "Opens With" button. Choose Wordpad for now (unless you have a specific editor in mind). Apache and PHP are just to run the code, not to edit it. The code is simply text that you can create in any old text-editor.



Now, for installation:



Install Apache HTTP Server first. Go through the simple set-by-step, there's nothing fancy to do.



http://httpd.apache.org/download.cgi



Then go to the installation for PHP.



http://ca.php.net/get/php-5.2.5-win32-installer.msi/from/a/mirror



When it asks you for the Apache configuration directory, go to the directory in which Apache installed, and choose the "conf" folder ("C:\Program Files\Apache Software Foundation\Apache 2.2\conf" by default for Apache 2.2).



Make sure that Apache is started by either the icon in your tray (green arrow) or going to Start->Settings->Control Panel->Administrative Tasks->Services and finding the Apache service and making sure it's "Started".



Once you've done that, go to the Apache directory and find the htdocs directory. This is where you place your files. Any PHP files must end in the extension .php.



if you create test.php in the htdocs directory, paste this code


echo "Hello World!";

?>



Now open your browser and enter

localhost/test.php



If that does no work (the localhost alias isn't set for whatever reason), enter this to give the exact address

127.0.0.1/test.php



There you go.



Oh, and if you want to change the directory to something other than htdocs, go to the Apache conf directory and open httpd.conf and do a search for htdocs. You should get this



DocumentRoot "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs"



You can change that directory to whatever you like. There's another line with this, so you'll have to do it twice.
Dave
2008-01-11 19:21:22 UTC
You have two options here:

1) Use a free web service provider that supports PHP (like http://www.freezoka.com ) and upload your PHP documents there and run them from that website (which is what I do) OR

2) Use PHPDev from http://www.firepages.com.au/ to install a prebuilt package of Apache and PHP and Perl all in one easy-to-use software. PHP and Apache aren't generally easy-to-install for a novice user, but PHPDev saves you that headache.
Moyo
2008-01-15 05:07:49 UTC
take it from me. i've been coding with php for the past 3 years and right now i' m using this combo...you cant beat it

>> EasyPHP - (www.easyphp.org) to run the scripts. comes with mysql as well

>> Zend Studio - for editing my PHP scripts. has loads of cool features

>> Opera web browser (i hate IE and FFox)



good luck coding
jais
2008-01-12 00:38:20 UTC
hey mezonn ,

welcome to the world of PHP, dont worry about that.

All you have to do is just download "Wamp.exe" from the link mentioned below and run the set up . it will install php,mysql,phpmyadmin (user interface for mysql) as

WAMP stands for Windows Apache Mysql PHP.if you need further help you can mail me , don't hesitate to ask me



http://www.wampserver.com/en/download.php



cheers,

Ahamed udhuman

Php developer.


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...