THELIA Forum

Welcome to the THELIA support and discusssion forum

Announcement

Rejoignez la communauté sur le Discord Thelia : https://discord.gg/YgwpYEE3y3

Offline


Est-il possible d'installer Thélia 2 via composer chez OVH sur une offre pro ?
Voici ce que j'ai fait :

1 - Installation de composer

curl -sS https://getcomposer.org/installer | /usr/local/bin/php.ORIG.5_4 -c /usr/local/lib/php.ini-2

> Sortie :

local/lib/php.ini-2
X-Powered-By: PHP/5.4.38
Content-type: text/html

#!/usr/bin/env php
Some settings on your machine may cause stability issues with Composer.
If you encounter issues, try to change the following:

PHP was compiled with --enable-sigchild which can cause issues on some platforms.
Recompile it without this flag if possible, see also:
    https://bugs.php.net/bug.php?id=22999

Downloading...

Composer successfully installed to: /home/theoetev/www/composer.phar
Use it: php composer.phar

2- Grab de Thélia

/usr/local/bin/php.ORIG.5_4 -c /usr/local/lib/php.ini-2 composer.phar create-project thelia/thelia path/ 2.2.0

> Sortie :

Installing thelia/thelia (2.2.0)
  - Installing thelia/thelia (2.2.0)
    Downloading: 100%         

Created project in path/
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
  - Installing thelia/installer (1.2)
    Downloading: 100%         

  - Installing doctrine/cache (v1.3.0)
    Downloading: 100%         

  - Installing ensepar/tcpdf (5.0.003)
    Downloading: 100%         

  - Installing ensepar/html2pdf (1.0.1)
    Downloading: 100%         

  - Installing imagine/imagine (0.6.2)
    Downloading: 100%         

  - Installing ircmaxell/password-compat (1.0.3)
    Downloading: 100%         

  - Installing symfony/process (v2.5.6)
    Downloading: 100%         

  - Installing kriswallsmith/assetic (dev-master eb82167)
    Cloning eb82167d176eb40078469ef9408ff56fd32a5d66

  - Installing leafo/lessphp (v0.4.0)
    Downloading: 100%         

  - Installing psr/log (1.0.0)
    Downloading: 100%         

  - Installing maximebf/debugbar (dev-master c94b481)
    Cloning c94b4815280144257b749e1d96db1aad728802df

  - Installing michelf/php-markdown (1.5.0)
    Downloading: 100%         

  - Installing oyejorge/less.php (v1.7.0.2)
    Downloading: 100%         

  - Installing symfony/yaml (v2.3.21)
    Downloading: 100%         

  - Installing symfony/translation (v2.3.21)
    Downloading: 100%         

  - Installing symfony/validator (v2.3.31)
    Downloading: 100%         

  - Installing symfony/finder (v2.3.21)
    Downloading: 100%         

  - Installing symfony/filesystem (v2.3.21)
    Downloading: 100%         

  - Installing symfony/console (v2.3.21)
    Downloading: 100%         

  - Installing symfony/config (v2.3.21)
    Downloading: 100%         

  - Installing propel/propel (dev-master 793aea6)
    Cloning 793aea6b762d9a72b083bfc49c74c574f67650c8

  - Installing ptachoire/cssembed (v1.0.2)
    Downloading: 100%         

  - Installing ramsey/array_column (1.1.3)
    Downloading: 100%         

  - Installing simplepie/simplepie (1.3.1)
    Downloading: 100%         

  - Installing smarty/smarty (v3.1.19)
    Downloading: 100%         

  - Installing symfony/http-foundation (v2.3.27)
    Downloading: Connecting...
Could not fetch https://api.github.com/repos/symfony/HttpFoundation/zipball/98a2199db323438a2d5e4b2d6bb031cf6f4bfaca, please create a GitHub OAuth token to go over the API rate limit
Head to https://github.com/settings/tokens/new?scopes=repo&description=Composer+on+ssh1.media.ha.ovh.net+2015-10-03+1757
to retrieve a token. It will be stored in "/homez.532/theoetev/.composer/auth.json" for future use by Composer.
Token (hidden): Token stored successfully.
    Downloading: 100%         

  - Installing symfony/event-dispatcher (v2.3.21)
    Downloading: 100%         

  - Installing symfony/debug (v2.6.6)
    Downloading: 100%         

  - Installing symfony/http-kernel (v2.3.30)
    Downloading: 100%         

  - Installing stack/builder (v1.0.2)
    Downloading: 100%         

  - Installing swiftmailer/swiftmailer (v5.2.2)
    Downloading: 100%         

  - Installing symfony/routing (v2.3.21)
    Downloading: 100%         

  - Installing symfony-cmf/routing (1.3.0)
    Downloading: 100%         

  - Installing symfony/dom-crawler (v2.5.6)
    Downloading: 100%         

  - Installing symfony/browser-kit (v2.3.21)
    Downloading: 100%         

  - Installing symfony/class-loader (v2.3.21)
    Downloading: 100%         

  - Installing symfony/dependency-injection (v2.3.21)
    Downloading: 100%         

  - Installing symfony/property-access (v2.5.6)
    Downloading: 100%         

  - Installing symfony/options-resolver (v2.5.6)
    Downloading: 100%         

  - Installing symfony/intl (v2.5.6)
    Downloading: 100%         

  - Installing symfony/form (v2.3.21)
    Downloading: 100%         

  - Installing symfony/icu (v1.0.0)
    Downloading: 100%         

  - Installing symfony/serializer (v2.3.21)
    Downloading: 100%         

  - Installing thelia/math-tools (1.0)
    Downloading: 100%         

  - Installing thelia/currency-converter (1.0.0)
    Downloading: 100%         

  - Installing fzaninotto/faker (v1.5.0)
    Downloading: 100%         

  - Installing phpdocumentor/reflection-docblock (2.0.4)
    Downloading: 100%         

  - Installing phpunit/php-token-stream (1.4.0)
    Downloading: 100%         

  - Installing sebastian/version (1.0.4)
    Downloading: 100%         

  - Installing sebastian/global-state (1.0.0)
    Downloading: 100%         

  - Installing sebastian/recursion-context (1.0.0)
    Downloading: 100%         

  - Installing sebastian/exporter (1.2.0)
    Downloading: 100%         

  - Installing sebastian/environment (1.2.1)
    Downloading: 100%         

  - Installing sebastian/diff (1.2.0)
    Downloading: 100%         

  - Installing sebastian/comparator (1.1.1)
    Downloading: 100%         

  - Installing phpunit/php-text-template (1.2.0)
    Downloading: 100%         

  - Installing doctrine/instantiator (1.0.4)
    Downloading: 100%         

  - Installing phpunit/phpunit-mock-objects (2.3.0)
    Downloading: 100%         

  - Installing phpunit/php-timer (1.0.5)
    Downloading: 100%         

  - Installing phpunit/php-file-iterator (1.3.4)
    Downloading: 100%         

  - Installing phpunit/php-code-coverage (2.0.15)
    Downloading: 100%         

  - Installing phpspec/prophecy (v1.3.1)
    Downloading: 100%         

  - Installing phpunit/phpunit (4.5.0)
    Downloading: 100%         

  - Installing thelia/hooktest-module (1.1)
    Downloading: 100%         

  - Installing thelia/hooktest-template (1.1)
    Downloading: 100%         

