[PHP] PHP Patch open_basedir for dynamic virtualhost

2007-03-07 Thread DoM
Hi all,
it's a lot of time that i am trying to let Jason Greene open_basedir
patch work with apache massive virtualhost.

This is direct link to patch when it was developed:
http://www.phpbuilder.com/lists/php-developer-list/2000101/0994.php

This is a FreeBSD port more recent with same code:
http://lists.freebsd.org/pipermail/freebsd-ports-bugs/2005-September/066983.html

If i set to open_basedir directive (inside virtualhost config section)
value VIRTUAL_DOCUMENT_ROOT, it works but i am not able to add static
path like /tmp/

This is an example:

VirtualDocumentRoot /var/www/php.net/%1
php_admin_value open_basedir VIRTUAL_DOCUMENT_ROOT

user test.php.net is chrooted for php scripts in his homedir but he
cannot write temporary files inside /tmp/

I tried with value %1; VIRTUAL_DOCUMENT_ROOT:/tmp/ and more but no way.

These are my apps version:

OS: Debian Sarge 3.1
Server version: Apache/2.0.54 (mpm-prefork pacchettizzata)
PHP: 4.4.6 (Source) & 5.2.1 (Source)

Any help will be useful and appreciated.

Thank you all


Regards

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

Re: [PHP] PHP Patch open_basedir for dynamic virtualhost

2007-03-07 Thread DoM
Jim Lucas wrote:
> http://us3.php.net/manual/en/features.safe-mode.php#ini.open-basedir
> 
> Read the first line of the first paragraph.
> 
> /tmp/ is not with-in /var/www/php.net/%1 it is out side

Yes, of course i know this :)

As i wrote i would like to include static path after dynamic path like
/var/www/php.net/%1
( i remember you that i know i could assign dynamic open_basedir value
such as /var/www/php.net/%1/ or VIRTUAL_DOCUMENT_ROOT only with Jason
Greene patch)

I mean something like this:
/var/www/php.net/%1/:/tmp/:/usr/local/xxx/ and so on.

> But then read the fifth paragraph and you should have your solution.
> 

If you mean this:
The restriction specified with open_basedir is actually a prefix, not a
directory name. This means that "open_basedir = /dir/incl" also allows
access to "/dir/include" and "/dir/incls" if they exist. When you want
to restrict access to only the specified directory, end with a slash.
For example: "open_basedir = /dir/incl/"

i tell you that i do not want an open_basedir value just like
/var/www/php.net/%1/ where /var/www/php.net/tmp/ is the answer cause
then all users (%1) inside /var/www/php.net/ can access their homedir
each other.

I do not know if i understand what you mean but i hope no and hope that
i am wrong, so i could hope in a solution :)

Anyway thanks to be interested about my problem.

Waiting for your reply.


Regards

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

Re: [PHP] PHP Patch open_basedir for dynamic virtualhost

2007-03-07 Thread DoM
Jim Lucas wrote:
> DoM wrote:
>> I mean something like this:
>> /var/www/php.net/%1/:/tmp/:/usr/local/xxx/ and so on.
> does this work?
> 
> The manual says it should.

And it works for static path like /tmp/:/var/www/: but not for dynamic
path like /var/www/%0/%1 .
I need Jason Greene patch to let it work with dynamic path and
mod_vhost_alias apache.

http://www.phpbuilder.com/lists/php-developer-list/2000101/0994.php


Regards

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

Re: [PHP] PHP Patch open_basedir for dynamic virtualhost

