Topic-icon System - JFBCSystem Content - JFBCContent Stop my site working

Active Subscriptions:

None
Andrew has a ticket open with SiteGround right now. A few months ago they installed the HIVE module which requires local php.ini files. There are no more "global" PHP variables. It caused me huge problems and is one of the reasons I left them. Hopefully they will be able to make Magic Quotes OFF a global setting so we don't need the php.ini files.

Will report back and thanks again for your support.
The topic has been locked.
Active Subscriptions:

None
Got it working, Alex. Support removed all php.ini files and then lied about Magic Quotes:

"I am glad to inform you that all php.ini files found under /home/user/opgroeigids.nl were successfully removed.

The Magic Quotes are by default disabled on our shared servers."

That is BS because Joomla was throwing Magic Quote warnings and I was able to personally verify they were ON with an i.php file. SiteGround...

Anyway, all issues seem to be cleared up now with Magic Quotes OFF as a global variable and no more php.ini files.

Thanks so much for helping us debug this!

Maybe Eoin is having a similar issue?
The topic has been locked.
Support Specialist
I'm so happy to hear you got things going, and I appreciate your patience. We are already testing a few lines of code updates to improve our dynamic loading of provider files and widgets. If you (or anyone else reading this) runs into this issue and would prefer to test some code changes to one of our files, just let us know. Those changes will definitely be in 6.1 to prevent this type of issue going forward.

As for SiteGround, we've honestly never used them personally. However, we've heard good things about them from many of our users, met many members of their team at different Joomla days, and even recommend them on our Joomla Partners page . I'm still unsure why we haven't heard of this before, since we've been doing the dynamic loading for almost 4 months now.

Either way, I'm glad we have a temporary resolution for you and a long term one in the works.

If you run into anything else, please let us know. We'll gladly investigate.

Eoin,
Hopefully you've followed this thread. My guess is the issue is the same for you on SiteGround. To summarize the solution(s) I'd recommend either:
a) Deleting the php.ini files from the following directories:
/components/com_jfbconnect/libraries/provider/
/components/com_jfbconnect/libraries/provider/facebook/widget/
/components/com_jfbconnect/libraries/provider/google/widget/
/components/com_jfbconnect/libraries/provider/linkedin/widget/
/components/com_jfbconnect/libraries/provider/pinterest/widget/
/components/com_jfbconnect/libraries/provider/twitter/widget/
/components/com_jfbconnect/libraries/toolbar/
b) Contacting Siteground to let them auto-remove all the php.ini files
c) Let us know if you'd like to make a quick code change to JFBConnect, which should also fix the issue.

Best wishes to all,
Alex
The topic has been locked.
Active Subscriptions:

None
Siteground have said:

I have carefully tested the website. I have completely disabled the firewall for your server but I still see the error which means that the issue is not caused due to blocked connection or similar network issues.

I have then changed the PHP version of yuor website to 5.4. This way I see only the first error:

Fatal error: Call to a member function onAfterInitialise() on a non-object in /home/kepplewr/public_html/plugins/system/jfbcsystem/jfbcsystem.php on line 61

I have also checked the web server's error logs but did not find any errors related to the website at kepplewray.org.uk.

If the plugin developer thinks that this issue is caused by an incorrect PHP configuration please ask him to provide us with the PHP configuration that needs to be used for the plugin to work and we will reconfigure the service. I have created a simple PHP info script so that yuor developer can check the account's PHP configuration at:

evm852.sgvps.net/~kepplewr/i.php
The topic has been locked.
Support Specialist
Eoin,
As noted above, the issue is a conflict between how JFBConnect automatically detects the social networks that are currently supported and Sitegrounds habit of adding an additional php.ini file to every directory. JFBConnect will be tightened up in the next release to better handle additional, unexpected, files in our directories. The suggestions above are still what we'd recommend:

a) Deleting the php.ini files from the following directories:
/components/com_jfbconnect/libraries/provider/
/components/com_jfbconnect/libraries/provider/facebook/widget/
/components/com_jfbconnect/libraries/provider/google/widget/
/components/com_jfbconnect/libraries/provider/linkedin/widget/
/components/com_jfbconnect/libraries/provider/pinterest/widget/
/components/com_jfbconnect/libraries/provider/twitter/widget/
/components/com_jfbconnect/libraries/toolbar/
b) Contacting Siteground to let them auto-remove all the php.ini files
c) Let us know if you'd like to make a quick code change to JFBConnect, which should also fix the issue.

