Re: [suPHP] PHP opcode cache that works with suPHP

2009-05-19 Thread Jani Ollikainen
Vladimir Prelovac wrote:
> Do you guys know of any PHP caching solution that will work with suphp?

There aren't for the reasons how mod_suphp works.

I've been thinking about what would be needed to make some opcode caching.

- PHP as Fast-CGI with user rights

- mod_suphp or fork or new code (later mod_fsuphp:) which handles these 
and sends requests to already existing fastcgi php if one exists, if not
it will run new fast-cgi php and send the request there.

- mod_fsuphp will need to watch those fast-cgi processes and kill them
when some idle time is exceeded or some memory consuption restrictions
is exceeded.

Negative impact is of course the memory consuption that every user will
have it's own opcode cache.

Maybe that would also be possible to avoid with shared memory which is 
read/writable with some group which these users belong and the used 
opcode cache uses shm.

I'm not so familiar with apache/apache's modules/mod_suphp that I could
say that this approach is doable. This is just something that I've been
thinking.

If this is doable I think it would be nice in the sites which are using
mod_suphp but there aren't plenty of active users.

At this moment I don't have any plans to research/implement these,
but if someone has I'd be interested.

Also comments are welcome...


-- 
Yhteistyöterveisin,
Jani Ollikainen @ Pronetko Networks Oy

___
suPHP mailing list
suPHP@lists.marsching.biz
http://lists.marsching.com/mailman/listinfo/suphp


Re: [suPHP] Symlink bug in 0.7.0

2009-01-26 Thread Jani Ollikainen
Scott wrote:
> if (directory.isSymlink()
> if (!directory.isSymlink()

I found this to break also symlinks other than the document_root.

I had document_root/directory which where symlink to 
/usr/share/directory and that just didn't want to follow it.

After patching suphp by adding ! it works correctly.

Here's the patch for patch(1):


--- suphp/src/Application.cpp 2008-03-30 17:43:59.0 +0300
+++ suphp-bs/src/Application.cpp  2009-01-26 12:41:22.0 +0200
@@ -564,7 +564,7 @@
  throw SoftException(error, __FILE__, __LINE__);
  }

-if (directory.isSymlink()
+if (!directory.isSymlink()
  && !config.getAllowDirectoryOthersWriteable()
  && directory.hasOthersWriteBit()) {
  std::string error = "Directory \"" + directory.getPath()





___
suPHP mailing list
suPHP@lists.marsching.biz
http://lists.marsching.com/mailman/listinfo/suphp


Re: [suPHP] SuPHP recursive forking

2008-09-26 Thread Jani Ollikainen
On Fri, Sep 26, 2008 at 10:20:09AM -0500, John Lightsey wrote:
> On a cPanel machine /usr/bin/php is the PHP CGI binary and /usr/local/ 
> bin/php is the PHP CLI binary.  In /opt/suphp/etc/suphp.conf the  
> env_path is set to /bin:/usr/bin.

In smart distributions php is the cli binary and php-cgi is the cgi
binary..

If cPanel uses both cgi and cli with the name php, that's just nasty.
I think you should try to fix cPanel to have smarter naming of php binaries.

-- 
 Jani Ollikainen

___
suPHP mailing list
suPHP@lists.marsching.biz
http://lists.marsching.com/mailman/listinfo/suphp


Re: [suPHP] suphp and Return_path + safe_mode repecussion

2008-03-07 Thread Jani Ollikainen
Alessandro De Zorzi wrote:
> for example, suppose a user change memory_limit setting
> 
>  ini_set('memory_limit', '1024M');
> phpinfo();
> ?>
> 
> this is not possible with safe_mode=On
> Another one is setting custom path to execute binary command with
> system() function

Hi,

Better way of disabling those is to disable system() and ini_set()

/etc/php.ini:
; This directive allows you to disable certain functions for security 
reasons.
; It receives a comma-delimited list of function names. This directive is
; *NOT* affected by whether Safe Mode is turned On or Off.
disable_functions =



___
suPHP mailing list
suPHP@lists.marsching.biz
http://lists.marsching.biz/mailman/listinfo/suphp


Re: [suPHP] php-cgi bug or suphp bug?

2007-09-07 Thread Jani Ollikainen
On Fri, Sep 07, 2007 at 05:55:27PM +0200, Alessandro De Zorzi wrote:
> I agree, but I need set on one for one domain only in restricted area

Oh, bad luck then, but you could use multiple php.ini.

One example is:
http://lists.marsching.biz/pipermail/suphp/2006-March/001244.html

Reason for multiple php.ini is different, but you should
be able get the idea.


-- 
 Jani Ollikainen   http://iki.fi/bestis/

___
suPHP mailing list
suPHP@lists.marsching.biz
http://lists.marsching.biz/mailman/listinfo/suphp


Re: [suPHP] php-cgi bug or suphp bug?

2007-09-07 Thread Jani Ollikainen
On Fri, Sep 07, 2007 at 05:07:11PM +0200, Roland Tapken wrote:
> This code works as expected with register_globals=off. But let me quote PHP 
> manual:

More important part of the manual is:
http://fi.php.net/manual/en/security.globals.php

For short: Don't use it

Someone might say that don't use it if you don't know what you are
doing, but if you know what you are doing you won't use it.

-- 
 Jani Ollikainen   http://iki.fi/bestis/

___
suPHP mailing list
suPHP@lists.marsching.biz
http://lists.marsching.biz/mailman/listinfo/suphp