Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<pre><code>//Report any errors ini_set ("display_errors", "1"); error_reporting(E_ALL); </code></pre> <p>You reporting errors it it generates an output then image broke.</p> <p>for example</p> <p>mysql_connect(localhost,$user,$password);</p> <p>must be</p> <p>mysql_connect("localhost",$user,$password);</p> <p>Can you run below code for seeing are you getting any output except image</p> <pre><code>&lt;?php //Report any errors ini_set ("display_errors", "1"); error_reporting(E_ALL); $user="root"; $password="pw"; $database="piwigo"; //Adding these two lines breaks the image: mysql_connect(localhost,$user,$password); @mysql_select_db($database) or die( "Unable to select database"); // $current_image = imagecreatefromjpeg("sample.jpg"); // place code for saving the montage image as a file or outputting to the // browser here. // header("Content-type: image/jpeg"); // imagejpeg($current_image); // imagedestroy($current_image); mysql_close(); ?&gt; </code></pre> <p>Possible working code</p> <pre><code>&lt;?php // Don't Report any errors error_reporting(0); $user="root"; $password="pw"; $database="piwigo"; //Adding these two lines breaks the image: mysql_connect("localhost",$user,$password) or die("Unable to connect database"); @mysql_select_db($database) or die("Unable to select database"); $current_image = imagecreatefromjpeg("sample.jpg"); // place code for saving the montage image as a file or outputting to the // browser here. header("Content-type: image/jpeg"); imagejpeg($current_image); imagedestroy($current_image); mysql_close(); ?&gt; </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload