Phalcon.ini is loaded in phpifo but phalcon is not installed - php

I am trying to install the Phalcon4 with php7.4-fpm and I see that the ini file for phalcon is loaded in my phpinfo() here
But I am still getting the below error
Problem 1
- phalcon/incubator-logger[v1.0.0-beta.1, ..., v1.0.1] require ext-phalcon ^4.0 -> it is missing from your system. Install or enable PHP's phalcon extension.
- Root composer.json requires phalcon/incubator-logger ^1.0 -> satisfiable by phalcon/incubator-logger[v1.0.0-beta.1, v1.0.0, v1.0.1].
To enable extensions, verify that they are enabled in your .ini files:
- /etc/php/7.4/cli/php.ini
- /etc/php/7.4/cli/conf.d/10-mysqlnd.ini
- /etc/php/7.4/cli/conf.d/10-opcache.ini
- /etc/php/7.4/cli/conf.d/10-pdo.ini
- /etc/php/7.4/cli/conf.d/15-xml.ini
- /etc/php/7.4/cli/conf.d/20-calendar.ini
- /etc/php/7.4/cli/conf.d/20-ctype.ini
- /etc/php/7.4/cli/conf.d/20-curl.ini
- /etc/php/7.4/cli/conf.d/20-dom.ini
- /etc/php/7.4/cli/conf.d/20-exif.ini
- /etc/php/7.4/cli/conf.d/20-ffi.ini
- /etc/php/7.4/cli/conf.d/20-fileinfo.ini
- /etc/php/7.4/cli/conf.d/20-ftp.ini
- /etc/php/7.4/cli/conf.d/20-gd.ini
- /etc/php/7.4/cli/conf.d/20-gettext.ini
- /etc/php/7.4/cli/conf.d/20-iconv.ini
- /etc/php/7.4/cli/conf.d/20-json.ini
- /etc/php/7.4/cli/conf.d/20-mbstring.ini
- /etc/php/7.4/cli/conf.d/20-mysqli.ini
- /etc/php/7.4/cli/conf.d/20-pdo_mysql.ini
- /etc/php/7.4/cli/conf.d/20-phar.ini
- /etc/php/7.4/cli/conf.d/20-posix.ini
- /etc/php/7.4/cli/conf.d/20-readline.ini
- /etc/php/7.4/cli/conf.d/20-shmop.ini
- /etc/php/7.4/cli/conf.d/20-simplexml.ini
- /etc/php/7.4/cli/conf.d/20-sockets.ini
- /etc/php/7.4/cli/conf.d/20-sysvmsg.ini
- /etc/php/7.4/cli/conf.d/20-sysvsem.ini
- /etc/php/7.4/cli/conf.d/20-sysvshm.ini
- /etc/php/7.4/cli/conf.d/20-tokenizer.ini
- /etc/php/7.4/cli/conf.d/20-xmlreader.ini
- /etc/php/7.4/cli/conf.d/20-xmlrpc.ini
- /etc/php/7.4/cli/conf.d/20-xmlwriter.ini
- /etc/php/7.4/cli/conf.d/20-xsl.ini
- /etc/php/7.4/cli/conf.d/50-phalcon.ini
You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.
How can I get the Phalcon4 working for me? I am running LEMP Stack on Ubuntu 20.04
TIA

The error's indicate that you are trying to load phalcon via the CLI, your phpinfo() output is only showing that phalcon is loaded for FPM.
You need to load the extension in both config ini files:
Documentation:
; Ubuntu/Debian with Php7-fpm: Add a File Called 30-phalcon.ini in /etc/php7/fpm/conf.d/ with This Content:
extension=phalcon.so
; Ubuntu/Debian with Php7-cli: Add a File Called 30-phalcon.ini in /etc/php7/cli/conf.d/ with This Content:
extension=phalcon.so

We need to run phalcon PSR module
Execute this command start the php-fpm server
sudo apt install php7.4-psr
sudo start php7.4-fpm

