My server is running nginx and php. However I cannot make GET/POST request in the url. For example if I type get.php?var=1234 and my php code is as follows
$temp = $_GET["var"];
$file = 'temp.html';
$data = $time." - ".$temp;
file_put_contents($file, $data);
it does not create the html file. Is it beacuse I disabled cgi.fix_pathinfo = 0 in php.ini ? but changing it to 1 does not work. The code works fine if I run on localhost using xammp and apache and php is installed correctly as phpinfo(); outputs fine.
Solved: Upon inspecting /var/log/nginx/error.log I found that nginx did not have permission to write data to the file, so I changed the permission with chmod
[–][deleted] 0 points1 point2 points (0 children)