CBSubs cachepath global CMS setting error?

8 years 2 weeks ago #163178 by beat
This means that CBSubs does not find any writable temporary folder for using openssl for the encryption to paypal:

- we use sys_get_temp_dir() and tempnam() as recommended in php doc.

But that fails because:

1) sys_get_temp_dir() doesn't return any writable by webserver folder

2) cache is not writable either
3) /tmp is not writable (or acccessible) either on your server.

Thus there is no writable tmp folder in your case, and that triggers that warning.

To fix:
- fix unix server settings
- or make your joomla cache writable
- or switch paypal encryption to off (which is still very safe)
.
We will fix that warning and add an error message which is more clear in the next release, as well as adding joomla's tmp dir to the desperate search for a writable temporary files folder.

Beat - Community Builder Team Member

Before posting on forums: Read FAQ thoroughly -- Help us spend more time coding by helping others in this forum, many thanks :)
CB links: Our membership - CBSubs - Templates - Hosting - Forge - Send me a Private Message (PM) only for private/confidential info
8 years 1 week ago #163230 by dansmith
Hi Beat,

Thanks for your reply.

When testing on my local system, I found that sys_get_temp_dir() is set to C:\WINDOWS\TEMP\. After adding this path to the open_basedir directive in the php.ini file the issue is resolved.

But, I'm not sure if this is a feasible solution with my LIVE site.

My LIVE site is on a shared server, maintained by a hosting provider. On my LIVE site, I've found that sys_get_temp_dir() is set to /tmp. I'm not sure if this is an absolute or relative directory. I'll check with my host to see if they can add that directory to the open_basedir directive, but I'm not to hopeful. I'm not sure if this directive can be changed for my site alone.

In the meantime, are you able to tell me where the 'cache' is? I'm assuming that you mean the subdirectory in the 'joomla' directory. This directory, and all other directories listed in the 'Directory Permissions' screen of System Information of the Joomla back-end are writable.

Thanks again for your help. Hope this issue is resolved soon.

Cheers,

Dan
8 years 1 week ago #163313 by dansmith
Hi There,

I have one more question about this issue.

The second error message in the 'History An Log' area of CBSubs looks like this:

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:/server/chroot_bind/php/php5/usr/local/lib/php/) in /server/3-web/34/39/my.web.site/public/www/joomladir/components/com_comprofiler/plugin/user/plug_cbpaidsubscriptions/processors/paypal/cbpaidsubscriptions.paypal.php on line 276


I'd like to know where it is getting the directory /root from. It's not defined in my Joomla configuration.php, and it's not returned by sys_get_temp_dir().

Cheers,

Dan
8 years 1 week ago #163547 by beat
That last one is wierd! CBSubs is not defining the string /root either. However your hoster seems to be using chroot so maybe it comes from there.

If your hoster's sys_get_temp_dir() returns a folder which absolute /tmp but /tmp is not in the open_basedir then it's clearly a host configuration issue that your hoster should resolve.

Beat - Community Builder Team Member

Before posting on forums: Read FAQ thoroughly -- Help us spend more time coding by helping others in this forum, many thanks :)
CB links: Our membership - CBSubs - Templates - Hosting - Forge - Send me a Private Message (PM) only for private/confidential info
8 years 6 days ago #163911 by dansmith
Hi Beat,

Thanks for your response. Sorry for my delayed reply, but I've been following this issue with my hoster.

I received a reply from them today effectively saying that, in their opinion, CBSubs is not compatible with their server.

They can't change sys_get_temp_dir and don't give anyone access to the /tmp directory. I believe that this is fair enough.

I'd like to look at this issue from another angle - it seems that CBSubs is *working*, as it will communicate with PayPal if the user continues through the process. But the error message that is displayed during the payment process is the real concern. We don't want to see errors of any kind when processing payments.

I get the impression that when looking for a directory to use as the 'tmp' directory, the CBSubs software checks a number of different options (I believe that the CB core software does something like this). Is it possible that this error message is displayed due to the trail-and-error testing of the different 'tmp' directory possibilies?

In your post from last week, you said :

We will fix that warning and add an error message which is more clear in the next release, as well as adding joomla's tmp dir to the desperate search for a writable temporary files folder.


I don't think that I really *got it* the first time I read it. But it sounds like this would resolve the issue. Do you have a time frame for this fix? Would it be something I can install as a patch?

If it would help, I can supply you with details to access my *development* site.

Cheers,

Dan
8 years 6 days ago #164060 by beat
I see 2 options for now:

1) make cache folder writable by webserver process (that's useful for joomla too): ownership and/or writable mode are not set properly.

2) disable encryption of the Paypal webform (which security-wise is not needed really with all other checks that CBSubs performs)

For upcoming CBSubs 1.2, I have added joomla tmp and an additional check to not to try using tmp dir if there is no usable tmp dir.

Beat - Community Builder Team Member

Before posting on forums: Read FAQ thoroughly -- Help us spend more time coding by helping others in this forum, many thanks :)
CB links: Our membership - CBSubs - Templates - Hosting - Forge - Send me a Private Message (PM) only for private/confidential info
Moderators: beatnantkrileon
Time to create page: 0.403 seconds
Facebook Twitter Google LinkedIn