OSSN SocialLogin Error: Call to undefined function ossn_register_system_sdk()
When enabling the SocialLogin component in Open Source Social Network (OSSN), the site may crash with this error:
Call to undefined function ossn_register_system_sdk() in
/components/SocialLogin/ossn_com.php on line 11
This happens because the SocialLogin component and the OSSN core are not compatible with each other.
The SocialLogin component calls the function ossn_register_system_sdk() during initialization. This function is either:
-
Missing because your OSSN core is too old for the SocialLogin version you installed, or
-
Removed because your OSSN core is newer and the SocialLogin component is outdated and still using the deprecated function.
Any of these version mismatches cause a fatal PHP error when components are loaded.
-
Front‑end site shows a fatal error and does not load.
-
PHP error log or on‑screen message contains:
-
Call to undefined function ossn_register_system_sdk()
-
Stack trace referencing:
-
/components/SocialLogin/ossn_com.php
-
OssnComponents->loadComs()
-
libraries/ossn.lib.components.php
-
system/start.php
-
index.php
-
-
Quick Workaround: Restore Site Access
Use this if your priority is to get the site back online, even if SocialLogin is temporarily disabled.
-
Connect via hosting File Manager or FTP.
-
Go to:
/home/user/domains/thedomain.com/public_html/components/. -
Rename the folder:
-
From: SocialLogin
-
To: SocialLogin_disabled
-
-
Reload the website.
The site should now load, but SocialLogin will be disabled until you apply a permanent fix.
Permanent Fix Option 1 (Preferred): Align Component Version
Use this if your OSSN core version is current or you cannot upgrade OSSN.
-
Check your OSSN version from the Admin panel (About section) or via ossn_version() in code.
-
Download a SocialLogin component version that explicitly supports your OSSN version (from OSSN official components or the source where you originally obtained it).
-
On the server, remove or archive the existing components/SocialLogin folder.
-
Install the compatible SocialLogin version via the OSSN Admin → Components → Installer, or by uploading and extracting into components/SocialLogin.
-
Clear any OSSN/component caches if present, then reload the site.
Permanent Fix Option 2: Update OSSN Core
Use this if SocialLogin is newer than your OSSN core (older core missing ossn_register_system_sdk()).
-
Take a full backup of files and database.
-
Download the latest OSSN core from the official OSSN site.
-
Upload and overwrite core directories, typically:
-
/classes
-
/libraries
-
/system
-
/components (preserving and/or backing up custom components)
-
-
Run the OSSN upgrade script in your browser, e.g.:
https://yourdomain.com/upgrade or upgrade.php as documented for your OSSN version. -
Confirm that ossn_register_system_sdk() exists in the updated core and reload the site.
This makes the function available again and removes the error for components that depend on it.
Optional Advanced Fix: Guard or Replace the Function Call
Only use this if you understand PHP and there is no compatible component update available.
-
Ensure the site is accessible (temporarily disable SocialLogin as described above).
-
Rename SocialLogin_disabled back to SocialLogin so you can edit it, but keep admin access open in another session.
-
Edit:
/components/SocialLogin/ossn_com.php. -
Locate the line that calls:
ossn_register_system_sdk('SocialLogin'); (or similar). -
Wrap the call in a function check or comment it out, for example:
if (function_exists('ossn_register_system_sdk')) {
ossn_register_system_sdk('SocialLogin');
}
or temporarily:
// ossn_register_system_sdk('SocialLogin');
-
Save the file, clear any OSSN cache, and reload the site.
Note: This may prevent SDK registration for SocialLogin and can cause login via external providers to fail or behave unexpectedly; it should be treated as a stopgap until versions are properly aligned.
To confirm diagnosis and fix:
-
Open /components/SocialLogin/ossn_com.php and verify that line 11 (or nearby) calls ossn_register_system_sdk().
-
Search the OSSN core for the function definition; if it does not exist, versions are incompatible or core is outdated.
-
After applying one of the permanent fixes, enable SocialLogin, clear caches, and test login via the configured social providers.
