• 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

#1
Hi,

I am unable to upload images or attachments, i have made sure that both the data and Internal_data have permissions set to 777
upload_2014-9-20_14-5-48.png
I have also edit the htaccess as per below.

Code:
#    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
</IfModule>
I'm a little stumped as to what else i can check
 

Mike

XenForo developer
Staff member
#2
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
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.

upload_2014-9-20_16-11-26.png
 

Mike

XenForo developer
Staff member
#4
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
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.

upload_2014-9-21_11-21-12.png

upload_2014-9-21_11-22-57.png


/nginx/nginx.conf
Code:
#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/*;
}

/nginx/conf.d/default.conf
Code:
#
# 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 127.0.0.1:80
    #
    #location ~ \.php$ {
    #    proxy_pass   http://127.0.0.1;
    #}

    # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
    #
    #location ~ \.php$ {
    #    root           html;
    #    fastcgi_pass   127.0.0.1:9000;
    #    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;
      allow 86.121.0.228;
      deny all;
                                }
}
upload_2014-9-21_11-19-57.png



upload_2014-9-21_11-21-1.png
 
Last edited: