Results 1 to 3 of 3

Thread: Allow Url Fopen

  1. #1
    Join Date
    Feb 2006
    Posts
    1

    Default Allow Url Fopen

    My webhost has set the following:


    "The PHP option allow_url_fopen would normally allow a programmer to open, include or otherwise use a remote file using a URL rather than a local file path. For security reasons, DreamHost has disabled this feature; however, a feature-rich alternative exists in the form of the bundled cURL library."

    "Unfortunately, due to security and performance issues on shared servers, URL access is disabled from PHP system functions such as fopen(), include(), etc. and will not be re-enabled. We have compiled in cURL support as a replacement. It's fairly easy to use and can replace most URL access needs. Please see our guide at:"

    http://wiki.dreamhost.com/index.php/Allow_url_fopen

    http://wiki.dreamhost.com/index.php/CURL


    How do I use these alternatives to define the URLs required for dynamic templates/messages, as discussed in:

    http://www.tectite.com/vbforums/showthread.php?t=591


    <input type="hidden" name="bad_url" value="http://derbybus.connan.org/cgi-bin/fmbadhandler.php" />
    <input type="hidden" name="bad_template" value="/error.php" />
    <input type="hidden" name="good_url" value="http://derbybus.connan.org/cgi-bin/t...es/success.php" />



    Thanks.

  2. #2
    Join Date
    Dec 2003
    Posts
    3,980

    Default Re: Allow Url Fopen

    Hi,

    IMHO, disabling URL opens is an excuse. There's no good reason to do it.

    In fact, if there's another way to open URLs (cURL) then what's the difference?

    Anyway, to your problem....

    Your bad_url and good_url will work find. They are just browser redirects.

    Use of FMBadHandler (make sure you have v1.12) should be OK too, as it uses "fsockopen" to open the return link (unless they've disabled that too ).

    The problem you may have is with templates. But, only if you're using $TEMPLATEURL instead of $TEMPLATEDIR.

    If you are using $TEMPLATEURL, we would need to change the mechanism for opening URLs.

    We probably won't implement cURL because not every server has it.

    But, if fsockopen works, then we can switch all the code to use that mechanism.

    Of course, we can't do that in a hurry. So, you can either use static templates with $TEMPLATEDIR or switch to a more flexible hosting company.
    Russell Robinson - Author of Tectite FormMail and FormMailDecoder
    http://www.tectite.com/

  3. #3
    Join Date
    Dec 2003
    Posts
    3,980

    Default Re: Allow Url Fopen

    Hi,

    I just realized you can probably enable this PHP option yourself....

    In your .htaccess file (for Apache), add this:
    Code:
    php_flag allow_url_fopen on
    If that doesn't work, ask your hosting provider for the correct setting.

    allow_url_fopen should be settable on a per-directory basis.
    Russell Robinson - Author of Tectite FormMail and FormMailDecoder
    http://www.tectite.com/

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Advance Error -no returne URL
    By JohnB in forum FormMail Subscription Support
    Replies: 7
    Last Post: 01-Jan-2005, 10:15 PM
  2. Using formmail from URL bar?
    By Eric Sandres in forum FormMail Subscription Support
    Replies: 1
    Last Post: 05-Nov-2004, 02:52 AM
  3. Now I am stomped! URL for redirect
    By sigurdur in forum FormMail Subscription Support
    Replies: 3
    Last Post: 01-Aug-2004, 12:02 AM
  4. Formmail File Visible In URL Address
    By amazing616 in forum FormMail Subscription Support
    Replies: 5
    Last Post: 03-Jun-2004, 08:13 PM
  5. The requested URL was not found on this server.
    By aussieincanada in forum FormMail Subscription Support
    Replies: 1
    Last Post: 27-May-2004, 07:46 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
  •