OSSN SocialLogin Error

OSSN SocialLogin Error: Call to undefined function ossn_register_system_sdk()

Overview

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.

 

Root Cause

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.

 

Symptoms

  • 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.

  1. Connect via hosting File Manager or FTP.

  2. Go to:
    /home/user/domains/thedomain.com/public_html/components/.

  3. Rename the folder:

    • From: SocialLogin

    • To: SocialLogin_disabled

  4. 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.

  1. Check your OSSN version from the Admin panel (About section) or via ossn_version() in code.

  2. Download a SocialLogin component version that explicitly supports your OSSN version (from OSSN official components or the source where you originally obtained it).

  3. On the server, remove or archive the existing components/SocialLogin folder.

  4. Install the compatible SocialLogin version via the OSSN Admin → Components → Installer, or by uploading and extracting into components/SocialLogin.

  5. 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()).

  1. Take a full backup of files and database.

  2. Download the latest OSSN core from the official OSSN site.

  3. Upload and overwrite core directories, typically:

    • /classes

    • /libraries

    • /system

    • /components (preserving and/or backing up custom components)

  4. Run the OSSN upgrade script in your browser, e.g.:
    https://yourdomain.com/upgrade or upgrade.php as documented for your OSSN version.

  5. 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.

  1. Ensure the site is accessible (temporarily disable SocialLogin as described above).

  2. Rename SocialLogin_disabled back to SocialLogin so you can edit it, but keep admin access open in another session.

  3. Edit:
    /components/SocialLogin/ossn_com.php.

  4. Locate the line that calls:
    ossn_register_system_sdk('SocialLogin'); (or similar).

  5. 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');


  1. 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.

 

Verification Steps

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.



  • 0 کاربر این را مفید یافتند
آیا این پاسخ به شما کمک کرد؟

مقالات مربوطه

Fix PHP Error: Allowed Memory Size of X Bytes Exhausted

If you are getting an error such as "Allowed memory size of... in file...

How to Create a User-friendly URL Using htaccess

If your website is using a long URL such as example.com/files/folder/sitemap.html, you can change...

How to Redirect a Page or Website Using htaccess

If a page on your website no longer exists and you want to redirect it to a new page or website,...

How to Switch off IPv6 in Windows 10

To switch off IPv6 in Windows 10, follow these steps: Open Network Connections:Right-click on...

Domain Registration Error Message

If you attempt a Domain Name registrationand you see an error message similar to "Domains must...