For that 3rd option, if you want to try some code that should work immediately, please edit the /components/com_jfbconnect/libraries/factory.php file. In there, find and replace the functions listed below:
getAllProviders
public static function getAllProviders()
    {
        static $allProviders;
        if (!isset($allProviders))
        {
            $allProviders = array();
            $files = JFolder::files(JPATH_SITE . '/components/com_jfbconnect/libraries/provider/', '\.php$');
            foreach ($files as $file)
            {
                $p = self::provider(str_replace(".php", "", $file));
                if ($p)
                    $allProviders[] = $p;
            }
        }
        return $allProviders;
    }
getAllWidgets
public static function getAllWidgets($provider)
    {
        static $allWidgets;

        if(!$provider || $provider == 'provider')
            return array();

        if (!isset($allWidgets))
            $allWidgets = array();

        if (!isset($allWidgets[$provider]))
        {
            $allWidgets[$provider] = array();

            $widgetFolder = JPATH_SITE . '/components/com_jfbconnect/libraries/provider/' . $provider . '/widget/';
            if(JFolder::exists($widgetFolder))
            {
                $widgetFiles = JFolder::files($widgetFolder, '\.xml$');
                if ($widgetFiles && count($widgetFiles) > 0)
                {
                    foreach ($widgetFiles as $file)
                    {
                        $allWidgets[$provider][] = self::widget($provider, str_replace(".xml", "", $file));
                    }
                }
            }

        }
        return $allWidgets[$provider];
    }

Then, in the /components/com_jfbconnect/libraries/toolbar.php file, around line 21, you'll see:
$files = JFolder::files($path);
Update that to:
$files = JFolder::files($path, '\.php$');

I hope that helps, but if you run into any issues with Siteground or with the code changes above, whichever way you choose to go, let me know, and we'll gladly help further.

Thanks,
Alex
The topic has been locked.
Active Subscriptions:

None
Sorry I posed that but I hadn't spotted the second page.

Thanks everyone for your help and for all posting in the same place :) I'll try these amendments now and see how I go. I have spotted php.ini files all over my site so I concur that this is likely the issue. I also had the errors in Joomla that were shown, although, it is weird because I only had one error, but by changing my PHP.ini I had many. Perhaps it is to do with the H2 cPanel add on that Siteground uses?

I'd rather have it off gloabally as it saves me a bother for every install of a new Joomla! site :)
The topic has been locked.
Active Subscriptions:

None
11 years 11 months ago - 11 years 11 months ago #44760 by uglyeoin
Blimey... I got this now

Notice: Constant _JEXEC already defined in /home/kepplewr/public_html/administrator/index.php on line 9

Notice: Constant DS already defined in /home/kepplewr/public_html/administrator/index.php on line 10

Notice: Constant JPATH_BASE already defined in /home/kepplewr/public_html/administrator/index.php on line 17

Warning: require_once(/home/kepplewr/public_html/includes/helper.php) [function.require-once]: failed to open stream: No such file or directory in /home/kepplewr/public_html/administrator/index.php on line 22

Fatal error: require_once() [function.require]: Failed opening required '/home/kepplewr/public_html/includes/helper.php' (include_path='.:/usr/local/php53/pear') in /home/kepplewr/public_html/administrator/index.php on line 22

Fatal error: Access to undeclared static property: JLoader::$classes in /home/kepplewr/public_html/libraries/loader.php on line 195

I'll try your code update instead lol. The php.ini files keep returning so I need to sort that out :)
Last edit: 11 years 11 months ago by uglyeoin.
The topic has been locked.
Active Subscriptions:

None
I tried the code changes, and I'm fairly sure I would have got them right (fairly...) but alas it's not working. In fact it's got more errors.
Notice: Constant _JEXEC already defined in /home/kepplewr/public_html/administrator/index.php on line 9

Notice: Constant DS already defined in /home/kepplewr/public_html/administrator/index.php on line 10

Notice: Constant JPATH_BASE already defined in /home/kepplewr/public_html/administrator/index.php on line 17

Warning: require_once(/home/kepplewr/public_html/includes/helper.php) [function.require-once]: failed to open stream: No such file or directory in /home/kepplewr/public_html/administrator/index.php on line 22

Fatal error: require_once() [function.require]: Failed opening required '/home/kepplewr/public_html/includes/helper.php' (include_path='.:/usr/local/php53/pear') in /home/kepplewr/public_html/administrator/index.php on line 22

Fatal error: Access to undeclared static property: JLoader::$classes in /home/kepplewr/public_html/libraries/loader.php on line 195

Would you be prepared to log in if I provided you with Super Admin access or FTP or anything?
The topic has been locked.
Support Specialist
Sure. PM me FTP details and super admin credentials and we'll gladly look into it further.

Thanks,
Alex
The topic has been locked.