Infinite redirect loop on Admin page

I just installed v2.04.14, and the installation went fine, but when I tried to access the Admin page (which I renamed for security purposes and changed in config.local.php file), I get this error:


[QUOTE]Too many redirects occurred trying to open

“[url]http://www.website.com/admin362.php?dispatch=auth.login_form&return_url=admin362.php%3Fdispatch%3Dauth.login_form%26return_url%3Dadmin362.php%253Fdispatch%253Dauth.login_form%2526return_url%253Dadmin362.php%25253Fdispatch%25253Dauth.login_form%252526return_url%25253Dadmin362.php%2525253Fdispatch%2525253Dauth.login_form%25252526return_url%2525253Dadmin362.php%252525253Fdispatch%252525253Dauth.login_form%2525252526return_url%252525253Dadmin362.php[/url] … etc.



This might occur if you open a page that is redirected to open another page which then is redirected to open the original page.[/QUOTE]





My host is Godaddy, and they said it was most likely a problem with the CS code. I emailed CS tech support a few days ago, but have yet to hear back. From what I can find on the issue, the problem might be caused by Godaddy throttling their servers and setting session cookies, or it might have to do with the curl settings. Does anyone know what I can do to fix the problem? I’ve installed CS Cart on a different host before, and did not have this problem.



thanks,



Sarah

Can you post the contents of your .htaccess file?

Here it is:


[QUOTE]DirectoryIndex index.html index.php





RewriteEngine on

Some hostings require RewriteBase to be uncommented

Example:

Your store url is [url]http://www.yourcompany.com/store/cart[/url]

So “RewriteBase” should be:

RewriteBase /store/cart

RewriteBase /

RewriteCond %{REQUEST_FILENAME} !.(png|gif|ico|swf|jpe?g|js|css)$

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule . index.php?sef_rewrite=1 [L,QSA]



RewriteCond %{REQUEST_FILENAME} ./catalog/.

RewriteCond %{REQUEST_FILENAME} -d

RewriteCond %{REQUEST_FILENAME}/index.html !-f

RewriteRule . index.php?sef_rewrite=1 [L,QSA]



[/QUOTE]



I tried it without the mod_rewrite code, and it had no effect.



Thanks for taking the time to respond!

[quote name=‘sarah77’]Here it is:







I tried it without the mod_rewrite code, and it had no effect.



Thanks for taking the time to respond![/quote]

The .htaccess file is ok, I guess it will be the host and some php settings. You could create a file called e.g. phpinfo.php and put this code inside:


phpinfo();
?>
Then open the URL in your browser and check the php settings. Or post the URL to see what are your php settings on the server.



Anyway Godaddy isn’t the best choice to host your CS-Cart.

Here is the php info. I’m not really sure what I should be looking for.



Why is Godaddy not the best choice?



Thanks.

[quote name=‘sarah77’]Here is the php info. I’m not really sure what I should be looking for.



Thanks.[/quote]

Hi here is a link to a php coniguration that works:



[URL]http://www.cscartdemo.martfox.com/phpinfo.php[/URL]



Just compare it with yours.


[quote]Why is Godaddy not the best choice?

[/quote]Their shared servers are not the fastest and I think they don’t support changes of php.ini settings through .htaccess file.

Is there something specific I should be looking for? I have no idea what most of that stuff means.

[quote name=‘sarah77’]Is there something specific I should be looking for? I have no idea what most of that stuff means.[/quote]

Try to add this to your .htaccess file in the first line:


php_value allow_call_time_pass_reference 1

or

php_flag allow_call_time_pass_reference 1

or

php_flag allow_call_time_pass_reference on 			 		

Thanks, but unfortunately I get a 500 server error when I try to add any of that code to my htaccess file. I tried adding it to the php.ini file, like this:

allow_call_time_pass_reference = on

but it had no effect. Here is what was in my php.ini file:


[QUOTE]register_globals = off

allow_url_fopen = off



expose_php = Off

max_input_time = 60

variables_order = “EGPCS”

extension_dir = ./

upload_tmp_dir = /tmp

precision = 12

SMTP = relay-hosting.secureserver.net

url_rewriter.tags = “a=href,area=href,frame=src,input=src,form=,fieldset=”



[Zend]

zend_extension=/usr/local/zo/ZendExtensionManager.so

zend_extension=/usr/local/zo/4_3/ZendOptimizer.so[/QUOTE]



