Page 1 of 3 123 LastLast
Results 1 to 10 of 23

Thread: Local Files - Firefox

  1. #1
    rlhanson's Avatar
    rlhanson is offline Master Glow Jedi
    Join Date
    Aug 2007
    Location
    Chapman, Kansas
    Posts
    531

    Default Local Files - Firefox

    I have an upload form on my site, which will display either the image or file name on the form submission confirmation.
    It works fine in IE but doesn't display anything when using Firefox. From what I understand, Firefox blocks local files as a security feature.

    Here's my code for grabbing the uploaded file info:

    PHP Code:
    <?
    $s_path 
    "incoming/";
     
    ....
     
    for (
    $i 1$i 4$i++) { //cycle for small images
     
    $result ProcessUploadedFile($itrue);
     if (
    $result !== true) {
      echo 
    '&nbsp;';
     } else {
      echo 
    'Your file was uploaded successfully! You will also receive an e-mail confirmation of your successful file upload status for your records. </br>';
      echo 
    "<br>";
      
    //Grabbing image info from the server
      
    $image $_FILES["s_userfile1"]["name"];?>
    Displaying the file info:
    PHP Code:
    <?php
     
    //if it's an image statement: 
    echo '<img src="';
      echo 
    '/';
      echo 
    $s_path;
      echo 
    $image;
      echo 
    '"><br><br>';
     
    //if it's not an image statement:
    echo "We have received your file: <strong><font color='#FF0000'>";
        echo  
    $image;
      echo 
    "</font></strong><br><br>[<a href='javascript:window.close();'>Close window</a>]";
    ?>
    Does anyone know a workaround or what I am doing wrong in the above code?

    Thanks in advance!
    Thank you,
    Lynne Hanson
    RL Hanson-Online

  2. #2
    jmarcv's Avatar
    jmarcv is offline Cranky Coder
    Join Date
    Jan 2005
    Posts
    354

    Default

    Why not display it from your server since it was uploaded?

  3. #3
    jmarcv's Avatar
    jmarcv is offline Cranky Coder
    Join Date
    Jan 2005
    Posts
    354

    Default

    Wait .... I don't see a local file?
    "incoming" is off your web root? ... and is where ProcessUploadedFile puts it? Did you look at the url in the page source? What does it look like? Does it work copying it into a browser?

  4. #4
    rlhanson's Avatar
    rlhanson is offline Master Glow Jedi
    Join Date
    Aug 2007
    Location
    Chapman, Kansas
    Posts
    531

    Default

    "incoming" is off your web root? ... and is where ProcessUploadedFile puts it? Did you look at the url in the page source? What does it look like? Does it work copying it into a browser?
    Yes - that's why I can't figure out why it won't display in Firefox.
    I'm actually calling the image name from the server, right?

    Here's the page: Art and Graphics File Upload Form :: RL Hanson-Online
    Thank you,
    Lynne Hanson
    RL Hanson-Online

  5. #5
    jmarcv's Avatar
    jmarcv is offline Cranky Coder
    Join Date
    Jan 2005
    Posts
    354

    Default

    in IE I see :


    Your file was uploaded successfully! You will also receive an e-mail confirmation of your successful file upload status for your records.




    In FF I do not see that text at all. Perhaps it was not uploaded successfully?

    Stupid question, but are you verifying the image is there? Looking in your error log?

  6. #6
    jmarcv's Avatar
    jmarcv is offline Cranky Coder
    Join Date
    Jan 2005
    Posts
    354

    Default

    You should take my suggestions [G]

    http://www.rlhanson-online.com//incoming/dali-lahma.jpg

    Forbidden

    You don't have permission to access //incoming/dali-lahma.jpg on this server.


    Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request. Apache/1.3.39 Server at Affordable Website Packages, Website Hosting, Full-Color Business Cards, Raised Ink Business Cards: RL Hanson-Online Port 80

  7. #7
    rlhanson's Avatar
    rlhanson is offline Master Glow Jedi
    Join Date
    Aug 2007
    Location
    Chapman, Kansas
    Posts
    531

    Default

    You should take my suggestions [G]
    I don't know how! lol That's why I'm asking.


    It is on the server.
    Thank you,
    Lynne Hanson
    RL Hanson-Online

  8. #8
    Matt's Avatar
    Matt is offline GlowHost Administrator
    Join Date
    Jan 2005
    Location
    Behind your monitor
    Posts
    5,350

    Default

    Does your script give it the correct permissions after upload? Whats the error log say in cPanel when you call that file?
    Send your friends and site visitors to GlowHost and get $125 plus bonus!
    GlowHost Affiliate Program | Read our Blog | GlowHost's Facebook | Follow us on Twitter | GlowHost on Google+

  9. #9
    rlhanson's Avatar
    rlhanson is offline Master Glow Jedi
    Join Date
    Aug 2007
    Location
    Chapman, Kansas
    Posts
    531

    Default

    Where is the error log?
    Thank you,
    Lynne Hanson
    RL Hanson-Online

  10. #10
    Matt's Avatar
    Matt is offline GlowHost Administrator
    Join Date
    Jan 2005
    Location
    Behind your monitor
    Posts
    5,350

    Default

    Its that big shiney button that says "error log"
    Send your friends and site visitors to GlowHost and get $125 plus bonus!
    GlowHost Affiliate Program | Read our Blog | GlowHost's Facebook | Follow us on Twitter | GlowHost on Google+

Page 1 of 3 123 LastLast

Similar Threads

  1. Can't delete files -- re-install prevented
    By JohnMorris in forum General Support
    Replies: 1
    Last Post: 04-30-2008, 10:54 PM
  2. extension_dir does not exists /usr/local/bin/php
    By trondsbr in forum General Support
    Replies: 3
    Last Post: 03-20-2008, 02:09 PM
  3. Can't delete files in cPanel and I am over quota
    By Matt in forum Knowledge Base
    Replies: 2
    Last Post: 06-15-2006, 11:51 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16