Describe the bug
After upgrading to 1.7.5 with autoupgrade, when you try to upload an image in the product section: you get error 500. I've checked the tmp folder and wasn't there after the upgrade, so I created it with 755 perm.
To Reproduce
Steps to reproduce the behavior:
Screenshots
Additionnal information
PrestaShop version: 1.7.5.0 stable
PHP version: 7.1.25
Hi @ChineseNorris,
Thanks for your report.
I did not manage to reproduce the issue after upgrade from PS1.7.4.4 to PS1.7.5.0.
I checked also the tmp folder & it exists.
Can you please provide us the log of your upgrade? It can be found in the log.txt file, available in
Thanks!
Hi @khouloudbelguith ,
here is the full log txt file. I've also tryied with php 7.2 to try if the php version will print a different output but with same results.
Happy new year =)
log.txt
Hello,
I have the same problem with a module that downloads images after updating my shop in 1.7.5, the image is download but I have this error that appears.
But it works well with the product section!
1.7.4 ->OK
1.7.5 ->ERROR
Hi,
I did not manage to reproduce the issue with PS1.7.5.0 after upgrade 1.7.4.4.
@ChineseNorris, in your log file, there are just some warnings ( different issue).
Those images are generated automatically so removing them PrestaShop regenerates them.
Into the path Project_Folder/img you need to create a folder tmp with access permission 777.
Also, go to BO => Design => Image Settings => click on Regenerate thumbnails.
Thanks to check & feedback.
Hi,
I've just regenerated all the images sucessfully but with no success while uploading the images, with 777 permission folder as well.
Regards
@ChineseNorris, thanks to delete and regenerate the .htaccess file.
Thanks to check and feedback
Hi @khouloudbelguith
I've just forced .htaccess to recreate without success. It's strange because I've made other updates with other prestashop stores without issues, this is strange.
@ChineseNorris, in my case also, I tried to delete the tmp folder to reproduce your issue.
But after creating a new folder tmp with access permission 777& regenerating thumbnails => the issue disappear.
In your shop, have you any override or custom module not compatible with PS1.7.5?
Could you please try to clear cache manually by deleting all the folder into var/cache (prod & dev).
Thanks to check and feedback.
After upgrading to version 1.7.5 with autoupgrade, when I try to load an image in the product section: I get the error 500.
@AntonioManta, if you enabled the debug mode, have you any errors displayed?
Thanks!
si
@AntonioManta, in the Projet_Folder/img/ path did you have the tmp
folder created?
Thanks!
yes with 777 permits
@AntonioManta, can you check permissions for /img/p/ directory ? (images for products in this case)
it must be writable, recursively writable.
Thanks!
Done but the problem remains
@AntonioManta, during the upgrade did you have any errors?
Can you please provide us the log of your upgrade? It can be found in the log.txt file, available in
Thanks!
During the update I did not have any errors
Hi @AntonioManta,
In your log file, I found this error:
[INTERNAL] /home2/yoonline/public_html/vendor/symfony/symfony/src/Symfony/Component/Console/Terminal.php line 127 - proc_open() has been disabled for security reasons
[2018-12-21 16:41:29] [INTERNAL] /home2/yoonline/public_html/vendor/symfony/symfony/src/Symfony/Component/Console/Terminal.php line 127 - Undefined variable: pipes
proc_open() has been disabled for security reasons is most likely a PHP error set somewhere in your php.ini or something else, you need to check the issue with your host & feedback.
Also, thanks to increase the post_max_size, it could be a problem.
Thanks!
The problem I forwarded to the service manager and proceeded as you suggested. But the problem persists. Lororo answered me this:
The problem is that Prestashop looks for a session file that does not exist:
Sorry for the insistence, but not being able to go back with the versions because in the meantime orders have been made on the site, and not being able to enter new products, can you tell me if this problem is solvable? I'm not good at programming and I'm in trouble. Thanks for your patience
@AntonioManta, could you please check that /home2/yoonline/php_sessions/ exists and is writable by your web server user.
Thanks!
@AntonioManta, could you please check if Session is enabled on your server & what is the exact value for the directive "session.save_path"?
Excuse me but I do not know where to see it. Help me?
@AntonioManta, you can check it in your file PHP info.
You can follow this:
link to know how to create PHP info page.
Thanks!
this is the link to check the data
onlinestampafineart.com/info.php
@AntonioManta, as expected, in your PHP info file, you have "session.save_path = /home2/yoonline/php_sessions"
You need to check the permission of this folder.
Thanks!
how should I set them 7 7 7?
I have set permissions 777 but the problem persists
@AntonioManta, I did not manage to reproduce the issue with PS1.7.5.0 after upgrade from PS1.7.4.4.
@marionf what do you think?
What do you suggest ?
Do you want the credentials to access my panel?
@AntonioManta, I assigned your issue to our developer to reproduce your issue and we'll come back to you if we need more information.
Thanks!
Hello, I have the same problem and, I don't know if it helps but since upgraded to 1.7.5.0, the folder img/tmp stoped creating jpg files but maybe corrupted files
@Sumire5, did you tried to re-create the tmp folder with 777 permissions?
Thanks!
Yes, I just tried with 777 permissions and nothing
done, but the problem persists
Have you found any solutions ??
Just in case, remember that if you are in a shared hosting all folders and files should be 755 for directories and 644 for files (otherwise the server will block the access to the directories/files).
I couldn't either solve the problem by resetting the cache (prod & dev).
Regards
It seems related to http://forge.prestashop.com/browse/BOOM-5850
This issue has been solved with https://github.com/PrestaShop/PrestaShop/pull/9265
Do you have the gamification module installed ? If yes, can you try to uninstall it ?
Do I have to install the gamification module?
No, I ask you if you have this module installed ?
I don't have that module installed and the fix sugested in #9265 is already implemented in 1.7.5.0
No, I did not install it
Despite our several trials, we could not reproduce your issue with the provided information.
It seems that your issue is not a PrestaShop's core bug but most likely a server configuration or customization problem.
I invite you to contact our support team: http://addons.prestashop.com/en/388-support to help you solve your issue.
Best regards.
I contacted the served and they replied saying that it seams related to ProductImageController as there are no server errors registered but there are prestashop errors registered as follows:
[2019-01-10 14:03:09] request.INFO: Matched route "admin_product_image_upload" . {"route":"admin_product_image_upload","route_parameters":{"_controller":"PrestaShopBundle\Controller\Admin\ProductImageController::uploadImageAction","idProduct":"1941","_route":"admin_product_image_upload"},"request_uri":"https://www.*.com/admin/index.php/sell/catalog/products/image/upload/1941?_token=2hGGkyoJpbGbMMnZj0F2XYp-_Mv6JVE1tf6zzeq6t70","method":"POST"} []
[2019-01-10 14:03:09] security.DEBUG: Read existing security token from the session. {"key":"_security_main","token_class":"Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken"} []
[2019-01-10 14:03:09] security.DEBUG: User was reloaded from a user provider. {"provider":"PrestaShopBundle\Security\Admin\EmployeeProvider","username":"@.com"} []
[2019-01-10 14:03:09] request.CRITICAL: Uncaught PHP Exception Symfony\Component\HttpFoundation\File\Exception\FileNotFoundException: "The file "/tmp/phphBbafd" does not exist" at */vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/File/File.php line 37 {"exception":"[object] (Symfony\Component\HttpFoundation\File\Exception\FileNotFoundException(code: 0): The file \"/tmp/phphBbafd\" does not exist at */vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/File/File.php:37)"} []
[2019-01-10 14:03:09] security.DEBUG: Stored the security token in the session. {"key":"_security_main"} []
With version 1.7.4 everything has always worked. I checked with the server administrators, but everything is well configured. I do not know what to do
Finally solved deactivating the module Page Cache Ultimate (although I had no problem with versions previous to 1.7.5.0)
Thanks solved me too
Looks like we all have Page Cache Ultimate.
Did you guys tried to reinstall after the update? @Sumire5 @AntonioManta
I have tried to reinstall it but I can't upload images. In addons.prestashop this module seams to be compatible with version 1.7.5.0 but I can't update it anymore.
I'm the developper of Page Cache Ultimate, sorry for this issue, it has been fixed in module version 4.53.
I'm the developper of Page Cache Ultimate, sorry for this issue, it has been fixed in module version 4.53.
@jherry Can you advise how to obtain 4.53? 4.49 is all that is showing at https://addons.prestashop.com/en/website-performance/7939-page-cache-ultimate.html
@devonto The version is on validation in Addons, should be available soon. If you need it now contact me with form at https://addons.prestashop.com/en/contact-us?id_product=7939
@jherry Thanks - that has done the trick.
If you still encounter the issue after upgrading Page Cache, check the file /override/classes/Dispatcher.php, make sure that the constructor, if overrided, forward the 'request' parameter
use Symfony\Component\HttpFoundation\Request as SymfonyRequest;
class Dispatcher extends DispatcherCore
{
protected function __construct(SymfonyRequest $request = null)
{
[...]
parent::__construct($request);
[...]
}
[...]
add the strings listed above to dispatcher.php file results in 500 error in BO and FO.
Below is my current dispatcher.php file
add the strings listed above to dispatcher.php file results in 500 error in BO and FO.
Below is my current dispatcher.php file
You attached your core Dispatcher file (native), only the override must be fixed.
Dear J茅r么me,
Thank you for your advice. I added the line ( in bolt (**) below) to /override/classes/Dispatcher.php
This resulted in 500 error in front and backoffice.
In the Apache error log, this error:
Backend fatal error: PHP Parse error: syntax error, unexpected '...' (T_ELLIPSIS), expecting ']' in /home/deb115780/domains/derks-wielersport.nl/public_html/override/classes/Dispatcher.php on line 6\n
Sorry, I'm not a developer. Besides copy/past I have no idea wat the added php instructions mean :(.
The server runs PHP version 7.2
class Dispatcher extends DispatcherCore
{
protected function __construct(SymfonyRequest $request = null)
{
[...]
parent::__construct($request);
[...]
}
[...]
With your instructions, the /override/classes/Dispatcher.php looks like this:
class Dispatcher extends DispatcherCore
{
protected function __construct(SymfonyRequest $request = null)
{
[...]
parent::__construct($request);
[...]
}
[...]
/*
* module: prettyurls
* date: 2019-03-01 12:05:29
* version: 2.2.2
/
protected function __construct()
{
parent::__construct();
$this->loadRoutes();
}
/
* module: prettyurls
* date: 2019-03-01 12:05:29
* version: 2.2.2
*/
We found the cause of our problem. Issue was caused by malfunction of module which rewrites URL to pretty url.
OK, because "[...]" just mean there can be some code here, you must not add it to the code ;-)
Most helpful comment
I'm the developper of Page Cache Ultimate, sorry for this issue, it has been fixed in module version 4.53.