CBSubs cachepath global CMS setting error?

12 years 11 months ago #161901 by dansmith
Hi There,

This is my first post, so please let me know if this is the wrong area.

While I realise that ultimately this maybe a compatibility issue with Joomla 1.6.3, I'm posing this issue as it may not be.

I'm using:
CBSubs Version 1.1.2
CB Version 1.4
Joomla! Version 1.6.3 (clean install of 1.6.2, patched to 1.6.3)
PHP version 5.2.17
No other extensions installed at this time.

Following errors/warnings appear in the History Log when user clicks the 'Upgrade' button from the 'Subscription' tab of their 'Profile':

Log Entry 1:

paypal openssl: did not find a writable temporary directory (). Please make sure that your cachepath global CMS setting is a writable directory.

Log Entry 2:

WARNING: is_writable() [<a href='function.is-writable'>function.is-writable</a>]: open_basedir restriction in effect. File(/root) is not within the allowed path(s):
(VIRTUAL_DOCUMENT_ROOT:/hosthome/chroot_bind/php/php5/usr/local/lib/php/) in /MY-
PATH/public/www/components/com_comprofiler/plugin/user/plug_cbpaidsubscriptions/processors/pay
pal/cbpaidsubscriptions.paypal.php on line 276

Log Entry 3:

WARNING: tempnam() [<a href='function.tempnam'>function.tempnam</a>]: open_basedir restriction in effect. File() is not within the allowed path(s):
(VIRTUAL_DOCUMENT_ROOT:/hosthome/chroot_bind/php/php5/usr/local/lib/php/) in /MY-
PATH/public/www/components/com_comprofiler/plugin/user/plug_cbpaidsubscriptions/processors/paypal/cbpaidsubscriptions.paypal.php on line 284

Log Entry 4:

WARNING: tempnam() [<a href='function.tempnam'>function.tempnam</a>]: open_basedir restriction in effect. File() is not within the allowed path(s): (VIRTUAL_DOCUMENT_ROOT:/hosthome/chroot_bind/php/php5/usr/local/lib/php/) in /MY-PATH/public/www/components/com_comprofiler/plugin/user/plug_cbpaidsubscriptions/processors/paypal/cbpaidsubscriptions.paypal.php on line 285

Log Entry 5:

WARNING: tempnam() [<a href='function.tempnam'>function.tempnam</a>]: open_basedir restriction in effect. File() is not within the allowed path(s):
(VIRTUAL_DOCUMENT_ROOT:/hosthome/chroot_bind/php/php5/usr/local/lib/php/) in /MY-PATH/public/www/components/com_comprofiler/plugin/user/plug_cbpaidsubscriptions/processors/paypal/cbpaidsubscriptions.paypal.php on line 286

Log Entry 6:

WARNING: fopen() [<a href='function.fopen'>function.fopen</a>]: Filename cannot be empty in /MY-PATH/public/www/components/com_comprofiler/plugin/user/plug_cbpaidsubscriptions/processors/paypal/cbpaidsubscriptions.paypal.php on line 295

Log Entry 7:

paypal openssl open : returns an error creating it.

Log Entry 8:

USER WARNING: openssl encryption failed. in /MY-PATH/public/www/components/com_comprofiler/plugin/user/plug_cbpaidsubscriptions/processors/paypal/cbpaidsubscriptions.paypal.php on line 432

Also, the following is displayed on front-end, followed by the invoice details:

did not find a writable temporary directory (). Please make sure that your cachepath global CMS setting is a writable directory.

returns an error creating it.

Your registration data has now been saved, but your subscription isn't active yet. You need now to pay the subscription:


I suspect that the problem is related to the 'cachepath global CMS' as mentioned in the first log entry, but I can't find any more info on where to find this. Closest item I can find is a forum thread on the Joomla website from 2006 where '$cachepath' as been depreciated.

forum.joomla.org/viewtopic.php?p=438152

But, it might be related to this issue in this forum, but I'm not seeing errors related to realpath():

www.joomlapolis.com/forum/88-usage/118498-paypal-problem#118498

Please let me know if you need any additional details.

Best Regards,

Dan

Please Log in to join the conversation.

12 years 11 months ago #162021 by krileon
The cache path is usually just the tmp or media folders. This is configured in Joomla 1.6 global configuration as parameter "Path to Temp Folder" under "Server". Please check Site > System Information > Directory Permissions to ensure all green. This shouldn't matter if you've the openssl PHP extension installed however. Please also check within CBSubs > Settings to see what messages you are seeing.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

12 years 11 months ago #162102 by dansmith
Replied by dansmith on topic Re: CBSubs cachepath global CMS setting error?
Hi Kyle,

Thank you for your reply.

I've checked the 'Path to Temp Folder' setting in 'Global Configuration' and it looks fine as far as I can see. It is an absolute path to the tmp folder for my web site on my hosts server. I believe that this is correct, as I wouldn't be able to install extensions if it wasn't right.

I've checked the directory permissions list - all green except configuration.php. I don't believe that should cause this issue. Please let me know if I'm wrong.

