The following warnings occurred:
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/global.php(961) : eval()'d code 26 errorHandler->error
/global.php 961 eval
/showthread.php 28 require_once





× This forum is read only. As of July 23, 2019, the UserSpice forums have been closed. To receive support, please join our Discord by clicking here. Thank you!

  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Error 500 after hitting the Cleanup button at the end of the installation
#1
Hello,
I've been trying to install Userspice 4.4 a few times and I'm getting the same problem over and over again.
What I did:
1. Changed permissions of the init.php file to 666.
2. Made sure all system requirements match. (The only thing on the main page that isn't matched is the Display Errors value in the php.ini)
3. Set my timezone, filled all database details
4. Pressed on Try these settings. Then there were no errors, and it said the connection was successful and I hit the button appeared to move on (Also I looked in the database and it created 35 tables, so it seems the connection was fine).
5. Then in step 3 I hit the clean up button, and it redirected me to update.php?installer=1, which showed http error 500, without any extra info.

Then I tried to go to index.php of the website but it led me back to the installation folder. So I tried manually removing it, but still, nothing works there's a 500 error on index.php.

Any suggestions?

Thank you!
  Reply
#2
(02-09-2019, 09:52 AM)morha13 Wrote: Hello,
I've been trying to install Userspice a few times and I'm getting the same problem over and over again.
What I did:
1. Changed permissions of the init.php file to 666.
2. Made sure all system requirements match. (The only thing on the main page that isn't matched is the Display Errors value in the php.ini)
3. Set my timezone, filled all database details
4. Pressed on Try these settings. Then there were no errors, and it said the connection was successful and I hit the button appeared to move on (Also I looked in the database and it created 35 tables, so it seems the connection was fine).
5. Then in step 3 I hit the clean up button, and it redirected me to update.php?installer=1, which showed http error 500, without any extra info.

Then I tried to go to index.php of the website but it led me back to the installation folder. So I tried manually removing it, but still, nothing works there's a 500 error on index.php.

Any suggestions?

Thank you!

What kind of system are you on?  I'm guessing it's Mac/Linux.  Is it a live server or something like LAMP/MAMP/XAMPP?
So error 500 is sort of a generic error message.  The first thing I would try is going to the top of any page that is giving you an error 500 and at the top, put these two lines of code....
error_reporting(E_ALL);
ini_set('display_errors', 1);

If you STILL only see an error 500, then you probably need to edit your php.ini file and set the error reporting line to
error_reporting=E_ALL & ~E_DEPRECATED & ~E_STRICT

If you STILL see an error 500 then you have a file permission issue and we can work on that once I know a little more about your system.
  Reply
#3
(02-09-2019, 09:57 AM)mudmin Wrote:
(02-09-2019, 09:52 AM)morha13 Wrote: Hello,
I've been trying to install Userspice a few times and I'm getting the same problem over and over again.
What I did:
1. Changed permissions of the init.php file to 666.
2. Made sure all system requirements match. (The only thing on the main page that isn't matched is the Display Errors value in the php.ini)
3. Set my timezone, filled all database details
4. Pressed on Try these settings. Then there were no errors, and it said the connection was successful and I hit the button appeared to move on (Also I looked in the database and it created 35 tables, so it seems the connection was fine).
5. Then in step 3 I hit the clean up button, and it redirected me to update.php?installer=1, which showed http error 500, without any extra info.

Then I tried to go to index.php of the website but it led me back to the installation folder. So I tried manually removing it, but still, nothing works there's a 500 error on index.php.

Any suggestions?

Thank you!

What kind of system are you on?  I'm guessing it's Mac/Linux.  Is it a live server or something like LAMP/MAMP/XAMPP?
So error 500 is sort of a generic error message.  The first thing I would try is going to the top of any page that is giving you an error 500 and at the top, put these two lines of code....
error_reporting(E_ALL);
ini_set('display_errors', 1);

If you STILL only see an error 500, then you probably need to edit your php.ini file and set the error reporting line to
error_reporting=E_ALL & ~E_DEPRECATED & ~E_STRICT

If you STILL see an error 500 then you have a file permission issue and we can work on that once I know a little more about your system.


My system is ubuntu 18.04, I installed everything manually basically. I'm running nginx, php 7.2.10, mysql server 5.7.24.
The server is hosting another systems using the php and mysql server so it should work fine.

I tried setting all the files in the Userspice's directory to 777 now and still same problem.
I added the error printing lines to the update.php file and that's the error I'm getting:
Parse error: syntax error, unexpected '=>' (T_DOUBLE_ARROW) in ****/admin/users/init.php on line 75

I went to line 75 in the init file, and something looks really wrong here (Lines 68-88) (The error is at the 'host' => 'localhost', line):
PHP Code:
if($user->isLoggedIn()){
    if(
$user->data()->email_verified == && $currentPage != 'verify.php' && $currentPage != 'logout.php' && $currentPage != 'verify_thankyou.php'){
        
Redirect::to('users/verify.php');
    }
}
$timezone_string 'Asia/Jerusalem';
date_default_timezone_set($timezone_string);
'host'         => 'localhost',
'username'     => '*******',
'password'     => '*******',
'db'           => '*******',
),
'remember'        => array(
 
 'cookie_name'   => 'pmqesoxiw318374csb',
 
 'cookie_expiry' => 604800  //One week, feel free to make it longer
),
'session' => array(
 
 'session_name' => 'user',
 
 'token_name' => 'token',
)
); 



Do you know what may cause this problem?

EDIT: Something really seems weird here. It looks like the file duplicated it's content at some point few times. Here's a link to the full init file: https://pastebin.com/P8fpNhqe
  Reply
#4
(02-09-2019, 10:09 AM)morha13 Wrote:
(02-09-2019, 09:57 AM)mudmin Wrote:
(02-09-2019, 09:52 AM)morha13 Wrote: Hello,
I've been trying to install Userspice a few times and I'm getting the same problem over and over again.
What I did:
1. Changed permissions of the init.php file to 666.
2. Made sure all system requirements match. (The only thing on the main page that isn't matched is the Display Errors value in the php.ini)
3. Set my timezone, filled all database details
4. Pressed on Try these settings. Then there were no errors, and it said the connection was successful and I hit the button appeared to move on (Also I looked in the database and it created 35 tables, so it seems the connection was fine).
5. Then in step 3 I hit the clean up button, and it redirected me to update.php?installer=1, which showed http error 500, without any extra info.

Then I tried to go to index.php of the website but it led me back to the installation folder. So I tried manually removing it, but still, nothing works there's a 500 error on index.php.

Any suggestions?

Thank you!

What kind of system are you on?  I'm guessing it's Mac/Linux.  Is it a live server or something like LAMP/MAMP/XAMPP?
So error 500 is sort of a generic error message.  The first thing I would try is going to the top of any page that is giving you an error 500 and at the top, put these two lines of code....
error_reporting(E_ALL);
ini_set('display_errors', 1);

If you STILL only see an error 500, then you probably need to edit your php.ini file and set the error reporting line to
error_reporting=E_ALL & ~E_DEPRECATED & ~E_STRICT

If you STILL see an error 500 then you have a file permission issue and we can work on that once I know a little more about your system.


My system is ubuntu 18.04, I installed everything manually basically. I'm running nginx, php 7.2.10, mysql server 5.7.24.
The server is hosting another systems using the php and mysql server so it should work fine.

I tried setting all the files in the Userspice's directory to 777 now and still same problem.
I added the error printing lines to the update.php file and that's the error I'm getting:
Parse error: syntax error, unexpected '=>' (T_DOUBLE_ARROW) in ****/admin/users/init.php on line 75

I went to line 75 in the init file, and something looks really wrong here (Lines 68-88) (The error is at the 'host' => 'localhost', line):
PHP Code:
if($user->isLoggedIn()){
    if(
$user->data()->email_verified == && $currentPage != 'verify.php' && $currentPage != 'logout.php' && $currentPage != 'verify_thankyou.php'){
        
Redirect::to('users/verify.php');
    }
}
$timezone_string 'Asia/Jerusalem';
date_default_timezone_set($timezone_string);
'host'         => 'localhost',
'username'     => '*******',
'password'     => '*******',
'db'           => '*******',
),
'remember'        => array(
 
 'cookie_name'   => 'pmqesoxiw318374csb',
 
 'cookie_expiry' => 604800  //One week, feel free to make it longer
),
'session' => array(
 
 'session_name' => 'user',
 
 'token_name' => 'token',
)
); 

