0

Below I check for file existence and its exists.

$path = libraries_get_path('nusoap') . '/nusoap.php';
if(file_exists($path)) {
    print file_get_contents($path);
    die;
}

But when I try to include it I get 500 Internal server error.

$path = libraries_get_path('nusoap') . '/nusoap.php';
if(file_exists($path)) {
    require_once $path;
}

Owner and Group of all files are www-data

EDIT

[Mon Dec 24 12:59:12 2012] [error] [client 2.146.17.144] PHP Fatal error:  Cannot redeclare class XMLSchema in /sites/all/modules/fedora_store/nusoap/nusoap.php on line 2049, referer: http://127.0.0.1/fedora/store/transaction/2/mellat
3
4

When you get fatal web server/PHP error it is very useful to check the logs. Usually Apache logs are placed in /var/log/apache2/error.log but it may differ.

Owner and Group of all files are www-data

I must warn you that www-data should not be an owner for most PHP files. www-data usually needs only read permissions. But it is not directly related to this question.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.