Related

Lumen installation ext-dom missing and composer.json error

I am trying to install Lumen but i am getting the next error:
My OS is Ubuntu 21.10
Your requirements could not be resolved to an installable set of packages.
Problem 1
- phpunit/phpunit[9.5.10, ..., 9.5.x-dev] require ext-dom * -> it is missing from your system. Install or enable PHP's dom extension.
- Root composer.json requires phpunit/phpunit ^9.5.10 -> satisfiable by phpunit/phpunit[9.5.10, ..., 9.5.x-dev].
To enable extensions, verify that they are enabled in your .ini files:
- /etc/php/8.1/cli/php.ini
- /etc/php/8.1/cli/conf.d/10-opcache.ini
- /etc/php/8.1/cli/conf.d/10-pdo.ini
- /etc/php/8.1/cli/conf.d/20-calendar.ini
- /etc/php/8.1/cli/conf.d/20-ctype.ini
- /etc/php/8.1/cli/conf.d/20-exif.ini
- /etc/php/8.1/cli/conf.d/20-ffi.ini
- /etc/php/8.1/cli/conf.d/20-fileinfo.ini
- /etc/php/8.1/cli/conf.d/20-ftp.ini
- /etc/php/8.1/cli/conf.d/20-gettext.ini
- /etc/php/8.1/cli/conf.d/20-iconv.ini
- /etc/php/8.1/cli/conf.d/20-intl.ini
- /etc/php/8.1/cli/conf.d/20-mbstring.ini
- /etc/php/8.1/cli/conf.d/20-phar.ini
- /etc/php/8.1/cli/conf.d/20-posix.ini
- /etc/php/8.1/cli/conf.d/20-readline.ini
- /etc/php/8.1/cli/conf.d/20-shmop.ini
- /etc/php/8.1/cli/conf.d/20-sockets.ini
- /etc/php/8.1/cli/conf.d/20-sysvmsg.ini
- /etc/php/8.1/cli/conf.d/20-sysvsem.ini
- /etc/php/8.1/cli/conf.d/20-sysvshm.ini
- /etc/php/8.1/cli/conf.d/20-tokenizer.ini
You can also run `php --ini` in a terminal to see which files are used by PHP in CLI mode.
Alternatively, you can run Composer with `--ignore-platform-req=ext-dom` to temporarily ignore these required extensions.
Already tried to install php-xml but didnt worked

Error downloading Pterodactyl with the command "composer install --no-dev --optimize-autoloader"

