PHP Error during installation CMS Newscoop 4.2.3
  • During installation this CMS Newscoop 4.2.3  errors:

    PHP Fatal error: Uncaught exception RuntimeException with message The php executable could not be found, add it to your PATH environment variable and try again in /var/www/mysite.com/install/classes/CampInstallationBase.php:820nStack trace:n#0 /var/www/mysite.com/install/classes/CampInstallationBase.php(93): CampInstallationBase->saveConfiguration()n#1 /var/www/mysite.com/install/classes/CampInstallation.php(96): CampInstallationBase->execute()n#2 /var/www/mysite.com/install/index.php(86): CampInstallation->execute()n#3 {main}n thrown in /var/www/mysite.com/install/classes/CampInstallationBase.php on line 820, referer: http://mysite.com/install/index.php

    Please, help correct these errors.

    Version PHP: 5.4.29
    Version MySQL: 5.5.33a-MariaDB
  • 11 Comments sorted by
  • Vote Up1Vote Down Andrey PodshivalovAndrey Podshivalov
    Posts: 1,526Member, Administrator, Sourcefabric Team

    Vlad S said:

    The php executable could not be found, add it to your PATH environment variable



    it means that php cli is not available from apache server
  • Hi, 

    can you add OS with version? Version of PHP and MySQL is helpful too, but OS with version is needed too for check installation + if you used zip or tar file.
  • CentOS 6.3. 
    User on all folders and files: www-data
    Used newscoop-4.2.3.tar.gz
  • Folder mysite.com (recursive):  
    User: www-data
    Group: www-data
  • Vote Up0Vote Down Daniel JamesDaniel James
    Posts: 844Member, Sourcefabric Team
    Hi Vlad, did you install all the PHP packages listed in the manual?
    yum install php php-gd php-mysql php-xml ImageMagick system-config-firewall
    See the chapter:

    http://sourcefabric.booktype.pro/newscoop-42-for-journalists-and-editors/installation-on-red-hat-enterprise/

    Cheers!

    Daniel
  • Vote Up0Vote Down Daniel JamesDaniel James
    Posts: 844Member, Sourcefabric Team
    Hi Vlad,

    I see the standard version of php on CentOS 6.3 is 5.3.3, but you have 5.4.29. So it looks like you have installed php manually, and I'd guess that some of it is missing or misconfigured.

    http://vault.centos.org/6.3/os/x86_64/Packages/

    The command:

    php -v

    should indicate that your PHP install has cli support, for example on Debian wheezy:

    PHP 5.4.4-14+deb7u10 (cli) (built: May 30 2014 09:58:21)

    Cheers!

    Daniel
  • Can you help me in Debian 6? My site is not opened. The browser downloads php-files.
    root@debian:~# php -v
    PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20090626+lfs/msql.so' - /usr/lib/php5/20090626+lfs/msql.so: cannot open shared object file: No such file or directory in Unknown on line 0
    PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20090626+lfs/mysqli.so' - /usr/lib/php5/20090626+lfs/mysqli.so: cannot open shared object file: No such file or directory in Unknown on line 0
    PHP Warning: Module 'gd' already loaded in Unknown on line 0
    PHP 5.3.3-7+squeeze19 with Suhosin-Patch (cli) (built: Feb 18 2014 13:59:15)
    Copyright (c) 1997-2009 The PHP Group
    Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
    with Suhosin v0.9.32.1, Copyright (c) 2007-2010, by SektionEins GmbH
  • Vote Up0Vote Down Andrey PodshivalovAndrey Podshivalov
    Posts: 1,526Member, Administrator, Sourcefabric Team
    remove all php stuff:

    apt-get autoremove --purge php.*

    and install it again:

    apt-get install phpmyadmin


    After that restart apache - site should work.

  • Now I have two php.ini files in /etc/php5/cli/ and in /etc/php5/apache2/. Is it right? Where i must change register_globals, memory_limit and etc.?
  • And i cant install php-apc
    root@debian:~# apt-get install php-apc
    Чтение списков пакетов... Готово
    Построение дерева зависимостей
    Чтение информации о состоянии... Готово
    Некоторые пакеты невозможно установить. Возможно, вы просите невозможного,
    или же используете нестабильную версию дистрибутива, где запрошенные вами
    пакеты ещё не созданы или были удалены из Incoming.
    Следующая информация, возможно, поможет вам:

    Пакеты, имеющие неудовлетворённые зависимости:
    php-apc : Зависит: phpapi-20090626+lfs
    E: Сломанные пакеты
    root@debian:~#
  • Vote Up0Vote Down Andrey PodshivalovAndrey Podshivalov
    Posts: 1,526Member, Administrator, Sourcefabric Team
    change /etc/php5/apache2/php.ini

    install xcache instead of apc:  apt-get install php5-xcache