Announcement

  •  » Engine
  •  » Calling pwg.session.login to login user via php script?

#1 2012-10-24 04:15:44

sigmahawk
Member
2012-10-24
1

Calling pwg.session.login to login user via php script?

Good evening,

I am attempting to have a user be automatically logged in via a php script. I am using CURL to access the API, which appears to log in the user properly, then set the session cookie "pwg_id" that is returned by CURL. This session also appears to be active in the database, however visiting the gallery does not result in the user being logged in. Aside from calling pwg.session.login and ensuring that a cookie with the session is set, what else could be done to ensure that the user is automatically logged in upon visiting the gallery?

Offline

 

#2 2012-10-24 06:50:27

rvelices
Former Piwigo Team
2005-12-29
1960

Re: Calling pwg.session.login to login user via php script?

sorry we have a mechanism against session hijacking based on partial ip address so this is not going to work unless you manually tweak teh code on your site to remove this protections

Offline

 

#3 2012-10-25 04:07:40

sunhubble
Member
2012-10-25
1

Re: Calling pwg.session.login to login user via php script?

thanks for this one.

Offline

 

#4 2013-04-06 01:11:05

Polly
Translation Team
2010-01-15
60

Re: Calling pwg.session.login to login user via php script?

hey ....
where to tweak the code? .... i want to be able to login with php to pull all images into my php script.

thank you,

polly

Offline

 

#5 2013-04-06 11:29:53

nicolas
Former Piwigo Team
2004-12-30
1232

Re: Calling pwg.session.login to login user via php script?

Polly wrote:

hey ....
where to tweak the code? .... i want to be able to login with php to pull all images into my php script.

thank you,

polly

Hi. In your local configuration (local/config/config.inc.php) you can add a new entry :

Code:

$conf['session_use_ip_address'] = false;

Offline

 

#6 2013-04-06 18:40:45

Polly
Translation Team
2010-01-15
60

Re: Calling pwg.session.login to login user via php script?

hey .....

it didn't work for me :-(
opened a new topic: http://piwigo.org/forum/viewtopic.php?p … 04#p142004

thanks!

Offline

 
  •  » Engine
  •  » Calling pwg.session.login to login user via php script?

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact