Jump to content

PHP config: Difference between revisions

From Meta, a Wikimedia project coordination wiki
Content deleted Content added
MaxEnt (talk | contribs)
MaxEnt (talk | contribs)
m Image Resizing: add a see also to complement php.ini redirect
Line 35: Line 35:


It is a separate install and, if compiled from source, requires additional graph libraries, such as png and gd.
It is a separate install and, if compiled from source, requires additional graph libraries, such as png and gd.

==See also==

* [[Newcomers guide to installing on Windows/PHP php.ini]]





Revision as of 20:52, 25 November 2006

 
This page should be moved to MediaWiki.org.
Please do not move the page by hand. It will be imported by a MediaWiki.org administrator with the full edit history. In the meantime, you may continue to edit the page as normal.

<- 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:

  • mbstring multibyte character string support (optional; slower custom code will be used if not available)
  • iconv character set conversion library (optional; other conversion functions will be used if not available)
  • zlib compression library, optionally to compress the file cache
  • sockets support for network communication, if using memcached

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 Turck MMcache and used to use the ionCube PHP Accelerator. There is Alternative PHP Cache, however we had more problems with it than ionCube.

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.

Wrong! Look here. /Mejf

While it might be possible to surmount the obstacles, safe mode is slated for elimination in PHP 6, since it never provided as much security as it seemed to promise, and creates numerous headaches. Register globals and magic quotes are also facing their demise. Given a choice, disable safe mode rather than invest in the work-around. MaxEnt

Image Resizing

ImageMagick is the utility for various image conversion in WikiMedia. See also [2]

It is a separate install and, if compiled from source, requires additional graph libraries, such as png and gd.

See also


Next page: MySQL config >

Template:H-langs:PHP config