Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

💬 [Question]'functional login' possible on 2.4? #1439

Open
mcbmcb0 opened this issue Jan 30, 2025 · 2 comments
Open

💬 [Question]'functional login' possible on 2.4? #1439

mcbmcb0 opened this issue Jan 30, 2025 · 2 comments
Assignees
Labels
question need advice

Comments

@mcbmcb0
Copy link

mcbmcb0 commented Jan 30, 2025

💬 Question

On debain 12 vps I’m moving from 1.x to 2.4. This time, I have cypht in /usr/local/share/ cypht2 (not /var/www/cypht). I’ve used the ‘functional login’ and embedded cypht in an iframe on the same domain. This worked well on 1.x . But on 2.4 with the functional login section of this: https://github.com/cypht-org/cypht/wiki/API-Login, when I try:

require_once '/usr/local/share/cypht2/modules/api_login/api.php';
cypht_login($user, $pass, $url);

I get:
Fatal error: Cannot redeclare get_special_folders() (previously declared in /usr/local/share/cypht2/modules/core/functions.php:591) in /usr/local/share/cypht2/modules/core/functions.php on line 591
Maybe something is being required again? I have also removed idle_timer from modules, DISABLE_EMPTY_SUPERGLOBALS=true, DISABLE_FINGERPRINT=true as these steps appeared necessary in 1.x for this login.

Without the functional login attempt cypht loads fine to the login screen and works properly when logged in, so permisisons, symlinks env and settings appear good to go.

Any suggestions on what is going wrong here?
Thanks!

@mcbmcb0 mcbmcb0 added the question need advice label Jan 30, 2025
@Baraka24
Copy link
Member

Baraka24 commented Feb 2, 2025

Hello @mcbmcb0,

I tried to reproduce the issue you're encountering, but I wasn't able to replicate it on my side. In my case, the cypht_login function was not being executed in /modules/api_login/api.php, though the inclusion works fine in Cypht 2.x. However, it does work as expected in Cypht 1.x.

Since we’re not seeing the same results, it might be beneficial for us to collaborate further. I’d suggest joining the Cypht Community so we can discuss this issue more thoroughly. Additionally, we could plan a screen share session to troubleshoot and provide more detailed assistance.

@mcbmcb0
Copy link
Author

mcbmcb0 commented Feb 4, 2025

Hi and thanks for having a look at this. Strange you could include /modules/api_login/api.php but not execute the login function, which would then be available - i wonder why? It is at the include (require) stage where I get the fatal error. Fyi I am using db session and settings due to session conflict with other code. I’m wondering if there is some autoloader conflict with other code on my site.

I will try and reinstall everything, crank up the error logging and try again. And join you on gitter with my results.

I’d also be interested if anyone else has managed the functional login with 2.x

Thanks again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question need advice
Projects
None yet
Development

No branches or pull requests

2 participants