FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Session Handling for multiple languages, permission denied
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Session Handling for multiple languages, permission denied [message #170917 is a reply to message #170916] Wed, 08 December 2010 10:42 Go to previous messageGo to previous message
jwcarlton is currently offline  jwcarlton
Messages: 76
Registered: December 2010
Karma:
Member
On Dec 8, 3:01 am, Erwin Moller
<Since_humans_read_this_I_am_spammed_too_m...@spamyourself.com> wrote:
> On 12/8/2010 8:26 AM, jwcarlton wrote:
>
>> I can set and read $_SESSION in PHP, no problem. But the file is being
>> stored on the server at /tmp/, and it's permission is set at 0600
>> (read and write by owner only).
>
>> If I want to access the session in other languages (like Perl),
>> permission is denied. How do I set PHP to save them with a different
>> read/write permission?
>
> Hi,
>
> As you mentioned, it is all about filepermissions.
> So you must first figure out the users that are acting in name of the
> programs. Or differently formulated, figure out as *which* user PHP
> runs, and also for Perl.
>
> It is possible they both run under Apache as www-data (Or 'apache', or
> 'nobody':  whatever you/your distro choosed when you installed apache.)
>
> If they are both the same user, you can read the sessionfiles.
> If not, you have a few options:
> 1) Make them the same user.
> 2) Change the sessionstorage directory for PHP, and make sure you give
> it such permissions both users can access it.
>
> I would advise against changing the permissions for /tmp.
>
> Hope this helps.
>
> Regards,
> Erwin Moller
>
> --
> "There are two ways of constructing a software design: One way is to
> make it so simple that there are obviously no deficiencies, and the
> other way is to make it so complicated that there are no obvious
> deficiencies. The first method is far more difficult."
> -- C.A.R. Hoare

Thanks, Erwin. Can you suggest how I would tell which user PHP and
Perl run as? I suspect that you're correct, and that they are
different.

If I change the session storage directory, is there a risk of it
running slower?
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: What could be causing this "Invalid callback" warning?
Next Topic: Best PHP Groupware Tools Script Sharing
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Fri Sep 20 08:44:44 GMT 2024

Total time taken to generate the page: 0.04090 seconds