I'm not sure what caused it initially, but it definitely was some sort of file permission issue during setup. 
I'd wipe out the init, and then paste this one in.
https://pastebin.com/BrXGrsND
Then just edit lines 26-30 with your db info.  
I would not only make sure that your files have the right permission number, but also that the user is correct. I think on ubuntu/apache it's normally www-data.

So that would look like
chown -Rf www-data.www-data /var/www/
sudo chmod -R 755 /var/www
  Reply
#5
(02-09-2019, 10:28 AM)mudmin Wrote:
(02-09-2019, 10:09 AM)morha13 Wrote:
(02-09-2019, 09:57 AM)mudmin Wrote:
(02-09-2019, 09:52 AM)morha13 Wrote: Hello,
I've been trying to install Userspice a few times and I'm getting the same problem over and over again.
What I did:
1. Changed permissions of the init.php file to 666.
2. Made sure all system requirements match. (The only thing on the main page that isn't matched is the Display Errors value in the php.ini)
3. Set my timezone, filled all database details
4. Pressed on Try these settings. Then there were no errors, and it said the connection was successful and I hit the button appeared to move on (Also I looked in the database and it created 35 tables, so it seems the connection was fine).
5. Then in step 3 I hit the clean up button, and it redirected me to update.php?installer=1, which showed http error 500, without any extra info.

Then I tried to go to index.php of the website but it led me back to the installation folder. So I tried manually removing it, but still, nothing works there's a 500 error on index.php.

Any suggestions?

Thank you!

What kind of system are you on?  I'm guessing it's Mac/Linux.  Is it a live server or something like LAMP/MAMP/XAMPP?
So error 500 is sort of a generic error message.  The first thing I would try is going to the top of any page that is giving you an error 500 and at the top, put these two lines of code....
error_reporting(E_ALL);
ini_set('display_errors', 1);

If you STILL only see an error 500, then you probably need to edit your php.ini file and set the error reporting line to
error_reporting=E_ALL & ~E_DEPRECATED & ~E_STRICT

If you STILL see an error 500 then you have a file permission issue and we can work on that once I know a little more about your system.


My system is ubuntu 18.04, I installed everything manually basically. I'm running nginx, php 7.2.10, mysql server 5.7.24.
The server is hosting another systems using the php and mysql server so it should work fine.

I tried setting all the files in the Userspice's directory to 777 now and still same problem.
I added the error printing lines to the update.php file and that's the error I'm getting:
Parse error: syntax error, unexpected '=>' (T_DOUBLE_ARROW) in ****/admin/users/init.php on line 75

I went to line 75 in the init file, and something looks really wrong here (Lines 68-88) (The error is at the 'host' => 'localhost', line):
PHP Code:
if($user->isLoggedIn()){
    if(
$user->data()->email_verified == && $currentPage != 'verify.php' && $currentPage != 'logout.php' && $currentPage != 'verify_thankyou.php'){
        
Redirect::to('users/verify.php');
    }
}
$timezone_string 'Asia/Jerusalem';
date_default_timezone_set($timezone_string);
'host'         => 'localhost',
'username'     => '*******',
'password'     => '*******',
'db'           => '*******',
),
'remember'        => array(
 
 'cookie_name'   => 'pmqesoxiw318374csb',
 
 'cookie_expiry' => 604800  //One week, feel free to make it longer
),
'session' => array(
 
 'session_name' => 'user',
 
 'token_name' => 'token',
)
); 

