Error codes: passthru_execution
-
I know this isn’t the plugin’s fault however I’m hoping you can give a little more insight as to how to fix this. I’m running on an nginx server. This error shows on the page:
Execution of the PHP file from path “https://marylandland.com/wp-content/webpc-passthru.php” is blocked on your server, or access to this file is blocked. Add an exception and enable this file to be executed via HTTP request. To do this, check the security plugin settings (if you are using) or the security settings of your server.
– I am not running any security plugins.
– I tried setting security on the webpc-passthrr.php file to 777 (made no difference)
– I added the recommended code to the nginx config. Mime types already existed in my server. This section is added and near the top (but nothing above should conflict)
location ~ /wp-content/(?<path>.+)\.(?<ext>jpe?g|png|gif)$ {
if ($http_accept !~* “image/webp”) {
break;
}
add_header Vary Accept;
expires 365d;
try_files /wp-content/uploads-webpc/$path.$ext.webp $uri =404;
}However that code above only affects the serving of webp images, not the execution of the php file.
My nginx file does have this code that handles php:
location ~ [^/]\.php(/|$) {
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
if (!-f $document_root$fastcgi_script_name) {
return 404;
}
fastcgi_pass unix:/run/php/php7.4-fpm-marylandland.com.sock;
fastcgi_index index.php;
include /etc/nginx/fastcgi_params;
}And I decided to add this to see if it would help:
location /wp-content/webpc-passthru.php {
fastcgi_pass unix:/run/php/php7.4-fpm-marylandland.com.sock;
fastcgi_index index.php;
include /etc/nginx/fastcgi_params;
}When I run the url myself I don’t get an error but I don’t get any response either. I edited your file and included an echo(“hi”); as the last line and when I run the file, that’s what I get so in my opinion, the file can be run directly.
Unfortunately none of these have resolved the error. I’m out of ideas. Can you offer any advice as to what to try next?
The page I need help with: [log in to see the link]
- The topic ‘Error codes: passthru_execution’ is closed to new replies.