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.

Link to comment
Share on other sites

  • 3 weeks later...

Both examples look exactly the same to me.

 

I'm not sure that the description your giving coincides with the code either.

 

I don't see any usage of fabricjs or the canvas element, nor do I see how that would relate to the php code you have posted.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.