Jump to content

PHP config: Difference between revisions

From Meta, a Wikimedia project coordination wiki
Content deleted Content added
mNo edit summary
Line 1: Line 1:
<- [[MediaWiki architecture]]
<- [[MediaWiki architecture]]


[http://www.php.net/ PHP] is a web template system that accidentally grew up into a fairly general language. PHP's syntax, capabilities, and execution model bear vague similarities to [[Perl]]; scripts are loaded by an "interpreter", compiled to bytecode, and then executed. The PHP interpreter can be run from the command line / CGI-style, or more commonly as an in-process [[Apache config|Apache]] module.
PHP ([[w:PHP programming language|PHP programming language]], ([http://www.php.net/]) is a web template system that accidentally grew up into a fairly general language. PHP's syntax, capabilities, and execution model bear vague similarities to [[Perl]]; scripts are loaded by an "interpreter", compiled to bytecode, and then executed. The PHP interpreter can be run from the command line / CGI-style, or more commonly as an in-process [[Apache config|Apache]] module.


== Installation ==
== Installation ==
Line 16: Line 16:
== Opcode caching ==
== Opcode caching ==


If running a high-traffic site, it is highly recommended that a system be used to cache the compiled scripts; there are a number of such plugins for PHP, some free, some proprietary. Wikipedia currently uses the [http://www.php-accelerator.co.uk/ ionCube PHP Accelerator], which is free-to-use but not [[en:free software|free software]]. For a totally free solution, there is [http://apc.communityconnect.com/ Alternative PHP Cache], however we had more problems with it.
If running a high-traffic site, it is highly recommended that a system be used to cache the compiled scripts; there are a number of such plugins for PHP, some free, some proprietary. Wikimedia currently uses the [http://www.php-accelerator.co.uk/ ionCube PHP Accelerator], which is free-to-use but not [[en:free software|free software]]. For a totally free solution, there is [http://apc.communityconnect.com/ Alternative PHP Cache], however we had more problems with it.


:''How about [http://turck-mmcache.sf.net/ Turck MMcache]? It's GPL, and it has nearly perfect performance with other complicated PHP applications such as phpBB and PHPNuke... I'm about to run a MediaWiki install on my machine with MMCache enabled, and I'll let all of you know how it goes.'' Yep, as suspected, MMCache has perfect performance with Phase 3, so I'd say it's safe to use on a production site. - [[user:ElizabethFong]]
:''How about [http://turck-mmcache.sf.net/ Turck MMcache]? It's GPL, and it has nearly perfect performance with other complicated PHP applications such as phpBB and PHPNuke... I'm about to run a MediaWiki install on my machine with MMCache enabled, and I'll let all of you know how it goes.'' Yep, as suspected, MMCache has perfect performance with Phase 3, so I'd say it's safe to use on a production site. - [[user:ElizabethFong]]

Revision as of 12:51, 27 June 2004

<- MediaWiki architecture

PHP (PHP programming language, ([1]) is a web template system that accidentally grew up into a fairly general language. PHP's syntax, capabilities, and execution model bear vague similarities to Perl; scripts are loaded by an "interpreter", compiled to bytecode, and then executed. The PHP interpreter can be run from the command line / CGI-style, or more commonly as an in-process Apache module.

Installation

http://www.php.net/manual/en/installation.php

Compile-time options

MediaWiki either needs or wants a number of optional features of PHP that need to be enabled at compile time:

Opcode caching

If running a high-traffic site, it is highly recommended that a system be used to cache the compiled scripts; there are a number of such plugins for PHP, some free, some proprietary. Wikimedia currently uses the ionCube PHP Accelerator, which is free-to-use but not free software. For a totally free solution, there is Alternative PHP Cache, however we had more problems with it.

How about Turck MMcache? It's GPL, and it has nearly perfect performance with other complicated PHP applications such as phpBB and PHPNuke... I'm about to run a MediaWiki install on my machine with MMCache enabled, and I'll let all of you know how it goes. Yep, as suspected, MMCache has perfect performance with Phase 3, so I'd say it's safe to use on a production site. - user:ElizabethFong

Fortunately, these all seem to be easy to install as Zend plugins, you just drop in a library and change your php.ini. No fussy recompiling of the entire PHP!

Depending on the cache and options used, you may have to perform a special operation whenever updating script files.

File Uploads Won't Work if PHP is running in Safe Mode

Just so you know.

Next page: MySQL config >