Error in php when executing with netbeans
am using FEDORA 20.
\MYSQL(MARIADB-SERVER),PHP,APACHE ALL INSTALLED AND WORKING. I have just successfully tested a project in php. my localhost is-> ¨/var/www/html/¨. Then I created a new PHP project in ¨/home/NetBeansProjects/PhpProject1¨, using netbeans but it doesńt run. When I try to run the project, i get The requested URL /PhpProject1/index.php was not found on this server on "http://localhost/PhpProject1/index.php" since /var/www/html is not writable without root privilage, how can i change my localhost to netbeans default directory( /home/NetBeansProjects/ )? OR WITHOUT CHANGE TO NETBEANS DIRECTORY ANY OTHER SOLUTION? |
If there is nothing else in the /var/www/html you can remove it and replace it with a symlink to your project directory
(as root) rm -r /var/www/html ln -s /home/NetBeansProjects /var/www/html Or edit your webserver's config. If that is an apache2 then it might be /etc/apache2/httpd.conf. Search and replace the directories in the tag DocumentRoot and the <Directory> tag below that. Then restart the server. |
Netbeans probably isn't set up to use the correct path. Verify your project's settings. You can make a local version of your site if you want to.
https://netbeans.org/kb/docs/php/project-setup.html |
[QUOTE=j-ray;5105499]If there is nothing else in the /var/www/html you can remove it and replace it with a symlink to your project directory
(as root) rm -r /var/www/html ln -s /home/NetBeansProjects /var/www/html QUOTE] now when i did following command i got error, service httpd start Redirecting to /bin/systemctl start httpd.service Job for httpd.service failed. See 'systemctl status httpd.service' and 'journalctl -xn' for details. |
My guess is that apache does not allow the DocumentRoot to be a symlink. But I am guessing only. If this was the case you could add a +FollowSymLinks to the <Directory>-tag in the conf file. (the directory tag regarding the docroot directory)
If you type /usr/sbin/apache2ctl configtest it may give you out what's wrong. Or consult the error logs, probably under /var/log/apache2/error.log |
Quote:
bash: /usr/bin/apache2ctl: No such file or directory |
on my box it is in
/usr/sbin you search in /usr/bin |
Quote:
|
what does the error log say?
|
Quote:
bash: /usr/sbin/apache2ctl: No such file or directory [root@localhost mr]# /var/log/apache2/error.log bash: /var/log/apache2/error.log: No such file or directory [root@localhost mr]# cat /var/log/apache2/error.log cat: /var/log/apache2/error.log: No such file or directory [root@localhost mr]# systemctl status httpd.service httpd.service - The Apache HTTP Server Loaded: loaded (/usr/lib/systemd/system/httpd.service; disabled) Active: failed (Result: exit-code) since Mon 2014-02-03 21:10:00 IST; 3min 21s ago Process: 3851 ExecStop=/bin/kill -WINCH $MAINPID (code=exited, status=1/FAILURE) Process: 3849 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE) Main PID: 3849 (code=exited, status=1/FAILURE) Feb 03 21:10:00 localhost.localdomain kill[3851]: -q, --queue <sig> use ... Feb 03 21:10:00 localhost.localdomain kill[3851]: -p, --pid prin... Feb 03 21:10:00 localhost.localdomain kill[3851]: -l, --list [=<signal>] list... Feb 03 21:10:00 localhost.localdomain kill[3851]: -L, --table list... Feb 03 21:10:00 localhost.localdomain kill[3851]: -h, --help display this... Feb 03 21:10:00 localhost.localdomain kill[3851]: -V, --version output versi... Feb 03 21:10:00 localhost.localdomain kill[3851]: For more details see kill(1). Feb 03 21:10:00 localhost.localdomain systemd[1]: httpd.service: control proc... Feb 03 21:10:00 localhost.localdomain systemd[1]: Failed to start The Apache ... Feb 03 21:10:00 localhost.localdomain systemd[1]: Unit httpd.service entered ... Hint: Some lines were ellipsized, use -l to show in full. |
All times are GMT -5. The time now is 03:23 PM. |