Note that there are some explanatory texts on larger screens.

plurals
  1. POPHP imagettfext not displaying working
    text
    copied!<p>I used to use a script to change the text on an image via update form.</p> <p>It worked perfectly at first while I was on a shared host with all modules pre-installed.</p> <p>I moved to a vps where I had to install everything myself and now the script no longer works.</p> <p>The php page is able to be displayed but when I update, the text does not show up like it used to.</p> <p><em>Here is an example of the page on the shared host that still works:</em> <a href="http://nyanpuffle.com/auntarctic/" rel="nofollow">http://nyanpuffle.com/auntarctic/</a> Password is 1234</p> <p><em>Here is an example of the page on the vps that does not work:</em> <a href="http://www.clubpenguincheatsy.com/cptrackers/auntarctic/" rel="nofollow">http://www.clubpenguincheatsy.com/cptrackers/auntarctic/</a> Password is 1234</p> <p>Here is a copy of the coding used:</p> <pre><code>&lt;TITLE&gt;Tracker&lt;/TITLE&gt; &lt;body bgcolor="#4b7bb2"&gt; &lt;font face="arial"&gt; &lt;center&gt; &lt;?php $submit = $_POST['submit']; // Gets If It has been Submitted if($submit){ // If submitted do this. $password = $_POST['password']; // Get the password they submitted $status = $_POST['status']; // Get the status they submitted $server = $_POST['server']; // Get the server they submitted $room = $_POST['room']; // Get the room they submitted //Now We Secure it. if($password == "1234"){ //Now We Generate the image and stuff. $im = imagecreatefrompng("in.png"); // Make RGB Colour For Writing $colour = imagecolorallocate($im, 255, 255, 255); // I want mine in red(This is black). So I am just //Gonna find out the rgb code $font = 'BurbankBigRegular-Bold.ttf'; // //This ^ Is our font, It has to be the exact name and in the right folder. //Draw Text imagettftext($im, 20, 0, 100, 68, $colour, $font, $status); imagettftext($im, 20, 0, 95, 95, $colour, $font, $server); imagettftext($im, 20, 0, 85, 127, $colour, $font, $room); //Create Image imagepng($im,'out.png'); // Destroy - Save Server Resources imagedestroy($im); echo "&lt;b&gt; Updated! &lt;/b&gt;"; }else { echo "&lt;p&gt;&lt;b&gt;Incorrect Password!&lt;/b&gt;&lt;/p&gt;"; } } //This form remebers what they put, so they dont have to keep typing it in. // $_SERVER['PHP_SELF'] Means Get this document to submit to. // If you know html this will be familiar. ?&gt; &lt;form action="&lt;?php echo $_SERVER['PHP_SELF']; ?&gt;" method="POST" /&gt; &lt;p&gt;Password: &lt;input type="password" name="password" id="password" value="&lt;?php echo $_POST['password']; ?&gt;"/&gt;&lt;/p&gt; &lt;p&gt;Status: &lt;select name="status"&gt; &lt;option value=""&gt;Select...&lt;/option&gt; &lt;option value="Online"&gt; Online&lt;/option&gt; &lt;option value="Offline"&gt; Offline&lt;/option&gt; &lt;option value="Tracking..."&gt; Tracking&lt;/option&gt; &lt;/select&gt; &lt;/p&gt; &lt;p&gt;Server: &lt;input type="text" id="server" name="server" value="&lt;?php echo $_POST['server']; ?&gt;"/&gt;&lt;/p&gt; &lt;p&gt;Room: &lt;input type="text" id="room" name="room" value="&lt;?php echo $_POST['room']; ?&gt;"/&gt;&lt;/p&gt; &lt;p&gt;&lt;input type="submit" id="submit" name="submit"/&gt;&lt;/p&gt; &lt;/form&gt; &lt;p&gt;Tracker:&lt;/p&gt; &lt;p&gt;&lt;img src="out.png" alt="Tracker" /&gt;&lt;/P&gt; &lt;a href="http://ClubPenguincheatsy.com/cptrackers"s&gt;Back to Tracker Dashbaord&lt;/a&gt; &lt;/center&gt; </code></pre> <p>The VPS is ran on Ubuntu and I have PHP,MYSQL, and Apache installed.</p>
 

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