Teifion
Teifion

Reputation: 110969

PHP script ending prematurely

My site has a php page that prints out XML, for some reason though it's being truncated to 8KB in size, I've never encountered this before and all the other pages on the site remain un-truncated.

Where should I start looking for the problem and what could cause it to stop like this?

The site uses the Zend framework and the page in question uses the soap server.

Upvotes: 0

Views: 398

Answers (3)

Gerry
Gerry

Reputation: 11174

Put this before the section where the output cuts off:

error_reporting(E_ALL);
ini_set('display_errors', 1);

Chances are there is just an error that is not being output. Also make sure your code does not contain the error suppression operator (@ symobl) as this is a common cause of hard to detect errors: http://www.php.net/manual/en/language.operators.errorcontrol.php

If my first suggestion fixed your issue then I would suggest that you set up and test error handling correctly so that you will receive all errors in the future as this will save you a lot of time.

Upvotes: 2

Ólafur Waage
Ólafur Waage

Reputation: 69991

It could be some memory limit, it could be some arbitrary part of the script that is running at that part of the XML creation.

Check what errors you are getting, see if any errors are suppressed. And if all else fails, post some example code that is running at that 8KB mark.

Upvotes: 1

Oli
Oli

Reputation: 239810

I'd expect an error if it was memory but have you tried increasing the memory limit in php.ini?

Upvotes: 1

Related Questions