Search code examples
phpeclipseideaptanaaptana3

Aptana 3 Studio: Can I put the www Apache folder as workspace?


I am very new in PHP world and now I have install Apatana 3 Studio and I have some question to you about PHP configuration in this development environment.

Seems that my configuration work well but I don't know if it is configured in a smart way...

I use Ubuntu and I have installed Apache 2 web server

Executing a simple php file (that is inside my /var/www folder) conteining phpinfo() function:

<?php phpinfo(); ?>

I obtain some information and seems that I have installed Apache 2 web server under this path: /etc/php5/apache2 and that the php.ini file have this path: /etc/php5/apache2/php.ini

Infact, this is part of the phpinfo() output that I obtain:

Configuration File (php.ini) Path /etc/php5/apache2 Loaded

Configuration File /etc/php5/apache2/php.ini

Ok, so I have configured my PHP environment settings in the following way:

1) I have create a new WorkSpace so that it matches the folder /var/www

2) I have set an external web server in this way: Windows ---> Preferences ---> Web Servers ---> New ---> External Web Server and I have put the following value:

Name: Apache

Base URL: [code]http://localhost[/code]

Document Root: /etc/php5/apache2

Doing so I can create a new project inside /var/www and if I execute some PHP file of this project by: Runs as ---> Php Server this file is executed in a browser windows.

Is it a right configuration? my douts depend by the fact that I have also try to create a new workspace inside the /var/www directory, for example: /var/www/AptanaWS but if I create a new project in this workspace if I try do execute a project file I have an error because it try to open the following URL:

[code]http://localhost/Test/test.php[/code]

and not the right URL that is:

[code]http://localhost/AptanaWS/Test/test.php[/code]

So, can I put my /var/www as my Work Space or is it a bad thing?


Solution

  • You can put it. Actually, I've did this with my Aptana install on Windows. On ubuntu I'm not using Aptana but it's the same principle..