OLSA Posted May 3, 2015 Share Posted May 3, 2015 Hello, I have strange problem on local server (wamp, PHP 5.4.1) and PW 2.5.29 dev with image uploads. If I set maximum width for that image field then I can't upload images wider than that value ( > max.width). Example set max. width to 1200px, then 1200px go ok without problems, but 1201px (exactly) - upload process stop at ~85 - 99 percent. Same thing happened if I set max. width to eg. 460px and try to upload 600px wide image (80KB), stop at 85 percent. Debug mode is on, but can't find any error except inside Firebug (POST) or inside wamp PHP error log get "warnings" and "notice" about: Permission denied in ***\wire\core\Functions.php on line 254 Undefined variable: pathname in ***\wire\core\WireTempDir.php on line 170 Also on the same server I have no problems with other sites on PW 2.5.3 master. I try to find solution for that problem but without success (because it's on Windows I suspect that "handler" seems to remain open, or problems with path "\\" vs "/"..., but without succes inside Functions.php and wireRmdir() ). Please have you some idea how to fix that? Regards, Sasa Link to comment Share on other sites More sharing options...
OLSA Posted May 3, 2015 Author Share Posted May 3, 2015 I found temporary solution and that is in connection with JSON response (because of that uploads stop at ~ 80 - 99 percent and can't finished). Very important part is that I have this problem (in admin/back-end) when debugging mode is switched on: // site/config.php $config->debug = true; Or, if debug mode is off everything works fine - no problem when PW api need to resize uploaded image. But, because debug mode is ON, in JSON response (only there) I have also details: Permission denied in ***\wire\core\Functions.php on line 254 Undefined variable: pathname in ***\wire\core\WireTempDir.php on line 170 Result of that is javascript error (strange JSON response) and "view" part is "incomplete" (progress bar stopped, and image doesn't show). Currently my temporary solution for this (Windows) problem are two simple steps: 1. wire/core/Functions.php, function wireRmdir(), at the end add something what I don't like to use, but it's works - "@" error control operator // wire/core/Functions.php // function wireRmdir() // line 254 return @rmdir($path); 2. wire/core/WireTempDir.php, function remove(), define $pathname // wire/core/WireTempDir.php // function remove() // line below 134 $pathname = ''; Windows, wamp, PW 2.5.29 - debug mode ON - backend - problem to upload images wider than "Max width for uploaded images" Regards, Sasa 3 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now