-
- 13 Posts
Hi,
I have just installed Modx and I’m having some problems logging in. All that happens is the login page resets after the correct passwords are entered and ’Login’ is clicked.
Below is the server setup.
Modx Evolution 1.0.4
Server Info
Linux 5.3.2
MySQL version 5.0.91-community
Apache version 2.2.15
PHP version 5.3.2
Browsers:
Firefox 3.6.8
Safari 5.0
**Same problem happens in both.
I have a php.ini containing;
safe_mode = Off
magic_quotes_gpc = off
Any help would be appreciated.
Was this working at some point? Or is this a brand new install?
Sometimes I’ve had to manually reset login permissions in the database after updating...
-
- 13 Posts
It was working straight after the install, but then it stopped working. I started getting session start errors, then I added a php.ini file to turn off safe mode and now I can’t login.
How do you manually reset the login permissions?
-
- 13 Posts
I just tested the session’s with you code and I didn’t get a return value. Just the Page 1 / Page 2 text underneath.
So now I know there’s something wrong with my sessions, how can I fix it?
Bingo. Well... try un-doing what you changed in the php.ini file. Do you have a backup of the php.ini file? Or does your host have a default php.ini file you could use?
-
- 24,544 Posts
-
- 13 Posts
When I first installed Modx there was no php.ini file on my server, then I started getting session start errors so the host added one for me with;
safe_mode = off
Since then I have added a few more lines,
magic_quotes_gpc = off
date.timezone = "Australia/Melbourne"
memory_limit = 128M
If I take everything out of the php.ini file I get the following error.
Warning: session_start() [function.session-start]: SAFE MODE Restriction in effect. The script whose uid is 2197 is not allowed to access /tmp owned by uid 0 in /home/cremefre/public_html/manager/includes/config.inc.php on line 60
Fatal error: session_start() [<a href=’function.session-start’>function.session-start</a>]: Failed to initialize storage module: files (path: ) in /home/cremefre/public_html/manager/includes/config.inc.php on line 60
I then added the following code to the php.ini file (thanks bob) and have also added to the ht.access file. But am waiting on the host to restart the server.
session.save_path = /home/cremefre/public_html/assets/sessions/
session.gc_maxlifetime = 28800
Which removes the session start errors, but I still have the same problem of not being able to login to the manager as the screen resets after I have clicked submit.
Many shared hosts have that kind of php safe_mode setting. Unless they specifically allow access to the /tmp directory, since it’s outside of the web root where the script is being executed (the index.php file) it’s inaccessible.
Each directory that executes a .php script needs to have its own supplementary php.ini file to override the default settings in the main server php.ini file, unlike .htaccess these are not inherited. That means you’ll need one in the root (for the main site’s index.php) and one in /manager (for the manager’s index.php file).