Have a problem with install Symfony vendors on remote server (VPS), because after installation composer library by server administration, I have PHP Fatal error when I run it:
PHP Fatal error: Uncaught ErrorException: proc_close() has been disabled for security reasons in phar:///usr/local/bin/composer/vendor/symfony/console/Application.php:957
Stack trace:
#0 [internal function]: Composer\Util\ErrorHandler::handle(2, 'proc_close() ha...', 'phar:///usr/loc...', 957, Array)
#1 phar:///usr/local/bin/composer/vendor/symfony/console/Application.php(957): proc_close(Resource id #252)
#2 phar:///usr/local/bin/composer/vendor/symfony/console/Application.php(753): Symfony\Component\Console\Application->getSttyColumns()
#3 phar:///usr/local/bin/composer/vendor/symfony/console/Application.php(714): Symfony\Component\Console\Application->getTerminalDimensions()
#4 phar:///usr/local/bin/composer/vendor/symfony/console/Application.php(648): Symfony\Component\Console\Application->getTerminalWidth()
#5 phar:///usr/local/bin/composer/vendor/symfony/console/Application.php(127): Symfony\Component\Console\Application->renderException(Object(ErrorException), Object(Symfony\Component\Console\Output\StreamOutput))
#6 p in phar:///usr/local/bin/composer/vendor/symfony/console/Application.php on line 957
Have PHP 7.3.15
memory_limit => 1024M
disable_functions => exec,system,passthru,shell_exec,proc_close,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname => exec,system,passthru,shell_exec,proc_close,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Maybe someone have any ideas?
If you are deploying in a shared cloud service the process won't work due to the limited resources available for your instance. I will advise you do the composer update or install on your development instance and transfer the files zipped to the host
There are multiple ways:
Contact your hosting source to allow you.
Push/Deploy the vendor from your local these way you don't need to run any composer command.
Related
For the New Laravel project, I need to update the PHP version using XAMPP,
After the update, the PHP version and apache folder when I start apache and MySQL from the XAMPP control panel this working but I open localhost/phpmyadmin/ it shows me fatal error and doesn't show the database.
Fatal error: Uncaught mysqli_sql_exception: You are not using binary logging in C:\xampp\phpMyAdmin\libraries\classes\Dbi\DbiMysqli.php:199 Stack trace: #0 C:\xampp\phpMyAdmin\libraries\classes\Dbi\DbiMysqli.php(199): mysqli->query('SHOW MASTER LOG...', 0) #1 C:\xampp\phpMyAdmin\libraries\classes\DatabaseInterface.php(316): PhpMyAdmin\Dbi\DbiMysqli->realQuery('SHOW MASTER LOG...', Object(mysqli), 1) #2 C:\xampp\phpMyAdmin\libraries\classes\DatabaseInterface.php(1869): PhpMyAdmin\DatabaseInterface->tryQuery('SHOW MASTER LOG...', 256, 1, false) #3 C:\xampp\phpMyAdmin\libraries\classes\Menu.php(573): PhpMyAdmin\DatabaseInterface->fetchResult('SHOW MASTER LOG...', 'Log_name', NULL, 256, 1) #4 C:\xampp\phpMyAdmin\libraries\classes\Menu.php(107): PhpMyAdmin\Menu->_getServerTabs() #5 C:\xampp\phpMyAdmin\libraries\classes\Menu.php(70): PhpMyAdmin\Menu->_getMenu() #6 C:\xampp\phpMyAdmin\libraries\classes\Header.php(445): PhpMyAdmin\Menu->getDisplay() #7 C:\xampp\phpMyAdmin\libraries\classes\Response.php(323): PhpMyAdmin\Header->getDisplay() #8 C:\xampp\phpMyAdmin\libraries\classes\Response.php(336): PhpMyAdmin\Response->_getDisplay() #9 C:\xampp\phpMyAdmin\libraries\classes\Response.php(495): PhpMyAdmin\Response->_htmlResponse() #10 [internal function]: PhpMyAdmin\Response->response() #11 {main} thrown in C:\xampp\phpMyAdmin\libraries\classes\Dbi\DbiMysqli.php on line 199
I feel the main issue is that your tried to upgrade only php instead of the whole Xampp Bundle. Either you should install complete xampp again or you should upgrade phpMyAdmin manually too as this will fix the php compatibility issues.
I had this exact same issue and I have spent many hours trying to figure this out, so it is as simple as this.
Once you have upgraded your php. (In my case I upgraded to php 8.1.10)
Make a copy of your phpMyAdmin folder renaming it different than the current value that it has.
Download phpMyAdmin 5.2.0 or higher.
Unzip the file, and then copy it into your xampp folder replacing the old phpMyAdmin folder.
Inside the new folder create the file config.inc.php and paste inside there the data that is in config.inc.php located in your old phpMyAdmin folder.
Thats it!
I have a site that uses composer to build the QA environment and then deploys the QA environment to production. Production does not have composer installed, instead the vendor folder is synced between the two environments. On my last project I had to update the composer.lock file. When i deployed the project, i received the following error:
PHP Fatal error: Uncaught GuzzleHttp\Exception\ClientException: Client error: GET https://www.myurl.com resulted in a 401 Unauthorized response:
Unauthorized.
in my_file_system/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php:113
Stack trace:
#0 my_file_system/vendor/guzzlehttp/guzzle/src/Middleware.php(66): GuzzleHttp\Exception\RequestException::create(Object(GuzzleHttp\Psr7\Request), Object(GuzzleHttp\Psr7\Response))
#1 my_file_system/vendor/guzzlehttp/promises/src/Promise.php(203): GuzzleHttp\Middleware::GuzzleHttp\{closure}(Object(GuzzleHttp\Psr7\Response))
#2 my_file_system/vendor/guzzlehttp/promises/src/Promise.php(156): GuzzleHttp\Promise\Promise::callHandler(1, Object(GuzzleHttp\Psr7\Response), Array)
#3 my_file_system/vendor/guzzlehttp/promises/src/TaskQueue.php(47): GuzzleHttp\Promise\Promise::GuzzleHttp\Promise\{closure}()
#4 my_file_system/ in my_file_system/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php on line 113, referer:
The error is happening during an JQuery AJAX call. Any deployment that i do to a system that has composer seems to work correctly, it is only when the system does not have the ability to run composer commands that error is seen.
I have been unable to duplicate the issue in a testing environment up to this point and can test in production.
The issue ended up being an incorrect value in the .env file.
I am trying to log into phpmyadmin page from a localhost, but whenever I try to open the phpmyadmin directory, I get the following message...
Fatal error: Uncaught Error: Call to undefined function __() in C:\dev\www\pma\libraries\sanitizing.lib.php:135 Stack trace: #0 C:\dev\www\pma\libraries\Message.php(586): PMA_sanitize('Undefined index...', false, true) #1 C:\dev\www\pma\libraries\Message.php(650): PMA\libraries\Message::decodeBB('Undefined index...') #2 C:\dev\www\pma\libraries\Error.php(167): PMA\libraries\Message->getMessage() #3 C:\dev\www\pma\libraries\ErrorHandler.php(157): PMA\libraries\Error->getHash() #4 C:\dev\www\pma\libraries\ErrorHandler.php(121): PMA\libraries\ErrorHandler->addError('Undefined index...', 8, 'C:\dev\www\pma\...', 285, true) #5 C:\dev\www\pma\libraries\core.lib.php(285): PMA\libraries\ErrorHandler->handleError(8, 'Undefined index...', 'C:\dev\www\pma\...', 285, Array) #6 C:\dev\www\pma\libraries\core.lib.php(312): PMA_getPHPDocLink('book.mbstring.p...') #7 C:\dev\www\pma\libraries\core.lib.php(954): PMA_warnMissingExtension('mbstring', true) #8 C:\dev\www\pma\libraries\common.inc.php(97): PMA_checkExtensions() #9 C:\dev in C:\dev\www\pma\libraries\sanitizing.lib.php on line 135
Anyone knows how to fix it?
Just had this. Needs the php-mbstring extension installed.
This could be a multitude of things. Typically this occurs due to the permissions you have set for the PHPMyAdmin directory. Assuming you manually compiled/installed PHP (as opposed to using an out-of-the-box solution such as XAMPP), it would do you well to ensure that the following extensions are enabled within your php.ini file:
extension=php_bz2.dll
extension=mbstring.dll
extension=mysqli.dll
Take the time while doing so to verify that the extension_dir property is also properly set. Remember to fully restart Apache using httpd -k stop and httpd -k start in order for changes made to php.ini or other configuration files to take effect as httpd -k restart sometimes doesn't propagate the changes.
I migrated magento host server from Godaddy to amazon aws ubuntu . Everything working fine but when user proceed to checkout. An error appears on screen
Error : Warning:
include(/var/www/html/includes/src/Payu_PayuCheckout_Model_Shared.php): failed to open stream: No such file or directory in /var/www/html/includes/src/Varien_Autoload.php on line 93 #0 /var/www/html/includes/src/Varien_Autoload.php(93): mageCoreErrorHandler(2, 'include(/var/ww...', '/var/www/html/i...', 93, Array) #1 /var/www/html/includes/src/Varien_Autoload.php(93): Varien_Autoload::autoload() #2 [internal function]: Varien_Autoload->autoload('Payu_PayuChecko...') #3 [internal function]: spl_autoload_call('Payu_PayuChecko...') #4 /var/www/html/includes/src/__default.php(23435): class_exists('Payu_PayuChecko...') #5 /var/www/html/app/Mage.php(462): Mage_Core_Model_Config->getModelInstance('payucheckout/sh...', Array) #6 /var/www/html/includes/src/Mage_Payment_Helper_Data.php(68): Mage::getModel('payucheckout/sh...') ..........
but same code works fine on godaddy.
Payu module is not enabled. I tried running compilation again also.
Do I missing any Php or Apache configuration ?
Please help me. any suggestion that can resolve this error.
it might be your compilation is creating issue
Go to file
includes/config.php
comment out line
define('COMPILER_INCLUDE_PATH', dirname(__FILE__).DIRECTORY_SEPARATOR.'src');
with
#define('COMPILER_INCLUDE_PATH', dirname(__FILE__).DIRECTORY_SEPARATOR.'src');
if not commented
and remove dir includes/src
I receive that error when try send e-mail with CakePHP 2.3.0.
My Cloud configuration is:
PHP 5.4
Apache 2.2
MySQL 5.5
CakePHP 2.3.0
Sorry about my english.
2013-03-06 09:15:05 Error: [SocketException] Permission denied
Request URL: /notifications/sendContact
Stack Trace:
#0 /var/www/html/site/lib/Cake/Network/Email/SmtpTransport.php(96): CakeSocket->connect()
#1 /var/www/html/site/lib/Cake/Network/Email/SmtpTransport.php(60): SmtpTransport->_connect()
#2 /var/www/html/site/lib/Cake/Network/Email/CakeEmail.php(1065): SmtpTransport->send(Object(CakeEmail))
#3 /var/www/html/site/app/Controller/NotificationsController.php(41): CakeEmail->send()
#4 [internal function]: NotificationsController->sendContact()
#5 /var/www/html/site/lib/Cake/Controller/Controller.php(485): ReflectionMethod->invokeArgs(Object(NotificationsController), Array)
#6 /var/www/html/site/lib/Cake/Routing/Dispatcher.php(186): Controller->invokeAction(Object(CakeRequest))
#7 /var/www/html/site/lib/Cake/Routing/Dispatcher.php(161): Dispatcher->_invoke(Object(NotificationsController), Object(CakeRequest), Object(CakeResponse))
#8 /var/www/html/site/app/webroot/index.php(102): Dispatcher->dispatch(Object(CakeRequest), Object(CakeResponse))
#9 {main}
2013-03-06 09:15:05 Error: Fatal Error (256): [CakeException] Unknown status code
#0 /var/www/html/site/lib/Cake/Error/ExceptionRenderer.php(212): CakeResponse->statusCode(13)
#1 [internal function]: ExceptionRenderer->error400(Object(SocketException))
#2 /var/www/html/site/lib/Cake/Error/ExceptionRenderer.php(175): call_user_func_array(Array, Array)
#3 /var/www/html/site/lib/Cake/Error/ErrorHandler.php(122): ExceptionRenderer->render()
#4 [internal function]: ErrorHandler::handleException(Object(SocketException))
#5 {main} in [/var/www/html/site/lib/Cake/Error/ErrorHandler.php, line 131]
2013-03-06 09:15:05 Error: [InternalErrorException] Internal Server Error
Request URL: /notifications/sendContact
Stack Trace:
#0 /var/www/html/site/lib/Cake/Error/ErrorHandler.php(183): ErrorHandler::handleFatalError(256, '[CakeException]...', '/var/www/html/p...', 131)
#1 [internal function]: ErrorHandler::handleError(256, '[CakeException]...', '/var/www/html/p...', 131, Array)
#2 /var/www/html/site/lib/Cake/Error/ErrorHandler.php(131): trigger_error('[CakeException]...', 256)
#3 [internal function]: ErrorHandler::handleException(Object(SocketException))
#4 {main}
2013-03-06 09:15:05 Error: Fatal Error (256): [CakeException] Unknown status code
#0 /var/www/html/site/lib/Cake/Error/ExceptionRenderer.php(212): CakeResponse->statusCode(13)
#1 [internal function]: ExceptionRenderer->error400(Object(SocketException))
#2 /var/www/html/site/lib/Cake/Error/ExceptionRenderer.php(175): call_user_func_array(Array, Array)
#3 /var/www/html/site/lib/Cake/Error/ErrorHandler.php(122): ExceptionRenderer->render()
#4 [internal function]: ErrorHandler::handleException(Object(SocketException))
#5 {main} in [/var/www/html/site/lib/Cake/Error/ErrorHandler.php, line 131]
2013-03-06 09:15:05 Error: [InternalErrorException] Internal Server Error
Request URL: /notifications/sendContact
Stack Trace:
#0 /var/www/html/site/lib/Cake/Error/ErrorHandler.php(183): ErrorHandler::handleFatalError(256, '[CakeException]...', '/var/www/html/p...', 131)
#1 [internal function]: ErrorHandler::handleError(256, '[CakeException]...', '/var/www/html/p...', 131, Array)
#2 /var/www/html/site/lib/Cake/Core/App.php(926): call_user_func('ErrorHandler::h...', 256, '[CakeException]...', '/var/www/html/p...', 131, Array)
#3 /var/www/html/site/lib/Cake/Core/App.php(899): App::_checkFatalError()
#4 [internal function]: App::shutdown()
#5 {main}
email.php
public $gmail = array(
'transport' => 'Smtp',
'from' => array('patric.....#gmail.com' => 'Patrick Maciel'),
'port'=>'465',
'timeout'=>'30',
'auth' => true,
'host' => 'ssl://smtp.gmail.com',
'username'=>'patrick......#gmail.com',
'password'=>'.......',
'client' => null,
'log' => false
);
php info (centOs)
-bash-4.1# yum info php
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirror.globo.com
* epel: mirror.globo.com
* extras: mirror.globo.com
* updates: mirror.globo.com
Installed Packages
Name : php
Arch : i686
Version : 5.4.12
Release : 1.el6.remi
Size : 8.2 M
Repo : installed
From repo : remi
Summary : PHP scripting language for creating dynamic web sites
URL : http://www.php.net/
License : PHP and Zend and BSD
Description: PHP is an HTML-embedded scripting language. PHP attempts to make it
: easy for developers to write dynamically generated web pages. PHP also
: offers built-in database integration for several commercial and
: non-commercial database management systems, so writing a
: database-enabled webpage with PHP is fairly simple. The most common
: use of PHP coding is probably as a replacement for CGI scripts.
:
: The php package contains the module which adds support for the PHP
: language to Apache HTTP Server.
Available Packages
Name : php
Arch : i386
Version : 5.3.22
Release : 1.w5
Size : 1.3 M
Repo : webtatic
Summary : PHP scripting language for creating dynamic web sites
URL : http://www.php.net/
License : PHP
Description: PHP is an HTML-embedded scripting language. PHP attempts to make it
: easy for developers to write dynamically generated web pages. PHP also
: offers built-in database integration for several commercial and
: non-commercial database management systems, so writing a
: database-enabled webpage with PHP is fairly simple. The most common
: use of PHP coding is probably as a replacement for CGI scripts.
:
: The php package contains the module which adds support for the PHP
: language to Apache HTTP Server.
-bash-4.1# php -m
[PHP Modules]
bz2
calendar
Core
ctype
curl
date
dom
ereg
exif
fileinfo
filter
ftp
gd
gettext
gmp
hash
iconv
imap
intl
json
libxml
mbstring
mcrypt
memcache
mhash
mysql
mysqli
openssl
pcntl
pcre
PDO
pdo_mysql
pdo_sqlite
Phar
pspell
readline
recode
Reflection
session
shmop
SimpleXML
snmp
sockets
SPL
sqlite3
standard
tidy
tokenizer
wddx
xml
xmlreader
xmlrpc
xmlwriter
xsl
zip
zlib
[Zend Modules]
-bash-4.1#
Apparently your PHP is not allowed to connect to the specified SMTP server. Did you properly configure your email-settings? (SMTP server, port, username, password etc).
A template for these settings is included with CakePHP in the file: app/Config/email.php.default (https://github.com/cakephp/cakephp/blob/2.2.7/app/Config/email.php.default)
You need to copy this file to app/Config/email.php and modify the settings for your environment.
After that, you'll have to specify the right configuration when sending emails
A more thorough explanation can be found in the manual:
http://book.cakephp.org/2.0/en/core-utility-libraries/email.html#configuration
update
Another option is that SELinux security-bits dissallow PHP/Apache to make network connections.
There are several security-bits, but this seems a likely candidate: httpd_can_network_connect .
You can temporarily allow PHP/Apache to make network connections using this:
setsebool httpd_can_network_connect
And make the setting 'permanent' using the -P parameter;
setsebool -P httpd_can_network_connect
For an overview of all SELibux booleans;
http://wiki.centos.org/TipsAndTricks/SelinuxBooleans
getsebool -a
Check httpd_can_network_connect
if off, set it to on
setsebool -P httpd_can_network_connect on
It works for me !!