Jump to content

Problem using simplexml_load_file()


siu00as

Recommended Posts

Hi,
I've been trying to parse XML files using simpleXML.
I've been using the following code:

$xml_data = simplexml_load_file('feed.xml');
echo $xml_data->product[0]->Advertiser;

This is working perfectly for small XML files. However whenever I try to parse a larger XML file which is 15.6Mb the following error message is returned:
[quote]INTERNAL SERVER ERROR

An internal server error has occured!
Please try again later.[/quote]

Having done some background reading I believe the error could be due to a value in the php.ini file. I have since made a new php.ini file and set the following variables:
[list]
[*]max_execution_time = 10000
[*]max_input_time = 60000
[*]memory_limit = 18M
[*]post_max_size = 18M
[*]upload_max_filesize = 18M
[/list]
This hasn't solved the problem, and I'm now completely stumped! Can anyone help??

Thanks

Thought a [url=http://www.scalextricracing.co.uk/php-info.php]link to my phpinfo()[/url] might help.
Link to comment
https://forums.phpfreaks.com/topic/27588-problem-using-simplexml_load_file/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.