logo       

Re: Question about encoder - CGI - disk_only: msg#00010

Subject: Re: Question about encoder - CGI - disk_only
Alexander Krause wrote:
> Hi Ben,
>
> On Sunday 16 July 2006 08:15, Ben Chabot wrote:
>   
>> Hello!
>>
>> I know the site says it does not support CGI, and if that is an issue,
>> please consider this a "why not" kind of question.
>>     
> i think you should check your eaccelerator.ini cos I'm getting at 
> least 'Caching Enabled=true' in my phpinfo (with the 0.9.5-beta2, cgi mode 
> with suphp).
> I suppose it's not working in cgi-mode cos the cache is cleaned after php 
> ends 
> (which is the case in cgi-mode) and my info says 'Cached Scripts=1'.
> This works in fast-cgi mode (ea mention about 50 cached scripts on my 
> lighttpd).
>   
[eAccelerator]
extension="eaccelerator.so"
eaccelerator.keys="disk_only"
eaccelerator.sessions="disk_only"
eaccelerator.content="disk_only"
eaccelerator.debug="1"
eaccelerator.log_file="/tmp/eaccelerator.log"


That is my php config.  You say the cache directory is cleaned up after 
php exists in CGI mode.  IS there any way to stop this?
> eaccelerator_get() and eaccelerator_put() are working too (cgi and fast-cgi).
>
>   
I don't know about those, this works though :  return 
eaccelerator_load('eJxzdXR2dvVxDXIM8Q9iYGFgYGBkYGACkwxgBhjYsEIZDIyMzOxAqiCjIDMvLd+OHSzECJUEADnfBv4=');?>

>> Anyway, I'm running an suexec that chroots (this is CGI of course).
>> I've got the encoder working in the chroot just fine as far as I can
>> tell.
>>     
> Do you mean eaccelerator_encode()? Does eaccelerator_load() works too?
>   

Yea, eaccelerator_load seems to work (see above)
>> It outputs code that is then able to run. PHP -v reports 
>> eaccelerator... but, php -i shows "caching enabled" as false.
>>     
> Same here with cli-mode:
> erazor-zone ~ #  php -i | grep Caching
> Caching Enabled => false
>
>
> But cgi-mode works:
> erazor-zone ~ #  php-cgi -i | grep Caching
> <tr><td class="e">Caching Enabled </td><td class="v">true </td></tr>
>   
Mine says false for both :

bash-2.05b# ./php -v
PHP 4.4.1 (cgi) (built: Jul 16 2006 01:44:27)
Copyright (c) 1997-2004 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies
    with eAccelerator v0.9.5-beta2, Copyright (c) 2004-2006 
eAccelerator, by eAccelerator

bash-2.05b# ./php -i | grep Caching
<tr><td class="e">Caching Enabled </td><td class="v">false </td></tr>

>   
>> So does 
>> my phpinfo() page.  And nothing is written to the log or the file
>> cache.  I have content, keys and sessions as "disk_only."
>>     
> I'm using shm_and_disk.
>
>   
I've tried shm_and_disk as well, but thought disk_only would make it 
cache, but no.. neither works. :(
>> So, my question is... why can't I cache to disk_only in CGI mode through
>> suexec?  Sure it'll be slower and such, but I'd really like to see if
>> this will make any kind of improvement.  Also, /tmp/eaccelerator in the
>> chroot is chmod 777.  So, I don't think anything is wrong there.
>>
>> If anyone can tell me how to make this automatically cache to the cache
>> dir please let me know!!  All I want to do is cache the compile php to
>> disk, that shouldn't be impossible should it?
>>     
> Whats the output of phpinfo in your eaccelerator section?
> And how did you compile eaccelerator?
>   
http://www.seaoffire.net/phpinfo.php

And I compiled eaccelerator a mutltitude of different ways, turning of 
shared memory, turning it on.. same with debug, and just about every 
other option.  Right now I used :

./configure \
--with-eaccelerator-content-caching \
--with-eaccelerator-sessions \
--with-eaccelerator-debug \
--enable-eaccelerator=shared \
--with-php-config=/usr/php/bin/php-config \
--without-eaccelerator-shared-memory

Thanks for the help, I have a feeling I am just missing some little 
thing somewhere. ... thanks!


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
science.linguis...    culture.sf.lite...    video.mplayer.c...    yellowdog.gener...    ietf.rfc822/199...    emacs.help/2002...    redhat.release....    kernel.speakup/...    java.openejb.de...    debian.devel.gt...    xfree86.newbie/...    bug-tracking.ma...    pam/2003-05/msg...    games.devel.ope...    user-groups.lin...    music.pancham/2...    network.mq.deve...    web.html.genera...    arklinux.bugs/2...    linux.ecasound/...    qnx.openqnx.dev...    org.user-groups...    file-systems.sf...    trustix.contrib...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe