Advertisement:

Author Topic: Integration of SMF script into laravel  (Read 4339 times)

Offline olekhabiter7

  • Newbie
  • *
  • Posts: 1
Integration of SMF script into laravel
« on: September 02, 2020, 10:23:59 AM »
Hello,

i have one question. How or is possible to store data from SMF SSI (api) into Laravel Auth. Is there way to sync that two script or any other way to store data from SMF and use as Auth throw framework website beside forum script.

Thank you.

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 73,189
Re: Integration of SMF script into laravel
« Reply #1 on: September 02, 2020, 11:04:49 AM »
With huge difficulty. SMF is its own framework.

That said, there are integration hooks you can use so that SMF will not look up auth from its own cookies but from the ones from your Laravel app, but you’d have to write that yourself, no ones done it for Laravel AFAIK. (You’d still have to put users into SMF’s tables, that’s a hard requirement)
No good deed goes unpunished
All helpful urges should be circumvented

Offline AndrykVP

  • Newbie
  • *
  • Posts: 1
Re: Integration of SMF script into laravel
« Reply #2 on: November 07, 2020, 06:08:15 PM »
I am also trying to use hooks and the SSI from SMF in Laravel and I'm stumpt. I hope you can help.

I have the SMF forums and Laravel in the same server (local at the time), and when calling for the SSI file with require_once I get a few errors.

Function get_magic_quotes_runtime() is deprecated on SSI.php Line 30
I changed this bit:
Code: [Select]
$ssi_magic_quotes_runtime = function_exists('get_magic_quotes_gpc') && get_magic_quotes_runtime();
To:
Code: [Select]
$ssi_magic_quotes_runtime = true;
But then I get another error

Trying to access array offset on value of type null on Load.php Line 168

It seems like $modSettings variable is null, and I'm not sure what to do next.

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 59,637
  • Gender: Male
    • Kindred-999 on GitHub
Re: Integration of SMF script into laravel
« Reply #3 on: November 08, 2020, 06:32:45 PM »
What version of smf?   And what version of php are you running?
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Offline Oldiesmann

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 24,910
  • Gender: Male
  • Ask me about the function DB :)
    • oldiesmann on Facebook
    • Oldiesmann on GitHub
    • https://www.linkedin.com/in/michaeleshom on LinkedIn
    • @oldiesmann on Twitter
    • Archie Comics Fan Forum
Re: Integration of SMF script into laravel
« Reply #4 on: November 17, 2020, 12:52:14 AM »
The magic quotes stuff is deprecated as of PHP 7.4.0. I don't know if SMF 2.0.17 is officially compatible with 7.4 yet. 2.1 is, though it's still in development.
Michael Eshom
Cincy Space - now open!

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 59,637
  • Gender: Male
    • Kindred-999 on GitHub
Re: Integration of SMF script into laravel
« Reply #5 on: November 17, 2020, 01:00:44 PM »
2.0.17 is NOT compatible with php 7.4
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."