Jump to content

PHP different results fron different servers!


jumborex

Recommended Posts

Hi, I'm trying to write a small graphic editor and I use HTML5, a JS library called fabricjs ( http://fabricjs.com/demos/ ). I've put the sequence upon 2 different servers: the first one is working perfectly: http://www.coalize.it/accordion.html

On the second server, the last pass, after having written a text, shows the image without ant text on it: apparently the original image.

http://www.messageonabottle.it/monab/accordion.html

Should be noted that on the server the stored image is the one with text on it!

The image is passed to the page in a $_POST, in base64 format, via the previous form. The PHP executed at page loading is the following:

<?php
	unlink("transit/" . $_POST["trans_file"]);
	$filename = explode(".", $_POST["trans_file"]);
	$filesave = $filename[0] . ".png";
	$data = $_POST["base64img_data"];
	$data = explode(";", $data);
	$data = explode(",", $data[1]);
	$imagine=base64_decode(chunk_split($data[1]));
	$handle = fopen("transit/$filesave", "wb");
	fwrite($handle, $imagine);
	fclose($handle);
?>

This code is the same I use passing from the canvas with the image, to the page making the text: the canvas plus image is transformed in PNG, used as a background for the canvas, then the text part is executed.

I cannot really image why the execution is different from the two servers!

Help, please.

  • 3 weeks later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.