1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.4 Can not upload images

Discussion in 'Troubleshooting and Problems' started by Mart456, Sep 20, 2014.

  1. Mart456

    Mart456 Member


    I am unable to upload images or attachments, i have made sure that both the data and Internal_data have permissions set to 777
    I have also edit the htaccess as per below.

    #    Mod_security can interfere with uploading of content such as attachments. If you
    #    cannot attach files, remove the "#" from the lines below.
    <IfModule mod_security.c>
        SecFilterEngine Off
        SecFilterScanPOST Off
    I'm a little stumped as to what else i can check
  2. Mike

    Mike XenForo Developer Staff Member

    Disable the Flash uploader and confirm again. If it works, it likely is still mod_security or similar. Often, they can't be disabled via .htaccess so your host will need to identify the rule that's being triggered and whitelist it.
  3. Mart456

    Mart456 Member

    Thanks Mike, i have turned the flash up loader off but that does not appear to work either.

    I get no error, the file looks like it uploading then the file disappears from the dialog box.

  4. Mike

    Mike XenForo Developer Staff Member

    There are no errors? Can you upload an avatar?

    If the issue is happening without the Flash uploader, then it likely is a permission issue (or a general upload limit on the server). Make sure that you've chmodded the data and internal_data directories and all files/directories within (recursively) to 0777.
  5. Mart456

    Mart456 Member

    Thanks for the help, ok after some more testing it look like i can upload files which are less than 200k, anything bigger will not load, here are some extracts from the phpinfo, i am also using nginx.



    #user www-data;
    user xxxxx;
    worker_processes  4;
    error_log  /var/log/nginx/error.log;
    pid        /var/run/nginx.pid;
    events {
        worker_connections  1024;
    http {
        include       /etc/nginx/mime.types;
        default_type  application/octet-stream;
        access_log /var/log/nginx/access.log;
         server_names_hash_bucket_size 64;
      sendfile        on;
      tcp_nopush     on;
      #keepalive_timeout  0;
      server_tokens off;
      keepalive_timeout  65;
      tcp_nodelay        on;
      gzip              on;
      gzip_comp_level   6;
      gzip_buffers      16 8k;
      gzip_http_version 1.1;
      gzip_min_length   1000;
      gzip_proxied any;
      gzip_types        text/plain text/css application/x-javascript text/xml application/xml application/xml+rss text/javascript image/x-icon image/bmp;
      gzip_vary         on;
      include /etc/nginx/sites-enabled/*;

    # The default server
    server {
        listen       80;
        server_name  _;
        client_max_body_size 15360k;
        #charset koi8-r;
        #access_log  logs/host.access.log  main;
        location / {
            root   /usr/share/nginx/html;
            index  index.html index.htm;
            client_max_body_size 15360k;
        # example
            #ModSecurityEnabled on;
            #ModSecurityConfig /etc/nginx/modsecurity.conf;
        error_page  404              /404.html;
        location = /404.html {
            root   /usr/share/nginx/html;
        # redirect server error pages to the static page /50x.html
        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
            root   /usr/share/nginx/html;
        # proxy the PHP scripts to Apache listening on
        #location ~ \.php$ {
        #    proxy_pass;
        # pass the PHP scripts to FastCGI server listening on
        #location ~ \.php$ {
        #    root           html;
        #    fastcgi_pass;
        #    fastcgi_index  index.php;
        #    fastcgi_param  SCRIPT_FILENAME  /scripts$fastcgi_script_name;
        #    include        fastcgi_params;
        # deny access to .htaccess files, if Apache's document root
        # concurs with nginx's one
        #location ~ /\.ht {
        #    deny  all;
          location /nginx_status {
          auth_basic off;
          stub_status on;
          access_log   off;
          deny all;

    Last edited: Sep 21, 2014

Share This Page