Jump to content

bandit8

New Members
  • Posts

    8
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

bandit8's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. The permissions are 777 ... that was one of the first things I checked (I had been hoping it would be something that simple!)... so that can't be affecting Flash's ability to read in the image...
  2. p.s. I had a colleague who knows a lot more about linux/vim editing then me play around with it yesterday, and he added my ftp user as part of the apache group...but was baffled by how it still wouldn't let me delete....or what could be causing this problem in general.
  3. Hi thorpe, thanks for your reply. I have a complete control over the server...but will openly admit I know very little about servers, or apache! How would I go about ensuring that the server root is writtable by the apache user? Thanks for any further suggestions you can provide. -b.
  4. Hi, I have a Flash movie that allows a user to upload an image to a server, using a php script. Once uploaded, the file is then loaded into the Flash movie from the server so that it is displayed to he user. I had all of this working totally fine on a shared-hosting server I had been using... but I recently switched over to a dedicated-virtual server, and as soon as I did it stopped working! The progress bar shows that the file is being uploaded, but then 'hangs' at the end, and does nothing. Logging into the server via ftp, I can see that the file was indeed successfully uploaded, however it won't let me delete it off of the server (it says I don't have permission). Looking at the properties of the file on the server, it shows the user and group as 'apache', where as on the old server it showed the user as my ftp login, and allowed me to delete it. I can't figure out why it keeps 'hanging', and why the Flash movie won't load in the file. All of the Flash coding, and PHP settings (i.e. safe_mode, upload_max_filesize, etc.) all match the old server..so I'm stumped. The PHP code Flash ueses to upload the file is: <?php $folderName = $_GET[num]; //create the directory if doesn't exists (should have write permissons) if(!is_dir("pix/$folderName")) mkdir("pix/$folderName", 0755); //move the uploaded file move_uploaded_file($_FILES['Filedata']['tmp_name'], "pix/$folderName/".$_FILES['Filedata']['name']); chmod("pix/$folderName/".$_FILES['Filedata']['name'], 0777); ?> Any suggestions/ideas would be greatly appreciated. If you need clarification of anything, please just let me know. Thanks! -b.
  5. I figured out what the problem was... I had copied a section of the tutorial code straight from the browser..and somehow it must have picked up an invisible character... for as soon as I retyped it all manually, it worked fine. Thanks for all the suggestions and trying to help though! -b.
  6. [quote author=ahmed17 link=topic=107488.msg431361#msg431361 date=1157838712] testing on a live web server off in a separate test folder  may be it will work well and i test code and give me result *gd in localhost give me also error [/quote] I have it on a live server, in a separate folder for testing...
  7. [quote author=ahmed17 link=topic=107488.msg431346#msg431346 date=1157836059] change the following code and it will work well [code]header('Content-type: image/gif');[/code] and [code]imagegif($image);[/code] [/quote] Hi Ahmed, That still gives me the exact same error... its pointing to line 8... I can't see what would be wrong with it..? b.
  8. Hi Everyone, I am trying to get an image verification system working...I have been going through the tutorial at: http://www.php-mysql-tutorial.com/user-authentication/image-verification.php But I keep getting the error: Parse error: parse error, unexpected T_STRING in /homepages/41/d171489552/htdocs/image_verification/test.php on line 8 This is the code I have: ----- <?php session_start(); // generate  5 digit random number $rand = rand(10000, 99999); // create the hash for the random number and put it in the session $_SESSION['image_random_value'] = md5($rand); // create the image $image = imagecreate(60, 30); // use white as the background image $bgColor = imagecolorallocate ($image, 255, 255, 255);  // the text color is black $textColor = imagecolorallocate ($image, 0, 0, 0);  // write the random number imagestring ($image, 5, 5, 8,  $rand, $textColor);       // send several headers to make sure the image is not cached     // taken directly from the PHP Manual      // Date in the past  header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");  // always modified  header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");  // HTTP/1.1  header("Cache-Control: no-store, no-cache, must-revalidate");  header("Cache-Control: post-check=0, pre-check=0", false);  // HTTP/1.0  header("Pragma: no-cache");      // send the content type header so the image is displayed properly header('Content-type: image/jpeg'); // send the image to the browser imagejpeg($image); // destroy the image to free up the memory imagedestroy($image); ?> ---- It's copied right from the tutorial, so I don't get why it would be giving me an error! Any thoughts/suggestions would be greatly appreciated. Thanks b.
×
×
  • 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.