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

Jorge Castro
  • 70,934
  • 124
  • 466
  • 653
Munna
  • 121
  • 1
  • 3
  • 1
    You might want to check out [What is the best way to add files to a website on a LAMP server?](http://askubuntu.com/questions/45496/what-is-the-best-way-to-add-files-to-a-website-on-a-lamp-server) – Marco Ceppi Jun 04 '11 at 23:57

3 Answers3

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.

Nemo
  • 9,332
  • 8
  • 47
  • 67
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.

JLinden
  • 970
  • 1
  • 11
  • 27
0

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

mrcktz
  • 1,734
  • 16
  • 20
Marko
  • 1
  • 2
    Whilst this may theoretically answer the question, [it would be preferable](http://meta.stackexchange.com/q/8259) to include the essential parts of the answer here, and provide the link for reference. – Kris Harper Sep 02 '11 at 17:04