Hi,
I am using Ubuntu 18.04.
I am trying to run a php script from an .html file in an Apache2 Virtual Host in Firefox Browser.
The script uses fopen() and I get the following error message: " failed to open stream: Permission denied".
($inputFile=fopen("optumRxInputFile.sql", "a+") or die("can't open file - line 38 test.php");)
Here are the permissions I have set:
rick@rick-Latitude-E6510:/var/www/html$ ll
total 24
drwxr-xr-x 2 root root 4096 Dec 7 10:55 ./
drwxr-xr-x 3 root root 4096 Jul 17 2019 ../
lrwxrwxrwx 1 root root 17 Dec 7 10:55 DB-sql -> /home/rick/DB-sql/
rick@rick-Latitude-E6510:~/DB-sql/PHP-Forms2$ ll
total 192
-rwxrwxrwx 1 rick rick 2364 Feb 15 11:32 optumRxForm.html~*
-rwxrwxrwx 1 rick rick 1675 Feb 17 11:00 test.php*
Here is my Virtual Host setup:
<VirtualHost *:80>
ServerName mysqlite.com
ServerAlias www.mysqlite.com
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html/DB-sql
<Directory /var/www/html/DB-sql >
Options Indexes FollowSymLinks
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
Here is my test.php code:
<code> I tried to put the code in here and I keep getting 403 Error and I lose everything</code>
Don't know what else to do here to fix this.
Thanks for your help in advance.
R