CodeChargeMVP
Posts: 473
|
Posted: 04/06/2011, 3:08 AM |
|
Hi,
Our main application has been installed on a Linux Server,
due to one of the requirements of our customer.
We had to fix some issues by make this work,as url�s etc..
Well when the user try to login on the software application by user login: "userone"
it works great, but when the user try to login by user login: "usertwo" leads
on the page that it supposed to be but this is showed completely blank.
This code were developed on php by one programmer who�s not anymore on this company,
please if you realise where�s the problem let me know:
This code is placed on login_events.php on click button (Server side):
if (1==$Login_Button_DoLogin_OnClick)
{ global $Redirect;
switch (CCGetGroupId())
{
case 'USERONE': $Redirect
="informantes/mantenimiento_interv/mantenimiento_intervencion.php";break;
case 'USERTWO': $Redirect ="/informantes/mantenimiento-inf/mantenimiento_inf.php";break;
}
header("Location: ".$Redirect);
}
These two functions could be handy (I copy them from common.php) :
function CCGetGroupID()
{
return CCGetSession("GroupID");
}
function CCGetSession($parameter_name, $default_value = "")
{
return isset ($_SESSION[$parameter_name]) ? $_SESSION[$parameter_name] : $default_value;
}
�is maybe a caps issue or anything related with the CCGetGroupId() function?
Thank you very much in advance.
_________________
Best Regards
Entrepeneur | NT Consultant
|
|
|
damian
Posts: 838
|
Posted: 04/06/2011, 5:57 AM |
|
first observation:
case 'USERONE': $Redirect ="informantes/mantenimiento_interv/mantenimiento_intervencion.php";break;
case 'USERTWO': $Redirect ="/informantes/mantenimiento-inf/mantenimiento_inf.php";break;
your first link has a leading / your second doesnt - test that first
the next thing to test is after logging in as userone can you access (by typing in) the usertwo url?
what about vice-versa?
what results do you see.
next look at the component security - the page might not have security but the grids and includes might so the page might load but not display data that the particular user has permissions to view...
thats where i would start based on the info you have provided...
_________________
if you found this post useful take the time to help someone else.... :)
|
|
|
CodeChargeMVP
Posts: 473
|
Posted: 04/07/2011, 12:38 AM |
|
Hi Damian,
I´ve figure it out the issue,
There´s a page on the project than is showed blank when is executed on the Linux Server,
the thing is than this page was settled up to be lead when usertwo login into the application,
so changing the lead page for usertwo, I find out than the problem it´s not about the login.php
page or login_events.php, is the other page which doesn´t work right, and when trying to get
access to it from the menu is showed blank.
¿do you know why a page could be showed blank on the Linux server while is working great
on Windows?
Greets.
Quote damian:
first observation:
case 'USERONE': $Redirect ="informantes/mantenimiento_interv/mantenimiento_intervencion.php";break;
case 'USERTWO': $Redirect ="/informantes/mantenimiento-inf/mantenimiento_inf.php";break;
your first link has a leading / your second doesnt - test that first
the next thing to test is after logging in as userone can you access (by typing in) the usertwo url?
what about vice-versa?
what results do you see.
next look at the component security - the page might not have security but the grids and includes might so the page might load but not display data that the particular user has permissions to view...
thats where i would start based on the info you have provided...
_________________
Best Regards
Entrepeneur | NT Consultant
|
|
|
damian
Posts: 838
|
Posted: 04/07/2011, 12:40 AM |
|
enable errors on your apache and see if you get some clues there.
_________________
if you found this post useful take the time to help someone else.... :)
|
|
|
CodeChargeMVP
Posts: 473
|
Posted: 04/07/2011, 12:49 AM |
|
Our Linux Server is placed on a different city from where I´m developing the application software, fourtunately we´ve install and Linux Server by make the tests, as soon I receive the error logs files, I´ll copy them here.
Greets.
Quote damian:
enable errors on your apache and see if you get some clues there.
_________________
Best Regards
Entrepeneur | NT Consultant
|
|
|
CodeChargeMVP
Posts: 473
|
Posted: 04/07/2011, 1:12 AM |
|
Here we go:
access_log:
This is the page which is showed blank on the Linux Server:
/infoaod/backoffice/tablasaux/tablasaux/crs/sectorescrs.php
127.0.0.1 - - [07/Apr/2011:09:57:51 +0200] "GET /infoaod/backoffice/tablasaux/Styles/Gourd/Style_doctype.css HTTP/1.1" 404 1536
127.0.0.1 - - [07/Apr/2011:09:57:51 +0200] "GET /infoaod/backoffice/tablasaux/Styles/Backoffice/Style_doctype.css HTTP/1.1" 404 1536
127.0.0.1 - - [07/Apr/2011:09:57:55 +0200] "GET /infoaod/backoffice/tablasaux/tablasaux/crs/sectorescrs.php?ConfGenCod=1&CACod=AN&TipViaCanCod=10000 HTTP/1.1" 200 2
error_log:
Seems than everytime than we try to access to a page on the Linux Server returns an error,
related to Styles and css, but in that page in particulary doesn�t show any message.
Of course I´ve clean the urls.
[Thu Apr 07 09:55:53 2011] [error] [client 127.0.0.1] File does not exist: /opt/lampp/htdocs/infoaod/backoffice/tablasaux/Styles, referer: http://127.0.0.1/infoaod/backoffice/tablasaux/tablasaux/agentes/tipos_agen
[Thu Apr 07 09:57:32 2011] [error] [client 127.0.0.1] File does not exist: /opt/lampp/htdocs/infoaod/backoffice/Styles, referer: http://127.0.0.1/infoaod/backoffice/tablasaux/da
[Thu Apr 07 09:57:32 2011] [error] [client 127.0.0.1] File does not exist: /opt/lampp/htdocs/infoaod/backoffice/Styles, referer: http://127.0.0.1/infoaod/backoffice/tablasaux/da
[Thu Apr 07 09:57:34 2011] [error] [client 127.0.0.1] File does not exist: /opt/lampp/htdocs/infoaod/backoffice/Styles, referer: http://127.0.0.1/infoaod/backoffice/tablasaux/dat?CACod=AN
[Thu Apr 07 09:57:34 2011] [error] [client 127.0.0.1] File does not exist: /opt/lampp/htdocs/infoaod/backoffice/Styles, referer: http://127.0.0.1/infoaod/backoffice/tablasaux/datos_
[Thu Apr 07 09:57:44 2011] [error] [client 127.0.0.1] File does not exist: /opt/lampp/htdocs/infoaod/backoffice/tablasaux/Styles, referer: http://127.0.0.1/infoaod/backoffice/tablasaux/tablasaux/canalizacion/tipovi
[Thu Apr 07 09:57:45 2011] [error] [client 127.0.0.1] File does not exist: /opt/lampp/htdocs/infoaod/backoffice/tablasaux/Styles, referer: http://127.0.0.1/infoaod/backoffice/tablasaux/tablasaux.../tipoviacanaliz
[Thu Apr 07 09:57:46 2011] [error] [client 127.0.0.1] File does not exist: /opt/lampp/htdocs/infoaod/backoffice/tablasaux/Styles, referer: http://127.0.0.1/infoaod/backoffice/tablasaux/tablasaux...izacion/tipovia
ConfGenCod=1&CACod=AN&TipViaCanCod=10000
[Thu Apr 07 09:57:46 2011] [error] [client 127.0.0.1] File does not exist: /opt/lampp/htdocs/infoaod/backoffice/tablasaux/Styles, referer: http://127.0.0.1/infoaod/backoffice/tablasaux/tablasaux...ViaCanCod=10000
[Thu Apr 07 09:57:51 2011] [error] [client 127.0.0.1] File does not exist: /opt/lampp/htdocs/infoaod/backoffice/tablasaux/Styles, referer: http://127.0.0.1/infoaod/backoffice/tablasaux/tablasaux/agentes/agente
ConfGenCod=1&CACod=AN&TipViaCanCod=10000
[Thu Apr 07 09:57:51 2011] [error] [client 127.0.0.1] File does not exist: /opt/lampp/htdocs/infoaod/backoffice/tablasaux/Styles, referer: http://127.0.0.1/infoaod/backoffice/tablasaux/tablasaux...pViaCanCod=1000
Greets.
_________________
Best Regards
Entrepeneur | NT Consultant
|
|
|
damian
Posts: 838
|
Posted: 04/07/2011, 5:54 AM |
|
linux is case sensitive - windows is not:
eg:
/opt/lampp/htdocs/infoaod/backoffice/tablasaux/Styles
is not the same as:
/opt/lampp/htdocs/infoaod/backoffice/tablasaux/styles
see if that line of questioning uncovers anything....
_________________
if you found this post useful take the time to help someone else.... :)
|
|
|
CodeChargeMVP
Posts: 473
|
Posted: 04/07/2011, 7:41 AM |
|
Hi Damian,
I Know this, but ¿what would happen then with the internal references on the html pages?
¿won´t it produce several errors?
Greets.
Quote damian:
linux is case sensitive - windows is not:
eg:
/opt/lampp/htdocs/infoaod/backoffice/tablasaux/Styles
is not the same as:
/opt/lampp/htdocs/infoaod/backoffice/tablasaux/styles
see if that line of questioning uncovers anything....
_________________
Best Regards
Entrepeneur | NT Consultant
|
|
|
ceinj
Posts: 10
|
Posted: 04/07/2011, 10:15 AM |
|
It's not clear how you moved your project to the Linux server. Did you republish it with CCS or did you use some FTP like utility. It sounds like some components are missing.
I suggest you republish using CCS and make sure you select the option to publish all files.
Langston
|
|
|
CodeChargeMVP
Posts: 473
|
Posted: 04/08/2011, 1:48 AM |
|
Please, read over the whole thread, paying specially attention to post number 5.
I think you missed some information.
Quote ceinj:
It's not clear how you moved your project to the Linux server. Did you republish it with CCS or did you use some FTP like utility. It sounds like some components are missing.
I suggest you republish using CCS and make sure you select the option to publish all files.
Langston
_________________
Best Regards
Entrepeneur | NT Consultant
|
|
|
CodeChargeMVP
Posts: 473
|
Posted: 04/08/2011, 1:54 AM |
|
Hi,
So it seems than the folder Styles and all their files inside should be lowercase,also the folder Images and all his files inside,then the Linux server doesn´t return any error messsage.
Also seems than the parameters sended between pages should be lowercase by avoid
future problems.
I´m concering about what will happen when trying to use builders again, it´ll create the forms
with the css or it´ll be showed with none, by prevent this issue I´ve create a copy of the folder Styles just before to lowercase.
It´s curious than the last step on the development software process as move the application files to a server should be the first step to take care about.
_________________
Best Regards
Entrepeneur | NT Consultant
|
|
|
damian
Posts: 838
|
Posted: 04/08/2011, 2:48 AM |
|
i have encounterred this before - my local (windows) env worked my published (linux) env did not. i cant be 100% sure but i think that i had at one point renamed the folder myself...
_________________
if you found this post useful take the time to help someone else.... :)
|
|
|
CodeChargeMVP
Posts: 473
|
Posted: 04/08/2011, 10:35 AM |
|
HI damian,
Yes,that´s the solution.
About what I was concerned, when using the builder next, I shall lowercase the urls on date
pickers and stuff.
Quote damian:
i have encounterred this before - my local (windows) env worked my published (linux) env did not. i cant be 100% sure but i think that i had at one point renamed the folder myself...
_________________
Best Regards
Entrepeneur | NT Consultant
|
|
|
damian
Posts: 838
|
Posted: 04/08/2011, 2:30 PM |
|
i would not change anything. i think you will find that this is likely a one off incident where something got changed manually along the way - either in your template or on the file system. i only ever encountered the issue once in over 100 sites.
_________________
if you found this post useful take the time to help someone else.... :)
|
|
|
CodeChargeMVP
Posts: 473
|
Posted: 04/11/2011, 1:22 AM |
|
Hi Damian,
There´s no reason to struggle about, the solution is just simple and easy lowercase following folders:
-style (subfolders and all files inside)
-js\menu (if you´re software application is using a javascript menu)
Then lowercase all internal references to this files.
Perhaps this is the biggest trouble with the easyest solution.
Then your software application will go as a flash in Linux.
Greets.
Quote damian:
i would not change anything. i think you will find that this is likely a one off incident where something got changed manually along the way - either in your template or on the file system. i only ever encountered the issue once in over 100 sites.
_________________
Best Regards
Entrepeneur | NT Consultant
|
|
|
damian
Posts: 838
|
Posted: 04/11/2011, 2:29 AM |
|
???
the simplest solution is not to change any path names in the first place...
_________________
if you found this post useful take the time to help someone else.... :)
|
|
|
CodeChargeMVP
Posts: 473
|
Posted: 04/11/2011, 5:39 AM |
|
????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
That´s absolutely wrong, by not change any path names you should know this problem before.
So if you don´t know the problem before mine is the faster solution.
Bis spater Alles Klar.
Quote damian:
???
the simplest solution is not to change any path names in the first place...
_________________
Best Regards
Entrepeneur | NT Consultant
|
|
|
datadoit
|
Posted: 04/11/2011, 5:55 AM |
|
You can lead a horse to water ....
|
|
|
CodeChargeMVP
Posts: 473
|
Posted: 04/11/2011, 1:26 PM |
|
haha you funny farmer
I think it´s time to relax some:
http://www.youtube.com/watch?v=pbgYx5fJjj8
Greets.
Quote datadoit:
You can lead a horse to water ....
_________________
Best Regards
Entrepeneur | NT Consultant
|
|
|
CodeChargeMVP
Posts: 473
|
Posted: 04/19/2011, 5:08 AM |
|
the blank pages on the Linux Server were caused due to this pages weren�t plubished before to put them up on it.
The solution just was to press F9, my fault.
_________________
Best Regards
Entrepeneur | NT Consultant
|
|
|
damian
Posts: 838
|
Posted: 04/19/2011, 6:05 AM |
|
Quote CodeChargeMVP:Please, read over the whole thread, paying specially attention to post number 5.
I think you missed some information.
Quote ceinj:It's not clear how you moved your project to the Linux server. Did you republish it with CCS or did you use some FTP like utility. It sounds like some components are missing.
I suggest you republish using CCS and make sure you select the option to publish all files.
Langston
i never could find post number 5
_________________
if you found this post useful take the time to help someone else.... :)
|
|
|
CodeChargeMVP
Posts: 473
|
Posted: 04/20/2011, 3:54 AM |
|
Another reason by explain why CCS gives problems when moving to a Linux Server is cause inside the css files on folder styles from your project there are url´s this way:
.menu_htb a {
background-color: #3d84cc;
background-image: url('Images/MenuBg.gif');background-repeat: repeat-x;background-position: top left;
height: auto;
width: auto;
}
It´s a big mistake,I know, but the solution is just simply and easy, maybe tedious, just lowercase all references inside css files than Linux Server Console will return no error.
.menu_htb a {
background-color: #3d84cc;
background-image: url('images/menubg.gif');background-repeat: repeat-x;background-position: top left;
height: auto;
width: auto;
}
_________________
Best Regards
Entrepeneur | NT Consultant
|
|
|
damian
Posts: 838
|
Posted: 04/20/2011, 4:10 AM |
|
all of my sites are developed on windows (wimp) and all are published on linux (lamp). i have only seen this issue once on about a hundred sites and its because I had changed a folder name myself.
ccs creates a whole bunch of folders and files automatically. the easiest way - for every other project you do - is not to ever rename folders and to pay attention to case.
now that you have started doing it for this project you may as well keep on going...
_________________
if you found this post useful take the time to help someone else.... :)
|
|
|
CodeChargeMVP
Posts: 473
|
Posted: 04/20/2011, 4:13 AM |
|
I change the thread name to resolved
_________________
Best Regards
Entrepeneur | NT Consultant
|
|
|
damian
Posts: 838
|
Posted: 04/20/2011, 7:36 AM |
|
im glad you got it working.
:)
_________________
if you found this post useful take the time to help someone else.... :)
|
|
|
CodeChargeMVP
Posts: 473
|
Posted: 04/21/2011, 10:18 AM |
|
thanks
Quote damian:
im glad you got it working.
:)
_________________
Best Regards
Entrepeneur | NT Consultant
|
|
|