In CBSubs, I've checked the 'License' tab under 'Settings' - all green with the following messages:
HTTPS POST subsystem status: fsockopen is available with openSSL extension and OpenSSL version: OpenSSL 1.0.0c 2 Dec 2010
Openssl status: Not needed, as OpenSSL PHP module is loaded
OpenSSL Status (See Settings): OpenSSL PHP module is available with openSSL extension and OpenSSL version: OpenSSL 1.0.0c 2 Dec 2010 loaded

License details are all green too.

The actual errors/warnings stored in the when a user begins to process a payment are in my previous message.

Not sure if this is significant, but I installed CB & CBSubs when my Joomla site was at v1.6.2, then applied the v1.6.3 patch to resolve the issue with the 'publish' function in the CB Plugin Manager.

Does this help?

Cheers,

Dan

Please Log in to join the conversation.

12 years 10 months ago - 12 years 10 months ago #162624 by dansmith
Replied by dansmith on topic Re: CBSubs cachepath global CMS setting error?
Hi There,

I've been doing some testing on my PC, and I think I may have found the issue.

I've installed the same versions of Joomla, CB & CBSubs on my local PC, and I can get the 'Pay Now' button to work without generating the 'cachepath' error.

I believe that the issue is related to the open_basedir directive for PHP. On my local, it is turned off by default. When I turn it on (set a path), I get the same errors that I get on my 'live' server. The 'live' server is a shared environment, and the open_basedir directive is not accessible to me.

Also, I found the following on the php.net website that kind of suggests what the actual problem is:

au.php.net/manual/en/function.tempnam.php

User Contributed note by 'koyama' on 31-Aug-2009 12:39

Watch out using a blank $dir as a "trick" to create temporary files in the system temporary directory.

<?php
$tmpfname = tempnam('', 'FOO'); // not good
?>

If an open_basedir restriction is in effect, the trick will not work. You will get a warning message like

Warning: tempnam() [function.tempnam]: open_basedir restriction in effect.
File() is not within the allowed path(s): (/var/www/vhosts/example.com/httpdocs:/tmp)

What works is this:

<?php
$tmpfname = tempnam(sys_get_temp_dir(), 'FOO'); // good
?>


Can you tell me if the above is applicable in the program 'cbpaidsubscriptions.paypal.php' which is generating the error on my site. That is, does the tempnam function not have a specific directory supplied.

I can't check the code that is generating in the error message, as the code is encrypted.

Thanks,

Dan

Please Log in to join the conversation.

12 years 10 months ago #162958 by dansmith
Replied by dansmith on topic Re: CBSubs cachepath global CMS setting error?
Hi there,

I know that it's poor form to push for a response to forum topics like this, but I'm running out of time before my 30 day trail/refund period is over, and I haven't been able to get CBSubs to work on my LIVE server yet, due to the issue mentioned above. I'd really like to use CBSubs, as it appears to do what I need, and it is quite easy to setup & use.

I think we're almost there. I just need an answer to the following questions:

1 - Does the call to the tempnam function in program cbpaidsubscriptions.paypal.php have a blank $dir parameter, as suggested by the note on the php.net website (see my previous reply)?

2 - If this is the case, is it possible to have the call to tempnam function updated as suggested in the note from the php.net website?

3 - Would it be possible to send to me the updated program file to test if this change resolves this issue?


Alternatively, can you suggest what I should ask my server hosting service to do to work with CBSubs? The php open_basedir directive has caused problems for me with other Joomla extensions, as well as Joomla it's self. I don't know if they can or are willing to disable the open_basedir directive, so if I can tell them (after you tell me) in specific terms what needs to be done to resolve this issue it would be a great help. While they have been able to resolve/workaround the other issue, their solutions have not involved changing open_basedir directive.


Cheers,

Dan

Please Log in to join the conversation.

12 years 10 months ago #162962 by dansmith
Replied by dansmith on topic Re: CBSubs cachepath global CMS setting error?
Some additional information...

The following is a list of the CB Plugins, CMS Plugins & Modules that I've installed. They are included in the order they were isntalled.

Install CB plug-ins:
1 - cbplug_CBSubs_MAIN_112-E.zip CBSubs Code Plugin (CB Plugin)
2 - cbplug_int_cbsubscbfield-E.zip CBSubs Fields Intergration Plugin (CB Plugin)
3 - cbplug_int_cbsubsemail-E.zip CBSubs email Intergration Plugin (CB Plugin)

Install Joomla (CMS) Plugins & Modules:
4 - bot_subs_112-E.zip CBSubs Contect Protection Plugin (CMS Plugin)
5 - mod_subs_112-E.zip CBSubs Module (CMS Module)
6 - mod_cb_adminnav-E.zip CBSubs Admin Navigation Module (CMS Module)

I think this is enough to setup a basic 'subscribe for access' type website.

Please let me know if I've missed a plugin or module that might be causing me issues.

Cheers,

Dan

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.280 seconds

Facebook Twitter LinkedIn