Setup - GeSHi/geshi-1.0 GitHub Wiki
GeSHi requires the following to be installable:
- PHP. It should be at least version 5.4 but higher versions are really recommended.
- Approximately 2 megabytes of space. The actual script is small - around 150K - but most of the size comes from the large number of language files (over 100!). If you’re pushed for space, make sure you don’t upload to your server the
src/contrib/directory, and you may want to leave out any language files that don’t take your fancy either.
As you can see, the requirements are very small. If GeSHi does NOT work for you in a particular version of PHP, please open a bug report.
FIXME this section needs to be rewritten
Packages come in
.tar.bz2 format, so there’s no complaining about whether it’s available for you. *nix users probably want
.tar.bz2 and windows users probably want
.zip. And those lucky to download it directly from SVN don’t even need to bother extracting GeSHi.
To extract GeSHi in Linux (
- Open a shell
cdto the directory where the archive lies
tar -xzvf [filename]where
[filename]is the name of the archive (typically
- GeSHi will be extracted to its own directory
To extract GeSHi in Windows (
- Open Explorer
- Navigate to the directory where the archive lies
- Extract the archive. The method you use will depend on your configuration. Some people can right-click upon the archive and select “Extract” from there, others may have to drag the archive and drop it upon an extraction program.
To extract from
.zip you’ll need an unzipping program -
unzip in Linux, or 7-Zip, WinZip, WinRAR or similar for Windows.
Installing GeSHi is a snap, even for those most new to PHP. There’s no tricks involved. Honest!
GeSHi is nothing more than a PHP class with related language support files. Those of you familiar with PHP can then guess how easy the installation will be: simply copy it into your include path somewhere. You can put it wherever you like in this include path. I recommend that you put the language files in a subdirectory of your include path too - perhaps the same subdirectory that geshi.php is in. Remember this path for later.
If you don’t know what an include path is, don’t worry. Simply copy GeSHi to your webserver. So for example, say your site is at
http://mysite.com/myfolder, you can copy GeSHi to your site so the directory structure is like this:
http://mysite.com/myfolder/geshi/[language files] http://mysite.com/myfolder/geshi.php
Or you can put it in any subdirectory you like:
http://mysite.com/myfolder/includes/geshi/[language files] http://mysite.com/myfolder/includes/geshi.php
FIXME explain install by composer
When using GeSHi on a live site, the only directory required is the
geshi/ subdirectory. Both
src/docs/ are worthless, and furthermore, as some people discovered, one of the files in contrib had a security hole (fixed as of 126.96.36.199). I suggest you delete these directories from any live site they are on.