I encounter a problem during the download of the Pterodactyl Panel: when I launch the Error downloading Pterodactyl command with the command composer compose --no-dev --optimize-autoloader
I have an error which is:
Do not run Composer as root/super user! See https://getcomposer.org/root for details
Loading composer repositories with package information
Installing dependencies from lock file
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Installation request for s1lentium/iptools v1.1.1 -> satisfiable by s1lentium/iptools[v1.1.1].
- s1lentium/iptools v1.1.1 requires ext-bcmath * -> the requested PHP extension bcmath is missing from your system.
To enable extensions, verify that they are enabled in your .ini files:
- /etc/php/7.4/cli/php.ini
- /etc/php/7.4/cli/conf.d/10-mysqlnd.ini
- /etc/php/7.4/cli/conf.d/10-opcache.ini
- /etc/php/7.4/cli/conf.d/10-pdo.ini
- /etc/php/7.4/cli/conf.d/15-xml.ini
- /etc/php/7.4/cli/conf.d/20-bz2.ini
- /etc/php/7.4/cli/conf.d/20-calendar.ini
- /etc/php/7.4/cli/conf.d/20-ctype.ini
- /etc/php/7.4/cli/conf.d/20-curl.ini
- /etc/php/7.4/cli/conf.d/20-dom.ini
- /etc/php/7.4/cli/conf.d/20-exif.ini
- /etc/php/7.4/cli/conf.d/20-ffi.ini
- /etc/php/7.4/cli/conf.d/20-fileinfo.ini
- /etc/php/7.4/cli/conf.d/20-ftp.ini
- /etc/php/7.4/cli/conf.d/20-gd.ini
- /etc/php/7.4/cli/conf.d/20-gettext.ini
- /etc/php/7.4/cli/conf.d/20-iconv.ini
- /etc/php/7.4/cli/conf.d/20-json.ini
- /etc/php/7.4/cli/conf.d/20-mbstring.ini
- /etc/php/7.4/cli/conf.d/20-mysqli.ini
- /etc/php/7.4/cli/conf.d/20-pdo_mysql.ini
- /etc/php/7.4/cli/conf.d/20-phar.ini
- /etc/php/7.4/cli/conf.d/20-posix.ini
- /etc/php/7.4/cli/conf.d/20-readline.ini
- /etc/php/7.4/cli/conf.d/20-shmop.ini
- /etc/php/7.4/cli/conf.d/20-simplexml.ini
- /etc/php/7.4/cli/conf.d/20-sockets.ini
- /etc/php/7.4/cli/conf.d/20-sysvmsg.ini
- /etc/php/7.4/cli/conf.d/20-sysvsem.ini
- /etc/php/7.4/cli/conf.d/20-sysvshm.ini
- /etc/php/7.4/cli/conf.d/20-tokenizer.ini
- /etc/php/7.4/cli/conf.d/20-xmlreader.ini
- /etc/php/7.4/cli/conf.d/20-xmlwriter.ini
- /etc/php/7.4/cli/conf.d/20-xsl.ini
- /etc/php/7.4/cli/conf.d/20-zip.ini
You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.
I checked and I have everything when I run php --ini:
Configuration File (php.ini) Path: /etc/php/7.4/cli
Loaded Configuration File: /etc/php/7.4/cli/php.ini
Scan for additional .ini files in: /etc/php/7.4/cli/conf.d
Additional .ini files parsed: /etc/php/7.4/cli/conf.d/10-mysqlnd.ini,
/etc/php/7.4/cli/conf.d/10-opcache.ini,
/etc/php/7.4/cli/conf.d/10-pdo.ini,
/etc/php/7.4/cli/conf.d/15-xml.ini,
/etc/php/7.4/cli/conf.d/20-bz2.ini,
/etc/php/7.4/cli/conf.d/20-calendar.ini,
/etc/php/7.4/cli/conf.d/20-ctype.ini,
/etc/php/7.4/cli/conf.d/20-curl.ini,
/etc/php/7.4/cli/conf.d/20-dom.ini,
/etc/php/7.4/cli/conf.d/20-exif.ini,
/etc/php/7.4/cli/conf.d/20-ffi.ini,
/etc/php/7.4/cli/conf.d/20-fileinfo.ini,
/etc/php/7.4/cli/conf.d/20-ftp.ini,
/etc/php/7.4/cli/conf.d/20-gd.ini,
/etc/php/7.4/cli/conf.d/20-gettext.ini,
/etc/php/7.4/cli/conf.d/20-iconv.ini,
/etc/php/7.4/cli/conf.d/20-json.ini,
/etc/php/7.4/cli/conf.d/20-mbstring.ini,
/etc/php/7.4/cli/conf.d/20-mysqli.ini,
/etc/php/7.4/cli/conf.d/20-pdo_mysql.ini,
/etc/php/7.4/cli/conf.d/20-phar.ini,
/etc/php/7.4/cli/conf.d/20-posix.ini,
/etc/php/7.4/cli/conf.d/20-readline.ini,
/etc/php/7.4/cli/conf.d/20-shmop.ini,
/etc/php/7.4/cli/conf.d/20-simplexml.ini,
/etc/php/7.4/cli/conf.d/20-sockets.ini,
/etc/php/7.4/cli/conf.d/20-sysvmsg.ini,
/etc/php/7.4/cli/conf.d/20-sysvsem.ini,
/etc/php/7.4/cli/conf.d/20-sysvshm.ini,
/etc/php/7.4/cli/conf.d/20-tokenizer.ini,
/etc/php/7.4/cli/conf.d/20-xmlreader.ini,
/etc/php/7.4/cli/conf.d/20-xmlwriter.ini,
/etc/php/7.4/cli/conf.d/20-xsl.ini,
/etc/php/7.4/cli/conf.d/20-zip.ini
And I didn't find the installation of s1lentium / iptools v1.1.1.
I have been looking for quite a while but cannot find any thanks for any help.
apt install php7.4-bcmath to the rescue!

php dependency/package manager Composer will not install packages

I'm building a website with PHP framework "Slim" as my templating framework, and it recommends using composer as the package manager. SO... I'm now using composer for the first time, developing locally on 64 bit Ubuntu 16.04 and composer is not installing anything into my project.
I've followed the installation instructions on the Slim Framework & Composer websites to a tee.
Basically this is the order of what I've done:
Installed composer into /var/www/html directory [1.]
Created Slim project using Slim-Skeleton as a base
php composer.phar create-project slim/slim-skeleton slimLittleTest
Note: the php composer.phar create-project slim/slim-skeleton command automatically creates a composer.json file, I will put the contents of that file down farther in my question.
Change into that directory and run php composer.phar install
Nothing is installed!
If I try to run php -S localhost:8080 -t public public/index.php as you're now supposed to able to (from the Slim framework website homepage tutorial) I get the following error:
[Tue Sep 5 18:55:04 2017] PHP Fatal error: require(): Failed opening required '/var/www/html/slimLittleTest/public/../vendor/autoload.php' (include_path='.:/usr/share/php') in /var/www/html/slimLittleTest/public/index.php on line 12
[Tue Sep 5 18:55:05 2017] PHP Warning:
require(/var/www/html/slimLittleTest/public/../vendor/autoload.php): failed to open stream: No such file or directory in /var/www/html/slimLittleTest/public/index.php on line 12
This error of course makes sense because nothing got installed! There is no vendor/autoload.php because Composer hasn't installed anything. (By default Composer installs dependencies into the vendor folder in the root of your project)
SEPTEMBER 7th QUESTION UPDATE
From some comments down below, I've been alerted to the fact that something must have gone wrong on the command composer create-project, that my solution of just re-requiring all packages shouldn't be necessary. Upon further inspection, I did get some errors upon running command php composer.phar create-project slim/slim-skeleton projectName. Below is exactly what got output from the console after running that command:
php composer.phar create-project slim/slim-skeleton tester
Installing slim/slim-skeleton (3.1.2)
- Installing slim/slim-skeleton (3.1.2): Loading from cache
Created project in tester
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- phpunit/phpunit 5.7.9 requires ext-dom * -> the requested PHP extension dom is missing from your system.
- phpunit/phpunit 5.7.8 requires ext-dom * -> the requested PHP extension dom is missing from your system.
- phpunit/phpunit 5.7.7 requires ext-dom * -> the requested PHP extension dom is missing from your system.
[.......]
To enable extensions, verify that they are enabled in your .ini files:
- /etc/php/7.0/cli/php.ini
- /etc/php/7.0/cli/conf.d/10-mysqlnd.ini
- /etc/php/7.0/cli/conf.d/10-opcache.ini
- /etc/php/7.0/cli/conf.d/10-pdo.ini
- /etc/php/7.0/cli/conf.d/20-calendar.ini
- /etc/php/7.0/cli/conf.d/20-ctype.ini
- /etc/php/7.0/cli/conf.d/20-curl.ini
- /etc/php/7.0/cli/conf.d/20-exif.ini
- /etc/php/7.0/cli/conf.d/20-fileinfo.ini
- /etc/php/7.0/cli/conf.d/20-ftp.ini
- /etc/php/7.0/cli/conf.d/20-gettext.ini
- /etc/php/7.0/cli/conf.d/20-iconv.ini
- /etc/php/7.0/cli/conf.d/20-imagick.ini
- /etc/php/7.0/cli/conf.d/20-json.ini
- /etc/php/7.0/cli/conf.d/20-mbstring.ini
- /etc/php/7.0/cli/conf.d/20-mcrypt.ini
- /etc/php/7.0/cli/conf.d/20-mysqli.ini
- /etc/php/7.0/cli/conf.d/20-pdo_mysql.ini
- /etc/php/7.0/cli/conf.d/20-phar.ini
- /etc/php/7.0/cli/conf.d/20-posix.ini
- /etc/php/7.0/cli/conf.d/20-readline.ini
- /etc/php/7.0/cli/conf.d/20-shmop.ini
- /etc/php/7.0/cli/conf.d/20-sockets.ini
- /etc/php/7.0/cli/conf.d/20-sysvmsg.ini
- /etc/php/7.0/cli/conf.d/20-sysvsem.ini
- /etc/php/7.0/cli/conf.d/20-sysvshm.ini
- /etc/php/7.0/cli/conf.d/20-tokenizer.ini
You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.
Would either that .ini extensions issue or Problem 1 php unit requires ext-dom issue be the main source of my problem?
I got lucky and stumbled upon an answer that worked in my situation.
I just had to run php composer.phar require [package_name], for each package name, and if it wasn't in composer.json yet that dependency would get installed. So what I needed to do was delete the composer.json file, then go back and require each package from it. Nothing else worked, such as php composer.phar update, or php composer.phar install.
So I ran php composer.phar require slim/php, php composer.phar require php, etc. from the command line and everything installed correctly.
This is potentially a failure of the getting started documentation from SlimFramework.com, It's not necessarily "wrong" because maybe it works in some/most situations, but they should at least address the potential for the problem I ran into, and a solution or way to avoid it.
EVEN BETTER SOLUTION
Turns out that the main error I was getting here is that I was missing ext-dom. Thank you to this badass #Anar Bayramov's answer on another StackOverflow question I know that I can get the missing ext-dom by simply downloading php7.0-xml.
sudo apt-get update
sudo apt-get install php7.0-xml
And BOOM! Now when I run php composer.phar create-project slim/slim-skeleton projectName all vendor packages are installed successfully and it works like a charm. Problem solved.

