cancel
Showing results for 
Search instead for 
Did you mean: 

Uploading external files to /pub/ not executing

Uploading external files to /pub/ not executing

Dear Readers,

 

I have a problem with the file syteem of magento 2.

For a module i'm uploading a map to the /pub/ the map contains 2 php file.

 

When i browse to the url and wanted to executied de PHP files i can only download the files and not execute. Is there a way to fix this problem?

1 REPLY

Re: Uploading external files to /pub/ not executing

This will be because your webserver is not configured to pass php files at this location through to php-fpm for processing and instead is just serving them as files. 

 

What webserver setup are you using? Are you using nginx and the sample configuration? https://github.com/magento/magento2/blob/2.2-develop/nginx.conf.sample

----
If you've found one of my answers useful, please give "Kudos" or "Accept as Solution" as appropriate. Thanks!