I have installed the Geshi Filter and Field modules, but Drupal does not detect the GeShi Libraries.

  1. I got the Geshi Libraries from sourceforge. To be sure, I put it in: /sites/all/libraries/ , /sites/all/modules/libraries/ and /sites/all/modules/geshifilter/

  2. I am using 7.x-1.x-dev

enter image description here

Yet, it cannot find the libraries. How can I get it to work? Please do not suggest syntaxhighlighter. I have tried it and I would prefer a server side solution.

From the Status Reportenter image description here


4 Answers 4


The files should be copied, for example, in "sites/all/libraries/geshi" or "$config/libraries/geshi," where "$config" is the directory containing the settings.php file used for the Drupal site.
In the first case, the class.geshi.php file is put in "sites/all/libraries/geshi/class.geshi.php," and the "geshi" directory that is in the downloaded archive is put in "sites/all/libraries/geshi/geshi."

As for where the Libraries API module looks for the directory containing the library files, the documentation comment for libraries_get_libraries() reports the following text:

Returns an array of library directories from the all-sites directory (i.e. sites/all/libraries/), the profiles directory, and site-specific directory (i.e. sites/somesite/libraries/).

The site-specific directory is the one that I reported as "$config/libraries/geshi."
The module doesn't look in "sites/all/modules/libraries."


Based on the comments in this bug report, flushing all caches once or twice will resolve the issue. Worked on my end after one flush.


Flushing cache didn't work for me -- but flushing all caches then turning off the geshifilter module, and reenabling it -- that worked.


On the module home page, it clearly says:

Important Note

only the 1.0.x branch of the GeSHi library is supported, so do not use the development branch GeSHi 1.1.x. Direct link to GeSHi 1.0.x releases: http://sourceforge.net/projects/geshi/files/geshi/

The source forge link you provided downloads GeSHi-1.1.2-alpha3.zip which you are not suppose to use.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.