0

I am getting an XML file through web service and converting it to array using the built in Cakephp function (_toArray). The xml file is fairly and big and when I assign the array to the template its showing a blank screen. It happens after the loading the page for 30 seconds.

When I print the array in the controller page, its printing the data correctly, but when passing the to template file its timing out (blank screen)

I would like to get suggestions to solve this issue

Renjith
  • 1
  • 1
  • A blank page normally means that your script is throwing an error but you haven't configured PHP to display error messages. That's something you need to fix before you go further; it's impossible to code without the aid of error messages. Here's a [brief explanation](http://stackoverflow.com/a/5680885/13508). – Álvaro González Feb 28 '13 at 16:28
  • Make sure you don't have any extra white spaces after the end ?> on any/all PHP files. (and make a habit of not closing PHP tags on PHP-specific files). – Dave Feb 28 '13 at 18:07

1 Answers1

0

Chances are your script is timing out. You can increase the time limit for this action by calling set_time_limit() in your controller.

You will probably want to look into Caching and the CacheHelper so subsequent views take much less time.

Lawrence Barsanti
  • 31,929
  • 10
  • 46
  • 68
  • I did try the set_time_limit(0) and increased memory_limit in php.ini, but that didn't solve the issue Its working well when the size of xml is small, so I need a solution to parse the xml and display it properly on the template without any errors – Renjith Mar 01 '13 at 04:48