-
-
Save Faryshta/6597fa6f5df51e15d81e537a8d24cb81 to your computer and use it in GitHub Desktop.
#!/bin/bash | |
# Install Dependencies | |
apt-get install --reinstall make; | |
apt-get update; | |
apt-get install --yes \ | |
git \ | |
bison \ | |
autoconf \ | |
libltdl-dev \ | |
libbz2-dev \ | |
libxml2-dev \ | |
libxslt1-dev \ | |
libpspell-dev \ | |
libenchant-dev \ | |
libmcrypt-dev \ | |
libpng-dev \ | |
libjpeg8-dev \ | |
libfreetype6-dev \ | |
libmysqlclient-dev \ | |
libcurl4-openssl-dev; | |
mkdir --parents /usr/local/php7; | |
mkdir --parents /etc/php7/conf.d; | |
mkdir --parents /etc/php7/cli/conf.d; | |
mkdir --parents /etc/php7/fpm/conf.d; | |
mkdir --parents --mode=777 /var/log/php7; | |
## Clone PHP7 source code from github | |
git clone https://github.com/php/php-src /usr/local/src/php7 --branch=master --depth=1; | |
cd /usr/local/src/php7; | |
## Configure the options for compilation | |
./buildconf --force; | |
./configure --prefix=/usr/local/php7 \ | |
\ | |
--with-bz2 \ | |
--with-zlib \ | |
--enable-zip \ | |
\ | |
--with-openssl \ | |
\ | |
--with-curl \ | |
--enable-ftp \ | |
--with-mysqli=mysqlnd \ | |
--with-pdo-mysql=mysqlnd \ | |
--enable-sockets \ | |
--enable-pcntl \ | |
\ | |
--with-pspell \ | |
--with-enchant \ | |
--with-gettext \ | |
\ | |
--with-gd \ | |
--enable-exif \ | |
--with-jpeg-dir \ | |
--with-png-dir \ | |
--with-freetype-dir \ | |
\ | |
--with-xsl \ | |
--enable-bcmath \ | |
--enable-mbstring \ | |
--enable-calendar \ | |
\ | |
--enable-sysvmsg \ | |
--enable-sysvsem \ | |
--enable-sysvshm \ | |
\ | |
--enable-soap \ | |
--with-xmlrpc \ | |
--enable-intl \ | |
\ | |
--with-config-file-path=/etc/php7/cli \ | |
--with-config-file-scan-dir=/etc/php7/cli/conf.d; | |
## Compile source code | |
make && make install && make clean; | |
## Symbolic link to use in the bash terminal | |
ln --symbolic /usr/local/php7/bin/php /usr/bin/php7 | |
## Virtual server command example | |
## php7 -S localhost:8000 |
necessário php5.6 antes de git checkout 4.0
Installing dependencies from lock file
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Installation request for doctrine/collections v1.4.0 -> satisfiable by doctrine/collections[v1.4.0].
- doctrine/collections v1.4.0 requires php ^5.6 || ^7.0 -> your PHP version (5.5.9) does not satisfy that requirement.
Problem 2
- Installation request for doctrine/common v2.7.3 -> satisfiable by doctrine/common[v2.7.3].
- doctrine/common v2.7.3 requires php ~5.6|~7.0 -> your PHP version (5.5.9) does not satisfy that requirement.
Problem 3
- Installation request for phpdocumentor/reflection-docblock 3.3.2 -> satisfiable by phpdocumentor/reflection-docblock[3.3.2].
- phpdocumentor/reflection-docblock 3.3.2 requires php ^5.6 || ^7.0 -> your PHP version (5.5.9) does not satisfy that requirement.
Problem 4
- doctrine/collections v1.4.0 requires php ^5.6 || ^7.0 -> your PHP version (5.5.9) does not satisfy that requirement.
- doctrine/orm v2.5.14 requires doctrine/collections ~1.2 -> satisfiable by doctrine/collections[v1.4.0].
- Installation request for doctrine/orm v2.5.14 -> satisfiable by doctrine/orm[v2.5.14].
$git checkout 3.1 && ./scripts/deploy.sh
Applying db update "refactor of entity meta keky value indexes":
exception 'PDOException' with message 'SQLSTATE[42601]: Syntax error: 7 ERROR: syntax error at or near "key"
LINE 1: ...TE INDEX registration_meta_key_idx ON registration_meta key;
^' in /srv/mapas/mapasculturais/src/protected/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:104
Stack trace:
#0 /srv/mapas/mapasculturais/src/protected/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php(104): PDO->query('CREATE INDEX re...')
#1 /srv/mapas/mapasculturais/src/protected/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(833): Doctrine\DBAL\Driver\PDOConnection->query('CREATE INDEX re...')
#2 /srv/mapas/mapasculturais/src/protected/db-updates.php(645): Doctrine\DBAL\Connection->executeQuery('CREATE INDEX re...')
#3 /srv/mapas/mapasculturais/src/protected/db-updates.php(665): MapasCulturais\App->MapasCulturais{closure}('CREATE INDEX re...')
#4 /srv/mapas/mapasculturais/src/protected/application/lib/MapasCulturais/App.php(575): MapasCulturais\App->MapasCulturais{closure}()
#5 /srv/mapas/mapasculturais/src/protected/application/lib/MapasCulturais/App.php(510): MapasCulturais\App->_dbUpdates()
#6 /srv/mapas/mapasculturais/src/protected/application/bootstrap.php(31): MapasCulturais\App->init(Array)
#7 /srv/mapas/mapasculturais/src/protected/tools/apply-updates.php(8): require('/srv/mapas/mapa...')
#8 {main}
Next exception 'Doctrine\DBAL\Driver\PDOException' with message 'SQLSTATE[42601]: Syntax error: 7 ERROR: syntax error at or near "key"
LINE 1: ...TE INDEX registration_meta_key_idx ON registration_meta key;
^' in /srv/mapas/mapasculturais/src/protected/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:106
Stack trace:
#0 /srv/mapas/mapasculturais/src/protected/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(833): Doctrine\DBAL\Driver\PDOConnection->query('CREATE INDEX re...')
#1 /srv/mapas/mapasculturais/src/protected/db-updates.php(645): Doctrine\DBAL\Connection->executeQuery('CREATE INDEX re...')
#2 /srv/mapas/mapasculturais/src/protected/db-updates.php(665): MapasCulturais\App->MapasCulturais{closure}('CREATE INDEX re...')
#3 /srv/mapas/mapasculturais/src/protected/application/lib/MapasCulturais/App.php(575): MapasCulturais\App->MapasCulturais{closure}()
#4 /srv/mapas/mapasculturais/src/protected/application/lib/MapasCulturais/App.php(510): MapasCulturais\App->_dbUpdates()
#5 /srv/mapas/mapasculturais/src/protected/application/bootstrap.php(31): MapasCulturais\App->init(Array)
#6 /srv/mapas/mapasculturais/src/protected/tools/apply-updates.php(8): require('/srv/mapas/mapa...')
#7 {main}
Next exception 'Doctrine\DBAL\Exception\SyntaxErrorException' with message 'An exception occurred while executing 'CREATE INDEX registration_meta_key_idx ON registration_meta key;':
SQLSTATE[42601]: Syntax error: 7 ERROR: syntax error at or near "key"
LINE 1: ...TE INDEX registration_meta_key_idx ON registration_meta key;
^' in /srv/mapas/mapasculturais/src/protected/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractPostgreSQLDriver.php:66
Stack trace:
#0 /srv/mapas/mapasculturais/src/protected/vendor/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php(128): Doctrine\DBAL\Driver\AbstractPostgreSQLDriver->convertException('An exception oc...', Object(Doctrine\DBAL\Driver\PDOException))
#1 /srv/mapas/mapasculturais/src/protected/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(836): Doctrine\DBAL\DBALException::driverExceptionDuringQuery(Object(Doctrine\DBAL\Driver\PDOPgSql\Driver), Object(Doctrine\DBAL\Driver\PDOException), 'CREATE INDEX re...', Array)
#2 /srv/mapas/mapasculturais/src/protected/db-updates.php(645): Doctrine\DBAL\Connection->executeQuery('CREATE INDEX re...')
#3 /srv/mapas/mapasculturais/src/protected/db-updates.php(665): MapasCulturais\App->MapasCulturais{closure}('CREATE INDEX re...')
#4 /srv/mapas/mapasculturais/src/protected/application/lib/MapasCulturais/App.php(575): MapasCulturais\App->MapasCulturais{closure}()
#5 /srv/mapas/mapasculturais/src/protected/application/lib/MapasCulturais/App.php(510): MapasCulturais\App->_dbUpdates()
#6 /srv/mapas/mapasculturais/src/protected/application/bootstrap.php(31): MapasCulturais\App->init(Array)
#7 /srv/mapas/mapasculturais/src/protected/tools/apply-updates.php(8): require('/srv/mapas/mapa...')
#8 {main}
Applying db update "altertable registration_file_and_files_add_order":