2

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.....)

1

3 Answers 3

2

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.

1

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.

0

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

1
  • 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. Sep 2, 2011 at 17:04

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .