Blank Screen When Trying to Import

Asked by Rasinio on 2018-11-15

Hey Adam,

My issue is similar to Question #659663, but with a different setup and different error in the error log. I'm trying to import PDFs to band with and XML file but when I try to import anything I get a blank screen.

My OS is Linux Mint 19 ("Cinnamon"). I am successfully able to navigate to localhost/quexf/admin after the correct authentication rights are entered in. The page displays that all configurations have passed. However, like Mr. White (from Question #659663) when I try to import a PDF, I get a blank screen. I've tried the test PDFs and the PDFs we really want to use for banding, etc.

I've tried a different browser, but always received the error, "Error try Firefox"; tried waiting for over an hour on the blank screen in case it was processing; and tried upping some of the configurations in the php.ini file.

My error log states:

Restarting PHP.
[Thu Nov 15 11:41:42.212719 2018] [mpm_prefork:notice] [pid 25713] AH00163: Apache/2.4.29 (Ubuntu) configured -- resuming normal operations
[Thu Nov 15 11:41:42.212875 2018] [core:notice] [pid 25713] AH00094: Command line: '/usr/sbin/apache2'

Trying to import a PDF.
[Thu Nov 15 11:42:26.418312 2018] [php7:error] [pid 25733] [client] PHP Fatal error: Uncaught Error: Call to undefined function imagecreatefromstring() in /var/www/html/quexf/admin/pagetest.php:203\nStack trace:\n#0 {main}\n thrown in /var/www/html/quexf/admin/pagetest.php on line 203, referer: http://localhost/quexf/admin/pagetest.php

I searched in the pagetest.php file and in all of the files at the top of the pagetest.php file:
- functions.xhtml.php
- functions.image.php
- functions.import.php
- functions.barcode.php

...for the imagecreatefromstring function definition, and couldn't find where it should be defined in any of these files. I only found where the function was being utilized, in the pagetest.php file and in the functions.import.php files. I don't code in PHP but the definition of a function seems fairly straightforward [function name_of_function(parameters)].

Other info that may be relevant:
PHP (cli) (built: Aug 19 2018 07:16:54)

Version 9.22

mysql Ver 14.14 Distrib 5.7.23, for Linux (x86_64) using EditLine wrapper

Server version: Apache/2.4.29 (Ubuntu); Server built: 2018-06-07T21:10:10

libphp-adodb/bionic,bionic,now 5.20.9-1 all [installed] (from 'apt list libphp-adodb')

Mozilla Firefox 61.0.1

Where is the imagecreatefromstring function supposed to be defined? Or is its absence a sign of a bigger problem?

Thank you,

Question information

English Edit question
queXF Edit question
No assignee Edit question
Solved by:
Adam Zammit
Last query:
Last reply:
Best Adam Zammit (adamzammit) said : #1

Please make sure you have the "GD" extension of PHP installed. apt install php-gd

Rasinio (rgraves8410) said : #2

Ah! That seems to have done it.

Thank you again,

Rasinio (rgraves8410) said : #3

Thanks Adam Zammit, that solved my question.