473,396 Members | 2,038 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

php accelerator that works in cgi mode?

I am looking for an open source php accelerator that works in cgi mode. I
am guessing that to do that the cache would have to be on disk and not in
memory. I was looking at the turk accelerator (since it will cache to
disk), but it says somewhere that it will not work in cgi mode. I am
almost tempted to try it though.

Ideas? BTW my platform is linux.
Jul 16 '05 #1
5 3751
KAH
"Nick Bartos" <sp**@2thebatcave.com> wrote in
news:pa****************************@2thebatcave.co m:
I am looking for an open source php accelerator that works in cgi
mode. I am guessing that to do that the cache would have to be on
disk and not in memory. I was looking at the turk accelerator (since
it will cache to disk), but it says somewhere that it will not work in
cgi mode. I am almost tempted to try it though.

Ideas? BTW my platform is linux.


I doubt you'll find such a product. Why do you run in CGI mode anyway? It's
insecure, slow and has less functionality. Run it as an Apache module.

KAH
Jul 16 '05 #2
actually the very reason I run it is for security.

I need to have php run as separate users for separate websites (so some
users can't screw with other users stuff). The only way I see to do this
is doing it through a cgi, or possibly doing an apache2 module using the
per-child mpm. However I don't want to go with apache2 and the per-child
mpm since it hasn't been tested that well.

And actually I don't run it as a cgi technically, I just use the cgi
executable. I have the .php, .php3, and .php4 extensions registered in
the linux kernel for a misc binary format, which allows all of the files
with that extension to be executed just like any other binary file (from
the web server or from the command line). This way the php binary is not
visable at all from the outside, so it is very secure in that reguard.
Also it gets around having to put the #! at the beginning of all the php
files.

If I could find a way to get apache suexec to work with php compiled as a
module in 1.3.x, I would be more than happy to switch. If there is some
way to do this please let me know. That would definately be a move in the
right direction for performance, but I can't sacrafice the security at
this point.

I doubt you'll find such a product. Why do you run in CGI mode anyway? It's
insecure, slow and has less functionality. Run it as an Apache module.

KAH


Jul 16 '05 #3
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Nick Bartos whispered unto us in comp.lang.php:
actually the very reason I run it is for security.
I need to have php run as separate users for separate websites (so
some users can't screw with other users stuff). The only way I see to
do this is doing it through a cgi, or possibly doing an apache2 module
using the per-child mpm. However I don't want to go with apache2 and
the per-child mpm since it hasn't been tested that well.


Run it as apache 1.3 module, in secure mode? Works well for me, at
least.
- Vid `RTFM` Strpic.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)

iD8DBQE/PNPMq1AzG0/iPGMRAihmAKCpkEERaC5xjUug4LCZ/4CjMbGDjwCeMD6n
KEFX01hZIlA1478eUMBqjA8=
=5cCQ
-----END PGP SIGNATURE-----

--
vm*@bofhlet.net, IRC:*@Martin, /bin/zsh. C|N>K
Linux moria 2.4.21 #1 Sat Jul 5 16:11:20 CEST 2003 i686
14:35:32 up 25 days, 23:20, 8 users, load average: 0.20, 0.12, 0.12
Jul 16 '05 #4
It looks like the solution is to use the apc cache with fastcgi (and a
slightly modified suexec).

After doing some crude bench testing, I came up with the cgi mode taking
1.6 times as long to process 400 requests (50 concurrently) on large (28K
lines) files. On small files (less than 10 lines), cgi mode took over 10
times longer. That of course is not good.

After implementing fastcgi and a modified suexec (to skip the owner/group
checks so I could get away with just one copy of the php binary), cgi mode
was fairly close to using mod_php statically in the httpd binary. The
average times for cgi were still a little slower, but the max times were
better than doing the module.

After implementing apc built statically into the php binary, the numbers
changed drastically. using that setup, cgi was now over 10x faster than
doing a module for the large files, and a bit better with smaller files
too.

As far as performance and security it looks like this will work well. Now
the test will be time in making sure that it ends up being stable...

On Thu, 14 Aug 2003 08:04:43 -0500, Nick Bartos wrote:
I am looking for an open source php accelerator that works in cgi mode.
I am guessing that to do that the cache would have to be on disk and not
in memory. I was looking at the turk accelerator (since it will cache
to disk), but it says somewhere that it will not work in cgi mode. I am
almost tempted to try it though.

Ideas? BTW my platform is linux.

Jul 16 '05 #5
Hello,

On 08/14/2003 10:04 AM, Nick Bartos wrote:
I am looking for an open source php accelerator that works in cgi mode. I
am guessing that to do that the cache would have to be on disk and not in
memory. I was looking at the turk accelerator (since it will cache to
disk), but it says somewhere that it will not work in cgi mode. I am
almost tempted to try it though.

Ideas? BTW my platform is linux.


AFAIK, you can tell Turck to stored compiled scripts in disk. When it
says it does not work in CGI mode, it means it will not cache the
compiled files in shared memory because those caches would be lost upon
script ending.

--

Regards,
Manuel Lemos

Free ready to use OOP components written in PHP
http://www.phpclasses.org/

Jul 16 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: | last post by:
I have not used a php accelerator besides the free version of zend's offering. I am looking for opinions on the best performer out there. Price is really not a problem... I just need to look at...
0
by: Deke | last post by:
I could not find a Zend PHP Accelerator Engine for Solaris X86. The faq says it is available but could not find it anywhere on the site. Does one one know about such a port? Any one use one? ...
2
by: Richard | last post by:
Is there a way to duplicate the accelerator key for controls which live on separate pages of a tab control. i.e. to have a button called &Button1 on one tab and another button called &Button2 on...
1
by: BruceR | last post by:
I have created an Outlook style bar in my C# application and have associated accelerator keys to my group/icon buttons by using the & key and setting UseMnemonic as appropriate. The problem is that...
4
by: Roberto\(DOTNET\) | last post by:
Hi at all, i made a webapplication, and some pages have into its some dynamic control (UserControl). Now i would like to put some accelerator key to improve the fast of some operations. Is there a...
1
by: Csaba Gabor | last post by:
Short version: if the user types an alt+ctrl+char combination which leads to a defined character, but s/he's not in a input(text)/textarea, then I'd like that keystroke combination to do the same...
2
by: Richard Lewis Haggard | last post by:
How does one specify the Escape key as an accelerator? My client has specified that the Escape key be used as an accelerator for a particular menu item. In VS05's designer mode, this particular...
2
by: B. | last post by:
I have a C# winform with accelerator key associated with some menus. If my exe is in unmanaged C++ and the winform is invoked through interop, the accelerator key not working. If I create a new...
2
by: killy971 | last post by:
I have been testing different libraries to process XSL transformations on large XML files. The fact is that I read a document from Intel, stating their library (XSLT accelerator) was more twice...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.