Question:
How do I test my php codes in my computer?
aP
2010-01-21 20:18:49 UTC
I tried to instalI a local server in my laptop to test my codes but it didn't work. I have easyphp5.3.0 installed but it's not working. Can anyone help me with this?
Five answers:
RM
2010-01-21 20:40:14 UTC
EasyPHP from http://easyphp.org/index.php appears to be an all-in-one solution comprised of an Apache web server, a PHP interpreter and a MySQL database. From the version you provided, I assume this is the package you are using.



First of all, after installing, try visiting http://localhost - this will give you an indication of whether the web server is installed correctly. Generally packages such as these have a default home page set for localhost (http://localhost or http://127.0.0.1) to test your installation. Check both addresses as piping issues have been known to affect the localhost address.



Secondly, make sure your web server is running either as a program or a service. You can check your event logs to determine where the problem is occurring. If you can't figure this out, you're probably better off going to the official PHP web site and downloading their combined package as it has been tested more thoroughly.



Thirdly, make sure your interpreter is working - create a page in your default directory with the extension PHP and some basic code and try to open it through localhost from your browser - loading the file path will not work - you want to interpret the source code, not open it for viewing. Make sure that php.ini is configured correctly and you should get error information from the logs.



Fourth, SQL also runs as a program or service on your PC and can be checked through an icon in your taskbar next to the clock. You can also try logging on as 'root' to the MySQL Administrator (if installed) or to the MySQL Console.



FInally, check to ensure that the port used by the web server (usually 80 or 8080) and MySQL (usually 3306 or 3307) are available for communication.
shrimpwagon
2010-01-23 18:43:11 UTC
THE BEST way to do it is to get yourself an older computer and turn it into a web server and adding it to your LAN, aka your router. I use an OLD eMachine from 2000! Haha. It is a great LAMP (Linux, Apache, MySQL, PHP) testing server. It only has like 512 MB but it runs Linux ok as a web server and as long as I don't go to a desktop.



I realize this may not be the answer you are looking for, but if you are at all really serious about being a web developer you need to get yourself a standalone testing server. It also helps when your PHP and MySQL versions match the live server that you upload to. That way you know your code will work when uploaded. Give it some real thought.
?
2016-09-29 08:54:33 UTC
you could have webserver put in, in case you're utilising abode windows xp then you definately gets IIS there basically make digital itemizing in it and you will run internet site and in case you're utilising linux then you definately could have tomcat and undemanding option to apply wamp or lamp server
anonymous
2010-01-21 20:35:20 UTC
Install xampp - http://www.apachefriends.org/en/xampp.html It works. Use Firefox with Firebug and FirePHP.
anonymous
2010-01-22 22:34:24 UTC
install wamp , and run


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