Re: [PHP] problem including images in safe_mode

2004-07-16 Thread Frank Holtschke
Jason Wong wrote:
On Thursday 15 July 2004 23:30, Frank Holtschke wrote:

Even if you could prevent an included file from being parsed, I can't see
how it would help you as you can't assign the contents to a variable. But
you say that you "sometimes have problems" which implies that sometimes
it works. Could you explain how it works?
We just flush it on the display. the php-script is an image src like


That's interesting.

The showImage.php does an include of the image which is located out of
the DocumentRoot.
The image is generated by a cron script. Mostly it works but sometimes
we have the problem
described above.

And anyway why are your images in safe_mode_include_dir in the first
place?
Cause php-scripts (owned by different uids => therefore the
safe_mode_include_dir ) of various virtual servers  make use of the image.

Several suggestions:
1) If the various virtual servers have no need to perform file operations 
anywhere else then you may get away with setting open_basedir appropriately.

2) Use the safe_mode_gid switch.
3) If cronjob is owned by root then have it create images for each of the 
virtual servers and set permissions accordingly.

thanks for your suggestions. We think about a very simple solution. Just 
changing the parser-identifier
from '
 '

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] image

2004-07-16 Thread Frank Holtschke
Php wrote:
like i call an image if the img tag but instead of loading the image it
loads a php script
did you send the mime-type header first? Something like:
header("Content-Type: image/png");
Then you can do an include of the image or something like that.
"Jason Wong" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
On Friday 16 July 2004 08:06, php wrote:

how do you catch an image request and instead of the image display php?
Please elaborate.
--
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
Neil Armstrong tripped.
*/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] problem including images in safe_mode

2004-07-15 Thread Frank Holtschke
Jason Wong wrote:
On Thursday 15 July 2004 19:52, Frank Holtschke wrote:

i have sometimes problems to include images. the reason are substrings
like 
parse error, unexpected ',' in
unforunatly there in no other way to include the image, cause the server
runs in safe_mode and
the image is located in the safe_mode_include_dir. therefore readfile
and things like that wont work.
Any suggestions how to protect an including file for getting parsed?

Even if you could prevent an included file from being parsed, I can't see how 
it would help you as you can't assign the contents to a variable. But you say 
that you "sometimes have problems" which implies that sometimes it works. 
Could you explain how it works?
We just flush it on the display. the php-script is an image src like 

The showImage.php does an include of the image which is located out of 
the DocumentRoot.
The image is generated by a cron script. Mostly it works but sometimes 
we have the problem
described above.

And anyway why are your images in safe_mode_include_dir in the first place?
Cause php-scripts (owned by different uids => therefore the 
safe_mode_include_dir ) of various virtual servers  make use of the image.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] problem including images in safe_mode

2004-07-15 Thread Frank Holtschke
Hall all,
i have sometimes problems to include images. the reason are substrings 
like 
in that case the php-parser tries to parse the string and returns the error:

parse error, unexpected ',' in
unforunatly there in no other way to include the image, cause the server 
runs in safe_mode and
the image is located in the safe_mode_include_dir. therefore readfile 
and things like that wont work.
Any suggestions how to protect an including file for getting parsed?

Thanks in advance.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php