# Gitlist install



## andrewm659 (May 27, 2017)

Got GitList installed and have it almost fully configured.  

However i'm getting this error:

```
Fatal error: Call to undefined function hash() in /usr/local/www/gitlist/vendor/twig/twig/lib/Twig/Environment.php on line 265
```

Still researching this but was wondering if anyone else is having this issue?


----------



## SirDice (May 29, 2017)

You're missing security/php56-hash (or security/php70-hash depending on the PHP version you're using).


----------



## andrewm659 (May 30, 2017)

Still getting this error:


```
Fatal error: Call to undefined function ctype_alpha() in /usr/local/www/gitlist/vendor/twig/twig/lib/Twig/Lexer.php on line 380
```


----------



## SirDice (May 30, 2017)

Different error, different missing module; textproc/php56-ctype


----------



## andrewm659 (Jun 2, 2017)

thanks I got it working!


----------



## xoneill (Dec 30, 2019)

Same issue, running FreeBSD 12.x with PHP 7.2 (which installed as a dependency of gitlist (apparently this port makes no assumptions about modules).  Wonder if this is related to PHP > 5.  I'll post an update if I'm able to resolve this...


----------



## andrewm659 (Jan 14, 2021)

So after a recent update to my rancid jail.  I am facing this error now.  I feel like I have reached out before but can't seem to pinpoint it in the forums.  But am getting this:

```
Fatal error: Uncaught Error: Call to undefined function hash() in /usr/local/www/gitlist/vendor/twig/twig/lib/Twig/Environment.php:332 Stack trace: #0 /usr/local/www/gitlist/vendor/twig/twig/lib/Twig/Environment.php(424): Twig_Environment->getTemplateClass('tree.twig') #1 /usr/local/www/gitlist/vendor/twig/twig/lib/Twig/Environment.php(363): Twig_Environment->loadTemplate('tree.twig') #2 /usr/local/www/gitlist/src/Controller/TreeController.php(44): Twig_Environment->render('tree.twig', Array) #3 [internal function]: GitList\Controller\TreeController->GitList\Controller\{closure}('NetworkDevices', 'master/configs') #4 /usr/local/www/gitlist/vendor/symfony/http-kernel/HttpKernel.php(144): call_user_func_array(Object(Closure), Array) #5 /usr/local/www/gitlist/vendor/symfony/http-kernel/HttpKernel.php(64): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1) #6 /usr/local/www/gitlist/vendor/silex/silex/src/Silex/Application.php(586): Symfony\Component\HttpKernel\HttpKernel->h in /usr/local/www/gitlist/vendor/twig/twig/lib/Twig/Environment.php on line 332
```

Same error diff format.

```
Fatal error: Uncaught Error: Call to undefined function hash() in /usr/local/www/gitlist/vendor/twig/twig/lib/Twig/Environment.php:332 Stack trace: #0 /usr/local/www/gitlist/vendor/twig/twig/lib/Twig/Environment.php(424): Twig_Environment->getTemplateClass('tree.twig') #1 /usr/local/www/gitlist/vendor/twig/twig/lib/Twig/Environment.php(363): Twig_Environment->loadTemplate('tree.twig') #2 /usr/local/www/gitlist/src/Controller/TreeController.php(44): Twig_Environment->render('tree.twig', Array) #3 [internal function]: GitList\Controller\TreeController->GitList\Controller\{closure}('NetworkDevices', 'master/configs') #4 /usr/local/www/gitlist/vendor/symfony/http-kernel/HttpKernel.php(144): call_user_func_array(Object(Closure), Array) #5 /usr/local/www/gitlist/vendor/symfony/http-kernel/HttpKernel.php(64): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1) #6 /usr/local/www/gitlist/vendor/silex/silex/src/Silex/Application.php(586): Symfony\Component\HttpKernel\HttpKernel->h in /usr/local/www/gitlist/vendor/twig/twig/lib/Twig/Environment.php on line 332
```

Thanks in advance!!!


----------



## SirDice (Jan 14, 2021)

Install security/php74-hash.


----------



## andrewm659 (Jan 14, 2021)

```
FreeBSD repository is up to date.
All repositories are up to date.
pkg: No packages available to install matching 'php74-hash' have been found in the repositories
root@rancid3git:~ # pkg search php74|grep -i hash
php74-pHash-0.9.6_5            PHP extension for the pHash perceptual hash library
php74-pear-Crypt_HMAC2-1.0.0   Implementation of Hashed Message Authentication Code for PHP5
php74-pear-horde-Horde_HashTable-1.2.6 Horde Hash Table Interface
root@rancid3git:~ #
```


----------



## SirDice (Jan 14, 2021)

Oh, wait, it's been removed:

```
The hash module is now part of the PHP core. It can't be disabled or enabled
anymore.
Therefore we remove this port.
```

Then I have no idea why it appears to be missing. The function is included in the standard lang/php74:

```
include/php/ext/hash/php_hash.h
```


----------



## andrewm659 (Jan 14, 2021)

That sucks!

How do I check what a package was compiled with?  Maybe its something in there?


----------



## SirDice (Jan 14, 2021)

andrewm659 said:


> How do I check what a package was compiled with? Maybe its something in there?


PHP is a scripting language, PHP code is not compiled. This function is part of the core language itself now and should be included with lang/php74.


----------

