modxbot / migrate

A testground for migrating issues and other such fun
0 stars 0 forks source link

phpThumbs throws a php error when editing a resource with non-empty image TV #7487

Open modxbot opened 12 years ago

modxbot commented 12 years ago

yogooo created Redmine issue ID 7487

h2. Summary

phpThumbs throws a php error when editing a resource with a non-empty image TV set to use a filesystem media source. The path to the image is mis-build. However the image thumbnail renders properly.

h2. The Error

(ERROR @ /path_to_modx_install/modx-2.2.0-pl2/core/model/phpthumb/phpthumb.class.php : 1054) PHP warning: is_link() [function.is-link]: open_basedir restriction in effect. File(/path_to_modx_installpicture.png) is not within the allowed path(s): (/path_to_modx_install:/tmp_php_upload:/tmp_php_sessions)

Look at the path in « File(/path_to_modx_installpicture.png) », the media source path is missing.

h2. Steps to reproduce

h2. Observed

The error reported above was logged (most likely multiple times)

h2. Expected

Properly build path (ie with path to media source), no error logged

h2. Remarks

MarkH commented 12 years ago

markh submitted:

I think you're missing a step here:

"- create a new Filesystem Media Source with Basepath = "assets/images/","

You'll also want to set the base url to assets/images/.

The path is what's used for accessing it through PHP and is usually prefixed with the MODX base_path (eg /home/user/public_html/assets/images/image.png) - the path is used for listing files and uploading, removing and chmodding files. The url is what's used for display the file and is usually prefixed with the MODX base_url (eg http://site.com/assets/image.png).

modxbot commented 12 years ago

yogooo submitted:

Yep, forgot to add this step. However it doesn't affect the issue.