Reputation: 63
When I try to run something on Netbeans using Ubuntu, a window opens but nothing actually works. I'm pretty sure it's because my http://localhost/ isn't working. So, how do I get that to work so I run files on Netbeans? Any specific step-by-step instructions would be great. I heard I had to install Apache, but I'm not sure.
Upvotes: 0
Views: 984
Reputation: 1376
If you want to run PHP stuff outside NetBeans, there are several steps you have to take:
sudo apt-get install apache2
sudo apt-get install php5
sudo apt-get install libapache2-mod-php5
sudo /etc/init.d/apache2 restart
Now, your Document Root (web root) should be at /var/www
.
Place your files there and access them with http://localhost/desired_file.php
with some web browser or just execute them with php
compiler on the command line.
Depending on your distro/version, there might be some configurations to be done, but that's the basic stuff you need to run PHP outside NetBeans
Upvotes: 1