imagine/imagine suggests installing ext-gmagick (to use the Gmagick implementation)
imagine/imagine suggests installing ext-imagick (to use the Imagick implementation)
kriswallsmith/assetic suggests installing leafo/scssphp (Assetic provides the integration with the scssphp SCSS compiler)
kriswallsmith/assetic suggests installing leafo/scssphp-compass (Assetic provides the integration with the SCSS compass plugin)
kriswallsmith/assetic suggests installing patchwork/jsqueeze (Assetic provides the integration with the JSqueeze JavaScript compressor)
kriswallsmith/assetic suggests installing twig/twig (Assetic provides the integration with the Twig templating engine)
maximebf/debugbar suggests installing monolog/monolog (Log using Monolog)
maximebf/debugbar suggests installing predis/predis (Redis storage)
symfony/validator suggests installing doctrine/common ()
propel/propel suggests installing monolog/monolog (The recommended logging library to use with Propel.)
symfony/routing suggests installing doctrine/common ()
symfony/dom-crawler suggests installing symfony/css-selector ()
symfony/dependency-injection suggests installing symfony/proxy-manager-bridge (Generate service proxies to lazy load them)
phpdocumentor/reflection-docblock suggests installing dflydev/markdown (~1.0)
phpdocumentor/reflection-docblock suggests installing erusev/parsedown (~1.0)
sebastian/global-state suggests installing ext-uopz (*)
phpunit/php-code-coverage suggests installing ext-xdebug (>=2.2.1)
phpunit/phpunit suggests installing phpunit/php-invoker (~1.1)
Generating autoload files
Warning: Ambiguous class resolution, "lessc" was found in both "/home/theoetev/www/path/core/vendor/oyejorge/less.php/lessc.inc.php" and "/home/theoetev/www/path/core/vendor/leafo/lessphp/lessc.inc.php", the first will be used.
X-Powered-By: PHP/5.4.38
Content-type: text/html

Warning: Composer should be invoked via the CLI version of PHP, not the cgi-fcgi SAPI

3 - Installation de Thélia

/usr/local/bin/php.ORIG.5_4 -c /usr/local/lib/php.ini-2 Thelia thelia:install

> Sortie :

PHP Fatal error:  Uncaught exception 'Exception' with message 'this script can only be launched with cli sapi' in /home/theoetev/www/path/core/Thelia:5
Stack trace:
#0 /home/theoetev/www/path/Thelia(4): include()
#1 {main}
  thrown in /home/theoetev/www/path/core/Thelia on line 5
X-Powered-By: PHP/5.4.38
Content-type: text/html

#!/usr/bin/env php
<br />
<b>Fatal error</b>:  Uncaught exception 'Exception' with message 'this script can only be launched with cli sapi' in /home/theoetev/www/path/core/Thelia:5
Stack trace:
#0 /home/theoetev/www/path/Thelia(4): include()
#1 {main}
  thrown in <b>/home/theoetev/www/path/core/Thelia</b> on line <b>5</b><br />

Sortie avec le binaire Thélia modifié 

