Make /admin root
Moderator: mkoch227
Make /admin root
I have tried to make /admin my Hesk Root with no success, no matter what I try the pages do not load properly.
I want mydomain.com/hesk/admin/index.php to read mydomain.com/hesk/index.php.
I have tried various code in .htaccess, also no success, the pages just wont load properly.
Has anybody had any experience with this?
I use the admin interface for user loggin with limited accounts. I have totally removed the customer interface.
I want mydomain.com/hesk/admin/index.php to read mydomain.com/hesk/index.php.
I have tried various code in .htaccess, also no success, the pages just wont load properly.
Has anybody had any experience with this?
I use the admin interface for user loggin with limited accounts. I have totally removed the customer interface.
-Steve
Re: Make /admin root
First of all I wouldn't recommend it as it could lead to all kinds of problems and you would have to make all changes again for each updated version.
You would have to modify all files inside "hesk/admin" folder when moving them to "hesk/" - replace all instances of to and delete all instances of
It would possibly require more modifications - would be up to you to test everything with trial and error.
You would have to modify all files inside "hesk/admin" folder when moving them to "hesk/" - replace all instances of
Code: Select all
../
Code: Select all
./
Code: Select all
admin/
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here 
You should follow me on Twitter here
Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools


Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Re: Make /admin root
I have modified HESK so much, that I will have to spend a week modifying 2.4 before i can update anyways.
Thanks for that, Ill give it a try.
Thanks for that, Ill give it a try.
-Steve
Re: Make /admin root
Well, I tried to accomplish this using the method described my Klemen with no success. The login screen is displayed, however once I submit my user credentials, the screen goes blank.
I know there are a lot of files to modify and I could have missed something, I tried three times with no luck.
Any ideas on where to look?
Has anybody else managed to pull this off?
Thanks!
I know there are a lot of files to modify and I could have missed something, I tried three times with no luck.
Any ideas on where to look?
Has anybody else managed to pull this off?
Thanks!
-Steve
Re: Make /admin root
Try setting debug mode to ON and see if you get any errors.
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here 
You should follow me on Twitter here
Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools


Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Re: Make /admin root
Do I ever.
When I navigate to the Hesk root in my browser on index.php (admin/ index.php) theses errors are shown above the login screen.
When enter user credential this is shown on a white screen
When I navigate to the Hesk root in my browser on index.php (admin/ index.php) theses errors are shown above the login screen.
Code: Select all
Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /home/ramp/public_html/test/language/en/text.php:1973) in /home/ramp/public_html/test/inc/common.inc.php on line 2415
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/ramp/public_html/test/language/en/text.php:1973) in /home/ramp/public_html/test/inc/common.inc.php on line 2415
Warning: Cannot modify header information - headers already sent by (output started at /home/ramp/public_html/test/language/en/text.php:1973) in /home/ramp/public_html/test/inc/common.inc.php on line 2427
Code: Select all
Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /home/ramp/public_html/test/language/en/text.php:1973) in /home/ramp/public_html/test/inc/common.inc.php on line 2415
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/ramp/public_html/test/language/en/text.php:1973) in /home/ramp/public_html/test/inc/common.inc.php on line 2415
Warning: Cannot modify header information - headers already sent by (output started at /home/ramp/public_html/test/language/en/text.php:1973) in /home/ramp/public_html/test/inc/common.inc.php on line 2427
Warning: session_regenerate_id() [function.session-regenerate-id]: Cannot regenerate session id - headers already sent in /home/ramp/public_html/test/inc/common.inc.php on line 2200
Warning: Cannot modify header information - headers already sent by (output started at /home/ramp/public_html/test/language/en/text.php:1973) in /home/ramp/public_html/test/index.php on line 204
Warning: Cannot modify header information - headers already sent by (output started at /home/ramp/public_html/test/language/en/text.php:1973) in /home/ramp/public_html/test/index.php on line 205
Warning: Cannot modify header information - headers already sent by (output started at /home/ramp/public_html/test/language/en/text.php:1973) in /home/ramp/public_html/test/index.php on line 239
-Steve
Re: Make /admin root
Try with the original language/en/text.php file instead.
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here 
You should follow me on Twitter here
Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools


Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Re: Make /admin root
After reverting back to the original text.php here are the errors in index.php (admin.index.php)
Once I submit my credentials this is show on a white screen
Code: Select all
Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /home/ramp/public_html/test/inc/common.inc.php:3052) in /home/ramp/public_html/test/inc/common.inc.php on line 2415
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/ramp/public_html/test/inc/common.inc.php:3052) in /home/ramp/public_html/test/inc/common.inc.php on line 2415
Warning: Cannot modify header information - headers already sent by (output started at /home/ramp/public_html/test/inc/common.inc.php:3052) in /home/ramp/public_html/test/inc/common.inc.php on line 2427
Code: Select all
Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /home/ramp/public_html/test/inc/database.inc.php:433) in /home/ramp/public_html/test/inc/common.inc.php on line 1211
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/ramp/public_html/test/inc/database.inc.php:433) in /home/ramp/public_html/test/inc/common.inc.php on line 1211
Warning: Cannot modify header information - headers already sent by (output started at /home/ramp/public_html/test/inc/database.inc.php:433) in /home/ramp/public_html/test/inc/common.inc.php on line 1217
Warning: session_regenerate_id() [function.session-regenerate-id]: Cannot regenerate session id - headers already sent in /home/ramp/public_html/test/inc/common.inc.php on line 1102
Warning: Cannot modify header information - headers already sent by (output started at /home/ramp/public_html/test/inc/database.inc.php:433) in /home/ramp/public_html/test/index.php on line 204
Warning: Cannot modify header information - headers already sent by (output started at /home/ramp/public_html/test/inc/database.inc.php:433) in /home/ramp/public_html/test/index.php on line 205
Warning: Cannot modify header information - headers already sent by (output started at /home/ramp/public_html/test/inc/database.inc.php:433) in /home/ramp/public_html/test/index.php on line 239
-Steve
Re: Make /admin root
Now you need the original common.inc.php file as there are errors in your current one...
You need to be really careful when editing files, because any text/code output before location headers will cause these errors. And since it's thing you modified yourself it's not really something I support.
You need to be really careful when editing files, because any text/code output before location headers will cause these errors. And since it's thing you modified yourself it's not really something I support.
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here 
You should follow me on Twitter here
Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools


Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Re: Make /admin root
I was able to make it work by restoring the original common.inc.php file also the database.ini.php.
I am going to wait for the next version upgrade, Ill change the files I need to make the root folder use the admin interface then customize Hesk to my needs. That way I wont have this same issue in the future.
Thanks for all our help.
I am going to wait for the next version upgrade, Ill change the files I need to make the root folder use the admin interface then customize Hesk to my needs. That way I wont have this same issue in the future.
Thanks for all our help.
-Steve
Re: Make /admin root
Yes, version 2.4 is not far away so you might be better of waiting a while and save yourself a lot of work.
When making changes to files I recommend making small changes step-by-step and testing in between. This way it is much easier to detect and troubleshoot errors.
When modifying include files (files that are included/required inside other files) make sure you don't print out any HTML code inside (except within functions when required) or don't have any empty lines outside <?php ... ?> tags. Such things output HTTP headers so if the script alter tries to set new headers (for example cookies or redirects) you get the "headers already started" error.
When making changes to files I recommend making small changes step-by-step and testing in between. This way it is much easier to detect and troubleshoot errors.
When modifying include files (files that are included/required inside other files) make sure you don't print out any HTML code inside (except within functions when required) or don't have any empty lines outside <?php ... ?> tags. Such things output HTTP headers so if the script alter tries to set new headers (for example cookies or redirects) you get the "headers already started" error.
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here 
You should follow me on Twitter here
Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools


Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Re: Make /admin root
I was able to make this work using Klemen's method above. i guess the first time around I missed something.
-Steve
Re: Make /admin root
wouldn't this be easier? and just not care about the path in the browser?
this is what my index.php looks like, we are just using it as a tracker internally, requests come in through a shared mailbox for the team that we flag/categorize as ours.
I guess in your case you would put the location as yourdomain.com/hesk/admin i dunno, people at big corps work with the most confusing links possible all day, it shouldn't be a big deal, maybe you are being OCD Steve =)
this is what my index.php looks like, we are just using it as a tracker internally, requests come in through a shared mailbox for the team that we flag/categorize as ours.
I guess in your case you would put the location as yourdomain.com/hesk/admin i dunno, people at big corps work with the most confusing links possible all day, it shouldn't be a big deal, maybe you are being OCD Steve =)
Code: Select all
<?php
header( 'Location: http://yourdomain.com/admin' ) ;
?>