Laravel: php artisan serve doesn't start

I've dug through a few of the other answers here and nothing seems to fit the bill. I'm probably going to leave some information out initially so just let me know what else you might need and thanks!
Currently running ubuntu 7, using composer and laravel both of which seem to be installed properly:
When I type 'php artisan serve' and 'php artisan serve --port:8000' into terminal I get this error:
PHP Warning:
require(/home/user/Projects/thingy/bootstrap/../vendor/autoload.php):
failed to open stream: No such file or directory in
/home/user/Projects/thingy/bootstrap/autoload.php on line 17 PHP
Fatal error: require(): Failed opening required
'/home/user/Projects/thingy/bootstrap/../vendor/autoload.php'
(include_path='.:/usr/share/php') in
/home/user/Projects/thingy/bootstrap/autoload.php on line 17
When I attempt to run 'php -S localhost:8000 -t public/' just as an attempt I get the following error upon refresh:
PHP 7.0.18-0ubuntu0.17.04.1 Development Server started at Thu Jul 6
09:15:36 2017 Listening on http://localhost:8000 Document root is
/home/user/Projects/thingy/public Press Ctrl-C to quit. [Thu Jul 6
09:15:40 2017] PHP Warning:
require(/home/user/Projects/thingy/bootstrap/../vendor/autoload.php):
failed to open stream: No such file or directory in
/home/user/Projects/thingy/bootstrap/autoload.php on line 17 [Thu
Jul 6 09:15:40 2017] PHP Fatal error: require(): Failed opening
required
'/home/user/Projects/thingy/bootstrap/../vendor/autoload.php'
(include_path='.:/usr/share/php') in
/home/user/Projects/thingy/bootstrap/autoload.php on line 17 [Thu
Jul 6 09:15:40 2017] 127.0.0.1:57214 [500]: / - require(): Failed
opening required
'/home/user/Projects/thingy/bootstrap/../vendor/autoload.php'
(include_path='.:/usr/share/php') in
/home/user/Projects/thingy/bootstrap/autoload.php on line 17
I checked to see if maybe a server was already running using the 'ps -ef | grep php' command in terminal and I don't see any servers running at all.
I have run 'composer install' and I get the following error:
Cannot create cache directory
/home/user/.composer/cache/repo/https---packagist.org/, or directory
is not writable. Proceeding without cache Cannot create cache
directory /home/user/.composer/cache/files/, or directory is not
writable. Proceeding without cache Cannot create cache directory
/home/user/.composer/cache/repo/https---packagist.org/, or directory
is not writable. Proceeding without cache Loading composer
repositories with package information Installing dependencies
(including require-dev) from lock file Your requirements could not be
resolved to an installable set of packages.
Problem 1
- Installation request for laravel/framework v5.4.28 -> satisfiable by laravel/framework[v5.4.28].
- laravel/framework v5.4.28 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
Problem 2
- Installation request for phpunit/php-code-coverage 4.0.8 -> satisfiable by phpunit/php-code-coverage[4.0.8].
- phpunit/php-code-coverage 4.0.8 requires ext-dom * -> the requested PHP extension dom is missing from your system. Problem 3
- Installation request for phpunit/phpunit 5.7.21 -> satisfiable by phpunit/phpunit[5.7.21].
- phpunit/phpunit 5.7.21 requires ext-dom * -> the requested PHP extension dom is missing from your system. Problem 4
- laravel/framework v5.4.28 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
- laravel/tinker v1.0.1 requires illuminate/console ~5.1 -> satisfiable by laravel/framework[v5.4.28].
- Installation request for laravel/tinker v1.0.1 -> satisfiable by laravel/tinker[v1.0.1].
To enable extensions, verify that they are enabled in your .ini
files:
- /etc/php/7.0/cli/php.ini
- /etc/php/7.0/cli/conf.d/10-opcache.ini
- /etc/php/7.0/cli/conf.d/10-pdo.ini
- /etc/php/7.0/cli/conf.d/20-calendar.ini
- /etc/php/7.0/cli/conf.d/20-ctype.ini
- /etc/php/7.0/cli/conf.d/20-exif.ini
- /etc/php/7.0/cli/conf.d/20-fileinfo.ini
- /etc/php/7.0/cli/conf.d/20-ftp.ini
- /etc/php/7.0/cli/conf.d/20-gettext.ini
- /etc/php/7.0/cli/conf.d/20-iconv.ini
- /etc/php/7.0/cli/conf.d/20-json.ini
- /etc/php/7.0/cli/conf.d/20-pdo_pgsql.ini
- /etc/php/7.0/cli/conf.d/20-pgsql.ini
- /etc/php/7.0/cli/conf.d/20-phar.ini
- /etc/php/7.0/cli/conf.d/20-posix.ini
- /etc/php/7.0/cli/conf.d/20-readline.ini
- /etc/php/7.0/cli/conf.d/20-shmop.ini
- /etc/php/7.0/cli/conf.d/20-sockets.ini
- /etc/php/7.0/cli/conf.d/20-sysvmsg.ini
- /etc/php/7.0/cli/conf.d/20-sysvsem.ini
- /etc/php/7.0/cli/conf.d/20-sysvshm.ini
- /etc/php/7.0/cli/conf.d/20-tokenizer.ini
- /etc/php/7.0/cli/conf.d/20-zip.ini You can also run php --ini inside terminal to see which files are used by PHP in CLI mode.
When running 'composer dump-autoload' I get the following:
Cannot create cache directory
/home/user/.composer/cache/repo/https---packagist.org/, or directory
is not writable. Proceeding without cache Cannot create cache
directory /home/user/.composer/cache/files/, or directory is not
writable. Proceeding without cache Cannot create cache directory
/home/user/.composer/cache/repo/https---packagist.org/, or directory
is not writable. Proceeding without cache Generating optimized
autoload files
After following the advice of Nishan Karunarathna and Alex I now get the following error when I run 'php artisan serve':
PHP Fatal error: Uncaught Error: Class
'Illuminate\Foundation\Application' not found in
/home/joshua/Projects/thingy/bootstrap/app.php:14 Stack trace:
0 /home/joshua/Projects/thingy/artisan(18): require_once()
1 {main} thrown in /home/joshua/Projects/thingy/bootstrap/app.php on line 14
Thanks for any help you give!
You have sort out the errors when encountered when doing composer install.
Install required PHP extensions
sudo apt-get install php7.0-mbstring
sudo apt-get install php7.0-xml
Then restart your nginx and try to run composer install again.
I think you should:
1) Install additional php extensions. Run into your terminal something like:
$ sudo apt-get install php7.0-opcache php7.0-calendar php7.0-ctype php7.0-gettext ...
2) Then give permissions to cache dir of composer:
$ sudo chmod -R u+w /home/joshua/.composer or if this directory is absent your should create its before $ sudo mkdir /home/joshua/.composer
3) Run $ composer install
But I'd like to pay your attention on:
1) Check your home directory on write permissions. If you don't have them, the most part of programs can't work correctly
2) Probably you have needed php extensions but they are not loaded. In this case check your .ini files and enable extensions.
Ok so I managed to answer my own question (actually a friend answered it for me.)
Apparently after you install laravel and composer it can, on occasion, lose the file path:
I had to open my .bashrc file in my hidden files on the /home/user/ level and add the command 'export PATH=~/.composer/vendor/bin:$PATH'
I think the other users here did contribute to fixing my problem as laravel and composer didn't seem to be installed correctly despite the files being in the proper place.

