HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   General (http://www.howtoforge.com/forums/forumdisplay.php?f=25)
-   -   Wrong TMP folder in user-specific php.ini (http://www.howtoforge.com/forums/showthread.php?t=61264)

SnakeX91 2nd April 2013 16:24

Wrong TMP folder in user-specific php.ini
 
Hello everyone!

I've got another question to answer...

When i set up a website (SuPHP+suEXEC), ISPConfig create an /var/www/conf/web{WEB_ID}/php.ini that contains the php configuration for web{WEB_ID}. But when I try to upload a file in each way (via CMS or self-made upload script), i get an open_basedir restriction, 'cause /var/tmp/ is not in the list of the open_basedir. In fact in php.ini i find /var/tmp/ as temporary folder for uploads.

Now, I know how is foolish to disable open_basedir for security reasons, but i think that ISPConfig has to set /var/clients/client{client_id}/web{web_id}/tmp/ as tmp folder for upload and NOT /var/tmp/. How can i get out of this?

falko 5th April 2013 00:11

ISPConfig just copies your default php.ini /var/www/conf/web{WEB_ID}/php.ini.

You can add /var/tmp to open_basedir on the Options tab of the website in ISPConfig.

SnakeX91 5th April 2013 00:19

Hi falko, thanks for your answer!

Yes, i can add /var/tmp/ in Options tab but... why?
Probably my opinion is wrong, but if ISPConfig creates a /tmp/ folder for each web{ID}, why to set /var/tmp/ to the default value if it's not accessible by default?

I can't understand if it is a missing feature, or if my opinion is incorrect. If it is a missing feature, I'd really like to implement it by myself and release it open-source & free. Could you explain me?

Thank you so much!

till 5th April 2013 08:13

ISPConfig is not setting /var/tmp as temporary folder. If this folder is used in your php.ini file, then it has been set by the php package maintainer of your Linux distribution and not by ispconfig.

The combination suphp + suexec does not make much sense fo php as suexec replaces suphp. suphp is very slow and should not be used anymore, the recommended php settings as described in the manual are php-fcgi + suexec or php-fpm + suexec. You will see that the upload temp folder is set by ispconfig then as well.


All times are GMT +2. The time now is 15:09.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.