Friday, August 17, 2012

Connecting Wamp Server and Aptana IDE (PHP programming)

Finally I discussed with my supervisor about making a survey or using online survey. He advise me to implement your survey by PHP and MySQL. He mentioned maybe it is a little more consuming but it worth. I should confess that spending time for such issues witch is not related directly to my PhD, does not make me happy. However university does not have any budget for us. So, I should look at these problems as an opportunity. I always wanted to learn PHP. Now I can spend my time on it and learn it.

Today afternoon I was looking for user friendly and open-source IDE for PHP programming. Among different IDEs. Eventually, I selected Aptana. It was very nice IDE and similar to Eclipse. It has very useful features which can make programming easier and faster. Moreover, you can use this IDE more than PHP for Ruby, JavaScript and etc. You can study all features of this handy IDE hear.

This afternoon only one thing suffered me a lot. I had installed Wamp Server on my computer. Nevertheless, Aptana could not detect my wamp server. I did some search on the internet and I understood I should define a local server for Aptana and say the location of my server (Read this page to understand how to do it). I did but still it did not work and it brought its default web server which was not connected to anywhere. After awhile I read somewhere else that in Run>Run Configuration I should say to my browsers to use that local server which I have created. I did, but guess it did not work again! Whyyyyyyyyy? I was getting crazy. I did all the things right why it does not work?

I was getting disappointed from Aptana and I was deciding to switch to another IDE till I found a comment from another user who had similar problem. It seems that this problem has appeared in Apanda version 3.9 later. What was the solution? Incredible! Instead of creating Simple Web Server (local) we should create External Web Server. Two new setting should be done. It needs to commands for running and stopping wamp server. In following figure I have shown required setting which is essential for connecting wamp server and Aptana. These two commands were: NET START wampapache and NET STOP wampapache. I should appreciate to that user who solve my problem and my afternoon headache.


5 comments:

  1. Thank's to you, very helpful tip.

    ReplyDelete
  2. Thanks! However, I'm still having problems. After pressing "OK," to the above window, where should my project files be? and how do I run them? I don't see any different options to choose from when I click the "Run" on the menu.

    ReplyDelete
    Replies
    1. Your file should locate at www folder of Wampserver, as you can see in "Document Root" section. For instance mine is located at C:\wamp\www. In the Aptana project explorer you can see your files. There is green play button at tool bar with clicking on it, your project should run.

      Delete