Showing posts with label Xampp. Show all posts
Showing posts with label Xampp. Show all posts

Thursday 13 October 2011

Configure Xampp and Eclipse PDT in LINUX

On configuring Xampp on eclipse PDT , we can make our PHP development easier.
Here are the steps to be followed to configure Xampp on eclipse PDT.
step1. Download  Xampp
           Download xampp from Apache Friends Web site

           For Installation instruction click the below link

step2. Start the XAMPP Server by typing the command. 

     cluster3-desktop lampp # /opt/lampp/lampp start

           Open the browser and type in the url(http://localhost). You can see the
           XAMPP server page up.

step3. Download Eclipse PDT
           Download eclipse PDT from eclipse website
           http://www.eclipse.org/pdt/downloads 

step4. Extract the downloaded file

     tar -xzvf eclipse-php-helios-linux-gtk-x86_64.tar.gz

           The ‘eclipse’ folder will be created in your current working directory
step5. Create a WorkSpace directory for the eclipse in the root directory
          of  Xampp
            When it asks you to select a Workspace browse to /opt/lampp/htdocs
            where   you installed XAMPP. The reason is that when you come to run
            your PHP program Eclipse will generate a URL and expect the web
            server to find the file and serve it to the browser.
      
      cluster3-desktop htdocs # mkdir /opt/lampp/htdocs/Demo

            This will create a "Demo" folder in htdocs folder of xampp server.
step6. Give full permission to the directory

           cluster3-desktop htdocs # sudo chmod -R 777 /opt/lampp
      /htdocs/Demo

step7. Start Eclipse and select a Workspace as /opt/lampp/htdocs/Demo

step8. Now  Eclipse will open.
           Create a ‘New PHP Project’ and Create a New File in that with any name
          (For Example ‘demo.php’)
step9. Select your project directory in eclipse and then click on
            'Window-->Preferences'
step10. Navigate to the ‘PHP’ Tab and expand it on the left hand side of the ‘Preference’ window. 
step11. Click on ‘PHP Executable s’. Click on ‘Search’ and locate where the /opt/lampp is
installed and then click ‘OK’. 
step12. Run demo.php 
           Right click demo.php and select Run As -> PHP Web Page





XAMPP – “Another daemon is already running” issue

When you try to start the xampp1.7.4 server from the terminal it is showing

cluster3-desktop lampp # /opt/lampp/lampp start
Starting XAMPP for Linux 1.7.4...
XAMPP: Another web server daemon is already running.
XAMPP: Starting MySQL...
XAMPP: XAMPP-ProFTPD is already running.
XAMPP for Linux started.

To  solve this problem you only have to type: 
sudo /etc/init.d/apache2 stop

The web server will be stopped now.

cluster3-desktop lampp # sudo /etc/init.d/apache2 stop
 * Stopping web server apache2                                                  apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
 ... waiting
cluster3-desktop lampp # /opt/lampp/lampp start
Starting XAMPP for Linux 1.7.4...
XAMPP: Starting Apache with SSL (and PHP5)...
XAMPP: XAMPP-MySQL is already running.
XAMPP: XAMPP-ProFTPD is already running.
XAMPP for Linux started.