Shippable / support

Shippable SaaS customers can report issues and feature requests in this repository
101 stars 28 forks source link

PHP Extensions :: Mongo #1954

Closed Sebastien-Meiffren closed 8 years ago

Sebastien-Meiffren commented 9 years ago

Hello,

I'm trying to run shippable with a PHP project, in 5.6, with the Phalcon Framework. I managed to have the Phalcon framework running but Mongo so file doesn't seems to load itself up.

language: php

php:
  - 5.6

services:
  - mongodb
  - memcached

before_script:
  - mkdir -p shippable/testresults
  - mkdir -p shippable/codecoverage
  - DIRECTORY="${PWD##*/}/cphalcon"
  - if [ ! -d "$DIRECTORY" ]; then git clone --depth=1 git://github.com/phalcon/cphalcon.git && cd cphalcon/build && ./install && cd ../.. && echo 'extension="phalcon.so"' >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini; fi
  - echo "extension = memcached.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
  - echo "extension = mongodb.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini

before_install:
  - export PATH=$HOME/.phpenv/bin:$HOME/.phpenv/extensions:$PATH && eval "$(phpenv init -)"
  - phpenv global $SHIPPABLE_PHP_VERSION
  - php --version

script:
  - cd myCOL/tests
  - phpunit  --log-junit ../../shippable/testresults/junit.xml --coverage-xml ../../shippable/codecoverage --configuration phpunit.xml

notifications:
   email: false

PS 1 : I'm assuming that I don't need to put the so as it is provided in the example since now in the documentation it says that shippable comes with it PS 2 : I have the same issue with memcache

Thanks :)

Sebastien-Meiffren commented 9 years ago

pecl install mongo doesn't work either. It says

pecl: command not found
mbrodala commented 8 years ago

You could try installing php5-pear before.

mbrodala commented 8 years ago

Also see #2086 where I had a similar issue with the intl extension.

Sebastien-Meiffren commented 8 years ago

For futur reference, thanks to @mbrodala, this is what I put in my before_script section

  - sudo apt-get update
  - sudo apt-get install --yes php-pear libicu-dev php5-memcached
  - yes '' | pecl upgrade mongo
  - echo "extension=mongo.so" >> $HOME/.phpenv/versions/$(phpenv version-name)/etc/php.ini
  - echo "extension=memcached.so" >> $HOME/.phpenv/versions/$(phpenv version-name)/etc/php.ini

But the fact that the documentation is not up to date (or working) remains ...

manishas commented 8 years ago

Thanks @mbrodala!

We're rewriting documentation and this will be available in next couple of weeks. We're adding an FAQ section where these tips and tricks will be aggregated so folks can find them easily.

With regards to this specific issue, I'll get someone to follow up on Monday and explain what's going on.

Sebastien-Meiffren commented 8 years ago

OK I'll wait for the update cause Mongo + mySQL doesn't seems to be working properly as well despite the fact that it seems to have started (can't connect even with the right port / user / pass)

manishas commented 8 years ago

@chetantarale can you take a look at this please?

0x-x0 commented 8 years ago

This should be working on our new build system with new dry-dock images. @Sebastien-Meiffren Can you please give it a try and let us know if you are still running into this.

Sebastien-Meiffren commented 8 years ago

I will try and let you know but I need to reconfigure my project because I no longer use shippable ...