PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Autres forums > Forum Programmation & Conception > comp.lang.php > php under FastCGI
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
php under FastCGI

Réponse
 
LinkBack Outils de la discussion
Vieux 21/01/2008, 10h18   #1
drblitzkrieg@gmail.com
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut php under FastCGI

Problem: If you need to run regular php scripts under FastCGI, saving
on the overhead of fopen'ing and reading in the contents before
executing each time, in theory I guess you'd put a FastCgiServer
directive in your httpd.conf, and direct it to some sort of app (could
be written in C or anything) that loads and keeps in memory all your
php files from your site, and runs their contents when a url request
comes in for that file. Does such an app exist?
  Réponse avec citation
Vieux 21/01/2008, 12h17   #2
C. (http://symcbean.blogspot.com/)
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: php under FastCGI

On 21 Jan, 10:18, drblitzkr...@gmail.com wrote:
> Problem: If you need to run regular php scripts under FastCGI, saving
> on the overhead of fopen'ing and reading in the contents before
> executing each time, in theory I guess you'd put a FastCgiServer
> directive in your httpd.conf, and direct it to some sort of app (could
> be written in C or anything) that loads and keeps in memory all your
> php files from your site, and runs their contents when a url request
> comes in for that file. Does such an app exist?


Yes - a ramdisk. But if you're using a sensible operating system it
will be cached anyway.

But more sensibly, a PHP accelerator will go even further by caching a
tokenized version of the script

C.
  Réponse avec citation
Vieux 23/01/2008, 10h40   #3
Blitzen
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: php under FastCGI

On 1ÔÂ21ÈÕ, ÏÂÎç9ʱ17·Ö, "C. (http://symcbean.blogspot.com/)"
<colin.mckin...@gmail.com> wrote:
> On 21 Jan, 10:18, drblitzkr...@gmail.com wrote:
>
> > Problem: If you need to run regularphpscriptsunderFastCGI, saving
> > on the overhead of fopen'ing and reading in the contents before
> > executing each time, in theory I guess you'd put a FastCgiServer
> > directive in your httpd.conf, and direct it to some sort of app (could
> > be written in C or anything) that loads and keeps in memory all your
> >phpfiles from your site, and runs their contents when a url request
> > comes in for that file. Does such an app exist?

>
> Yes - a ramdisk. But if you're using a sensible operating system it
> will be cached anyway.
>
> But more sensibly, aPHPaccelerator will go even further by caching a
> tokenized version of the script
>
> C.


Cool, thanks.
One thing: I'm using (from the sapi/cgi/php-cgi) and running my apps
instead of mod_php from apache, and it's not recognizing the mysql
functions. From strace I realized it wasn't finding php.ini, so I sym-
linked the correct one to where it was trying to look for it (/usr/
local/lib/php-cgi-fcgi.ini). Looks like it's finding it now, but still
not loading mysql - normally the mod_php executes /etc/php5/apache2/
php.ini and I guess at some point also executes the ones in /etc/php5/
conf.d, which are just 1 line each telling it to extension=mysqli.so
or whatever the module is. I dumped the contents of all of these into /
etc/php5/fcgi/php.ini and set:

extension_dir = "/usr/lib/php5/20060613/"

which is where they are. How to get the sapi cgi php binary to load
the mysql and other modules correctly to use in running apps?

Thx.
  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 03h09.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,10441 seconds with 11 queries