Products Resources Support About Us

PHP 5.4.4 ABEND0C4 when using the fopen("http://...") function call

Using Rocket PHP 5.4.4 Build Date Nov 21 2016 03:23:06 on a z/OS 2.2 system under Apache V9.

The fopen() function can successfully process a local file but experiences an ABEND0C4 when attempting to process a URL (e.g. http://…). The following code is an example:

**$handle = fopen($url,“r”); **
**if($handle) { **
** fclose($handle); **
** echo “

Successful fopen/fclose

”; **
**} **
else **
** echo “

ERROR: Could not fopen file


When this code is executed in a browser a 500 Internal Server Error page is displayed. The following message appears on SYSLOG:


The following messages appear in the Apache HTTP server error log:

AH01215: CEE3204S The system detected a protection exception (System Completion Code=0C4).:
AH01215: From entry point _php_stream_write_mvs at compile unit offset +000000C2 at entry offset +000000C2 at address:
AH01215: 299AD60A.:
End of script output before headers:

Assistance appreciated.


The example code didn’t format too well. Here it is again for clarity:

$url = “”;
$handle = fopen($url,“r”);
if($handle) {
echo “Successful fopen/fclose”;
echo “ERROR: Could not fopen file”;

Note also that the same ABEND0C4 occurs when running the script via PHP CLI.

Thanks for reporting this problem. We are in the midst of testing an entirely new port of PHP 7.0.5. We need to make a judgement call as to whether we will patch v5.4.4 or only to ensure v7.0.5 does not exhibit this behavior. Back to you in a couple of days.

This problem does not manifest in our v7.0.5 port of PHP.

Hi Peter,
RichardW is a colleague of mine. If we could get php 7.0.5 we would be happy to test with our applications to see how it works out.

Cheers, Manfred

Yes, as soon as it is ready!

We are definitely interested in PHP 7. In fact, the latest level, 7.1.2, would be even better! Thanks.