Unable to login

NC20 (yes. I know it’s old! I’m working on it)

Unable to login. When I press the “Log In” button, it loads for a little while, then goes right back to the login screen. It does not say wrong login/password.

contents of nextcloud log:

{"reqId":"ZWR4dwd7sw3TBS8XHljDWwAAAAE","level":0,"time":"2023-11-27T03:07:36-08:00","remoteAddr":"50.92.250.112","user":"--","app":"files_sharing","method":"POST","url":"/cloud/index.php/login","message":"/appinfo/app.php is deprecated, use \\OCP\\AppFramework\\Bootstrap\\IBootstrap on the application class instead.","userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko/20100101 Firefox/119.0","version":"20.0.5.2"}
{"reqId":"ZWR4dwd7sw3TBS8XHljDWwAAAAE","level":0,"time":"2023-11-27T03:07:36-08:00","remoteAddr":"50.92.250.112","user":"--","app":"gpxedit","method":"POST","url":"/cloud/index.php/login","message":"/appinfo/app.php is deprecated, use \\OCP\\AppFramework\\Bootstrap\\IBootstrap on the application class instead.","userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko/20100101 Firefox/119.0","version":"20.0.5.2"}
{"reqId":"ZWR4dwd7sw3TBS8XHljDWwAAAAE","level":0,"time":"2023-11-27T03:07:36-08:00","remoteAddr":"50.92.250.112","user":"--","app":"metadata","method":"POST","url":"/cloud/index.php/login","message":"/appinfo/app.php is deprecated, use \\OCP\\AppFramework\\Bootstrap\\IBootstrap on the application class instead.","userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko/20100101 Firefox/119.0","version":"20.0.5.2"}
{"reqId":"ZWR4eAd7sw3TBS8XHljDXAAAAAE","level":0,"time":"2023-11-27T03:07:37-08:00","remoteAddr":"50.92.250.112","user":"--","app":"files_sharing","method":"GET","url":"/cloud/apps/dashboard/","message":"/appinfo/app.php is deprecated, use \\OCP\\AppFramework\\Bootstrap\\IBootstrap on the application class instead.","userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko/20100101 Firefox/119.0","version":"20.0.5.2"}
{"reqId":"ZWR4eAd7sw3TBS8XHljDXAAAAAE","level":0,"time":"2023-11-27T03:07:37-08:00","remoteAddr":"50.92.250.112","user":"--","app":"gpxedit","method":"GET","url":"/cloud/apps/dashboard/","message":"/appinfo/app.php is deprecated, use \\OCP\\AppFramework\\Bootstrap\\IBootstrap on the application class instead.","userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko/20100101 Firefox/119.0","version":"20.0.5.2"}
{"reqId":"ZWR4eAd7sw3TBS8XHljDXAAAAAE","level":0,"time":"2023-11-27T03:07:37-08:00","remoteAddr":"50.92.250.112","user":"--","app":"metadata","method":"GET","url":"/cloud/apps/dashboard/","message":"/appinfo/app.php is deprecated, use \\OCP\\AppFramework\\Bootstrap\\IBootstrap on the application class instead.","userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko/20100101 Firefox/119.0","version":"20.0.5.2"}
{"reqId":"ZWR4eAd7sw3TBS8XHljDXAAAAAE","level":0,"time":"2023-11-27T03:07:37-08:00","remoteAddr":"50.92.250.112","user":"--","app":"core","method":"GET","url":"/cloud/apps/dashboard/","message":{"Exception":"OC\\AppFramework\\Middleware\\Security\\Exceptions\\NotLoggedInException","Message":"Current user is not logged in","Code":401,"Trace":[{"file":"/home/mountain/public_html/cloud/lib/private/AppFramework/Middleware/MiddlewareDispatcher.php","line":98,"function":"beforeController","class":"OC\\AppFramework\\Middleware\\Security\\SecurityMiddleware","type":"->","args":[{"__class__":"OCA\\Dashboard\\Controller\\DashboardController"},"index"]},{"file":"/home/mountain/public_html/cloud/lib/private/AppFramework/Http/Dispatcher.php","line":98,"function":"beforeController","class":"OC\\AppFramework\\Middleware\\MiddlewareDispatcher","type":"->","args":[{"__class__":"OCA\\Dashboard\\Controller\\DashboardController"},"index"]},{"file":"/home/mountain/public_html/cloud/lib/private/AppFramework/App.php","line":152,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OCA\\Dashboard\\Controller\\DashboardController"},"index"]},{"file":"/home/mountain/public_html/cloud/lib/private/Route/Router.php","line":309,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OCA\\Dashboard\\Controller\\DashboardController","index",{"__class__":"OC\\AppFramework\\DependencyInjection\\DIContainer"},{"_route":"dashboard.dashboard.index"}]},{"file":"/home/mountain/public_html/cloud/lib/base.php","line":1008,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/apps/dashboard/"]},{"file":"/home/mountain/public_html/cloud/index.php","line":37,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/home/mountain/public_html/cloud/lib/private/AppFramework/Middleware/Security/SecurityMiddleware.php","Line":143,"CustomMessage":"--"},"userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko/20100101 Firefox/119.0","version":"20.0.5.2"}
{"reqId":"ZWR4eQd7sw3TBS8XHljDXQAAAAE","level":0,"time":"2023-11-27T03:07:37-08:00","remoteAddr":"50.92.250.112","user":"--","app":"files_sharing","method":"GET","url":"/cloud/index.php/login?redirect_url=/cloud/apps/dashboard/","message":"/appinfo/app.php is deprecated, use \\OCP\\AppFramework\\Bootstrap\\IBootstrap on the application class instead.","userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko/20100101 Firefox/119.0","version":"20.0.5.2"}
{"reqId":"ZWR4eQd7sw3TBS8XHljDXQAAAAE","level":0,"time":"2023-11-27T03:07:37-08:00","remoteAddr":"50.92.250.112","user":"--","app":"gpxedit","method":"GET","url":"/cloud/index.php/login?redirect_url=/cloud/apps/dashboard/","message":"/appinfo/app.php is deprecated, use \\OCP\\AppFramework\\Bootstrap\\IBootstrap on the application class instead.","userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko/20100101 Firefox/119.0","version":"20.0.5.2"}
{"reqId":"ZWR4eQd7sw3TBS8XHljDXQAAAAE","level":0,"time":"2023-11-27T03:07:37-08:00","remoteAddr":"50.92.250.112","user":"--","app":"metadata","method":"GET","url":"/cloud/index.php/login?redirect_url=/cloud/apps/dashboard/","message":"/appinfo/app.php is deprecated, use \\OCP\\AppFramework\\Bootstrap\\IBootstrap on the application class instead.","userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko/20100101 Firefox/119.0","version":"20.0.5.2"}
{"reqId":"ZWR4ewd7sw3TBS8XHljDXgAAAAE","level":0,"time":"2023-11-27T03:07:40-08:00","remoteAddr":"50.92.250.112","user":"--","app":"files_sharing","method":"GET","url":"/cloud/index.php/core/js/oc.js?v=1903dc29","message":"/appinfo/app.php is deprecated, use \\OCP\\AppFramework\\Bootstrap\\IBootstrap on the application class instead.","userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko/20100101 Firefox/119.0","version":"20.0.5.2"}
{"reqId":"ZWR4ewd7sw3TBS8XHljDXgAAAAE","level":0,"time":"2023-11-27T03:07:40-08:00","remoteAddr":"50.92.250.112","user":"--","app":"gpxedit","method":"GET","url":"/cloud/index.php/core/js/oc.js?v=1903dc29","message":"/appinfo/app.php is deprecated, use \\OCP\\AppFramework\\Bootstrap\\IBootstrap on the application class instead.","userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko/20100101 Firefox/119.0","version":"20.0.5.2"}
{"reqId":"ZWR4ewd7sw3TBS8XHljDXgAAAAE","level":0,"time":"2023-11-27T03:07:40-08:00","remoteAddr":"50.92.250.112","user":"--","app":"metadata","method":"GET","url":"/cloud/index.php/core/js/oc.js?v=1903dc29","message":"/appinfo/app.php is deprecated, use \\OCP\\AppFramework\\Bootstrap\\IBootstrap on the application class instead.","userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko/20100101 Firefox/119.0","version":"20.0.5.2"}
{"reqId":"ZWR4e4lRonsJm0AxK3BUIAAAAAY","level":0,"time":"2023-11-27T03:07:40-08:00","remoteAddr":"50.92.250.112","user":"--","app":"files_sharing","method":"GET","url":"/cloud/index.php/apps/theming/styles?v=2","message":"/appinfo/app.php is deprecated, use \\OCP\\AppFramework\\Bootstrap\\IBootstrap on the application class instead.","userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko/20100101 Firefox/119.0","version":"20.0.5.2"}
{"reqId":"ZWR4e4lRonsJm0AxK3BUIAAAAAY","level":0,"time":"2023-11-27T03:07:40-08:00","remoteAddr":"50.92.250.112","user":"--","app":"gpxedit","method":"GET","url":"/cloud/index.php/apps/theming/styles?v=2","message":"/appinfo/app.php is deprecated, use \\OCP\\AppFramework\\Bootstrap\\IBootstrap on the application class instead.","userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko/20100101 Firefox/119.0","version":"20.0.5.2"}
{"reqId":"ZWR4e4lRonsJm0AxK3BUIAAAAAY","level":0,"time":"2023-11-27T03:07:40-08:00","remoteAddr":"50.92.250.112","user":"--","app":"metadata","method":"GET","url":"/cloud/index.php/apps/theming/styles?v=2","message":"/appinfo/app.php is deprecated, use \\OCP\\AppFramework\\Bootstrap\\IBootstrap on the application class instead.","userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko/20100101 Firefox/119.0","version":"20.0.5.2"}
{"reqId":"ZWR4e4lRonsJm0AxK3BUIAAAAAY","level":0,"time":"2023-11-27T03:07:40-08:00","remoteAddr":"50.92.250.112","user":"--","app":"scss_cacher","method":"GET","url":"/cloud/index.php/apps/theming/styles?v=2","message":"SCSSCacher::process ordinary check follows","userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko/20100101 Firefox/119.0","version":"20.0.5.2"}
{"reqId":"ZWR4e4lRonsJm0AxK3BUIAAAAAY","level":0,"time":"2023-11-27T03:07:40-08:00","remoteAddr":"50.92.250.112","user":"--","app":"scss_cacher","method":"GET","url":"/cloud/index.php/apps/theming/styles?v=2","message":"SCSSCacher::isCached 39b9-50e3-theming.css isCachedCache is expired or unset","userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko/20100101 Firefox/119.0","version":"20.0.5.2"}
{"reqId":"ZWR4e4lRonsJm0AxK3BUIAAAAAY","level":0,"time":"2023-11-27T03:07:40-08:00","remoteAddr":"50.92.250.112","user":"--","app":"scss_cacher","method":"GET","url":"/cloud/index.php/apps/theming/styles?v=2","message":"SCSSCacher::isCached 39b9-50e3-theming.css dependencies successfully cached for 5 minutes","userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko/20100101 Firefox/119.0","version":"20.0.5.2"}
{"reqId":"ZWR4fQd7sw3TBS8XHljDYAAAAAE","level":0,"time":"2023-11-27T03:07:41-08:00","remoteAddr":"50.92.250.112","user":"--","app":"files_sharing","method":"GET","url":"/cloud/index.php/apps/theming/icon?v=2","message":"/appinfo/app.php is deprecated, use \\OCP\\AppFramework\\Bootstrap\\IBootstrap on the application class instead.","userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko/20100101 Firefox/119.0","version":"20.0.5.2"}
{"reqId":"ZWR4fYlRonsJm0AxK3BUIQAAAAY","level":0,"time":"2023-11-27T03:07:41-08:00","remoteAddr":"50.92.250.112","user":"--","app":"files_sharing","method":"GET","url":"/cloud/index.php/apps/theming/favicon?v=2","message":"/appinfo/app.php is deprecated, use \\OCP\\AppFramework\\Bootstrap\\IBootstrap on the application class instead.","userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko/20100101 Firefox/119.0","version":"20.0.5.2"}
{"reqId":"ZWR4fQd7sw3TBS8XHljDYAAAAAE","level":0,"time":"2023-11-27T03:07:41-08:00","remoteAddr":"50.92.250.112","user":"--","app":"gpxedit","method":"GET","url":"/cloud/index.php/apps/theming/icon?v=2","message":"/appinfo/app.php is deprecated, use \\OCP\\AppFramework\\Bootstrap\\IBootstrap on the application class instead.","userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko/20100101 Firefox/119.0","version":"20.0.5.2"}
{"reqId":"ZWR4fQd7sw3TBS8XHljDYAAAAAE","level":0,"time":"2023-11-27T03:07:41-08:00","remoteAddr":"50.92.250.112","user":"--","app":"metadata","method":"GET","url":"/cloud/index.php/apps/theming/icon?v=2","message":"/appinfo/app.php is deprecated, use \\OCP\\AppFramework\\Bootstrap\\IBootstrap on the application class instead.","userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko/20100101 Firefox/119.0","version":"20.0.5.2"}
{"reqId":"ZWR4fYlRonsJm0AxK3BUIQAAAAY","level":0,"time":"2023-11-27T03:07:42-08:00","remoteAddr":"50.92.250.112","user":"--","app":"gpxedit","method":"GET","url":"/cloud/index.php/apps/theming/favicon?v=2","message":"/appinfo/app.php is deprecated, use \\OCP\\AppFramework\\Bootstrap\\IBootstrap on the application class instead.","userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko/20100101 Firefox/119.0","version":"20.0.5.2"}
{"reqId":"ZWR4fYlRonsJm0AxK3BUIQAAAAY","level":0,"time":"2023-11-27T03:07:42-08:00","remoteAddr":"50.92.250.112","user":"--","app":"metadata","method":"GET","url":"/cloud/index.php/apps/theming/favicon?v=2","message":"/appinfo/app.php is deprecated, use \\OCP\\AppFramework\\Bootstrap\\IBootstrap on the application class instead.","userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko/20100101 Firefox/119.0","version":"20.0.5.2"}

Can you post your config.php or parts of it? Do you use caching? Can you disable it? Have you changed something? Maybe you can read this thread.

Please export all data, install the newest Nextcloud, restore all data, use occ files:scan --all and use the new Nextcloud. But all shares, … are lost. Or upgrade all versions from 20 to 27.

For the first way you not need access to your Nextcloud. You can copy all files from file system.


$CONFIG = array (
  'instanceid' => 'oc20leygohzu',
  'passwordsalt' => 'O6BvYGrSlvaxR8vpp7k+fxm8B4hY0j',
  'secret' => '4EKKCrqQ09DONXCmKCf6i00aNf3iRY+ta9SQdbPUJ1xsCNMl',
  'trusted_domains' => 
  array (
    0 => 'server ip',
    1 => 'domain name',
  ),
  'logtimezone' => 'America/Vancouver',
  'datadirectory' => '/home/mountain/public_html/cloud/data',
  'overwrite.cli.url' => 'https://mydomain.ca/cloud',
  'dbtype' => 'mysql',
  'version' => '20.0.5.2',
  'dbname' => '...',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'dbuser' => '...',
  'dbpassword' => '...',
  'installed' => true,
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'maintenance' => false,
  'theme' => '',
  'loglevel' => 0,
  'mail_from_address' => 'admin',
  'mail_smtpmode' => 'smtp',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_domain' => 'my domain',
  'mail_smtphost' => 'my mail server',
  'mail_smtpport' => '465',
  'mail_smtpauth' => 1,
  'mail_smtpsecure' => 'ssl',
  'mail_smtpname' => '...',
  'mail_smtppassword' => '...',
  'app_install_overwrite' => 
  array (
    0 => 'recommendation_assistant',
  ),
);

I think so

how?

just php settings I think. I lost track where it broke.

is there a guide for this anywhere?

would this use my current database so I can pick up where I left off?

what are “shares” exactly?

Thank you.

It probably won’t help. But you could deactivate Memcache. Delete this line:
'memcache.local' => '\\OC\\Memcache\\APCu',

You can also try uninstalling apps that you have installed yourself and do not really need.

occ app

The following line of your logfile

brings me to this post:

So your login prob might have to do with old session data in memcache.
Do you have changed the option in your php.ini that looks like this


session.save_handler = ....

The default setting is


[Session]
; Handler used to store/retrieve data.
; https://php.net/session.save-handler
session.save_handler = files

Have you changed your php.ini?

Also read this post in NC Forum

no luck

There are no apps I don’t need.
It’s kind of stupid there’s no command to disable them all (but you CAN update all for some reason) I would have to disable all 50 of them one by one.

OP states “If i clean my browser cache first login work then not”
Not the case for me. Anyway, OP never posted a solution.

There is no such line in my php.ini

I am using https and have a valid certificate.
Also OP had stuff in his error log, like (prefork.c) is not supported by mod_http2.
Mine is empty.

I’m not sure if it is ok to run php without session.save_handler = …

The php default should be

session.save_handler = files

An older post related to php7.x is this one where the permissions of /var/lib/php are not correct - are they correct in your case?

I added the line, but it didn’t help

I don’t have a /var/lib. This is a shared server.
Maybe there is some way to test sessions caching with another script …

I generated a list of all installed apps (occ app:list)
and I made it into a script to disable all 50 of them (occ app:disable app)
Still no change.

accessibility 1.6.0 disabled
activity 2.13.4 disabled
bookmarks 10.5.1 disabled
calendar 3.0.6 disabled
cloud_federation_api can't be disabled.
comments 1.10.0 disabled
contacts 4.0.8 disabled
dashboard 7.0.0 disabled
contactsinteraction 1.1.0 disabled
dav can't be disabled.
federatedfilesharing can't be disabled.
federation 1.10.1 disabled
files can't be disabled.
files_pdfviewer 2.0.1 disabled
files_rightclick 0.17.0 disabled
files_sharing 1.12.2 disabled
files_trashbin 1.10.1 disabled
files_versions 1.13.0 disabled
files_videoplayer 1.9.0 disabled
firstrunwizard 2.9.0 disabled
gpxedit 0.0.14 disabled
gpxmotion 0.1.0 disabled
gpxpod 4.2.8 disabled
logreader 2.5.0 disabled
lookup_server_connector can't be disabled.
maps 0.2.0 disabled
metadata 0.17.0 disabled
nextcloud_announcements 1.9.0 disabled
notes 4.3.1 disabled
notifications 2.8.0 disabled
oauth2 can't be disabled.
password_policy 1.10.1 disabled
phonetrack 0.7.2 disabled
photos 1.2.3 disabled
privacy 1.4.0 disabled
provisioning_api can't be disabled.
recommendations 0.8.0 disabled
registration 1.3.0 disabled
serverinfo 1.10.0 disabled
settings can't be disabled.
sharebymail 1.10.0 disabled
spreed 10.0.10 disabled
support 1.3.0 disabled
systemtags 1.10.0 disabled
tasks 0.14.4 disabled
text 3.1.0 disabled
theming 1.11.0 disabled
twofactor_backupcodes can't be disabled.
updatenotification 1.10.0 disabled
user_status 1.0.1 disabled
viewer can't be disabled.
weather_status 1.0.0 disabled
workflowengine can't be disabled.
Thu Nov 30 22:55:02 PST 2023
No such app enabled: accessibility
No such app enabled: activity
No such app enabled: bookmarks
No such app enabled: calendar
cloud_federation_api can't be disabled.
No such app enabled: comments
No such app enabled: contacts
No such app enabled: dashboard
No such app enabled: contactsinteraction
dav can't be disabled.
federatedfilesharing can't be disabled.
No such app enabled: federation
files can't be disabled.
No such app enabled: files_pdfviewer
No such app enabled: files_rightclick
No such app enabled: files_sharing
No such app enabled: files_trashbin
No such app enabled: files_versions
No such app enabled: files_videoplayer
No such app enabled: firstrunwizard
No such app enabled: gpxedit
No such app enabled: gpxmotion
No such app enabled: gpxpod
No such app enabled: logreader
lookup_server_connector can't be disabled.
No such app enabled: maps
No such app enabled: metadata
No such app enabled: nextcloud_announcements
No such app enabled: notes
No such app enabled: notifications
oauth2 can't be disabled.
No such app enabled: password_policy
No such app enabled: phonetrack
No such app enabled: photos
No such app enabled: privacy
provisioning_api can't be disabled.
No such app enabled: recommendations
No such app enabled: registration
No such app enabled: serverinfo
settings can't be disabled.
No such app enabled: sharebymail
No such app enabled: spreed
No such app enabled: support
No such app enabled: systemtags
No such app enabled: tasks
No such app enabled: text
No such app enabled: theming
twofactor_backupcodes can't be disabled.
No such app enabled: updatenotification
No such app enabled: user_status
viewer can't be disabled.
No such app enabled: weather_status
workflowengine can't be disabled.

The log is down to just one error now when I try to login

{"reqId":"ZWmgUsybXq0y-r6nzWWLiQAAAAQ","level":0,"time":"2023-12-01T00:58:58-08:00","remoteAddr":"50.92.250.112","user":"--","app":"core","method":"GET","url":"/cloud/index.php/apps/files/","message":{"Exception":"OC\\AppFramework\\Middleware\\Security\\Exceptions\\NotLoggedInException","Message":"Current user is not logged in","Code":401,"Trace":[{"file":"/home/mountain/public_html/cloud/lib/private/AppFramework/Middleware/MiddlewareDispatcher.php","line":98,"function":"beforeController","class":"OC\\AppFramework\\Middleware\\Security\\SecurityMiddleware","type":"->","args":[{"__class__":"OCA\\Files\\Controller\\ViewController"},"index"]},{"file":"/home/mountain/public_html/cloud/lib/private/AppFramework/Http/Dispatcher.php","line":98,"function":"beforeController","class":"OC\\AppFramework\\Middleware\\MiddlewareDispatcher","type":"->","args":[{"__class__":"OCA\\Files\\Controller\\ViewController"},"index"]},{"file":"/home/mountain/public_html/cloud/lib/private/AppFramework/App.php","line":152,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OCA\\Files\\Controller\\ViewController"},"index"]},{"file":"/home/mountain/public_html/cloud/lib/private/Route/Router.php","line":309,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OCA\\Files\\Controller\\ViewController","index",{"__class__":"OC\\AppFramework\\DependencyInjection\\DIContainer"},{"_route":"files.view.index"}]},{"file":"/home/mountain/public_html/cloud/lib/base.php","line":1008,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/apps/files/"]},{"file":"/home/mountain/public_html/cloud/index.php","line":37,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/home/mountain/public_html/cloud/lib/private/AppFramework/Middleware/Security/SecurityMiddleware.php","Line":143,"CustomMessage":"--"},"userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko/20100101 Firefox/119.0","version":"20.0.5.2"}

OK success, finally.

I wanted to test PHP session caching outside of NC to see it was even working.
So, I asked chatgpt to write me a script. It took a few tries , but it eventually came up with one that worked:

<?php
// Start the session
session_start();

// Check if a counter variable is set in the session
if(isset($_SESSION['counter'])) {
  // Increment the counter
  $_SESSION['counter']++;
} else {
  // Set the counter to 1
  $_SESSION['counter'] = 1;
}

// Display the counter value
echo "Counter: " . $_SESSION['counter'];

// End the session
session_write_close();
?>

Sure enough it didn’t work on my NC server, but it did work on another server I have.

PHP Warning:  session_start(): open(/var/cpanel/php/sessions/alt-php74/sess_a4a42fd737d49859ad666af0681b4548, O_RDWR) failed: No such file or directory
PHP Warning:  session_start(): Failed to read session data: files (path: /var/cpanel/php/sessions/alt-php74)

So I changed the session.save_path in my php.ini from whatever my provider had in there, to a directory in my home and now I’m able to login normally.

Thanks to @chrissi55 for the tip off.

1 Like

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.