Closed Syedwaheed closed 4 years ago
Check out this Function
page_require_level(2);
This function redirecting user according to user level.
@Syedwaheed The issue is with the line return at the top of the file "includes/load.php"
If you remove this, it'll work fine.
The problem is the headers are already sent (because the web server sees a blank, non PHP line) so when the 'redirect' function is triggered, its unable to do anything since headers have already been sent to the client.
I've proposed a pull-request to fix the issue. siamon123/warehouse-inventory-system#21
I think this was the caching problem on live server.. i have commented the session_start(); and run it. Got error. Then undo the comment again and everything is working fine on live server. Dont know why is it so.
Sounds good!
To clarify my earlier post.. it appears the blank line issue is only on UNIX-based systems... possibly nginx only (haven't tested with Apache). Although the extra line was NOT an issue on Win32/64.
When i have uploaded files on web server the redirect ('admin.php',false) would not work in auth page. Does anyone of you made a fix to it. please help. thanks in advance