PHP Classes

Image creation problem

Recommend this page to a friend!

      PHP QR Code Generator  >  All threads  >  Image creation problem  >  (Un) Subscribe thread alerts  
Subject:Image creation problem
Summary:No image was created
Messages:5
Author:Angelo Cirone
Date:2014-11-04 11:32:12
 

  1. Image creation problem   Reply   Report abuse  
Picture of Angelo Cirone Angelo Cirone - 2014-11-04 11:32:12
I installed the package and opened the page qrcode-test.php, but no image was created and no error appeared.
I use:
- Apache Server Version 2.2.11
- PHP5 Version 5.3.5
- GD Support enabled (version 2.0.34)


  2. Re: Image creation problem   Reply   Report abuse  
Picture of Maik Greubel Maik Greubel - 2014-11-04 14:19:17 - In reply to message 1 from Angelo Cirone
Thank you for reporting. Could you please add the lines

<?php
ini_set('display_errors', 1);
error_reporting(E_ALL);
?>

to the qrcode-test.php at the beginning of the script?

  3. Re: Image creation problem   Reply   Report abuse  
Picture of Angelo Cirone Angelo Cirone - 2014-11-05 16:05:17 - In reply to message 2 from Maik Greubel
I modified the page as you suggested but there was no change.
To test the script I modified the page adding this row at the begin

echo "QR-Code Image Creation...<br><br>";

and this row at the end


echo "Done!";

This is the result:

QR-Code Image Creation...

Done!

I test the script in IE8, IE10, Firefox 32.0.3 and Google Chrome 38.0.2125.111 m

  4. Re: Image creation problem   Reply   Report abuse  
Picture of Maik Greubel Maik Greubel - 2014-11-05 19:05:15 - In reply to message 3 from Angelo Cirone
Hello,

just an idea: has the webserver account the correct rights to create new files in the tests folder, where the test.jpg should be stored according store() method?

In meantime I tested it against a plain PHP 5.3.5 runtime (without Apache) and with Apache 2.2 Win32. Both tests were successful.

I also added to new example scripts, qrcode-form.php and qrcode-display.php which are the same than in demo (here on phpclasses.org). These two scripts don't store the image but send it directly to browser. Could you please test this? In case of it works and a qrcode is displayed, the problem has to be searched on your server configuration (I guess some access rights issue).

Thank you

  5. Re: Image creation problem   Reply   Report abuse  
Picture of Angelo Cirone Angelo Cirone - 2014-11-06 11:28:44 - In reply to message 4 from Maik Greubel
Thank you for the support.
In the folder "tests" I found the file test.jpg created by the script.
The only problem is that it doesn't display the result in the browser.
So I added this row
echo "<img src='test.jpg'>";
to display the image.

Thank you again.