Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

http://www.howtogeek.com/howto/ubuntu/installing-php5-and-apache-on-ubuntu/

I followed that site and installed php on my ubuntu 11.04. I'm using net beans 7 rc1 to develop programs. A small problem in php. as per that installation it specifies that php files should save in "/var/www" this works good i checked.

But prob is when using netbeans php files are defaultly saved in /home/usr/netbeansproject/... something like this so that directly i can't able to run it. Each and every time i transfered php files in /var/www to run it. I tried something to change in netbeans but i can't do that properly. Can anyone help me to change that directory either from php side or netbens. (step by step thnks guys.....)

share|improve this question
1  
You might want to check out What is the best way to add files to a website on a LAMP server? –  Marco Ceppi Jun 4 '11 at 23:57
add comment

3 Answers 3

When saving a file or creating a project, you'll have to specify the "Sources folder" in th dialog that appears.

For instance when you create a new PHP project: File > New Project - Then you select PHP and PHP Application and click "Next >". The next part is where you specify the project name and the folder you want it to be saved in.

NetBeans is built to handle projects, and it works best that way.

Another option would be to change the settings of your web server. You would do this by changing the "/var/www" paths in httpd.conf to the Netbeans default directory. I am not sure where you'll be able to find it the way you installed it though. You might find it in /etc/apache2 or something similar.

I'm using XAMPP (LAMPP) and my httpd.conf file is located in /opt/lampp/etc/httpd.conf.

share|improve this answer
add comment

I'm not so sure about netbeans, but for normal websites, I prefer to symlink to actual folders that I need to be hosted inside the www directory.

For eg :

/var/www/project_name -> /home/usr/netbeansproject/project_name/

I do this for all my websites on my laptop.

share|improve this answer
add comment

I wrote all you need here so not to repeat my self here you go.

share|improve this answer
2  
Whilst this may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference. –  Kris Harper Sep 2 '11 at 17:04
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.