...

View Full Version : warning: simplexml_load_file() error...



Haros
11-22-2008, 11:35 PM
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


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?

oesxyl
11-23-2008, 12:24 AM
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


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

Haros
11-23-2008, 09:59 AM
Thanks for your reply.

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

oesxyl
11-23-2008, 03:28 PM
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



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum