Jump to content
xisto Community
contactskn

How Can I Change My System To A Server Or how can I test my php codes without being online.

Recommended Posts

Dear friends I have started developing good programs in php with the help of you friends out there. Thanks for your kind help. Now I would like to know that how can I test my php codes with out going online. That is on my system itself which can be much more easier for me. So please do help me to resolve this problem faced by me. Thanks in advance dear friends.

Share this post


Link to post
Share on other sites

Assuming you are using Windows.....Download WAMP server and install it on your system. Start the wamp server and type LOCALHOST in your web browser. If it gives the default page your installation is success... Put your PHP documents in WWW folder of WAMP installation directory(usually C:\WAMP\WWW).

For example create a php file test.php and put it in WWW folder. Then open your browser and type LOCALHOST/test.php to test your file..

 

A little search in our tutorial section will give you more details... If you have any further doubts post here...

Share this post


Link to post
Share on other sites

I think XAMPP is the best one out there. That's what I think. Not only in terms of the number of packages pre-installed, but also is better in usability front. Anyway, as you are new to the AMP (Apache, MySQL, PHP) world you can start of with any of th packages told till now in this thread.But still if you went on with my suggestion, then here's what to do next. Open "C:\xampp\htdocs\" (this should be the path if you didn't change anything during installation). Although you can start putting all your php files in htdocs folder, I would recommend you create another folder inside htdocs like "web" and there you can put all your files. Since xampp has a nice startup interface which is put in htdocs which you probably don't want to remove or move. You can access that by going to "htttp://localhost/". And to access all your created files go to "LOCALHOST/web". If the "web" folder doesnt contain index file then the browser will list all the file present in the folder, which is very useful, so dont add index file in web folder.And for the editor which you could use, of course you shouldn't use notepad once you enter the programming world. Atleast you should have notepad++ or context like programs. But for specific language like php you can use a software (once free, not anymore) called PHP Designer. And no, I am not telling to go and buy the latest version, but search and download an old version called as "PHP Designer 2005". There may be two such release at that time, both free, so do check them both before you settle with your choice. I think it is the most useful IDE for beginners. To test php codes you will first need to ink your PHP installation on PC. The you can just start typing your codes and hit F5 and voila the output appears right there in the right pane. Very time saving feature for new programmers.

Share this post


Link to post
Share on other sites

Hi!@contactsknYou might want to try using an IDE with an integrated application server for running PHP code - NuSphere PhpEd fits the bill and is also commercially supported. It also provides a debugger so you can execute your code line-by-line. You might want to try EclipsePHP - it's open-source and free (it includes a debugger, but I'm not sure if it includes an application server).If you simply want to setup a test environment, I'd recommend XAMPP just as the previous posted does because it's updated frequently with the latest versions of Apache, PHP and MySQL.Regards,Nitin Reddy

Share this post


Link to post
Share on other sites

Netbeans is another good IDE for PHP development. ?It also has a debugger, but enabling debugging running with either XAMPP or WAMP can be a little difficult. ?Both XAMPP and WAMP require very little work to get them running, but I prefer WAMP because many configuration options are accessible from the systray icon, and it has an aliases system which means you can move your server root to another location without having to move phpmyadmin or other applications to the new location as well. ?(WAMP is also kinda fun to say? :( )

Share this post


Link to post
Share on other sites

@IdolonHi!I've not tried WAMP (unless you are referring to TSW - The Saint WAMP, which I used a long time ago) so I can't tell you much about it. Pretty much any package involving Apache supports aliases - I use XAMPP and my phpMyAdmin works just fine even when I change the document root - it's because the alias is like creating a virtual directory under the root of your website so no matter where you move your document root to, it still works. I think the only time you'd have a problem with an alias is when there's a folder of the same name in the document root folder.I prefer to do most of my configuration via the config file, but if there were a better GUI for XAMPP, I'd definitely use it.Regards,Nitin ReddyPS: I'm guessing XAMPP is more frequently updated than WAMP as it's more in the buzz.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.