http2pic icon indicating copy to clipboard operation
http2pic copied to clipboard

Not working under docker on Alpine

Open vijayrajah opened this issue 9 years ago • 1 comments

I;m trying to get this working on Docker bsed on Alpine linux. I have installed php 5.6.27

I have the following php modules installed

# php -m
[PHP Modules]
Core
curl
date
ereg
fileinfo
filter
hash
libxml
mbstring
mysqlnd
pcre
readline
Reflection
session
SimpleXML
SPL
standard
tokenizer
xmlwriter

I'm able to access the landing/home pace of the app

While tyting to access the api (api.php?url=) I get 500 Error.. I get the following in apache log

[Sun Nov 13 19:37:58.622063 2016] [:error] [pid 21] [client 10.0.0.6:49528] PHP Notice:  Use of undefined constant DEBUG - assumed 'DEBUG' in /http2pic/http2pic.class.php on line 20
[Sun Nov 13 19:37:58.622095 2016] [:error] [pid 21] [client 10.0.0.6:49528] PHP Notice:  Use of undefined constant MAXTIMEOUT - assumed 'MAXTIMEOUT' in /http2pic/http2pic.class.php on line 22
[Sun Nov 13 19:37:58.622102 2016] [:error] [pid 21] [client 10.0.0.6:49528] PHP Notice:  Use of undefined constant ONFAILIMAGE - assumed 'ONFAILIMAGE' in /http2pic/http2pic.class.php on line 23
[Sun Nov 13 19:37:58.622111 2016] [:error] [pid 21] [client 10.0.0.6:49528] PHP Notice:  Use of undefined constant ONDOMAINFAILIMAGE - assumed 'ONDOMAINFAILIMAGE' in /http2pic/http2pic.class.php on line 24
[Sun Nov 13 19:37:58.622117 2016] [:error] [pid 21] [client 10.0.0.6:49528] PHP Notice:  Use of undefined constant RENDERINGENGINE - assumed 'RENDERINGENGINE' in /http2pic/http2pic.class.php on line 27
[Sun Nov 13 19:37:58.622124 2016] [:error] [pid 21] [client 10.0.0.6:49528] PHP Notice:  Use of undefined constant WKHTMLTOIMAGEPATH - assumed 'WKHTMLTOIMAGEPATH' in /http2pic/http2pic.class.php on line 30
[Sun Nov 13 19:37:58.622128 2016] [:error] [pid 21] [client 10.0.0.6:49528] PHP Notice:  Use of undefined constant PHANTOMJSPATH - assumed 'PHANTOMJSPATH' in /http2pic/http2pic.class.php on line 33
[Sun Nov 13 19:37:58.622132 2016] [:error] [pid 21] [client 10.0.0.6:49528] PHP Notice:  Use of undefined constant CACHEDIR - assumed 'CACHEDIR' in /http2pic/http2pic.class.php on line 36
[Sun Nov 13 19:37:58.622150 2016] [:error] [pid 21] [client 10.0.0.6:49528] PHP Notice:  Undefined index: type in /http2pic/api.php on line 5
[Sun Nov 13 19:37:58.622155 2016] [:error] [pid 21] [client 10.0.0.6:49528] PHP Notice:  Undefined index: timeout in /http2pic/api.php on line 6
[Sun Nov 13 19:37:58.622158 2016] [:error] [pid 21] [client 10.0.0.6:49528] PHP Notice:  Undefined index: viewport in /http2pic/api.php on line 7
[Sun Nov 13 19:37:58.622161 2016] [:error] [pid 21] [client 10.0.0.6:49528] PHP Notice:  Undefined index: js in /http2pic/api.php on line 8
[Sun Nov 13 19:37:58.622163 2016] [:error] [pid 21] [client 10.0.0.6:49528] PHP Notice:  Undefined index: width in /http2pic/api.php on line 9
[Sun Nov 13 19:37:58.622166 2016] [:error] [pid 21] [client 10.0.0.6:49528] PHP Notice:  Undefined index: cache in /http2pic/api.php on line 10
[Sun Nov 13 19:37:58.622169 2016] [:error] [pid 21] [client 10.0.0.6:49528] PHP Notice:  Undefined index: onfail in /http2pic/api.php on line 11
[Sun Nov 13 19:37:58.622216 2016] [:error] [pid 21] [client 10.0.0.6:49528] PHP Notice:  Undefined index: ondomainfail in /http2pic/http2pic.class.php on line 99
[Sun Nov 13 19:37:58.622240 2016] [:error] [pid 21] [client 10.0.0.6:49528] PHP Notice:  Undefined variable: reachableResult in /http2pic/http2pic.class.php on line 117
[Sun Nov 13 19:37:58.622243 2016] [:error] [pid 21] [client 10.0.0.6:49528] PHP Notice:  Undefined variable: reachableResult in /http2pic/http2pic.class.php on line 121
[Sun Nov 13 19:37:58.622246 2016] [:error] [pid 21] [client 10.0.0.6:49528] PHP Fatal error:  Call to undefined function imagejpeg() in /http2pic/http2pic.class.php on line 126

I cloned the repo using it.

Any ideas as how might be able to fix this?

vijayrajah avatar Nov 13 '16 14:11 vijayrajah

You seem to be missing the php-gd library which can create images and contains the function imagejpeg

geek-at avatar Nov 13 '16 18:11 geek-at