if (0 && php_sapi_name() != 'cli') {
Status: 500
X-Powered-By: PHP/5.4.38
Location: http://:/install
Content-Type: text/html; charset=UTF-8

#!/usr/bin/env php
<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8" />
        <meta name="robots" content="noindex,nofollow" />
        <style>
            /* Copyright (c) 2010, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: http://developer.yahoo.com/yui/license.html */
            html{color:#000;background:#FFF;}body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,textarea,p,blockquote,th,td{margin:0;padding:0;}table{border-collapse:collapse;border-spacing:0;}fieldset,img{border:0;}address,caption,cite,code,dfn,em,strong,th,var{font-style:normal;font-weight:normal;}li{list-style:none;}caption,th{text-align:left;}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:normal;}q:before,q:after{content:'';}abbr,acronym{border:0;font-variant:normal;}sup{vertical-align:text-top;}sub{vertical-align:text-bottom;}input,textarea,select{font-family:inherit;font-size:inherit;font-weight:inherit;}input,textarea,select{*font-size:100%;}legend{color:#000;}

            html { background: #eee; padding: 10px }
            img { border: 0; }
            #sf-resetcontent { width:970px; margin:0 auto; }
                        .sf-reset { font: 11px Verdana, Arial, sans-serif; color: #333 }
            .sf-reset .clear { clear:both; height:0; font-size:0; line-height:0; }
            .sf-reset .clear_fix:after { display:block; height:0; clear:both; visibility:hidden; }
            .sf-reset .clear_fix { display:inline-block; }
            .sf-reset * html .clear_fix { height:1%; }
            .sf-reset .clear_fix { display:block; }
            .sf-reset, .sf-reset .block { margin: auto }
            .sf-reset abbr { border-bottom: 1px dotted #000; cursor: help; }
            .sf-reset p { font-size:14px; line-height:20px; color:#868686; padding-bottom:20px }
            .sf-reset strong { font-weight:bold; }
            .sf-reset a { color:#6c6159; cursor: default; }
            .sf-reset a img { border:none; }
            .sf-reset a:hover { text-decoration:underline; }
            .sf-reset em { font-style:italic; }
            .sf-reset h1, .sf-reset h2 { font: 20px Georgia, "Times New Roman", Times, serif }
            .sf-reset .exception_counter { background-color: #fff; color: #333; padding: 6px; float: left; margin-right: 10px; float: left; display: block; }
            .sf-reset .exception_title { margin-left: 3em; margin-bottom: 0.7em; display: block; }
            .sf-reset .exception_message { margin-left: 3em; display: block; }
            .sf-reset .traces li { font-size:12px; padding: 2px 4px; list-style-type:decimal; margin-left:20px; }
            .sf-reset .block { background-color:#FFFFFF; padding:10px 28px; margin-bottom:20px;
                -webkit-border-bottom-right-radius: 16px;
                -webkit-border-bottom-left-radius: 16px;
                -moz-border-radius-bottomright: 16px;
                -moz-border-radius-bottomleft: 16px;
                border-bottom-right-radius: 16px;
                border-bottom-left-radius: 16px;
                border-bottom:1px solid #ccc;
                border-right:1px solid #ccc;
                border-left:1px solid #ccc;
            }
            .sf-reset .block_exception { background-color:#ddd; color: #333; padding:20px;
                -webkit-border-top-left-radius: 16px;
                -webkit-border-top-right-radius: 16px;
                -moz-border-radius-topleft: 16px;
                -moz-border-radius-topright: 16px;
                border-top-left-radius: 16px;
                border-top-right-radius: 16px;
                border-top:1px solid #ccc;
                border-right:1px solid #ccc;
                border-left:1px solid #ccc;
                overflow: hidden;
                word-wrap: break-word;
            }
            .sf-reset a { background:none; color:#868686; text-decoration:none; }
            .sf-reset a:hover { background:none; color:#313131; text-decoration:underline; }
            .sf-reset ol { padding: 10px 0; }
            .sf-reset h1 { background-color:#FFFFFF; padding: 15px 28px; margin-bottom: 20px;
                -webkit-border-radius: 10px;
                -moz-border-radius: 10px;
                border-radius: 10px;
                border: 1px solid #ccc;
            }
        </style>
    </head>
    <body>
                    <div id="sf-resetcontent" class="sf-reset">
                <h1>Whoops, looks like something went wrong.</h1>
                                        <h2 class="block_exception clear_fix">
                            <span class="exception_counter">1/1</span>
                            <span class="exception_title"><abbr title="Symfony\Component\Debug\Exception\ContextErrorException">ContextErrorException</abbr> in <a title="/home/theoetev/www/path/core/vendor/propel/propel/src/Propel/Runtime/ServiceContainer/StandardServiceContainer.php line 276" ondblclick="var f=this.innerHTML;this.innerHTML=this.title;this.title=f;">StandardServiceContainer.php line 276</a>:</span>
                            <span class="exception_message">Notice: Undefined index: thelia</span>
                        </h2>
                        <div class="block">
                            <ol class="traces list_exception">
       <li> in <a title="/home/theoetev/www/path/core/vendor/propel/propel/src/Propel/Runtime/ServiceContainer/StandardServiceContainer.php line 276" ondblclick="var f=this.innerHTML;this.innerHTML=this.title;this.title=f;">StandardServiceContainer.php line 276</a></li>
       <li>at <abbr title="Symfony\Component\Debug\ErrorHandler">ErrorHandler</abbr>->handleError('8', 'Undefined index: thelia', '/home/theoetev/www/path/core/vendor/propel/propel/src/Propel/Runtime/ServiceContainer/StandardServiceContainer.php', '276', <em>array</em>('name' => 'thelia')) in <a title="/home/theoetev/www/path/core/vendor/propel/propel/src/Propel/Runtime/ServiceContainer/StandardServiceContainer.php line 276" ondblclick="var f=this.innerHTML;this.innerHTML=this.title;this.title=f;">StandardServiceContainer.php line 276</a></li>
       <li>at <abbr title="Propel\Runtime\ServiceContainer\StandardServiceContainer">StandardServiceContainer</abbr>->getConnectionManager('thelia') in <a title="/home/theoetev/www/path/core/vendor/propel/propel/src/Propel/Runtime/ServiceContainer/StandardServiceContainer.php line 356" ondblclick="var f=this.innerHTML;this.innerHTML=this.title;this.title=f;">StandardServiceContainer.php line 356</a></li>
       <li>at <abbr title="Propel\Runtime\ServiceContainer\StandardServiceContainer">StandardServiceContainer</abbr>->getReadConnection('thelia') in <a title="/home/theoetev/www/path/core/vendor/propel/propel/src/Propel/Runtime/ActiveQuery/ModelCriteria.php line 970" ondblclick="var f=this.innerHTML;this.innerHTML=this.title;this.title=f;">ModelCriteria.php line 970</a></li>
       <li>at <abbr title="Propel\Runtime\ActiveQuery\ModelCriteria">ModelCriteria</abbr>->find() in <a title="/home/theoetev/www/path/core/lib/Thelia/Model/ModuleQuery.php line 32" ondblclick="var f=this.innerHTML;this.innerHTML=this.title;this.title=f;">ModuleQuery.php line 32</a></li>
       <li>at <abbr title="Thelia\Model\ModuleQuery">ModuleQuery</abbr>::getActivated() in <a title="/home/theoetev/www/path/core/lib/Thelia/Core/Thelia.php line 226" ondblclick="var f=this.innerHTML;this.innerHTML=this.title;this.title=f;">Thelia.php line 226</a></li>
       <li>at <abbr title="Thelia\Core\Thelia">Thelia</abbr>->loadConfiguration(<em>object</em>(<abbr title="Thelia\Core\TheliaContainerBuilder">TheliaContainerBuilder</abbr>)) in <a title="/home/theoetev/www/path/core/lib/Thelia/Core/Thelia.php line 427" ondblclick="var f=this.innerHTML;this.innerHTML=this.title;this.title=f;">Thelia.php line 427</a></li>
       <li>at <abbr title="Thelia\Core\Thelia">Thelia</abbr>->buildContainer() in <a title="/home/theoetev/www/path/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Kernel.php line 533" ondblclick="var f=this.innerHTML;this.innerHTML=this.title;this.title=f;">Kernel.php line 533</a></li>
       <li>at <abbr title="Symfony\Component\HttpKernel\Kernel">Kernel</abbr>->initializeContainer() in <a title="/home/theoetev/www/path/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Kernel.php line 130" ondblclick="var f=this.innerHTML;this.innerHTML=this.title;this.title=f;">Kernel.php line 130</a></li>
       <li>at <abbr title="Symfony\Component\HttpKernel\Kernel">Kernel</abbr>->boot() in <a title="/home/theoetev/www/path/core/lib/Thelia/Core/Thelia.php line 147" ondblclick="var f=this.innerHTML;this.innerHTML=this.title;this.title=f;">Thelia.php line 147</a></li>
       <li>at <abbr title="Thelia\Core\Thelia">Thelia</abbr>->boot() in <a title="/home/theoetev/www/path/core/lib/Thelia/Core/Application.php line 37" ondblclick="var f=this.innerHTML;this.innerHTML=this.title;this.title=f;">Application.php line 37</a></li>
       <li>at <abbr title="Thelia\Core\Application">Application</abbr>->__construct(<em>object</em>(<abbr title="Thelia\Core\Thelia">Thelia</abbr>)) in <a title="/home/theoetev/www/path/core/Thelia line 53" ondblclick="var f=this.innerHTML;this.innerHTML=this.title;this.title=f;">Thelia line 53</a></li>
       <li>at <abbr title=""></abbr>include('/home/theoetev/www/path/core/Thelia') in <a title="/home/theoetev/www/path/Thelia line 4" ondblclick="var f=this.innerHTML;this.innerHTML=this.title;this.title=f;">Thelia line 4</a></li>
    </ol>
</div>

            </div>
    </body>
</html>

Je suis bloqué à cette étape.

Last edited by anti-conformiste (03-10-2015 18:44:10)

Offline


Haaa, php en ligne de commande sur un mutu... Tout un poème

Ceci devrait sans doute t'aider : https://gist.github.com/floptwo/8867068


OpenStudio Toulouse

Offline


roadster31 wrote:

Haaa, php en ligne de commande sur un mutu... Tout un poème

Ceci devrait sans doute t'aider : https://gist.github.com/floptwo/8867068

Roadster impeccable, comme d'had !

/usr/local/php5.6/bin/php Thelia thelia:install

> Sortie :

#!/usr/bin/env php

Welcome to Thelia install process
You need information about your database configuration (host, username, password, database name, etc)

Caution : You are installing Thelia in cli mode, we verify some information, but this information are only available for the cli php sapi
This informations can be different in your apache or cgi php.ini files

Checking some permissions
PHP version 5.6.6 matches the minimum required (PHP 5.4). ... Ok
The directory /home/theoetev/www/path/local/config is writable ... Ok
The directory /home/theoetev/www/path/log is writable ... Ok
The directory /home/theoetev/www/path/cache is writable ... Ok
The directory /home/theoetev/www/path/web is writable ... Ok
The directory /home/theoetev/www/path/local/session is writable ... Ok
The directory /home/theoetev/www/path/local/media is writable ... Ok
The PHP "memory_limit" configuration value (currently 512M) is correct (128M required). ... Ok
The PHP "post_max_size" configuration value (currently 64M) is correct (20M required). ... Ok
The PHP "upload_max_filesize" configuration value (currently 64M) is correct (2M required). ... Ok
curl php extension is loaded. ... Ok
fileinfo php extension is loaded. ... Ok
gd php extension is loaded. ... Ok
intl php extension is loaded. ... Ok
mcrypt php extension is loaded. ... Ok
pdo_mysql php extension is loaded. ... Ok
...

Thalia installé et base T1 importé :-)

Merci Monsieur !

Offline


Dans la même veine, sur un mutu ovh, la commande
$ curl -sS https://getcomposer.org/installer | /usr/local/php5.6/bin/php
installe composer à la racine de l'hébergement.

Pour un projet situé par exemple sur www/monprojet, on fait :
$ /usr/local/php5.6/bin/php composer.phar create-project thelia/thelia www/monprojet/ 2.2.1

Tout marche bien, mais comment installer un module ?
$ /usr/local/php5.6/bin/php composer.phar require thelia/mon-super-module
installe le module à la racine de l'hébergement, pas dans www/monprojet/ même si on exécute la commande dans ce répertoire.

Alors comment modifier la commande pour que le module soit installé au bon endroit ?

Offline


En fait, c'était mon client ftp qui ne voulait pas changer de directory ! En utilisant le terminal, ça marche nickel.