Wordpress and ISPConfig 3

Discussion in 'General' started by NewGuy, Jan 28, 2010.

  1. NewGuy

    NewGuy New Member

    I am trying to install WordPress 2.9 and add a new theme to it. To do so, I have to use the upload tool within WordPress. When I do I get this

    Code:
    The uploaded file could not be moved to /var/www/clients/client1/web1/web/wp-content/uploads/2010/01
    I've Googled and the (bad) advise has been to set the wp-content folder to 777 permissions for the first upload then reset it to 755. I've tried this and get the same error. I am hoping it is a problem with Ispconfig at this point. Has anyone gotten this installed?
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    You selected the wrong php mode. Switch php mode of this site to php-fcgi or php-cgi and enable suexec.
     
  3. NewGuy

    NewGuy New Member

    Thanks for the quick reply. I've tried all 4 options and still get this error.
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    You have to wait until the config files are processed (2 minutes) and you have to enable suexec and not just a different php option.
     
  5. NewGuy

    NewGuy New Member

    I seem to be either misunderstanding or something isn't working as we expect. I've attached a screenshot of how it is currently configured. I left it set at this after my last post and tested again prior to posting now. I am still getting the error.
     

    Attached Files:

  6. till

    till Super Moderator Staff Member ISPConfig Developer

    Then you most likely misconfigured some permissions of the folders with your prior attemps to fix this.

    run:

    chown -R web1:client1 /var/www/clients/client1/web1/web

    on the shell and try again.
     
  7. NewGuy

    NewGuy New Member

    Nope.

    I'll go back to the Wordpress forums and see if they have any other suggestions. I believe everything is set up in ISPConfig. Thanks for the notes about which version of PHP to use.
     
  8. NewGuy

    NewGuy New Member

    What are the proper permissions for:

    /var/www/clients/
    /var/www/clients/client1
    /var/www/clients/client1/web1
    /var/www/clients/client1/web1/web
     
  9. till

    till Super Moderator Staff Member ISPConfig Developer

    Post the permissions of your folders if you wnat that we caompare them. But the permissions of these folders do not matter for your problem. If they were incorrect, you would not be able to execute a php script without errors. What matters is the directory /var/www/clients/client1/web1/web/wp-content/uploads/2010/01, so please post the output of:

    ls -la /var/www/clients/client1/web1/web/wp-content/uploads/2010/01
     
  10. Mosquito

    Mosquito New Member

    Its not a permissions problem if you can upload images but not themes. Likely, the theme is larger in size and exceeds the max allowed by php.ini. On a RedHat system look at

    Code:
    /etc/php.ini
    
    Look for max file size settings. The defaults are 2M. Try increasing that.
     
  11. Aisfrond

    Aisfrond New Member

    For wordpress you should listen to Till, enable suexec and use Fast-CGI as PHP.
    Then try this for safety reasons:
    find web/ -type d -exec chmod 755 {} \;
    find web/ -type f -exec chmod 644 {} \;
    (from /var/www/sitename.com/ )

    If you still have problems, try this in 'apache configuration' of your web hosting options:

    FcgidMaxRequestLen 104857600


    I have to say: Till is very very good, I can't believe how many problems I've resolved thanks to him.

    Aisfrond
     
  12. reason8

    reason8 Member

    Hello and good afternoon.
    I just switched over from MOD_PHP to CGI. Fast CGI was giving me an Error 500 when using W3TC Cache.
    When deleting the plugin, Fast CGI works. WHen the plugin is or is not activated I get the error.
    I have ran the file/folder permissions command mentioned above but to no avail.
    Any ideas what could be the issue?
    Currently I am using CGI and it appears to be working.

    I am running openSUSE 13.1 x64
    ISPConfig 3.1.2
     
  13. ahrasis

    ahrasis Active Member

    Apache or nginx?
     
  14. reason8

    reason8 Member

    Hi Ahrasis,
    Apache 2.4
     
  15. ahrasis

    ahrasis Active Member

    Do your server by any chance is using APC at the same time?
     
  16. reason8

    reason8 Member

    You are good. :)
    Yes.
    I am using APC for disk, database, etc.
     
  17. ahrasis

    ahrasis Active Member

    That could be the cause. Try to disable apc and see how it goes.
     
    reason8 likes this.
  18. reason8

    reason8 Member

    I'm looking for performance. To appease google pagespeed.
    What's the best combination for minification of js and css/html files?
    I would more than happily disable apc if fastcgi and w3tc cache does the job.
     
  19. till

    till Super Moderator Staff Member ISPConfig Developer

    You can find the reason for that error in the error.log of the website. One possible reason is a wrong user of cached data as mod_php is using a wrong user to run php, when you corrected that by switching to fastcgi, then w3tc can not read its cached data anymore. to fix that, chown all files and folders inside the web directory to the web user and client group of this website.
     
  20. reason8

    reason8 Member

    It was an APC issue as stated above. Disabling it for all caching resolved the issue.
    However, fast-cgi is not playing well with a plugin called EWWW for image compression.
    It works under cgi and mod_php.
    I'm not completely sure what the performance gains or hits are but I am going with security over performance.
    I don't want to change permissions on the uploads folder for ewww and image compression just to use fcgi.
    Any tips?

    *** UPDATE ***
    The EWWW Image optimizer plugin can not write to the folder under FCGI or CGI. I'm wondering if I didnt simply loosen the permissions on these folders originally.
    I'll try to find the best middle ground.
    If anyone has ideas, let me know.

    Thanks.
     
    Last edited: May 6, 2017

Share This Page