Deploying Yii application on IPOWER web hosting

Greetings,

I just deployed my website on IPOWER web hosting and i had a problem while logging into my website tho it was working good on wamp.

Problem Description :

If you try to log in , the user information would not be saved into the session .

the log in would redirect to the home page as if succeeded but actually it failed because you still cant use the

pages where log in is required plus the log in tab wouldn’t change to “username + (log-out)”.

Problem cause:

Ipower have a strange way of using sessions , in order to use php session you have to specify something called

"session_save_path(); " so you can tell the server where to save the session .

Solution:

according to Ipower’s guide

you have to put the below function at the beginning of ur script :

session_save_path("your home directory path"/cgi-bin/tmp);

to explain more,

  1. what you need to do is visit this link and find out your web document root path(home directory path)

"ipower.com/controlpanel/cgiManagement/PHPplus.bml"

  1. create a new directory in your web root folder called "/cgi-bin/tmp"

so its a directory called "cgi-bin" and inside it another directory called "tmp"

3)next thing i did was to add the

session_save_path("your home directory path"/cgi-bin/tmp);

in my "controller.php" inside "/protected/components" as all controllers extend this one .

just put it before class declaration.

now , the part where it says "your home directory path" ,replace it with the path you got from step one.

and there you go , it should work

cheers.