Jump to content
Sign in to follow this  

QTPro - redirects to login.php on Add

Recommended Posts



I have installed QTpro and it is working fine in all respects but this.


In the stock area for any product (page admin/stock.php) when I change the stock quantities and click on the ADD button, before it updates them on the screen I get re-directed to the login.php page each time and have to re-enter my password. So on the Get command for this page it is re-directing me and re-requiring my password.


Obviously this is a nightmare when updating stock quantities to keep having to re-enter the username and password.


I can't find where to stop it doing this. On previous installs of oscommerce with QTpro it didn't do this. Any ideas how and where I can change this?


I've been looking in admin/includes/application_top.php but can't seem to work out where it is redirecting to login.php on this particular command on the stock page. I'm not even sure if I'm looking in the right place.


Any help would be greatly appreciated!

Share this post

Link to post
Share on other sites

So as far as I've got now is finding that the QTPro installation is the only area in admin that uses the Get method and that is what is prompting the re-direct.


I think some other contributions for admin use the GET method. Have found this problem in the forums a few times, but no answers that stop the re-direct on GET method.


Not sure how to get around this - any ideas?

Share this post

Link to post
Share on other sites

I found the solution and as usual with oscommerce its something really simple. In admin/stock.php


about line 214 just before the closing </form> add <?php echo tep_hide_session_id(); ?>


This will stop the GET method interfering with the session id and requiring a new login.


I think it works fine. See code below:


Original (about line 214)



Change to:

       <?php echo tep_hide_session_id(); ?></form></td>

Share this post

Link to post
Share on other sites

I found the issue to actually be in my admin/includes/configure.php file, I had it incorrect; though all other admin functions worked, I got the redirect you mention, but read this post and fixed it by doing a default oscommerce install and mirroring the automated configure.php file. Also, see this post



Share this post

Link to post
Share on other sites

And another solution is to replace line 163


<td><form action="<?php echo $PHP_SELF;?>" method=get>




<td><form action="<?php echo tep_href_link(FILENAME_STOCK);?>" method=get>





Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile


Virus Threat Scanner

My Contributions

Basic install answers.

Click here for Contributions / Add Ons.

UK your site.

Site Move.

Basic design info.


For links mentioned in old answers that are no longer here follow this link Useful Threads.


If this post was useful, click the Like This button over there ======>>>>>.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this