I'm not sure what caused it initially, but it definitely was some sort of file permission issue during setup. 
I'd wipe out the init, and then paste this one in.
https://pastebin.com/BrXGrsND
Then just edit lines 26-30 with your db info.  
I would not only make sure that your files have the right permission number, but also that the user is correct. I think on ubuntu/apache it's normally www-data.

So that would look like
chown -Rf www-data.www-data /var/www/
sudo chmod -R 755 /var/www

So I did some digging, and the problem is actually with the server.  $_SERVER['PHP_SELF'] returns nothing. I'm working on fixing it, but it seems the problem has nothing to do with Userspice...

Thank you for your help and sorry for bothering you with a problem that as far as it seems has nothing to do with Userspice...
  Reply
#6
No problem at all. Sorry about that!
  Reply
#7
Solution: Just in case anyone gets this problem, in my case the problem was that I followed a tutorial that insisted on disabling cgi.fix_pathinfo, in the php.ini file.
When setting cgi.fix_pathinfo =1, the problem fixed!
  Reply
#8
(02-09-2019, 01:18 PM)morha13 Wrote: Solution: Just in case anyone gets this problem, in my case the problem was that I followed a tutorial that insisted on disabling cgi.fix_pathinfo, in the php.ini file.
When setting cgi.fix_pathinfo =1, the problem fixed!

Further info: I've done loads of these. All Ubuntu server based. It's permissions.
If you chmod 777 the /install directory (and all files) before the install, it should work ok.
US attempts to delete the files in this dir as part of the cleanup, but hits a permission denied.

And yes, repeated installs will mangle your init, clear down and start afresh.
  Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)