Note, This is an external script not running on InfinityFree, if it’s in the wrong category, I’ll move it, The operating system is Ubuntu 18.04, PHP 7.2, Apache2
So, I have this script called make-cert.php, it has the following content;
<?php $data = array( "certificate_domains" => "$_GET['domains']", "certificate_csr" => "$_GET['csr']", "certificate_validity_days" => "90" ); $post_data = json_encode($data); $crl = curl_init('https://api.zerossl.com/certificates?access_key=xxxx'); curl_setopt($crl, CURLOPT_RETURNTRANSFER, true); curl_setopt($crl, CURLINFO_HEADER_OUT, true); curl_setopt($crl, CURLOPT_POST, true); curl_setopt($crl, CURLOPT_POSTFIELDS, $post_data); curl_setopt($crl, CURLOPT_HTTPHEADER, array( 'Content-Length: ' . strlen($payload)) ); $result = curl_exec($crl); if ($result === false) { $result_noti = 0; die(); } else { $result_noti = 1; die(); } curl_close($crl); ?>
And everytime I run it, I get 500 error, and the server log says:
PHP Fatal error: Unknown: Failed opening required '/var/www/hn.fyi/ssl/src/make-cert.php' (include_path='.:/usr/share/php') in Unknown on line 0
include_path in php.ini is commented out.
I checked the PHP.ini file, and auto_prepend_file is empty, And other PHP code works on the same domain, document root & webserver.
What is going on?