- Posts: 7
COMMUNITY FORUM
Support requests should ONLY be directed there and require an active subscription plan.
This forum board is to be used for archive purposes and knowledge exchange ONLY.
PHP errors
- Benjamin Aharonov
-
Topic Author
- Offline
- New Member
Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(/cache/imagenes10d233bad6453f71c651ef12637a2b9cjpg) is not within the allowed path(s): (/home/tchncnwe:/usr/lib/php:/usr/local/lib/php:/tmp) in /home/tchncnwe/public_html/mambots/content/plugin_jw_sigpro.php on line 285
Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(/cache/imagenesd81fe0473327ce3921439f1a00058743jpg) is not within the allowed path(s): (/home/tchncnwe:/usr/lib/php:/usr/local/lib/php:/tmp) in /home/tchncnwe/public_html/mambots/content/plugin_jw_sigpro.php on line 285
Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(/cache/imagenes0f1d0d2a902b171860023ef9c02b5a99jpg) is not within the allowed path(s): (/home/tchncnwe:/usr/lib/php:/usr/local/lib/php:/tmp) in /home/tchncnwe/public_html/mambots/content/plugin_jw_sigpro.php on line 285
My url is: www.techno.com.mx
Thanks
Please Log in or Create an account to join the conversation.
- Benjamin Aharonov
-
Topic Author
- Offline
- New Member
- Posts: 7
Thanks anyway
Please Log in or Create an account to join the conversation.
- JoomlaWorks
-
- Offline
- Admin
- Posts: 6227
Please Log in or Create an account to join the conversation.
- mjarntz
-
- Offline
- New Member
- Posts: 6
Thanks,
Mark
Please Log in or Create an account to join the conversation.
- JoomlaWorks
-
- Offline
- Admin
- Posts: 6227
In line 87, change this:
if ($dh = opendir($mosConfig_absolute_path.$rootfolder.$_images_dir_)) {
to this
if ($dh = @opendir($mosConfig_absolute_path.$rootfolder.$_images_dir_)) {
;)
Please Log in or Create an account to join the conversation.
- mjarntz
-
- Offline
- New Member
- Posts: 6
Thanks,
Mark
Please Log in or Create an account to join the conversation.
- JoomlaWorks
-
- Offline
- Admin
- Posts: 6227
Site >> Global Configuration >> (tab) Server >> Error Reporting:
select "System Default" or "none".
That should fix these warnings. And check with your host too on that.
Please Log in or Create an account to join the conversation.
- mjarntz
-
- Offline
- New Member
- Posts: 6
Thanks,
Mark
Please Log in or Create an account to join the conversation.
- JoomlaWorks
-
- Offline
- Admin
- Posts: 6227
Anyway, we hope to address that in 1.3, by making the code more flexible to work on such environments. ;)
Please Log in or Create an account to join the conversation.
- jhooks
-
- Offline
- New Member
- Posts: 3
Damn hosting restrictions! ;D
Anyway, we hope to address that in 1.3, by making the code more flexible to work on such environments. ;)
Just thought I would let you know I had the same problem as the OP turned out the problem was due to a bug in sig_pro. The only effect of having open_basedir enabled is that it showed the bug for what it was.
The diff is as follows:
s15291501:/srv/www/vhosts/staging.scrine.org/httpdocs/mambots/content # diff plugin_jw_sigpro.php plugin_jw_sigpro.php.orig
285,286c285,286
< if (file_exists($mosConfig_absolute_path.$tempfolder.md5($_images_dir_.$name).".".$format) && filemtime ($mosConfig_absolute_path.$tempfolder.md5($_images_dir_.$name).".".$format) + $cache_expire_time * 60 > time()) {
< $html .= $leftcomment.'<img alt="'.$clickopen.'" title="'.$clickopen.'" src="'.$tempfolder.md5($_images_dir_.$name).".".$format.'" />'.$rightcomment;
---
> if (file_exists($tempfolder.md5($_images_dir_.$name).$format) && filemtime ($tempfolder.md5($_images_dir_.$name).$format) + $cache_expire_time * 60 > time()) {
> $html .= $leftcomment.'<img alt="'.$clickopen.'" title="'.$clickopen.'" src="'.$tempfolder.md5($_images_dir_.$name).$format.'" />'.$rightcomment;
As you can see the original file misses out '$mosConfig_absolute_path' this causes it to generate the wrong path which is why it is (otherwise) inexplicably outside of the allowable open_basedir directories. You will also notice that it was missing a "." before the $format. Either of these bugs will prevent the thumbnail check from working and cause the thumbnail to be generated every time.
I know you were joking but I have to say it: Neither open_basedir, nor error reporting are 'damn hosting restrictions'. Open_basedir is very useful, primarily as a security measure - even in a non-shared environment you would never want your web server to have access out of the document root, some temp folder and maybe a libs folder. Open_basedir also has the benefit of picking up some bugs that might not be spotted otherwise :P. Error reporting is clearly beneficial for obvious reasons, though you probably wouldn't want it on a production server.
Please Log in or Create an account to join the conversation.
- jhooks
-
- Offline
- New Member
- Posts: 3
However, this is the thread which I found first from Google and look at the number of views I think this is the post most other people tend to find too. So if anyone wanted independent verification of the bug, see Vinikey's post.
Please Log in or Create an account to join the conversation.
- jhooks
-
- Offline
- New Member
- Posts: 3
"src="'.$tempfolder.md5($_images_dir_.$name).".".$format.'
Should be
"src="'.$mosConfig_live_site.$tempfolder.md5($_images_dir_.$name).".".$format.'
Otherwise if you have Joomla installed in a subdirectory of your document root (configured by editing $mosConfig_live_site and $mosConfig_absolute_path) sigpro will not create the correct links.
Please Log in or Create an account to join the conversation.