The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

PHP 4.3.2 & fopen()

Discussion in 'General Discussion' started by ukhost, Jun 9, 2003.

  1. ukhost

    ukhost Well-Known Member

    Joined:
    Jan 8, 2002
    Messages:
    222
    Likes Received:
    0
    Trophy Points:
    16
    Hi,

    Anyone else using php 4.3.2 and seeing odd fopen() problems?

    Some times it works some times it doens't!

    Kind Regards,

    Neil

    cPanel.net Support Ticket Number:
     
  2. carlgm

    carlgm Well-Known Member

    Joined:
    Mar 25, 2003
    Messages:
    103
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    England, UK
    You will see issues with anything that uses the URL, is this the case?

    cPanel.net Support Ticket Number:
     
  3. ukhost

    ukhost Well-Known Member

    Joined:
    Jan 8, 2002
    Messages:
    222
    Likes Received:
    0
    Trophy Points:
    16
    PHP:
    $bbcxmlfilename "http://www.bbc.co.uk/syndication/feeds/news/ukfs_news/uk/rss091.xml";
    $bbc_handle fopen ($bbcxmlfilename"r");
    $bbc_news fread ($bbc_handle1000000);
    fclose ($bbc_handle);
    $tutvxmlfilename "/home/********/public_html/maintenance/bbcnews.xml";
    $tutv_handle fopen($tutvxmlfilename"w+"); 
    fwrite($tutv_handle$bbc_news);
    fclose($tutv_handle);
    Do you mean if I'm doing something like above?

    If so why is this and is there a way round it?

    Kind Regards,

    Neil

    cPanel.net Support Ticket Number:
     
  4. carlgm

    carlgm Well-Known Member

    Joined:
    Mar 25, 2003
    Messages:
    103
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    England, UK
    You will need to modify php to allow URL wrapping.
    For some reason it's disabled.

    cPanel.net Support Ticket Number:
     
  5. tsook

    tsook Well-Known Member

    Joined:
    Mar 21, 2003
    Messages:
    55
    Likes Received:
    0
    Trophy Points:
    6
    I have exactly same problem!!!!

    How exactly i modify php to allow URL wrapping???

    cPanel.net Support Ticket Number:
     
  6. Jump

    Jump Active Member

    Joined:
    Mar 29, 2003
    Messages:
    26
    Likes Received:
    0
    Trophy Points:
    1
    It's not fopen it's fread.

    http://bugs.php.net/bug.php?id=24033

    Even though they say it was a bug in 4.3 up, I have been doing it that way since before 4.23. Whatever, if they want it to be a recent bug fix then that's the way it is. You'll have to relearn the fread function.

    cPanel.net Support Ticket Number:
     
  7. Jemshi

    Jemshi Well-Known Member

    Joined:
    Sep 11, 2003
    Messages:
    210
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    India
    Thanks bud !!!!!!!

    I have been wandering in search of a solution for my problem and that link had the exact problem described !.

    Thanks again :)

    cPanel.net Support Ticket Number:
     
Loading...

Share This Page