«

»

Nov 28

Internal server error when upload image larger 100 kb in Drupal and Plesk

As usually we write in english to let know all people about the error we fixed. When you install Drupal, you have to try upload image like changing your picture profile to test file upload, file system permissions and site visualization. Doing so we encountered the error described in object: Internal server error! It’s really scaring viewing this bad error….but be happy, you are reading our article and soon you will find the solution to this orrible problem.

The solution is really complicated and you should have right permission to modify some important file in your server and so you have to connect to your server via ssh to make all changes we suggest.

  1. Be sure the /sites/default directory has rw permissions for the right user : in Plesk user is domaninname.com and group psacln . You can check executing  “ ls -al” . However this has to be verified in every environment.
  2. Problem in object arises because of a configuration set for mod_fgid.c that produce an apache error like this one :
    [Fri Nov 25 19:12:32 2011] [warn] [client IP.Address.Example.Client] mod_fcgid: HTTP request length 132356 (so far) exceeds MaxRequestLen (131072), referer: http://www.domain.name.com/some_page.html
  3. To solve add to vhost configuration:
    <IfModule mod_fcgid.c>
    # 20MB should be enough
    MaxRequestLen 20000000
    </IfModule>
  4. In plesk vhost configuration doesn’t not be modified as simple as be in other system, you have to go to /var/www/vhost/domain.name/conf/  , here you will find several  http.include . These files are vhost configuration for plesk: does not modify it!. Create a vhost .conf file into /conf witch command ” touch vhost.conf” and add point 3 configuration lines. Save it.
  5. You have almost finished your job. Now you have to lets plesk rebuild domain configuration; so run  :
    /usr/local/psa/admin/sbin/websrvmng -u –vhost-name=example.com
    in Plesk 10 or sup /usr/local/psa/admin/sbin/httpdmng –reconfigure-domain domain.name
  6. Test and enjoy the solution.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>