Forum

Thread tagged as: Problem, Error

Assets not showing when uploaded (URL Rewrite Error)

When I upload a new asset (both through region and the assets tab), it's viewable in the asset gallery, but not on the live site. In the console it gives error 500 URL rewrite module error.

I noticed that any new asset on this site is given special security permissions that doesn't include reading or executing. Once I switch the permissions the image shows up on the webpage. The resources folder has the correct permissions, it's just new files that are added to it that are having the issue. This only happens through the asset upload - When I upload an image through an FTP or just copy it into the resource folder, the permissions are correct.

It might be helpful to know that this site also has rewrite rules to where the .html or .php are hidden/removed off the URL automatically.

Any suggestions?

Perch: 3.0.8, PHP: 5.4.24, MySQL: mysqlnd 5.0.10 - 20111026 - $Id: 2d8f599f49e5e8d2f5ba7112b5c444b3e2e48cdf $, with PDO
Server OS: WINNT, cgi-fcgi
Installed apps: content (3.0.8), assets (3.0.8), categories (3.0.8)
App runtimes: <?php $apps_list = [ ];
PERCH_LOGINPATH: /perch
PERCH_PATH: C:\inetpub\wwwroot\Sheboyganchamber\perch
PERCH_CORE: C:\inetpub\wwwroot\Sheboyganchamber\perch\core
PERCH_RESFILEPATH: C:\inetpub\wwwroot\Sheboyganchamber\perch\resources
Image manipulation: GD
PHP limits: Max upload 10M, Max POST 8M, Memory: 128M, Total max file upload: 8M
F1: 0c66c2e1f82f9e0b7617b2cb8270f2c7
Resource folder writeable: Yes
SCRIPT_NAME: /perch/core/settings/diagnostics/index.php
REQUEST_URI: /perch/core/settings/diagnostics/
DOCUMENT_ROOT: C:\inetpub\wwwroot\Sheboyganchamber
HTTP_HOST: sheboygan.org
Jared Dutra

Jared Dutra 0 points

  • 4 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

That sounds like a hosting configuration issue. Uploaded files should be readable.

This has been resolved and I'm posting for anybody that runs into the same issue.

With IIS, when images were being uploaded to assets, they are first put into a windows temp directory THEN moved to the resources folder. The new files were taking the permissions of the temp directory folder and being moved with those permissions.

Regardless, this issue can be fixed by changing the security permissions on your windows temp directory folder.