Composer Update Failed cannot open shared object file: - composer-php

I just run
composer update
but I got this
Failed loading ./opcache.so: ./opcache.so: cannot open shared object file: No such file or directory
PHP Warning: PHP Startup: Unable to load dynamic library './pdo.so' - ./pdo.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 './calendar.so' - ./calendar.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 './ctype.so' - ./ctype.so: cannot open shared object file: No such file or directory in Unknown on line 0
... so on
I run php -i and got this
Loaded Configuration File => /etc/php/7.0/cli/php.ini
Scan this dir for additional .ini files => /etc/php/7.0/cli/conf.d
Additional .ini files parsed => /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,
... so on
How do I fix it?
Thanks in Advance.

Your php can not find the dlls. To solve it:
Run php -i and find your php.ini location under Loaded Configuration File key.
Search for the dll files php unable to load and find their full path
Update the extension key in your php.ini to the full dll path
for example:
extension=<path>/php_pdo_firebird.dll
extension=<path>/php_pdo_mysql.dll'
extension=<path>/php_pdo_pgsql.dll:

composer use php.ini in /etc/php/7.0/cli/php.ini looks like you uncoment extension_dir
just comment, and reload apache and you done it.

Related

lumen: [ErrorException] chdir(): No such file or directory (errno 2)

UPDATED:
I transfer the contents of the public folder to the root and transferred the contents of root folder to the lara folder like this:
When i run:
php artisan serve
this error comming:
[ErrorException]
chdir(): No such file or directory (errno 2)
What have I done?
I try these solutions [1], [2] but no solution found.
I use from this server:
PHP 7.2.15-1+ubuntu16.04.1+deb.sury.org+1
Also I use from Lumen instead of Laravel.
Thanks for sharing your knowledge
Please make sure that your public folder is available..

Laravel pdf issue: failed to open stream: No such file or directory by using barryvdh/laravel-dompdf package

I am update composer and use barryvdh/laravel-dompdf package.
the problem is when i click the button it show me error like image below:-
Is that anyway to change the folder path? or am I missing code to modify path to download the pdf file?
You need to run this command:
php artisan vendor:publish
Then, try to create a fonts directory in the storage directory.
i.e. storage/app/fonts. Also, remember to make it writable.
For maximum execution time of 30 seconds exceeded, this is not laravel related issue but it's about php configuration issue. Please see this and fix it: http://php.net/manual/en/info.configuration.php#ini.max-execution-time
You can also see this answer: https://stackoverflow.com/a/30290770/6000629
Hope this will helps you!
Try this:
$pdf = PDF::loadView('pdf/personalpdf', compact('user','result'))->setOptions(['defaultFont' => 'sans-serif']);
It worked for me, I didn't make any file/folder
Just remove the reference to css external file in your cart.placeOrder.blade
Note: This directory must exist and be writable by the webserver process.
under the config file thats what it say: therefore you should create the fonts directory inside the storage.
"font_cache" => storage_path('fonts/'),

Could not load xDebug .dll in xampp

Trying for a while but could not fixed the php_xdebug.dll load issue.
Php Version: 7.0.9
xDebug Version: PHP 7.0 VC14 (64 bit)
file: php_xdebug-2.4.1-7.0-vc14-nts-x86_64.dll
I have copied the .dll file in ext directory and edited the php.ini directory accordingly
php.ini configuration:
zend_extension = "C:\xampp\php\ext\php_xdebug-2.4.1-7.0-vc14-nts-x86_64.dll"
xdebug.remote_autostart=on
xdebug.remote_enable=on
xdebug.remote_enable=1
xdebug.remote_handler="dbgp"
xdebug.remote_host="127.0.01"
xdebug.remote_port=9000
xdebug.remote_mode=req
xdebug.remote_log="C:\xampp\logs"
After restarting the apache, If I check the php --ini then getting load error
C:\xampp\php>php --ini
Failed loading C:\xampp\php\ext\php_xdebug-2.4.1-7.0-vc14-nts-x86_64.dll
Configuration File (php.ini) Path: C:\Windows
Loaded Configuration File: C:\xampp\php\php.ini
Scan for additional .ini files in: (none)
Additional .ini files parsed: (none)
It means that the .dll file is not in the "ext" folder. Check the "zend_ext" folder.

installation - PHP Extensions "pdo_mysql" must be loaded

This is whay i see on phpinfo();
pdo_mysql
PDO Driver for MySQL enabled
Client API version 5.1.68
Directive Local Value Master Value
pdo_mysql.default_socket /var/lib/mysql/mysql.sock /var/lib/mysql/mysql.sock
but im still getting the magento message :
"PHP Extensions "pdo_mysql" must be loaded"
why is that ?
open or make php.ini file into root directory and add the following code:
extension=pdo.so
extension=pdo_sqlite.so
extension=sqlite.so
extension=pdo_mysql.so

Magento Collection on Mysql4 = No such file or directory

In a downloaded module there is a specific call Mage::getModel('module/statistic_collection'), this gives me the failed to open stream: No such file or directory error with the path Namespace/Module/Model/Statistic/Collection.php but it exists in Namespace/Module/Model/Mysql4/Statistic/Collection.php.
So how can I tell magento that they need to add the Mysql4 folder ?
You have two options:
Mage::getResourceModel('module/statistics_collection')
or
Mage::getModel('module/statistics')->getCollection()

Resources