Jump to content

dodgy

New Members
  • Posts

    2
  • Joined

  • Last visited

    Never

Everything posted by dodgy

  1. Make sure that their is no output to the browser in any of your files that gets called before the session_start() function ie. No white spaces before "<?php" or after the "?>" in your files Not even html comments link <!-- comment --> Hope this helps
  2. I have the following problem. I open up an image to edit and ones I finish editing the image I delete the original and what to save the edited image directly to a mysql database, but "imagejpeg()" only gives me the options to save to a file or output to the browser. So I output it to the browser but catch the output as follows // Apparently there is a problem with apache that change the script directory so you have to change it back with the following function function callback ($string) { chdir(dirname($_SERVER['SCRIPT_FILENAME'])); return $string; } ob_start("callback"); imagejpeg($image_resized, NULL, 75); // This string a can save to the insert into my db $image_string = addslashes(ob_get_contents()); $ob_end_clean; The code above works perfectly with WAMP but when i use it in a linux/apache invironment, the code brakes at the ob_start() function but no errors are displayed(Error reporting is on and set to E_ALL) Can any one make a suggestion to what may be the wrong. It seems as if the call back functions doesn't work ie. the script directory is till incorrect!! Thanks
×
×
  • 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.