se3rij Posted November 10, 2016 Share Posted November 10, 2016 When i try update module i get message Exception thrown by module statsdata on upgrade. Cannot store module content in temporary folder !But on my log file i see mistakes. .296 [NOTICE] [iP address] [sTDERR] PHP Warning: tempnam(): open_basedir restriction in effect. File() is not within the allowed path(s): (/var/www/vhosts/mysite.com/:/tmp/) in /var/www/vhosts/mysite.com/httpdocs/src/Adapter/Addons/AddonsDataProvider.php on line 76 296 [NOTICE] [iP address] [sTDERR] PHP Warning: file_put_contents(): Filename cannot be empty in /var/www/vhosts/mysite.com/httpdocs/src/Adapter/Addons/AddonsDataProvider.php on line 77 Any Ideas? Link to comment Share on other sites More sharing options...
razaro Posted November 11, 2016 Share Posted November 11, 2016 Got same error and made report to forge http://forge.prestashop.com/browse/BOOM-1811 Added your description as it have all info needed. Link to comment Share on other sites More sharing options...
JrDeline Posted November 11, 2016 Share Posted November 11, 2016 have the same problem when i try to update a module or install a new one. Link to comment Share on other sites More sharing options...
se3rij Posted November 11, 2016 Author Share Posted November 11, 2016 Got same error and made report to forge http://forge.prestashop.com/browse/BOOM-1811 Added your description as it have all info needed. Any answer on forge? Link to comment Share on other sites More sharing options...
razaro Posted November 11, 2016 Share Posted November 11, 2016 No you will see changes in comments or history but PrestaTeam will probably take a look next week. Link to comment Share on other sites More sharing options...
se3rij Posted November 14, 2016 Author Share Posted November 14, 2016 No you will see changes in comments or history but PrestaTeam will probably take a look next week. Hi, did hi answer something? Link to comment Share on other sites More sharing options...
bellini13 Posted November 14, 2016 Share Posted November 14, 2016 (edited) I have located the fix and updated the forge issue The fix to this issue is within the following file\src\Adapter\Addons\AddonsDataProvider.phpThe original code does not specify a folder location, which is an invalid use of this function $temp_filename = tempnam('', 'mod'); Change that line to the following and it should correct the issue. $temp_filename = tempnam(sys_get_temp_dir(), 'mod'); Edited November 14, 2016 by bellini13 (see edit history) 1 Link to comment Share on other sites More sharing options...
JrDeline Posted November 14, 2016 Share Posted November 14, 2016 THX Bellini13, but now I get the Error Warning: shell_exec() has been disabled for security reasons Link to comment Share on other sites More sharing options...
bellini13 Posted November 15, 2016 Share Posted November 15, 2016 review the forge ticket, it has the solution Link to comment Share on other sites More sharing options...
JrDeline Posted November 15, 2016 Share Posted November 15, 2016 So I changed the 3 files as described on github but error still exist src/Adapter/Addons/AddonsDataProvider.php src/Core/Addon/Module/ModuleManagerBuilder.php src/PrestaShopBundle/Resources/config/admin/services.yml https://github.com/PrestaShop/PrestaShop/pull/6973/files#diff-6722637a5aaf2841f5a4e972d839dacc 1 Link to comment Share on other sites More sharing options...
se3rij Posted November 15, 2016 Author Share Posted November 15, 2016 So I changed the 3 files as described on github but error still exist https://github.com/PrestaShop/PrestaShop/pull/6973/files#diff-6722637a5aaf2841f5a4e972d839dacc If it's working now? Link to comment Share on other sites More sharing options...
JrDeline Posted November 16, 2016 Share Posted November 16, 2016 (edited) If it's working now? NO error persists! Warning: tempnam(): open_basedir restriction in effect. File() is not within the allowed path(s): (/home/:/tmp/:/usr/local/pd-admin2/) Edited November 16, 2016 by JrDeline (see edit history) Link to comment Share on other sites More sharing options...
razaro Posted November 16, 2016 Share Posted November 16, 2016 (edited) Edit: my bad, bellini is right about security. Edited November 16, 2016 by razaro (see edit history) Link to comment Share on other sites More sharing options...
JrDeline Posted November 16, 2016 Share Posted November 16, 2016 ok, but is there a way do use a directory without disabling the protection? Link to comment Share on other sites More sharing options...
bellini13 Posted November 16, 2016 Share Posted November 16, 2016 ..... Sorry, but do not follow this advice. changing open_basedir to none allows php scripts to be run anywhere on the server, which easily leads to attacks 2 Link to comment Share on other sites More sharing options...
JrDeline Posted November 16, 2016 Share Posted November 16, 2016 Sorry, but do not follow this advice. changing open_basedir to none allows php scripts to be run anywhere on the server, which easily leads to attacks That's the indetion why i'm ask if there is a way to use a directory without disabling the protection! Link to comment Share on other sites More sharing options...
JrDeline Posted November 24, 2016 Share Posted November 24, 2016 with 1.7.0.1 the module update works now !!! Big THANKS to the DEV Team !!! 1 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