Solved Error with my server

Free add-ons
Avatar Gallery

Speddy20537

Registered
Registered
Joined
Oct 27, 2019
Messages
10
Reaction score
0
good Morning


First of all huge thank you for the brilliant addon.
Now I want to test it and when I search for a new
avatar and go to save this error message comes to light.



PHP:
rrorException: [E_WARNING] tempnam(): open_basedir restriction in effect. File(/tmp) is not within the allowed path(s): (/var/www/virtual/gameserversupport.de/:/opt/phpswitcher/static/php7.2/share/pear/)
src/addons/XenSoluce/AvatarGallery/XF/Pub/Controller/Account.php:22


PHP:
#0 [internal function]: XF::handlePhpError(2, '[E_WARNING] tem...', '/var/www/virtua...', 22, Array)
#1 src/addons/XenSoluce/AvatarGallery/XF/Pub/Controller/Account.php(22): tempnam('/tmp', 'php')
#2 src/XF/Mvc/Dispatcher.php(321): XenSoluce\AvatarGallery\XF\Pub\Controller\Account->actionAvatar(Object(XF\Mvc\ParameterBag))
#3 src/XF/Mvc/Dispatcher.php(248): XF\Mvc\Dispatcher->dispatchClass('XF:Account', 'Avatar', Object(XF\Mvc\RouteMatch), Object(SV\SearchImprovements\XF\Pub\Controller\Account), NULL)
#4 src/XF/Mvc/Dispatcher.php(100): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(SV\SearchImprovements\XF\Pub\Controller\Account), NULL)
#5 src/XF/Mvc/Dispatcher.php(50): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#6 src/XF/App.php(2178): XF\Mvc\Dispatcher->run()
#7 src/XF.php(390): XF\App->run()
#8 index.php(20): XF::runApp('XF\\Pub\\App')
#9 {main}


PHP:
array(4) {
  ["url"] => string(15) "/account/avatar"
  ["referrer"] => string(65) "/account/account-details"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(8) {
    ["avatar_crop_x"] => string(1) "0"
    ["avatar_crop_y"] => string(1) "0"
    ["use_custom"] => string(1) "1"
    ["gallery_avatar"] => string(49) "gallery_avatars/Pirates/Flag-Jolly-Roger-icon.png"
    ["_xfToken"] => string(8) "********"
    ["_xfRequestUri"] => string(24) "/account/account-details"
    ["_xfWithData"] => string(1) "1"
    ["_xfResponseType"] => string(4) "json"
  }
}
 
Solution
Hello,

It will be necessary to see with your host for the tmp files because I use a function: tempnam() and it will create a /tmp file, where it is going to create this file it is possible to modify this path thanks to the option, but ask for more help to your hoster.
In fact the error comes from the fact that your server does not allow a PHP function: tempnam()

What is your current PHP version of your server?
 


this error does not come from the addon but that there is something that blocks a PHP function watchman look on the internet, we use a function: tempnam() (it is a PHP function)
 
In which file is that called because here is a file called on me for the server is different and the following answer from manufacturer of webcontroll pannel.



Code:
Your application cannot access the /tmp directory which is the expected behavior as customers have their own temporary dir:

/var/www/virtual/<customer>/phptmp

First solution (recommended)

You need configure your application to use this directory. This is the recommended solution as this avoid PHP application accessing system temporary directory.
 
Sorry but I can't help you anymore it's not from my resort the addon works it just needs to see you with your hosting, if you wanted me to intervene with your hosting you will have to pay me (your server is French?)
 
Hi SyTry to me I have just tested the plugin and also here it show a server error when on a test account I try to add an avatar from the list.

The avatars images must be loaded only in the folder /data/gallery_avatars/(folder) and enabled the group permissions from Users/Avatar Gallery to work?
 
Hi SyTry to me I have just tested the plugin and also here it show a server error when on a test account I try to add an avatar from the list.

The avatars images must be loaded in the folder /data/gallery_avatars/(folder) ?
Hello, yes :
Upload your gallery avatars to data/gallery_avatars. If you would like your avatars to be categorized, simply create directories inside gallery_avatars/ and place the images in these directories. The names of these directories will be used as your category names on the front-end.

Regards, SyTry
 
Thanks for your answer. Yes then it's all setted good on my installation, but too here it show the server error so it must be something that should be fixed because also other people say that have the same server error.
I'm using the XF version v2.1.8 Patch 2 if could help you.
 
Thanks for your answer. Yes then it's all setted good on my installation, but too here it show the server error so it must be something that should be fixed because also other people say that have the same server error.
I'm using the XF version v2.1.8 Patch 2 if could help you.
Can you try with the latest release please, and let me know if it's the same ? :unsure:
 
Yes I have tried, but is still the same.
In particular the avatars loaded are shown, but when you try to change your own from the user control panel, you can see them but after you select the one you like and then you click save, the system go in error.
 
Yes I have tried, but is still the same.
In particular the avatars loaded are shown, but when you try to change your own from the user control panel, you can see them but after you select the one you like and then you click save, the system go in error.
And you have the same stack trace ?
 
This is the error that is it found now, those of before are been deleted so I cannot check if are the same.

Code:
ErrorException: [E_WARNING] tempnam(): open_basedir restriction in effect. File(/tmp) is not within the allowed path(s): (/home/users/root7/www:/home/users/root7/files:/home/users/root7/tmp) src/addons/XenSoluce/AvatarGallery/XF/Pub/Controller/Account.php:21
Generato da: Test 9 Aprile 2020 alle 22:46
STACK TRACE
#0 [internal function]: XF::handlePhpError(2, '[E_WARNING] tem...', '/home/users/roo...', 21, Array)
#1 src/addons/XenSoluce/AvatarGallery/XF/Pub/Controller/Account.php(21): tempnam('/tmp', 'php')
#2 src/XF/Mvc/Dispatcher.php(350): XenSoluce\AvatarGallery\XF\Pub\Controller\Account->actionAvatar(Object(XF\Mvc\ParameterBag))
#3 src/XF/Mvc/Dispatcher.php(261): XF\Mvc\Dispatcher->dispatchClass('XF:Account', 'Avatar', Object(XF\Mvc\RouteMatch), Object(XenSoluce\AvatarGallery\XF\Pub\Controller\Account), NULL)
#4 src/XF/Mvc/Dispatcher.php(113): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(XenSoluce\AvatarGallery\XF\Pub\Controller\Account), NULL)
#5 src/XF/Mvc/Dispatcher.php(55): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#6 src/XF/App.php(2184): XF\Mvc\Dispatcher->run()
#7 src/XF.php(391): XF\App->run()
#8 index.php(20): XF::runApp('XF\\Pub\\App')
#9 {main}


Request Status

array(4) {
  ["url"] => string(15) "/account/avatar"
  ["referrer"] => string(42) "https://www.sigarettaelettronicaforum.com/"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(8) {
    ["avatar_crop_x"] => string(1) "0"
    ["avatar_crop_y"] => string(1) "0"
    ["use_custom"] => string(1) "1"
    ["gallery_avatar"] => string(31) "gallery_avatars/Avatar/020.jpeg"
    ["_xfToken"] => string(8) "********"
    ["_xfRequestUri"] => string(1) "/"
    ["_xfWithData"] => string(1) "1"
    ["_xfResponseType"] => string(4) "json"
  }
 
Hello,

It will be necessary to see with your host for the tmp files because I use a function: tempnam() and it will create a /tmp file, where it is going to create this file it is possible to modify this path thanks to the option, but ask for more help to your hoster.
 
Solution
Top Bottom