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 #170916 is a reply to message #170915] Wed, 08 December 2010 08:01 Go to previous messageGo to previous message
Erwin Moller is currently offline  Erwin Moller
Messages: 228
Registered: September 2010
Karma:
Senior Member
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
[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: Sun Nov 24 23:32:48 GMT 2024

Total time taken to generate the page: 0.04913 seconds