How to install a custom PHP extension on Travis (OAuth)

I'd like to install the PHP extension OAuth in my build environment on Travis.
I've tried these two configuration in .travis.yml file:
COnfiguration 1 (using before_script):
language: php
matrix:
include:
- php: 5.3
- php: 5.4
- php: 5.5
- php: 5.6
- php: 7.0
- php: hhvm
cache:
directories:
- $HOME/.composer/cache
install:
- travis_retry composer update ${COMPOSER_FLAGS} --no-interaction
script:
- phpunit --verbose --coverage-clover build/logs/clover.xml
- phpenv config-rm xdebug.ini || return 0
before_script:
- pecl install oauth
Configuration 2 (using install):
language: php
matrix:
include:
- php: 5.3
- php: 5.4
- php: 5.5
- php: 5.6
- php: 7.0
- php: hhvm
cache:
directories:
- $HOME/.composer/cache
install:
- travis_retry composer update ${COMPOSER_FLAGS} --no-interaction
- pecl install oauth
script:
- phpunit --verbose --coverage-clover build/logs/clover.xml
- phpenv config-rm xdebug.ini || return 0
The documentation isn't clear about where to put the commands to install custom PHP extensions (or maybe I've not understood it, it's possible!).
Anyway, can someone help me configure Travis to install OAuth PHP extension? Thankyou!
Per Problems with PHP YAML within Travis CI it looks like the pecl install goes in the before_script section.
Per my own testing here https://travis-ci.org/davidjeddy/no-code/jobs/345523220 it appears that does the trick.

Categories