Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Nov 2008
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    warning: simplexml_load_file() error...

    First of all, greetings to everyone. Nice to be in yor community.

    Now, I am trying to parse some xml data. And when i try the simplexml_load_file() function i get an error

    Code:
    warning: simplexml_load_file() [function.simplexml-load-file] I/O warning : failed to load external entity
    I have allow_url_fopen = On in my php.ini so I don't get why this error exists... I have tried to open a file stored locally (I am using xampp) and i get the same error. The funny this is that after this error data seem to load correctly...

    Any clues?

  • #2
    Master Coder
    Join Date
    Dec 2007
    Posts
    6,682
    Thanks
    436
    Thanked 890 Times in 879 Posts
    Quote Originally Posted by Haros View Post
    First of all, greetings to everyone. Nice to be in yor community.

    Now, I am trying to parse some xml data. And when i try the simplexml_load_file() function i get an error

    Code:
    warning: simplexml_load_file() [function.simplexml-load-file] I/O warning : failed to load external entity
    I have allow_url_fopen = On in my php.ini so I don't get why this error exists... I have tried to open a file stored locally (I am using xampp) and i get the same error. The funny this is that after this error data seem to load correctly...

    Any clues?
    the loaded file is invalid xml, try to validate before and take a decision for the case is not valid.

    regards

  • #3
    New to the CF scene
    Join Date
    Nov 2008
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks for your reply.

    As it seems I had used the simplexml_load_file function while the simplexml_load_string needed...

  • #4
    Master Coder
    Join Date
    Dec 2007
    Posts
    6,682
    Thanks
    436
    Thanked 890 Times in 879 Posts
    Quote Originally Posted by Haros View Post
    Thanks for your reply.

    As it seems I had used the simplexml_load_file function while the simplexml_load_string needed...
    your error have nothing to do with php. The file contains a invalid xml char. Loading as string will do the same thing.

    failed to load external entity

    regards


  •  

    Posting Permissions

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