2007-03-09 Thread DoM
DoM wrote:
> Hi all,
> it's a lot of time that i am trying to let Jason Greene open_basedir
> patch work with apache massive virtualhost.
> 
> This is direct link to patch when it was developed:
> http://www.phpbuilder.com/lists/php-developer-list/2000101/0994.php
> 
> This is a FreeBSD port more recent with same code:
> http://lists.freebsd.org/pipermail/freebsd-ports-bugs/2005-September/066983.html
> 
> If i set to open_basedir directive (inside virtualhost config section)
> value VIRTUAL_DOCUMENT_ROOT, it works but i am not able to add static
> path like /tmp/
> 
> This is an example:
> 
> VirtualDocumentRoot /var/www/php.net/%1
> php_admin_value open_basedir VIRTUAL_DOCUMENT_ROOT
> 
> user test.php.net is chrooted for php scripts in his homedir but he
> cannot write temporary files inside /tmp/
> 
> I tried with value %1; VIRTUAL_DOCUMENT_ROOT:/tmp/ and more but no way.
> 
> These are my apps version:
> 
> OS: Debian Sarge 3.1
> Server version: Apache/2.0.54 (mpm-prefork pacchettizzata)
> PHP: 4.4.6 (Source) & 5.2.1 (Source)
> 
> Any help will be useful and appreciated.
> 

Does anyone know something about that ?


Regards


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

[PHP] PHP, Java, & a strange number...

2003-11-11 Thread Dom S
Hi,
I am having problems trying to get PHP to return a Java .jar file.
Basically, the jar is reported as corrupted by Opera, or any browser and
Java 1.3. I have tracked this down to a strange number at the start of the
message body:
If I access the jar file directly (no PHP), I get (viewed by packet
sniffing)

Header stuff,
Content Type: text/html; charset=ISO-8859-1
CRLF CRLF 190 CRLF
< jar file >

When I use:




I get:
Header stuff,
Content Type: text/html; charset=ISO-8859-1
< jar file >

and it doesn't work.
So I tried adding:



and it works again, in ANY browser and ANY java version. So what is the
'190' at the start of the message all about?
It gets wierder though. My real PHP script has a session. and when I use:



I now get:

Header stuff, including lots of cache-limiting bits
Content Type: text/html; charset=ISO-8859-1
CRLF CRLF 2000 CRLF
< jar file >

The '190' is now '2000', and this fails to load in Opera & Java 1.3, but
works with IE6 & Java 1.1 or Java 1.3. So why is PHP changing this number to
2000? Is there a way to stop it?
Thank you for your time,

Dom

-- 

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



[PHP] Re: PHP, Java, & a strange number...

2003-11-11 Thread Dom S
Please ignore - now posted to bug newsgroup

"Dom S" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi,
> I am having problems trying to get PHP to return a Java .jar file.
> Basically, the jar is reported as corrupted by Opera, or any browser and
> Java 1.3. I have tracked this down to a strange number at the start of the
> message body:
> If I access the jar file directly (no PHP), I get (viewed by packet
> sniffing)
>
> Header stuff,
> Content Type: text/html; charset=ISO-8859-1
> CRLF CRLF 190 CRLF
> < jar file >
>
> When I use:
>
>   header("Content-Type: text/html; charset=ISO-8859-1");
>  readfile("tj.jar");
> ?>
>
>
> I get:
> Header stuff,
> Content Type: text/html; charset=ISO-8859-1
> < jar file >
>
> and it doesn't work.
> So I tried adding:
>
>   header("Content-Type: text/html; charset=ISO-8859-1");
>  header("\n\n190\n");
>  readfile("../_JAVARES/car/jammer.jar");
> ?>
>
> and it works again, in ANY browser and ANY java version. So what is the
> '190' at the start of the message all about?
> It gets wierder though. My real PHP script has a session. and when I use:
>
>   session_start();
>  header("Content-Type: text/html; charset=ISO-8859-1");
>  readfile("tj.jar");
> ?>
>
> I now get:
>
> Header stuff, including lots of cache-limiting bits
> Content Type: text/html; charset=ISO-8859-1
> CRLF CRLF 2000 CRLF
> < jar file >
>
> The '190' is now '2000', and this fails to load in Opera & Java 1.3, but
> works with IE6 & Java 1.1 or Java 1.3. So why is PHP changing this number
to
> 2000? Is there a way to stop it?
> Thank you for your time,
>
> Dom
>
> --

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