I have downloaded from http://www.modssl.org/contrib and installed
apache-mod_ssl-1.3.6.2.3.10-0.i386.rpm,
apache-mod_ssl-devel-1.3.6.2.3.10-0.i386.rpm and
mod-php3-3.0.7-3.i386.rpm into a RedHat 6.0 Linux distribution.
I use PHP3 as apache module. 

When I run the script below I get the following message:
"The document contained no data. Try again later, or contact the server
administrator."
BTW the file exists, because the commented instruction gets the wanted
result.

--------------- The script ---------------
<?
    .....
    } else {
        $file_size = filesize( $cert_file );
        $fd = fopen( $cert_file, "r" );
        $CAcert = fread( $fd, $file_size );
        Header("Content-Type: application/x-x509-ca-cert");
#       system("cat $cert_file", $RC);
        echo ("$CAcert");
        fclose($fd);
    }
    .....
?>
--------------- End script ---------------

I find this message in the apache error_log: " [Sun Aug  1 09:31:32
1999] [notice] child pid 727 exit signal Segmentation fault (11)".

After several trials I desumed that the line which causes the segfaults
is the one with the "fopen" php3 instruction.
This is very strange because the following script, that I wrote trying
to reproduce the problem works fine:

---------------- The working script -----------------
<?
    $cert_file = "/etc/httpd/conf/httpd.conf";
    $file_size = filesize( $cert_file );
    $fd = fopen( $cert_file, "r" );
    $fileContent = fread( $fd, $file_size );
    Header("Content-Type: text/html");
    echo "<PRE>";
    echo ("$fileContent");
    echo "</PRE>";
    fclose($fd);
?>
--------------- End of working script ---------------

I get similar problems in other php3 scripts with similar fopen
instructions.
I didn't have such problem with the same piece of code on RedHat 5.2 and
previous version of modssl and php3 packages.


Any help will be appreciated, thanks.


-- 
                                                Mario
______________________________________________________________________
Apache Interface to OpenSSL (mod_ssl)                   www.modssl.org
User Support Mailing List                      [EMAIL PROTECTED]
Automated List Manager                            [EMAIL PROTECTED]

Reply via email to