Jump to content
Sign in to follow this  
hollydoll

nice long list of warnings on my site

Recommended Posts

When I click on the paypal payment option on my site it comes up with a long list of warnings incliding this which it starts with

Warning: fopen(/519530-2-data.txt) [function.fopen]: failed to open stream: Permission denied in /home/website/public_html/shop/includes/modules/payment/paypal_standard.php on line 331

 

any suggestions as to whats wrong??

Share this post


Link to post
Share on other sites

When I click on the paypal payment option on my site it comes up with a long list of warnings incliding this which it starts with

Warning: fopen(/519530-2-data.txt) [function.fopen]: failed to open stream: Permission denied in /home/website/public_html/shop/includes/modules/payment/paypal_standard.php on line 331

 

any suggestions as to whats wrong??

okay still not fixed, someone please provide some help?

Share this post


Link to post
Share on other sites

these are the lines that are appearing to be wrong in the warning:

 

$fp = fopen(MODULE_PAYMENT_PAYPAL_STANDARD_EWP_WORKING_DIRECTORY . '/' . $random_string . 'data.txt', 'w');

fwrite($fp, $data);

fclose($fp);

 

unset($data);

 

if (function_exists('openssl_pkcs7_sign') && function_exists('openssl_pkcs7_encrypt')) {

openssl_pkcs7_sign(MODULE_PAYMENT_PAYPAL_STANDARD_EWP_WORKING_DIRECTORY . '/' . $random_string . 'data.txt', MODULE_PAYMENT_PAYPAL_STANDARD_EWP_WORKING_DIRECTORY . '/' . $random_string . 'signed.txt', file_get_contents(MODULE_PAYMENT_PAYPAL_STANDARD_EWP_PUBLIC_KEY), file_get_contents(MODULE_PAYMENT_PAYPAL_STANDARD_EWP_PRIVATE_KEY), array('From' => MODULE_PAYMENT_PAYPAL_STANDARD_ID), PKCS7_BINARY);

 

unlink(MODULE_PAYMENT_PAYPAL_STANDARD_EWP_WORKING_DIRECTORY . '/' . $random_string . 'data.txt');

 

// remove headers from the signature

$signed = file_get_contents(MODULE_PAYMENT_PAYPAL_STANDARD_EWP_WORKING_DIRECTORY . '/' . $random_string . 'signed.txt');

$signed = explode("\n\n", $signed);

$signed = base64_decode($signed[1]);

 

$fp = fopen(MODULE_PAYMENT_PAYPAL_STANDARD_EWP_WORKING_DIRECTORY . '/' . $random_string . 'signed.txt', 'w');

fwrite($fp, $signed);

fclose($fp);

 

unset($signed);

 

openssl_pkcs7_encrypt(MODULE_PAYMENT_PAYPAL_STANDARD_EWP_WORKING_DIRECTORY . '/' . $random_string . 'signed.txt', MODULE_PAYMENT_PAYPAL_STANDARD_EWP_WORKING_DIRECTORY . '/' . $random_string . 'encrypted.txt', file_get_contents(MODULE_PAYMENT_PAYPAL_STANDARD_EWP_PAYPAL_KEY), array('From' => MODULE_PAYMENT_PAYPAL_STANDARD_ID), PKCS7_BINARY);

 

unlink(MODULE_PAYMENT_PAYPAL_STANDARD_EWP_WORKING_DIRECTORY . '/' . $random_string . 'signed.txt');

 

// remove headers from the encrypted result

$data = file_get_contents(MODULE_PAYMENT_PAYPAL_STANDARD_EWP_WORKING_DIRECTORY . '/' . $random_string . 'encrypted.txt');

$data = explode("\n\n", $data);

$data = '-----BEGIN PKCS7-----' . "\n" . $data[1] . "\n" . '-----END PKCS7-----';

 

unlink(MODULE_PAYMENT_PAYPAL_STANDARD_EWP_WORKING_DIRECTORY . '/' . $random_string . 'encrypted.txt');

} else {

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×