Forums / General / Copied site now requires user login

Copied site now requires user login

Author Message

James Ward

Friday 17 July 2009 12:10:34 pm

I copied a site over to a new server, a complete copy of the database and the site files. After extracting everthing in the new location I made changes to the site/site.ini.append.php and the site_admin/site.ini.append.php database information and loaded the site.

The admin section works fine but the user site is now requesting a user login to view every page of the site. If I login to the user site as admin I can see the content but that is the only way.

Checking annonymous user is granted read access to all standard and media content and should be able to see the site.

Has anyone experienced something similar when copying a site to a new location? I don't want to start making drastic changes to the site setup since it is working perfectly fine on the old server.

Thanks in advance.

working at www.wardnet.com
blogging at www.jamesward.ca

James Ward

Friday 17 July 2009 12:56:56 pm

Quick update on what I have tried so far:
CHMOD entire var directory to 777 with no effect.

Turned debugging on for the user site and am receiving the following error:

Error: error/view.php Jul 17 2009 23:00:41

Error ocurred using URI: /

Any thoughts what this means?

working at www.wardnet.com
blogging at www.jamesward.ca

Matthieu Sévère

Friday 17 July 2009 1:40:30 pm

Try to check your setting in your site.ini you've maybe copy the directive to force login wich is present in the admin site.ini but shouldn't be in the front site.ini

--
eZ certified developer: http://ez.no/certification/verify/346216

James Ward

Friday 17 July 2009 2:07:00 pm

Thank you for the suggestion.

The only change I made to the site.ini.append.php for the "site" siteaccess was the database username and password.

In that site.ini.append.php I have the lines:

[SiteAccessSettings]
RequireUserLogin=false

So I do not think that is the issue. It would also not explain the URI error I am receiving. Any other suggestions would be much appreciated.

working at www.wardnet.com
blogging at www.jamesward.ca

Greg McAvoy-Jensen

Friday 17 July 2009 11:21:16 pm

James,

Good question.

The error you mention might be related to this:
http://serwatka.net/blog/make_your_extension_compatible_with_ez_publish_4_1
If so, it may be resolved when the user login question is answered.

You might try looking at the site.ini files via the admin interface to confirm no ini file anywhere is forcing user login (as you checked with the siteaccess). Other brainstorm ideas: clear cache, delete cache, regenerate autoloads. Is the anonymous user also blocked from seeing pages like /content/search and /ezinfo/about? This might help you know whether they're being denied access to content or to the siteaccess as a whole.

Granite Horizon, Certified Developer of eZ Publish Web Solutions
Provider of the SaaS Solution Granite Horizon In The Cloud | http://granitehorizon.com/cloud
http://granitehorizon.com | +1 916 647 6350 | California USA | @granitegreg
Blog: http://granitehorizon.com/blog

André R.

Monday 20 July 2009 12:28:54 am

Did you find a solution James?
Might be user access cache, the one in var/<site_dir>/cache/user-info* (and in sessions, so truncate ezsession table as well).

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

James Ward

Monday 20 July 2009 8:04:39 am

Still no solution.

Greg,
I completed deleted my cache directories manually to ensure the issue was not related to that.
The site is a complete copy (ez directories included) of a functioning 3.7.2 site. System info says I am running PHP 4.4.9 (This is a webdeal server and they were aware I was running a 3.x version when they setup this host for me.) So it is not a module issue with ez4.x.

ezinfo/about is displayed correctly for my anonymous user however content/search requires the user to login. Not sure what that means.

I double checked all my site.ini files and requireuserlogin is definitely disabled for all my front-end siteaccesses.

I turned on debugaccess but it is giving me no more information than I already had. It says I am using the "en" siteaccess which is as I expect and then in the case of trying to access the search it says:

Error: error/view.php  	Jul 20 2009 18:07:25

Error ocurred using URI: /index.php/en/content/search

I am going to completely recopy the site and see what happens. Maybe there was an error in my tar process that I did not notice. If there are any other suggestions please let me know.

working at www.wardnet.com
blogging at www.jamesward.ca

Heath

Monday 20 July 2009 8:27:51 am

If the eZ Publish installation is the same than I would question the web server configuration as being different. Are you using mod_rewrite in the same way as the existing server (check vhost conf and .htaccess file for proper mod_rewrite rules).

Also are you using ForceVirtualHost=true
I always do ...

Cheers,
Heath

Brookins Consulting | http://brookinsconsulting.com/
Certified | http://auth.ez.no/certification/verify/380350
Solutions | http://projects.ez.no/users/community/brookins_consulting
eZpedia community documentation project | http://ezpedia.org

James Ward

Wednesday 22 July 2009 9:32:43 am

Thanks for all the suggestions but still no luck.

Heath,
I set ForceVirtualHost=true for the user site access but it does not seem to have had any effect. Cleared the caches as well.

André,
I manually deleted all the cache files with no success. I am not sure what you mean by "truncate ezsession table". Can you provide more detail before I start messing with the table?

I have a support request in with the hosting company to see if they can track down the problem but they have not responded yet.

working at www.wardnet.com
blogging at www.jamesward.ca

Clément Matéo

Monday 08 November 2010 8:15:00 am

Over 1 year later ...

I had the same issue, I just needed to add user/login policy to anonymous role, and it worked.

The weird part came from importing dump from the site I copied... even if the user/login policy is present in the source site, it despaired in the new one

Clément Matéo

Monday 08 November 2010 11:54:01 pm

Found why user/login policy has disappeared : I use installation process (by setting CheckValidity to true in site.ini). this process delete that kind of policy for anonymous user