FastCgi file upload path change

Discussion in 'Installation/Configuration' started by mesut, Sep 19, 2010.

  1. mesut

    mesut New Member


    I have installed ISPConfig3 Perfect Server on Ubuntu 10.04. Everything looks good. But i noticed that php file upload not running. Scripts like prestashop show succesful, but no image. I think problem is, upload path.

    And than, i want to test Wordpress. Installed it but admin didn't work. Only shows dashboard. I clicked articles and get blank screen.

    How can i change fcgi upload tmp path on vhost file.:confused:
    Last edited: Sep 19, 2010
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Just make sure that you selected php-fcgi in the website settings and that you also enabled suexec in the website settings. I run several cms systems and some wordpress installs on my ispconfig 3 server and they work all out of the bix, no need for changing any upload paths as the cms has full write permissions on the directory of the weba nd the website temp directory with the settings that i described.
  3. mesut

    mesut New Member

    I know, it is strange but i change to mod-php and make vhost directive "php_admin_value upload_tmp_dir /var/www/" and then file upload worked!
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    The temp directory of a website in ispconfig is /var/www/ and not /var/www/

    Which security level have you set under system > server config on the web tab? If the level is set "High", then the upload_tmp dir will be set in the fcgi starter script to the correct temp directory /var/www/ If the level is set to medium, then no upload_temp dir is set and php will use the system default of the linux distribution.

    It is recommended to use the level "High".
  5. mesut

    mesut New Member

    Yes till. I have 2 servers. One is dedicated and another is VPS. On dedicated server which is i installed, works good. But my virtual server doesn't upload. I think, problem may be apparmor. I follow instructions for perfect server 10.04 but apparmor remove commands didn't run. Apparmor compiled as kernel module. And this is in my log files:

    Sep 20 07:28:48 server kernel: [ 0.144989] Security Framework initialized
    Sep 20 07:28:48 server kernel: [ 0.145001] AppArmor: AppArmor initialized
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    Apparmor might be the problem. Any errors in the website error.log (the one in the log directory in the website root) when the upload fails?
  7. mesut

    mesut New Member

    Yes, i found in error.log with fastcgi + suexec:

    PHP Warning:open_basedir restriction in effect. File(/var/www/clients/client1/web3/tmp/phpKydZAi) isn't within the allowed path(s): (/var/www/clients/client0/web3/web:/var/www/clients/client0/web3/tmp:/var/www/ in /var/www/clients/client1/web3/web/admin123/tabs/AdminProducts.php)
    I Found problem! I have created under client0 this site. And than, i assigned new user that is client1. As see log line, it didn't assign new user automatically. I changed client0 to client1 and problem fixed! :))
    Last edited: Sep 20, 2010

Share This Page