[GH-ISSUE #1439] 💬 [Question]'functional login' possible on 2.4? #656

Closed
opened 2026-02-25 21:35:36 +03:00 by kerem · 3 comments
Owner

Originally created by @mcbmcb0 on GitHub (Jan 30, 2025).
Original GitHub issue: https://github.com/cypht-org/cypht/issues/1439

Originally assigned to: @Baraka24 on GitHub.

💬 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!

Originally created by @mcbmcb0 on GitHub (Jan 30, 2025). Original GitHub issue: https://github.com/cypht-org/cypht/issues/1439 Originally assigned to: @Baraka24 on GitHub. ## 💬 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!
kerem 2026-02-25 21:35:36 +03:00
  • closed this issue
  • added the
    question
    label
Author
Owner

@Baraka24 commented on GitHub (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.

<!-- gh-comment-id:2629563978 --> @Baraka24 commented on GitHub (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](https://gitter.im/cypht-org/community) so we can discuss this issue more thoroughly. Additionally, we could plan a screen share session to troubleshoot and provide more detailed assistance.
Author
Owner

@mcbmcb0 commented on GitHub (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.

<!-- gh-comment-id:2632679099 --> @mcbmcb0 commented on GitHub (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.
Author
Owner

@Baraka24 commented on GitHub (Oct 2, 2025):

Thanks for the update. We'll wait for your results on Gitter. For now, I'll close this issue, but feel free to reopen if the problem persists.

<!-- gh-comment-id:3362093494 --> @Baraka24 commented on GitHub (Oct 2, 2025): Thanks for the update. We'll wait for your results on Gitter. For now, I'll close this issue, but feel free to reopen if the problem persists.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/cypht#656
No description provided.