CodeCharge Studio
search Register Login  

Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 login redirection not working

Print topic Send  topic

Author Message
mikecou
Posted: 08/19/2004, 8:23 AM

Has anyone had any experience with a login form not redirecting to the correct path. I have a site on my local server that when I do the login, it works fine. But when I moved the code to my production server, the login does not redirect correctly.

for example:
i would click on the /mystuff/mystuff.php link. It would take me to the login page /login.php and allow me to login. Once it does this, on the production server it redirects to /mystuff.php rather than /mystuff/mystuff.php. The login works correctly and if I click on another page that is password protected by the login it works fine and I am logged in. The redirect just doesn't work.

I have the login options set to use absolute references and like I said, it works fine on my dev server but not on my prod server.

any ideas would be wonderful.

thanks

mike
mike
Posted: 08/19/2004, 8:24 AM

oh... i am using php, with a mysql back end and ccs 2.3.2.24. The only difference may be that my dev box is a linux box and the prod is a windows box. That is the only thing i can think of.

mike
DonB
Posted: 08/19/2004, 10:06 PM

There is a setting in the Project properties - where you tell it the correct
"root" for the website. This value is prepended to all links (which are
declared as relative paths) to make them absolute paths. This is probably
blank (default is blank) or incorrect for the server configuration.

--
DonB

http://www.gotodon.com/ccbth


"mike" <mike@forum.codecharge> wrote in message
news:54124c636029e4@news.codecharge.com...
> oh... i am using php, with a mysql back end and ccs 2.3.2.24. The only
> difference may be that my dev box is a linux box and the prod is a windows
box.
> That is the only thing i can think of.
>
> mike
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>

mikecou
Posted: 08/20/2004, 6:02 AM

I looked there and i have the value set. I have tried several values there and none of them work. if I click on project settings and go to the publishing tab i have both the server path and server url set up and they are correct. Is there another value I am missing?

the url for the site in question is http://advancedce.org
if you click on the my records link at the bottom and login with test and test, it will bring you to a page that shows classes that they have signed up for. But if you click on the links at the top of the page called "edit my classes" or "edit my personal info" they don't work. Everything else works. The only thought I have for this is that those two links are in an include file. but on another page that is having this problem, the links there don't work either and they aren't in an include.

any thoughts?
mikecou
Posted: 08/20/2004, 7:30 AM

sorry... screwed up the link. .... try this one...

http://www.advancedce.org/register/register.php

click on my records on the side and login with test and test
Charles Edmonds
Posted: 08/21/2004, 8:22 PM

On Fri, 20 Aug 2004 7:30:20 -0700, mikecou wrote:
> http://www.advancedce.org/register/register.php
>
> click on my records on the side and login with test and test

An interesting note ...

Your right - after the initial login, the two links on the top have errors.

However if you click the "My Records" a second time, then both top links
work!

I'm not sure why, but maybe this info will help!

Charles
DonB
Posted: 08/21/2004, 8:41 PM

It appears your html file is not there - only the php file. So it tells me
"No input file specified.".

--
DonB

http://www.gotodon.com/ccbth


"mikecou" <mikecou@forum.codecharge> wrote in message
news:54125f67bdc73c@news.codecharge.com...
> I looked there and i have the value set. I have tried several values
there and
> none of them work. if I click on project settings and go to the
publishing tab
> i have both the server path and server url set up and they are correct.
Is
> there another value I am missing?
>
> the url for the site in question is http://advancedce.org
> if you click on the my records link at the bottom and login with test and
test,
> it will bring you to a page that shows classes that they have signed up
for.
> But if you click on the links at the top of the page called "edit my
classes"
> or "edit my personal info" they don't work. Everything else works. The
only
> thought I have for this is that those two links are in an include file.
but on
> another page that is having this problem, the links there don't work
either and
> they aren't in an include.
>
> any thoughts?
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>

mikecou
Posted: 08/22/2004, 9:11 PM

i tried adding this "session_save_path("C:\\Domains\\advancedce.org\\wwwroot\\tmp\\");" to the common.php right before the session_start()

it is supposed to change the temp directory for the php and ignore the temp directory the php.ini file specifies. When looking at the directory, I can see the cookies created when I try to log in.

this is what it looks like on my dev box...
UserID|s:2:"27";UserLogin|s:5:"admin";GroupID|s:2:"16";

this is my production box
UserID|s:2:"27";UserLogin|s:5:"admin";GroupID|s:2:"16";

i haven't found any differene in the code or anything.

any other thoughts?
mikecou
Posted: 08/22/2004, 9:14 PM

donb --> i have all the php and html files there... they work fine when you actually log in and go to them.

mikecou
Posted: 08/23/2004, 9:35 AM

I installed a winxp server this morning, put php, mysql and IIS on the box with pretty much the same versions I have on my production box. I installed all my databases, php code and everything else.

Once I got everything configured I tried to log in and I got the exact same error where most of the links do not keep their references. I checked the tmp directory and the session file is being created. It looks the same as the other ones.

Any other thoughts?
mikecou
Posted: 08/23/2004, 9:50 AM

FOUND IT!!!

I had an include file for my pages at the top to display some common links. That is where the links were broken. But on my navigation, that was an include as well. It was working just fine. But the difference was that the include file for the navigation was in a different directory from the ones with the broken links. It was in the same directory as the page I was trying to load. I moved the include file from that directory to another and It WORKED!!!

This means that windows and linux handle the redirect code slightly different. The include file was in the same directory on my linux box and my windows box. It worked on the linux box but not the windows box. I am going to test it now to make sure it still works on the linux box but I think it will still work.


original config that doesn't work
/mystuff/
-> mystuff.php <- has a include for mystuff_header.php
-> mystuff_header.php

new config that works
/mystuff/
-> mystuff.php <- has a include for mystuff_header.php
/includes/
-> mystuff_header.php


hope this helps someone else too.....

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Web Database

Join thousands of Web developers who build Web applications with minimal coding.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.