siamon123 / warehouse-inventory-system

Open source inventory management system with php and mysql
http://www.oswapp.com
MIT License
379 stars 233 forks source link

not working on live server #18

Closed Syedwaheed closed 4 years ago

Syedwaheed commented 7 years ago

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

siamon123 commented 7 years ago

Check out this Function

page_require_level(2);

This function redirecting user according to user level.

bateller commented 7 years ago

@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

Syedwaheed commented 7 years ago

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.

bateller commented 7 years ago

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.