uid check by file_exists

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
leguye
Forum Newbie
Posts: 2
Joined: Tue Jan 07, 2003 11:00 am

uid check by file_exists

Post by leguye »

Hello,

I've just installed PHP 4.3.0. The 4.0.6 was installed before. With the new version, in safe mode, the 'file_exists' function produce this warning:

Warning: file_exists() [function.file-exists]: SAFE MODE Restriction in effect. The script whose uid is 302 is not allowed to access /full/path/to/file.gif owned by uid 301 in /full/path/to/script.php on line 12

I did not have this problem with version 4.0.6.

Please help me!

Thank you,


Emmanuel.
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

User avatar
mydimension
Moderator
Posts: 531
Joined: Tue Apr 23, 2002 6:00 pm
Location: Lowell, MA USA
Contact:

Post by mydimension »

this may have the answer your looking for: http://www.php.net/manual/en/features.s ... e-mode-gid
if you don't have access to the php.ini file then you might be able to use the ini_set() function.
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

safemode-settings can't be altered by ini_set(). Would be useless otherwise ;)
leguye
Forum Newbie
Posts: 2
Joined: Tue Jan 07, 2003 11:00 am

Post by leguye »

I tried the safe_mode_gid (On or Off) without any effect. I repeat that in version 4.0.6 my php.ini is OK. Is the file_exists() function more restricted in 4.3.0?

Thanx,

Emmanuel.[/quote]
maxim
Forum Newbie
Posts: 4
Joined: Wed Jan 08, 2003 9:09 am

Post by maxim »

Is the file_exists() function more restricted in 4.3.0?
Yes it is, in safe mode there are a lot of restrictions based on your ownership of the files and so on.
Post Reply