jumborex Posted March 9, 2013 Share Posted March 9, 2013 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. Quote Link to comment Share on other sites More sharing options...
ulferik Posted March 28, 2013 Share Posted March 28, 2013 Don't know the answer, but you have a security vulnerability in line #2. Quote Link to comment Share on other sites More sharing options...
trq Posted March 28, 2013 Share Posted March 28, 2013 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.