Jump to content

When i want update module


se3rij

Recommended Posts

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

I have located the fix and updated the forge issue

 

The fix to this issue is within the following file
\src\Adapter\Addons\AddonsDataProvider.php

The 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 by bellini13 (see edit history)
  • Like 1
Link to comment
Share on other sites

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

  • 2 weeks later...

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...