How to carry codeigniter session in domain alias? - codeigniter

I have two urls pointing to one application e.g
api.mysite.com & alias.mysite.com
Even if I set config:
$config['cookie_domain'] = ".mysite.com";
The session isn't carried over. I'm using the alias.mysite.com if the url will be seen by viewers via address bar when they are redirected after processing instead of having them see api.mysite.com
Appreciate any help or idea.
Thank you very much.

I believe you can find your answer here:
http://ellislab.com/forums/viewthread/57101/
Subdomain overwiting CodeIgniter session
sharing session over subdomains in PHP

Related

Angular UI-Router (1.x) Change Host Url

I have a requirement from a client to change the web site Url to a subdomain when they enter the checkout section of the site we are developing for them. For example from www.mysite.com to checkout.mysite.com. We are using UI-Router in HTML5 mode and would like to have the router change the Url to the subdomain instead of going to www.mysite.com/checkout. Does anyone know a way that this can be accomplished? I've also tried using pushState but without success. All of the subdomain suggestions I've tried have not worked. Honestly even if I just put a "fake" url that would work fine too. Changing the Url is more of a visual thing instead of actually redirecting to a subdomain.
After much review I found that this cannot be done because it is a security issue; even switching to a subdomain (which is what I was trying to do) is not allowed.

codeigniter hosting issue session_start(): Cannot send session cookie

enter image description hereI have created a web system using codeigniter. I don't have any errors while testing it in local host. after hosting the website to live host it generates some errors which cannot resolved. The errors is "session_start(): Cannot send session cookie ". I searched regarding this issue and did all possible changes in coding and config file. I have clearly define the session saving location in config. Also when I try to remove all session functionalities in my website, it generate another error which is "base_url() is not a function". Please guide further with solution. thanks all.
In application/config/config.php
$config['sess_save_path'] = sys_get_temp_dir();
Bang!
UPDATE: Regardless base_url() make sure you have the url helper loaded in the autoload.

how to make sub folder for login page and rest of the pages in codeigniter

I am working in a codeigniter project in wamp server.
My current login page is http://localhost/flowers/login and its working correctly (no issue). The rest of the urls are like this
http://localhost/handycheck/admin/dashboard etc
My issue is i need to change the login url like this
http://localhost/flowers/admin/login
&
http://localhost/flowers/providers/login
Its because I have to maintain login form for multiple users.
How can i make this.
Please help me and thanks in advance who helps me alot..
You can do this by adding custom roue in codeigniter routing configuration as follows go to config/routes and add the following entry in this file
$route['flowers/providers/login'] = 'flowers/login';
$route['flowers/admin/login'] = 'flowers/login';
this will redirect the request to the login in flowers controller and if you need to do custom handling for admins and provider you can get the url segments and do custom handling according to user type
I hope my answer would be useful

Setting up Sticky Session on AWS ELB for Prestashop

i am currently toying around with my shop hoping that i can load balance my shop.
I basically want to use the sticky session feature for my load balancer (see image below):
Unfortunately i don't know what value should i put here. This is basically where i am stuck with. As far as i know, prestashop encrypt cookies information (both name and value).
Here's a screenshot:
I have got a hunch that somehow i need to hard-code it in such a way that i creates a new cookie name and associated with a unique value for a particular session.
Can anyone help me with this? What should i do?
FYI: I am using Prestashop 1.5.4.x
I haven't found the answer on the Internet, but I managed to solve the problem for the admin section of Prestashop. You should use the option of Sticky sessions in the ELB, as you can't name the cookie that Prestashop uses. Next, you should disable the option "Check the cookie's IP address" under Administration->Preferences, but might lead to security problems. Don't know how serious.

Can we remove secure login option alone from Magento

Is there way to disable the secure login/registeration/forgot password alone, but all other pages like checkout customer dashboard area can use https but i want to disable secure url for only customer login/registeration/forgot pages, i checked on custome r module /etc/config.xml but couldnot find anything like that.
Please help me
Thanks in advance.
First you'll want to do all this from app/code/local/ of course!
With that being said you'll need to extend/edit app/code/core/Mage/Customer/etc/config.xml:
<secure_url>
<customer>/customer/account/</customer>
</secure_url>
...and remove it.
Next you'll need to edit/extend app/code/Core/Mage/Customer/Helper/Data.php:
and modify the _getUrl()'s to force using secure url on the pages you want it to be secure:
return $this->_getUrl('customer/account', array('_secure' => true));
NOTE: Like everyone else mentioned this isn't exactly a good idea from a security stand point.
Hope this helps!
Did you think that Login pages are accessed via HTTPS for a reason? The reason is to protect them from modification. Removing HTTPS will open a huge security hole and will cause leakage of passwords of your web site visitors.
So, you should overload the blocks that contents url links and rework it to get urls witout http. But the good is to use in your box the iframes.

Resources