Digital Point Image Proxy

Digital Point Image Proxy [Paid] 1.0.4

No permission to buy ($75.00)

digitalpoint

Well-known member
If you look at one of the image URLs that run through the proxy (has /proxy in the URL) and remove the .png at the end, any different?
 

Brent W

Well-known member
If I just remove the .png from the url I get the same result. (it says 1x1 in the title bar with or without .png.
 

eva2000

Well-known member
Any ideas why I am getting blank space (no image, no 404) when viewing the image url?
yeah get the same blank images if I remove all png file matches at nginx level to let PHP-FPM pick it up + disable ngx_pagespeed on /proxy/ urls https://community.centminmod.com/threads/testing-image-proxying.213/#post-1202

The addon never once worked with PHP 5.6 - it started back when Shawn you were away and PHP 5.6 came out and I upgraded from PHP 5.5 to 5.6. So I disabled the addon until now.

If I just remove the .png from the url I get the same result. (it says 1x1 in the title bar with or without .png.

yeah with .png removed, get a 1x1 image (the actual proxied url)

upload_2015-3-4_17-13-39.png
 
Last edited:

digitalpoint

Well-known member
Is there anything unique about your setup that you can think of? I'm using PHP 5.6 with Nginx myself without any issues. Hard to debug on my end when it works. Lol
 

eva2000

Well-known member
Is there anything unique about your setup that you can think of? I'm using PHP 5.6 with Nginx myself without any issues. Hard to debug on my end when it works. Lol
yeah understand totally, only common denominator is both @BamaStangGuy and I are using my Centmin Mod LEMP stack setup http://centminmod.com/

for my forum's Nginx and PHP-FPM configs

nginx -V
nginx version: nginx/1.7.10
built by gcc 4.4.7 20120313 (Red Hat 4.4.7-11) (GCC)
TLS SNI support enabled
configure arguments: --sbin-path=/usr/local/sbin/nginx --conf-path=/usr/local/nginx/conf/nginx.conf --with-http_ssl_module --with-http_gzip_static_module --with-http_stub_status_module --with-http_sub_module --with-http_addition_module --with-http_image_filter_module --with-http_secure_link_module --with-http_flv_module --with-http_realip_module --with-http_geoip_module --with-openssl-opt=enable-tlsext --add-module=../ngx-fancyindex-ngx-fancyindex --add-module=../ngx_cache_purge-2.3 --add-module=../headers-more-nginx-module-0.25 --add-module=../nginx-accesskey-2.0.3 --add-module=../nginx-http-concat-master --add-module=../openresty-memc-nginx-module-1518da4 --add-module=../openresty-srcache-nginx-module-ffa9ab7 --add-module=../nginx-sticky-module-1.2.5 --add-module=../nginx_upstream_check_module-0.3.0 --with-openssl=../openssl-1.0.2-chacha --with-libatomic --with-pcre=../pcre-8.36 --with-pcre-jit --with-http_spdy_module --add-module=../ngx_pagespeed-release-1.9.32.3-beta

Code:
php -v
PHP 5.6.6 (cli) (built: Feb 24 2015 12:44:18)
Copyright (c) 1997-2015 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2015 Zend Technologies
    with Zend OPcache v7.0.4-dev, Copyright (c) 1999-2015, by Zend Technologies

php -i | grep configure
Configure Command => '../configure' '--enable-fpm' '--enable-opcache' '--enable-intl' '--enable-pcntl' '--with-mcrypt' '--with-snmp' '--with-mhash' '--with-zlib' '--with-gettext' '--enable-exif' '--enable-zip' '--with-bz2' '--enable-soap' '--enable-sockets' '--enable-sysvmsg' '--enable-sysvsem' '--enable-sysvshm' '--enable-shmop' '--with-pear' '--enable-mbstring' '--with-openssl' '--with-mysql=mysqlnd' '--with-libdir=lib64' '--with-mysqli=mysqlnd' '--with-mysql-sock=/var/lib/mysql/mysql.sock' '--with-curl' '--with-gd' '--with-xmlrpc' '--enable-bcmath' '--enable-calendar' '--enable-ftp' '--enable-gd-native-ttf' '--with-freetype-dir=/usr' '--with-jpeg-dir=/usr' '--with-png-dir=/usr' '--with-xpm-dir=/usr' '--with-vpx-dir=/usr' '--with-t1lib=/usr' '--enable-pdo' '--with-pdo-sqlite' '--with-pdo-mysql=mysqlnd' '--enable-inline-optimization' '--with-imap' '--with-imap-ssl' '--with-kerberos' '--with-readline' '--with-libedit' '--with-gmp' '--with-pspell' '--with-tidy' '--with-enchant' '--with-fpm-user=nginx' '--with-fpm-group=nginx' '--disable-fileinfo' '--with-config-file-scan-dir=/etc/centminmod/php.d' 'CC=ccache 'CXX=ccache

PHP extensions loaded
Code:
 php -m
[PHP Modules]
bcmath
bz2
calendar
Core
ctype
curl
date
dom
enchant
ereg
exif
filter
ftp
gd
geoip
gettext
gmp
hash
iconv
igbinary
imagick
imap
intl
json
libxml
mbstring
mcrypt
memcache
memcached
mhash
mysql
mysqli
mysqlnd
newrelic
openssl
pcntl
pcre
PDO
pdo_mysql
pdo_sqlite
Phar
posix
pspell
readline
Reflection
session
shmop
SimpleXML
snmp
soap
sockets
SPL
sqlite3
standard
sysvmsg
sysvsem
sysvshm
tidy
tokenizer
xml
xmlreader
xmlrpc
xmlwriter
Zend OPcache
zip
zlib

[Zend Modules]
Zend OPcache

I have ngx_pagespeed enabled but excluded for /proxy/*/* requests. I think Brent doesn't use ngx_pagespeed at all.

I believe Brent would have Nginx with static OpenSSL 1.0.2 stable release. While I am using patched OpenSSL 1.02 for chacha20_poly1305 cipher support for static compiled OpenSSL with Nginx.


edit: only thing i noticed in the response headers is that with your addon enabled, my png remote url images are being reported as content-type:image/gif 1x1 image while with default xenforo proxy.php served they are reported as content-type:image/png
 
Last edited:

digitalpoint

Well-known member
My setup is pretty vanilla as far as web server and PHP goes...

Code:
nginx -V
nginx version: nginx/1.7.10
built by gcc 4.3.4 [gcc-4_3-branch revision 152973] (SUSE Linux)
TLS SNI support enabled
configure arguments: --prefix=/etc/nginx --sbin-path=/usr/sbin/nginx --pid-path=/var/run/nginx.pid --error-log-path=/usr/log/nginx/error.log --http-log-path=/usr/log/nginx/access.log --with-openssl=/home/software_source/openssl-1.0.2 --with-openssl-opt=enable-ec_nistp_64_gcc_128 --with-cc-opt='-I /usr/local/ssl/include' --with-ld-opt='-L /usr/local/ssl/lib' --without-http_ssi_module --with-http_ssl_module --with-http_stub_status_module --with-http_spdy_module --with-http_realip_module

Code:
php -v
PHP 5.6.6 (cli) (built: Feb 26 2015 10:32:30)
Copyright (c) 1997-2015 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2015 Zend Technologies
    with Zend OPcache v7.0.4-dev, Copyright (c) 1999-2015, by Zend Technologies

Code:
php -i | grep configure
Configure Command =>  './configure'  '--with-config-file-path=/etc' '--with-libdir=lib64' '--enable-fpm' '--enable-opcache' '--with-zlib' '--with-mysqli=mysqlnd' '--with-gd' '--with-png-dir' '--with-freetype-dir' '--with-jpeg-dir' '--with-curl' '--enable-exif' '--enable-mbstring' '--enable-pcntl' '--with-openssl' '--enable-sockets' '--with-snmp' '--enable-bcmath' '--with-mcrypt' '--enable-zip'

Code:
php -m
[PHP Modules]
bcmath
Core
ctype
curl
date
dom
ereg
exif
fileinfo
filter
gd
geoip
hash
iconv
imagick
json
libxml
mbstring
mcrypt
memcache
mysqli
mysqlnd
openssl
pcntl
pcre
PDO
pdo_sqlite
Phar
posix
Reflection
session
SimpleXML
snmp
sockets
SPL
sqlite3
standard
tokenizer
xml
xmlreader
xmlwriter
Zend OPcache
zip
zlib

[Zend Modules]
Zend OPcache

If someone has a test site or something where you have the Image Proxy enabled, but it's not working, I could take a look at it... but like I said, a bit tough to debug when it's working fine on my end.

If you go to one of the image URLs it generates (/proxy/*********/image.png), and it doesn't give you some sort of Nginx error like 404, then most likely the request is being passed along to the application (XF) which is a good thing. If you get a 1x1 pixel, then most likely it's getting some sort of exception somewhere in the DigitalPointImageProxy_Model_Proxy->getImage() method.

You could go into the Model/Proxy.php file and have it log any exceptions to your server log to help debug it if you wanted...

If you add this in the "catch" block, maybe it will give some more info:
PHP:
XenForo_Error::logException($e, false);
 

Arkshine

Active member
Just tried to update to PHP 5.6.6, and It seems to work for me too.

t60AP6u.png


Code:
PHP 5.6.6-1~dotdeb.1 (cli) (built: Feb 20 2015 07:28:17)
Copyright (c) 1997-2015 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2015 Zend Technologies
    with Zend OPcache v7.0.4-dev, Copyright (c) 1999-2015, by Zend Technologies

Code:
nginx version: nginx/1.6.2
built by gcc 4.7.2 (Debian 4.7.2-5)
TLS SNI support enabled
configure arguments: --with-cc-opt='-g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2' --with-ld-opt=-Wl,-z,relro --prefix=/usr/share/nginx --conf-path=/etc/nginx/nginx.conf --http-log-path=/var/log/nginx/access.log --error-log-path=/var/log/nginx/error.log --lock-path=/var/lock/nginx.lock --pid-path=/run/nginx.pid --http-client-body-temp-path=/var/lib/nginx/body --http-fastcgi-temp-path=/var/lib/nginx/fastcgi --http-proxy-temp-path=/var/lib/nginx/proxy --http-scgi-temp-path=/var/lib/nginx/scgi --http-uwsgi-temp-path=/var/lib/nginx/uwsgi --with-debug --with-pcre-jit --with-ipv6 --with-http_ssl_module --with-http_stub_status_module --with-http_realip_module --with-http_auth_request_module --with-file-aio --with-http_spdy_module --with-http_addition_module --with-http_dav_module --with-http_geoip_module --with-http_gzip_static_module --with-http_image_filter_module --with-http_secure_link_module --with-http_sub_module --with-http_xslt_module --with-mail --with-mail_ssl_module --add-module=/usr/src/nginx/source/dotdeb-nginx/debian/modules/nginx-auth-pam --add-module=/usr/src/nginx/source/dotdeb-nginx/debian/modules/nginx-dav-ext-module --add-module=/usr/src/nginx/source/dotdeb-nginx/debian/modules/nginx-echo --add-module=/usr/src/nginx/source/dotdeb-nginx/debian/modules/nginx-upstream-fair --add-module=/usr/src/nginx/source/dotdeb-nginx/debian/modules/nginx-syslog --add-module=/usr/src/nginx/source/dotdeb-nginx/debian/modules/nginx-cache-purge --add-module=/usr/src/nginx/source/dotdeb-nginx/debian/modules/ngx_http_pinba_module --add-module=/usr/src/nginx/source/dotdeb-nginx/debian/modules/ngx_http_substitutions_filter_module --add-module=/usr/src/nginx/source/dotdeb-nginx/debian/modules/nginx-x-rid-header --with-ld-opt=-lossp-uuid


Though, even before the update, probably unrelated and because of my retardness, with XF url rewriting enabled, some urls need to be rewritten in nginx to prepend "index.php?".
I had to do it for /proxy/ too, like:
Code:
    location ~ ^/(taigachat|proxy|attachments|albums|qus)/(.*)$
    {
        rewrite ^/(.*)$ /index.php?$1&$args last;
    }
Probably not the issue, but just saying in case.
Ignore me if I'm saying something stupid.
 
Last edited:

cjwinternet

Active member
Can somebody confirm please... Does this plugin store / cache images on the server?

Because XF cache is filling up our free space very quickly every day.
 

digitalpoint

Well-known member
Not sure what you mean... There is no way it could be doing anything (including caching to disk) if it's not installed.
 

cjwinternet

Active member
The default caching is doing that, and I don't want it to. That's why I asked whether this software cached to disk.

Do you talk to everyone like they're stupid?
 

digitalpoint

Well-known member
The default caching is doing that, and I don't want it to. That's why I asked whether this software cached to disk.
If you have a cache defined/enabled in XenForo's config file, it will use that cache (whatever mechanism you set there). For example if you define a back with a "File" backend there... yes... it will cache stuff to disk. If you do not have a cache enabled/defined there, then no... it will not cache anything.

More info on defining a XF cache (or checking if you are using one) here: https://xenforo.com/help/cache/

Do you talk to everyone like they're stupid?
No.
 
Top