New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Relative path problem when using phpThumb #4
Comments
Fixed the path issue. But it cant generate a thumbnail. Here is the errror log. Ill check on this later today and get back with more info. Just gotta complete a project first. As a ref, i checked phpthumbsup as well. It had the same issue with the paths. So i guess we could recommend the developer of that project to sort the same issue. [2013-11-05 07:32:10](ERROR @ /index.php) [pThumb] Resource: 1 || Image: assets/product_photo_lasse.png "" does not exist in file "phpthumb.class.php" on line 3647 Unknown image type identified by "" () in SourceImageToGD()[3444] in file "phpthumb.class.php" on line 3647 |
This is the problem right here:
Since MODX is installed outside of what your web server thinks is your document root, phpThumb isn't happy. It has a couple settings I can use to fix that I think, but this misconfiguration might cause problems for you elsewhere too. Since you're on a Mac, there's a nice program called MAMP, which installs Apache, PHP and MySQL. It's dead simple to install and configure; much easier than OS X's built-in web server. All you need is the free version. I just tested it on my computer and it sets the document root properly for PHP. You might give that a try if you've got a few minutes... I'll see tonight what I can do about phpThumb and your current configuration though. |
One more version for you to try if you don't mind. phpThumb will probably find something new to complain about though :-) You can see it's rather paranoid about checking everything each time it creates an image! |
I put these changes into v2.2.0. If you still have your machine set up like that, give it a try if you like. |
Sorry for being non-responsive. Was covered in work. I will have a look at this today, or tomorrow the lastest and get back to you. And yes, i have left my mac that way to be able to test this so ill check on it! |
Ok, whenever you get the chance... Thanks! |
I'm going to close this, but please reopen if it continues to be a problem. |
When using phpThumb, if you give pThumb a relative path and your $_SERVER['DOCUMENT_ROOT'] is different than MODX_BASE_PATH, the file won't be found. Resizer works ok.
The text was updated successfully, but these errors were encountered: