.phpenv directory does not exist

php
circle.yml

#1

Apache will not start.

Stack:
PHP Ubuntu 14.04.

Error:
…fail!

  • The apache2 configtest failed.
    Output of config test was:
    apache2: Syntax error on line 140 of /etc/apache2/apache2.conf: Syntax error on line 1 of /etc/apache2/mods-enabled/php5.load: Cannot load /usr/lib/apache2/modules/libphp5.so into server: /usr/lib/apache2/modules/libphp5.so: cannot open shared object file: No such file or directory
    Action ‘configtest’ failed.
    The Apache error log may have more information.

Troubleshooting:
Using PHP 5.6.18. For some reason it has symlinked libphp5.so file in /usr/lib/apache2/modules/ folder.

total 2.7M
drwxr-xr-x 1 root root 3.3K May 30 12:01 .
drwxr-xr-x 1 root root 14 May 23 13:48 …
-rw-r–r-- 1 root root 14K Jan 14 17:45 httpd.exp
lrwxrwxrwx 1 root root 63 May 30 12:01 libphp5.so -> /home/ubuntu/.phpenv/versions/5.6.18/libexec/apache2/libphp5.so

The problem is that /home/ubuntu/.phpenv/versions/5.6.18/libexec/apache2/libphp5.so does not exist.

Changed from using Ubuntu 12.04 to 14.04. Not sure why it is doing this?

Any help :slight_smile:


#2

see my answer here Apache2 and PHP - missing libphp5.so


#3

Thanks. I reverted to 12.04 instead. But will give you solution a try. :slight_smile:


#4