+ Post New Thread
Results 1 to 13 of 13
Internet Related/Filtering/Firewall Thread, link in a php page sends the .php rather than the .pdf which is linked (ffox on Mac) in Technical; Title pretty much explains it all, issue persists in FireFox 5.0.1 on the Mac OS X (not lion the one ...
  1. #1

    RabbieBurns's Avatar
    Join Date
    Apr 2008
    Location
    Sydney
    Posts
    5,512
    Thank Post
    1,320
    Thanked 469 Times in 306 Posts
    Blog Entries
    6
    Rep Power
    199

    link in a php page sends the .php rather than the .pdf which is linked (ffox on Mac)

    Title pretty much explains it all, issue persists in FireFox 5.0.1 on the Mac OS X (not lion the one before that). Works fine in Safari.

    Is this a client side error, or do i need to get the developers of the website to fix something?

  2. #2

    SimpleSi's Avatar
    Join Date
    Jun 2005
    Location
    Lancashire
    Posts
    5,808
    Thank Post
    1,476
    Thanked 592 Times in 444 Posts
    Rep Power
    168
    Could we see the code/url?
    Si

  3. #3

    RabbieBurns's Avatar
    Join Date
    Apr 2008
    Location
    Sydney
    Posts
    5,512
    Thank Post
    1,320
    Thanked 469 Times in 306 Posts
    Blog Entries
    6
    Rep Power
    199
    its an internal site developed for us by a third party, but a link that is failling on FF on MAC looks like this:

    Code:
    </li><li><a href="/lib/utils/secure_image.php?file=/5/58/Yr_7_Visual_Arts_Assessment_Schedule.pdf" class="internal" title="Yr 7 Visual Arts Assessment Schedule.pdf" target="_blank">Yr 7 Visual Arts Assessment Schedule</a>
    
    </li></ul>
    not sure if thats any use?

  4. #4

    CESIL's Avatar
    Join Date
    Nov 2006
    Location
    Hampshire
    Posts
    1,403
    Thank Post
    109
    Thanked 267 Times in 198 Posts
    Rep Power
    168
    the php page you are calling could use the header command to redirect the user to the pdf file

    Code:
     header("location: http://[rest of path here]/5/58/Yr_7_Visual_Arts_Assessment_Schedule.pdf")
    I think that syntax is right...

  5. #5

    CESIL's Avatar
    Join Date
    Nov 2006
    Location
    Hampshire
    Posts
    1,403
    Thank Post
    109
    Thanked 267 Times in 198 Posts
    Rep Power
    168
    I should have explained a bit more...

    in secure_image.php...

    use $_GET to insert the file name into the header command...

    this method is no good if the secure page writes output...in that case pass the filename onto a loader page that uses the location function.
    Last edited by CESIL; 29th July 2011 at 10:33 AM.

  6. #6

    RabbieBurns's Avatar
    Join Date
    Apr 2008
    Location
    Sydney
    Posts
    5,512
    Thank Post
    1,320
    Thanked 469 Times in 306 Posts
    Blog Entries
    6
    Rep Power
    199
    This is site developed and maintained by a 3rd party for us.

    Are there errors in that code we need to get them to fix?

  7. #7

    CESIL's Avatar
    Join Date
    Nov 2006
    Location
    Hampshire
    Posts
    1,403
    Thank Post
    109
    Thanked 267 Times in 198 Posts
    Rep Power
    168
    What images/files was the secure_image page designed to return?

    I am guessing that the idea is that the link takes a user to a login page (or one that checks credentials) and then returns a file?

    can you post the php code that gets returned by the link you posted?

  8. #8

    Steve21's Avatar
    Join Date
    Feb 2011
    Location
    Swindon
    Posts
    2,689
    Thank Post
    334
    Thanked 515 Times in 483 Posts
    Rep Power
    179
    May sound stupid, but are you sure it's not downloading the pdf, then just redirecting?

    I know firefox on mac never used to be open to "open" pdf files without a plugin, so autodownloaded them to desktop (or w/e it's set). After it was downloaded it'd redirect to the download page, (or again "used to")

    May sound stupid, but worth a check :P

    Steve

  9. #9

    RabbieBurns's Avatar
    Join Date
    Apr 2008
    Location
    Sydney
    Posts
    5,512
    Thank Post
    1,320
    Thanked 469 Times in 306 Posts
    Blog Entries
    6
    Rep Power
    199
    what plugin would I need? Ill have a test when I get back to work on monday dont have anything mac with me here...

    @CESIL its just meant to go to the pdf file, not sure what the secure thing is about unless its checking to see if user is logged on...

    It might be downlaoding the pdf and naming it php i have no idea. Ill investigate more on monday, thanks

  10. #10


    tom_newton's Avatar
    Join Date
    Sep 2006
    Location
    Leeds
    Posts
    4,462
    Thank Post
    866
    Thanked 845 Times in 667 Posts
    Rep Power
    195
    Make sure lib/utils has the right perms set on the web server - a web server will just serve a php file if you don't tell it to interpret it... often /cgi-bin/ is already set up to handle .cgi/.php et al, whereas other directories often aren't. With apache, either stick in a config for that directory, or sometimes you can get away with .htaccess

  11. #11

    Steve21's Avatar
    Join Date
    Feb 2011
    Location
    Swindon
    Posts
    2,689
    Thank Post
    334
    Thanked 515 Times in 483 Posts
    Rep Power
    179
    Quote Originally Posted by tom_newton View Post
    Make sure lib/utils has the right perms set on the web server - a web server will just serve a php file if you don't tell it to interpret it... often /cgi-bin/ is already set up to handle .cgi/.php et al, whereas other directories often aren't. With apache, either stick in a config for that directory, or sometimes you can get away with .htaccess
    Surely it's already set though, as it's working in safari to quote Rabbie.

    And rabbie, about the plugins there's a lot of them, but as I mentioned haven't used Macs in a while, so the basic firefox(mac) behaviour may have changed, but aye check your download folder, or desktop w/e just to see if it did download the file, when you got a minute :P Just worth checking!

    Steve

  12. Thanks to Steve21 from:

    RabbieBurns (29th July 2011)

  13. #12

    RabbieBurns's Avatar
    Join Date
    Apr 2008
    Location
    Sydney
    Posts
    5,512
    Thank Post
    1,320
    Thanked 469 Times in 306 Posts
    Blog Entries
    6
    Rep Power
    199
    aye works fine with all other browsers on all other OS just ffox on mac thats the problem. Its starting to sound more likely what you have said so will check that first thing monday. Cheers

  14. #13

    CESIL's Avatar
    Join Date
    Nov 2006
    Location
    Hampshire
    Posts
    1,403
    Thank Post
    109
    Thanked 267 Times in 198 Posts
    Rep Power
    168
    note to self...read all the post idiot! I just read the title and then jumped in...

SHARE:
+ Post New Thread

Similar Threads

  1. Link thing that i dont know the name of in Joomla!
    By Little-Miss in forum How do you do....it?
    Replies: 3
    Last Post: 20th February 2011, 11:37 PM
  2. Office 2007 file format support in Apache, PHP and Moodle
    By Geoff in forum Virtual Learning Platforms
    Replies: 2
    Last Post: 8th July 2007, 12:12 AM
  3. Replies: 1
    Last Post: 14th June 2007, 07:50 AM
  4. Dead shortcut link in startup
    By _Bat_ in forum Windows
    Replies: 1
    Last Post: 19th May 2006, 01:08 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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