I just noticed that “Scan this dir for additional .ini files” is set to “none”, so I don’t think that ini file is even getting read. EDIT: I got it to read the file by renaming it to php5.ini. However, it still has no effect with the added allow_call_time_pass_reference variable.

Hmmm… but anyway that wouldn’t be the CS code.


[QUOTE]…but when I tried to access the Admin page (which I renamed for security purposes and changed in config.local.php file)[/QUOTE]



Was it working before with the original admin.php file? What are the permissions of your config.local.php, admin and index file?

[quote name=‘indy0077’]Was it working before with the original admin.php file? What are the permissions of your config.local.php, admin and index file?[/QUOTE]



No, it never worked. Even if I try naming it back to just admin.php, and setting all the permissions to 777, it still doesn’t work. My current permissions are:



config.local.php 644

admin.php 704

index.php 604



The index loads fine.

Do you think the problem might have something to do with Godaddy’s proxy settings?

[quote name=‘sarah77’]No, it never worked. Even if I try naming it back to just admin.php, and setting all the permissions to 777, it still doesn’t work. My current permissions are:



config.local.php 644

admin.php 704

index.php 604



The index loads fine.[/quote]

Ok, then first you have to contact your provider and ask them to reset the files ownership.



I don’t know your server configuration, but generally you should use 644 for files and 755 for folders except folders which need to be writable.



Then I would delete the tables in the database and re-install the cart (maybe it might be worth to reupload all files to your server as well before the installation).

[quote name=‘indy0077’]Ok, then first you have to contact your provider and ask them to reset the files ownership.



I don’t know your server configuration, but generally you should use 644 for files and 755 for folders except folders which need to be writable.



Then I would delete the tables in the database and re-install the cart (maybe it might be worth to reupload all files to your server as well before the installation).[/QUOTE]



Why would I need godaddy to rest the files ownership? I don’t think it’s a permissions problem. Like I said, even at everything set to 777, it still doesn’t work. I’m not ready to re-install everything yet. I’m still waiting to hear back from CS-Cart tech support. If I don’t hear back from them by tomorrow, I guess I’ll start all over.

[quote name=‘sarah77’]Why would I need godaddy to rest the files ownership? I don’t think it’s a permissions problem. Like I said, even at everything set to 777, it still doesn’t work. I’m not ready to re-install everything yet. I’m still waiting to hear back from CS-Cart tech support. If I don’t hear back from them by tomorrow, I guess I’ll start all over.[/quote]

Oh so, I thought that you can’t set the name back to admin.php. BTW if it’s once installed you don’t have to set the permissions to 777. That’s absolutelly wrong.

[quote name=‘indy0077’]Oh so, I thought that you can’t set the name back to admin.php. BTW if it’s once installed you don’t have to set the permissions to 777. That’s absolutelly wrong.[/QUOTE]



Well you thought it might be a permissions problem, so I changed all the files you mentioned to 777 just to make sure that wasn’t the problem. I changed everything back to the way I had it.



Do you know if there is a file I can edit to change the proxy settings? Apparently Godaddy has special settings according to these sites:

[url]CS-Cart Documentation — CS-Cart 4.15.x documentation

[url]http://www.ecommercetemplates.com/support/topic.asp?TOPIC_ID=57245[/url]



CS-Cart says to change it in the Admin section, but I obviously can’t do that since I can’t access it.

[QUOTE]Do you know if there is a file I can edit to change the proxy settings?

[/QUOTE]



You can change it through phpMyAdmin



table: cscart_settings

option_id: 9214 - 9217

Thanks, but I don’t know enough about running queries to know what to write. I don’t want to mess anything up.

[quote name=‘sarah77’]Thanks, but I don’t know enough about running queries to know what to write. I don’t want to mess anything up.[/quote]

Just open the database in cPanel through phpMyAdmin find the table and the id’s and put it manually there.

[quote name=‘indy0077’]Just open the database in cPanel through phpMyAdmin find the table and the id’s and put it manually there.[/QUOTE]



Thanks, I found it, and will try it.

EDIT: That had no effect.

[quote name=‘sarah77’]Thanks, I found it, and will try it.

EDIT: That had no effect.[/quote]

Then I see only two ways: reupload and reinstall the cart, if it won’t work then it should be in the php (server) settings. The cart works well on other servers, then I don’t see any reason.