I have a script that is meant to send a comment on a differential revision and is meant to update harbour master on whether the CI build was successful. Lately I've been receiving the following error:
PCNTL [49m[m Unable to install signal handler, pcntl_signal() unavailable. Continuing without signal handling.
[2022-11-10 11:34:30] EXCEPTION: (Exception) Failed to s
I've tried PHP version 8.1 and 5.6 no luck.
Does anyone know a solution? Much appriated.
Full log:
[Pipeline] sh
echo '{"transactions":[{"type":"comment","value":"failed: http://jenkins.lab.local:8080/job/Lemington_build/685/"}],"objectIdentifier":"D43951"}'
arc --trace --conduit-token <secret_token> --conduit-uri http://phabricator.lab.local/ call-conduit differential.revision.edit
[1m[45m ARGV [49m[m "C:/Program Files/Arcanist/arcanist/bin/arc" --trace --conduit-token <secret_token> --conduit-uri http://phabricator.lab.local/ call-conduit differential.revision.edit
[1m[45m PCNTL [49m[m Unable to install signal handler, pcntl_signal() unavailable. Continuing without signal handling.
[2022-11-10 11:34:30] EXCEPTION: (Exception) Failed to set socket nonblocking! at [<arcanist>\src\channel\PhutilSocketChannel.php:51]
arcanist(head=master, ref.master=85c953ebe4a6)
#0 PhutilSocketChannel::__construct(resource) called at [<arcanist>\src\workflow\ArcanistWorkflow.php:2414]
#1 ArcanistWorkflow::readStdin() called at [<arcanist>\src\workflow\ArcanistCallConduitWorkflow.php:46]
#2 ArcanistCallConduitWorkflow::runWorkflow(PhutilArgumentParser) called at [<arcanist>\src\workflow\ArcanistWorkflow.php:227]
#3 ArcanistWorkflow::executeWorkflow(PhutilArgumentParser) called at [<arcanist>\src\toolset\ArcanistPhutilWorkflow.php:21]
#4 ArcanistPhutilWorkflow::execute(PhutilArgumentParser) called at [<arcanist>\src\parser\argument\PhutilArgumentParser.php:492]
#5 PhutilArgumentParser::parseWorkflowsFull(array) called at [<arcanist>\src\runtime\ArcanistRuntime.php:171]
#6 ArcanistRuntime::executeCore(array) called at [<arcanist>\src\runtime\ArcanistRuntime.php:37]
#7 ArcanistRuntime::execute(array) called at [<arcanist>\support\init\init-arcanist.php:6]
#8 require_once(string) called at [<arcanist>\bin\arc:10]
I've tried PHP version 8.1 and 5.6 no luck.
Also tried the arc upgrade command but I'm on latest version
You are getting this error because your local version of PHP must not be compiled with pcntl_signal
You can check if it is supported with the following command
php -i | grep pcntl
Which should result in
pcntl
pcntl support => enabled
This link in the PHP Manual is the instructions for installation - https://www.php.net/manual/en/pcntl.installation.php
Related
I'm running Apache 2.4 on FreeBSD (FAMP stack) and had Wordpress successfully hosting a website. However I recently tried to install phpLDAPadmin in order to manage an LDAP server and now whenever Apache is running, any page on my site displays the following:
Fatal error: Uncaught Error: Call to undefined function mysql_connect() in /usr/local/www/apache24/data/wp-includes/wp-db.php:1643 Stack trace: #0 /usr/local/www/apache24/data/wp-includes/wp-db.php(639): wpdb->db_connect() #1 /usr/local/www/apache24/data/wp-includes/load.php(427): wpdb->__construct('user', 'pass', 'wordpressdb', 'localhost') #2 /usr/local/www/apache24/data/wp-settings.php(120): require_wp_db() #3 /usr/local/www/apache24/data/wp-config.php(92): require_once('/usr/local/www/...') #4 /usr/local/www/apache24/data/wp-load.php(37): require_once('/usr/local/www/...') #5 /usr/local/www/apache24/data/wp-blog-header.php(13): require_once('/usr/local/www/...') #6 /usr/local/www/apache24/data/index.php(17): require('/usr/local/www/...') #7 {main} thrown in /usr/local/www/apache24/data/wp-includes/wp-db.php on line 1643
The site is experiencing technical difficulties.
Furthermore, when I went to check the version of php, this happens:
# php --version
Segmentation fault (core dumped)
I read that it can happen when upgrading php from 5.x to 7.x, but unless installing phpLDAPadmin performed an upgrade, I believe I have had php 7.2 all along. I was able to see that the man page for php shows version 7.2.21. While the problem does seem to be related to php, I haven't been able to figure out exactly what is going on. It seems extremely odd that I can't even check the php version in the command line.
I have tried restarting, as well as updating via freebsd-update and portsnap followed by a reinstall, not to mention various configuration changes to php.ini, wp-config.php and httpd.conf.
====Edit====
I ran pkg upgrade -f which made the following changes:
Installed packages to be UPGRADED:
py27-openssl: 18.0.0 - 19.0.0
openldap-server: 2.4.47_1 - 2.4.48
openldap-client: 2.4.47 - 2.4.48
mysql56-server: 5.6.44 - 5.6.45
mysql56-client: 5.6.44 - 5.6.45
libnghttp2: 1.39.1 - 1.39.2
apache24: 2.4.39_1 - 2.4.41
Installed packages to be DOWNGRADED:
postgresql95-client: 9.5.18_1 - 9.5.18
postfix: 3.4.6,1 - 3.4.5,1
Installed packages to be REINSTALLED:
pkg-1.11.1
zstd-1.4.0
zip-3.0_1
xtrans-1.4.0
xorgproto-2019.1
xorg-macros-1.19.2
xmlcharent-0.3_2
xmlcatmgr-2.2_2
xcb-proto-1.13_1
xauth-1.0.10
tor-0.4.0.5_1
texinfo-6.6_1,1
swig30-3.0.12
sdocbook-xml-1.1_2,2
scons-3.0.1
rhash-1.3.5
readline-8.0.0
python36-3.6.9
python27-2.7.16_1
py27-zope.interface-4.6.0
py27-zope.event-4.1.0
py27-zope.component-4.2.2
py27-urllib3-1.22,1
py27-typing-3.6.6
py27-sphinxcontrib-websupport-1.1.2
py27-sphinx_rtd_theme-0.4.3
py27-sphinx-1.6.5_2,1
py27-snowballstemmer-1.2.0_1
py27-six-1.12.0
py27-setuptools_scm-3.3.3
py27-setuptools-41.0.1
py27-requests-toolbelt-0.8.0
py27-requests-2.21.0
py27-pytz-2019.1,1
py27-pytest-runner-2.11.1
py27-pystemmer-1.3.0_2
py27-pysocks-1.7.0
py27-pyrfc3339-1.1
py27-pygments-2.4.1
py27-pycparser-2.19
py27-parsedatetime-2.4_1
py27-josepy-1.2.0
py27-ipaddress-1.0.22
py27-imagesize-0.7.1
py27-idna-2.8
py27-enum34-1.1.6
py27-docutils-0.14_4
py27-cryptography-2.6.1
py27-configobj-5.0.6_1
py27-configargparse-0.14.0
py27-chardet-3.0.4_1
py27-cffi-1.12.3
py27-certifi-2019.6.16
py27-certbot-0.35.1,1
py27-asn1crypto-0.24.0
py27-alabaster-0.7.6
py27-acme-0.35.1,1
py27-MarkupSafe-1.1.1
py27-Jinja2-2.10.1
py27-Babel-2.7.0
portmaster-3.19_18
png-1.6.37
pkgconf-1.6.1,1
phpldapadmin-php72-1.2.3_10,1
php72-xml-7.2.21
php72-session-7.2.21
php72-openssl-7.2.21
php72-ldap-7.2.21
php72-iconv-7.2.21
php72-hash-7.2.21
php72-gettext-7.2.21
php72-7.2.21
perl5-5.28.2
pcre-8.43_1
p5-Unicode-EastAsianWidth-1.40
p5-Text-Unidecode-1.30
p5-Locale-libintl-1.31
p5-Locale-gettext-1.07
openvpn-2.4.7
openssl-1.0.2s,1
openjdk8-8.212.4.1
ninja-1.9.0,2
nasm-2.14.02,1
nano-4.2
mpfr-4.0.2
mkfontscale-1.2.1
minixmlto-0.0.2_1
maven-wrapper-1_2
maven-3.6.1
m4-1.4.18_1,1
lzo2-2.10_1
lua52-5.2.4
libzip-1.5.2
libxslt-1.1.32_1
libxml2-2.9.9
libxcb-1.13.1
libuv-1.30.1
libunwind-20170615
libtool-2.4.6_1
libtextstyle-0.20.1
libpthread-stubs-0.4
liblz4-1.9.1,1
libltdl-2.4.6
libinotify-20180201_1
libiconv-1.14_11
libgpg-error-1.36
libgcrypt-1.8.4_1
libfontenc-1.1.4
libffi-3.2.1_3
libevent-2.1.10
libedit-3.1.20190324,1
libargon2-20171227_1
libarchive-3.3.3,1
libXtst-1.2.3_2
libXt-1.2.0,1
libXrender-0.9.10_2
libXpm-3.5.12_2
libXmu-1.1.3,1
libXi-1.7.10,1
libXfixes-5.0.3_2
libXext-1.3.4,1
libXdmcp-1.1.3
libXau-1.0.9
libX11-1.6.8,1
libSM-1.2.3,1
libICE-1.0.9_3,1
jsoncpp-1.8.1_6
jpeg-turbo-2.0.2
javavmwrapper-2.6
java-zoneinfo-2019.a
jakarta-commons-logging-1.2
jakarta-commons-codec-1.10
jakarta-commons-cli-1.4,1
iso8879-1986_3
indexinfo-0.3.1
icu-64.2,1
httpcore-4.4.11
httpclient-4.5.7
html2text-1.3.2a
help2man-1.47.10
gperf-3.0.3_2
gmp-6.1.2_1
gmake-4.2.1_3
glib-2.56.3_5,1
giflib-5.1.9
gettext-tools-0.20.1
gettext-runtime-0.20.1
gdbm-1.18.1_1
freetype2-2.10.0
fontconfig-2.12.6,1
expat-2.2.6_1
easy-rsa-3.0.6
docbook-xsl-1.79.1_1,1
docbook-xml-5.0_3
docbook-sgml-4.5_1
docbook-1.5
dialog4ports-0.1.6
dejavu-2.37_1
dbus-glib-0.110
dbus-1.12.12
db5-5.3.28_7
curl-7.65.1
cmake-3.14.5
check-0.12.0_1
ca_root_nss-3.45
bison-3.4.1,1
binutils-2.32_1,1
automake-1.16.1_1
autoconf-wrapper-20131203
autoconf-2.69_2
apr-1.6.5.1.6.1_1
alsa-lib-1.1.2_2
Number of packages to be upgraded: 7
Number of packages to be reinstalled: 172
Number of packages to be downgraded: 2
After that finished, php --version works:
# php --version
PHP 7.2.21 (cli) (built: Aug 8 2019 01:27:53) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
However, I'm still getting the same Fatal error from Apache/Wordpress.
Ok, I finally fixed this!
The problem must have been related to upgrading PHP, probably from PHP 7.1 to PHP 7.2. I'm assuming this happened when I installed phpLDAPadmin, which is what triggered the issue.
Firstly, I was able to solve the segmentation fault/core dump issue by running the following:
pkg upgrade -f
This allowed me to use the PHP terminal commands again. However WordPress still wasn't working and showed the same fatal error above.
After checking through a FAMP stack install guide for FreeBSD 12 and PHP 7.2, I realized that I didn't have all of the necessary PHP modules installed anymore.
php -m
PHP Warning: PHP Startup: Unable to load dynamic library 'php_nd_mysqls.dll' (tried: /usr/local/lib/php/20170718/php_nd_mysqls.dll (Cannot open "/usr/local/lib/php/20170718/php_nd_mysqls.dll"), /usr/local/lib/php/20170718/php_nd_mysqls.dll.so (Cannot open "/usr/local/lib/php/20170718/php_nd_mysqls.dll.so")) in Unknown on line 0
[PHP Modules]
Core
date
gettext
hash
iconv
ldap
libxml
mysqlnd
openssl
pcre
Reflection
session
SPL
standard
xml
Whereas the installation guide here shows the php install command as follows:
pkg install php72 php72-mysqli mod_php72 php72-mbstring php72-zlib php72-curl php72-gd php72-json
I believe, based on reading this page earlier, that it was the lack of MySQLI that was causing WordPress to throw the fatal error. When I installed the missing PHP modules everything worked again!
I downloaded the Google App Engine SDK for PHP but I am having problems with the installation of the PHP interpreter. I downloaded the source code from the link given but when I try to compile php the command make terminates with this error:
/bin/bash /home/david/Google/appengine-php-master/php-src/libtool --silent --preserve-dup-deps --mode=compile cc -Iext/jsonc/ -I/home/david/Google/appengine-php-master/php-src/ext/jsonc/ -DPHP_ATOM_INC -I/home/david/Google/appengine-php-master/php-src/include -I/home/david/Google/appengine-php-master/php-src/main -I/home/david/Google/appengine-php-master/php-src -I/home/david/Google/appengine-php-master/php-src/ext/date/lib -I/home/david/Google/appengine-php-master/php-src/ext/ereg/regex -I/libxml2 -I/home/david/Google/appengine-php-master/php-src/ext/sqlite3/libsqlite -I/home/david/Google/appengine-php-master/php-src/TSRM -I/home/david/Google/appengine-php-master/php-src/Zend -I/include -g -O2 -fvisibility=hidden -c /home/david/Google/appengine-php-master/php-src/ext/jsonc/json.c -o ext/jsonc/json.lo
In file included from ext/jsonc/json-c/json_inttypes.h:5:0,
from ext/jsonc/json-c/json_object.h:16,
from ext/jsonc/json-c/linkhash.h:16,
from ext/jsonc/json-c/json.h:22,
from /home/david/Google/appengine-php-master/php-src/ext/jsonc/json.c:34:
ext/jsonc/json-c/json_config.h:2:23: fatal error: ../config.h: No such file or directory
#include "../config.h"
^
compilation terminated.
Makefile:725: recipe for target 'ext/jsonc/json.lo' failed
make: *** [ext/jsonc/json.lo] Error 1
In fact there is no such config.h file in that directory so I can't understand how to solve this problem.
So I decided to search online the source code of PHP 5.4.19 and I compiled and installed it and everything worked. I followed all the other installation steps and everything worked.
Now if I start the server with the command
google_appengine/dev_appserver.py --php_executable_path=/usr/local/bin/php-cgi --php_gae_extension_path=/home/david/Google/appengine-php-extension-master/modules/gae_runtime_module.so my_app/
I get:
INFO 2016-03-25 15:04:19,209 sdk_update_checker.py:229] Checking for updates to the SDK.
INFO 2016-03-25 15:04:19,797 sdk_update_checker.py:257] The SDK is up to date.
INFO 2016-03-25 15:04:19,901 api_server.py:205] Starting API server at: http://localhost:51913
INFO 2016-03-25 15:04:19,907 dispatcher.py:197] Starting module "default" running at: http://localhost:8080
INFO 2016-03-25 15:04:19,909 admin_server.py:116] Starting admin server at: http://localhost:8000
ERROR 2016-03-25 15:04:21,270 php_runtime.py:348] The PHP runtime is not available
Traceback (most recent call last):
File "/home/david/Google/google_appengine/google/appengine/tools/devappserver2/php_runtime.py", line 344, in new_instance
self._check_binaries(php_executable_path, gae_extension_path)
File "/home/david/Google/google_appengine/google/appengine/tools/devappserver2/php_runtime.py", line 286, in _check_binaries
cls._check_gae_extension(php_executable_path, gae_extension_path, env)
File "/home/david/Google/google_appengine/google/appengine/tools/devappserver2/php_runtime.py", line 241, in _check_gae_extension
ext_stdout))
_PHPEnvironmentError: "/usr/local/bin/php-cgi -m" returned an error [-6]
[libprotobuf FATAL google/protobuf/stubs/common.cc:61] This program requires version 3.0.0 of the Protocol Buffer runtime library, but the installed version is 2.6.1. Please update your library. If you compiled the program yourself, make sure that your headers are from the same version of Protocol Buffers as your link-time library. (Version verification failed in "/home/david/Google/appengine-php-extension-master/remote_api.pb.cc".)
terminate called after throwing an instance of 'google::protobuf::FatalException'
what(): This program requires version 3.0.0 of the Protocol Buffer runtime library, but the installed version is 2.6.1. Please update your library. If you compiled the program yourself, make sure that your headers are from the same version of Protocol Buffers as your link-time library. (Version verification failed in "/home/david/Google/appengine-php-extension-master/remote_api.pb.cc".)
Accordingly to the message the problem should be in the version of libprotobuf9 library. I have that library installed in my system (ubuntu 15.04) and in fact the version is 2.6.1. But by following the installation steps I installed protoc-3.0.0-beta-2-linux-x86_64 and protobuf-3.0.0-beta-2 in /usr. So, why does appengine use the wrong version of the library?
I thought about removing libprotobuf9 from my system but if I run sudo apt-get remove libprotobuf9 the list of packages that need to be removed is very big and contains things like
gnome-bluetooth gnome-calculator gnome-contacts
gnome-disk-utility gnome-font-viewer gnome-keyring gnome-mahjongg gnome-mines gnome-orca gnome-power-manager gnome-screensaver
gnome-screenshot gnome-session-bin gnome-session-canberra gnome-sudoku gnome-system-log gnome-system-monitor gnome-terminal
to me it doesn't seem a good idea to remove them. What's the solution to my problem?
I am trying to run the Magento Cron job but get this error message. I checked phpinfo() which shows everything should be loaded and the get_loaded_extensions() shows => PDO [27] => pdo_mysql [28] => pdo_sqlite [29]
Any thoughts what I can do next to find the cause?
Thanks,
Chris
PHP Fatal error: Uncaught exception 'Zend_Db_Adapter_Exception' with
message 'The PDO extension is required for this adapter but the extension is
not loaded' in /home/k117235a/domains/greenman-chris.eu/private_html/lib/Zend/Db/Adapter/Pdo/Abstract.php:342
Stack trace:
#0 /home/k117235a/domains/greenman-chris.eu/private_html/lib/Zend/Db/Adapter/Abstract.php(248):
Zend_Db_Adapter_Pdo_Abstract->setFetchMode(2)
#1 /home/k117235a/domains/greenman-chris.eu/private_html/app/code/core/Mage/Core/Model/Resource.php(175):
Zend_Db_Adapter_Abstract->__construct(Array)
#2 /home/k117235a/domains/greenman-chris.eu/private_html/app/code/core/Mage/Core/Model/Resource.php(110):
Mage_Core_Model_Resource->_newConnection('pdo_mysql', Object(Mage_Core_Model_Config_Element))
#3 /home/k117235a/domains/greenman-chris.eu/private_html/app/code/core/Mage/Core/Model/Resource/Db/Abstract.php(320):
Mage_Core_Model_Resource->getConnection('core_write')
#4 /home/k117235a/domains/greenman-chris.eu/private_html/app/code/core/Mage/Core/Model/Resource/Db/Abstract
in /home/k117235a/domains/greenman-chris.eu/private_html/lib/Zend/Db/Adapter/Pdo/Abstract.php
on line 342
Probably you are checking the phpinfo() from the browser, but the extension might be loaded just for apache/nginx, and not for commandline, which is how I'm assuming the cronjob php file will run.
Check that the extension is enabled for CLI, typically in the following location:
/etc/php5/cli/conf.d/20-pdo_mysql.ini (the name might not be exactly the same)
It might be only on /etc/php5/apache2/ or /etc/php5/php-fpm/
You can just copy it from the other locations or create a new file with the following content:
extension=pdo_mysql.so
After that check that the extension is loaded by running from command-line:
php -i | grep pdo
If it's loaded you should see some output and the cronjob should now work.
I hope it helps.
Use "$ which php" to ensure you're using the PHP you think you are.
Look at the php.ini your command line PHP is using and see if any extensions are disabled
An alternate method is to have Apache run the cron jobs by using wget:
[specified time] wget -q http://magento.url.com/cron.php
Using this method also helps in cases where file permissions are an issue (specially when Magento's cache is involved).
I installed gearmand 1.1.5 on my server, and tried the examples provided with the installation after starting the server. They work pretty correctly (the echo example works, the reverse doesn't work as expected, but doesn't gives any error).
Then I installed the php wrapper using pecl. The version is the last stable (1.1.1). Obviously I added the extension to php.ini, and my php --info|grep gearman output is:
gearman
gearman support => enabled
libgearman version => 1.1.5
PWD => /root/gearman-1.1.1/examples
OLDPWD => /root/gearman-1.1.1
_SERVER["PWD"] => /root/gearman-1.1.1/examples
_SERVER["OLDPWD"] => /root/gearman-1.1.1
Then I tried the echo example in the pecl package, the worker starts correctly:
[~/gearman-1.1.1/examples]# php reverse_worker.php
Starting
Waiting for job...
the client, instead, gives me the following error:
[~/gearman-1.1.1/examples]# php reverse_client.php
Starting
Sending job
PHP Warning: GearmanClient::do(): send_packet(GEARMAN_COULD_NOT_CONNECT) Failed to send server-options packet -> libgearman/connection.cc:430 in /root/gearman-1.1.1/examples/reverse_client.php on line 26
PHP Stack trace:
PHP 1. {main}() /root/gearman-1.1.1/examples/reverse_client.php:0
PHP 2. GearmanClient->do() /root/gearman-1.1.1/examples/reverse_client.php:26
Warning: GearmanClient::do(): send_packet(GEARMAN_COULD_NOT_CONNECT) Failed to send server-options packet -> libgearman/connection.cc:430 in /root/gearman-1.1.1/examples/reverse_client.php on line 26
Call Stack:
0.0001 228408 1. {main}() /root/gearman-1.1.1/examples/reverse_client.php:0
0.0003 229552 2. GearmanClient->do() /root/gearman-1.1.1/examples/reverse_client.php:26
RET: 26
In the gearman daemon's log there is no sign of activity for this php tests, while it logged all previous examples I tried.
How can I fix this error? Thanks.
Your should always use addServer("127.0.0.1", 4730), not addServer(), despite what php documentation says.
In case if you have used something like this
$client->addServers('127.0.0.1', 4730);
or
$client->addServers();
and still it didnt work then use something like this
$client->addServers('127.0.0.1:4730');
PS - I have used localhost IP, this can be replaced with actual host IP.
I'm running a Rackspace cloud server CentOs + apache2 + php 5.4 + pcntl module with a basic Kohana php framework with a mongoDb task module that forks children processes. I get the following error if I try to run more then 1 child task process at the same time:
Unable to connect to MongoDB server at Interrupted system call
According to the mongoDb task module author the issue is not related to code but perhaps the mongoDb driver or the server.
Does anyone know what the error means and/or what may be the cause?
Full error output:
0 /var/www/.../modules/mangodb/classes/mangodb.php(370):
MangoDB->connect()
1 /var/www/.../modules/mangodb/classes/mangodb.php(173):
MangoDB->_call('command', Array, Array)
2 /var/www/.../modules/mangotask/classes/model/queue/task.php(33):
MangoDB->command(Array)
3 /var/www/.../modules/mangoQueue/classes/controller/daemon.php(232):
Model_Queue_Task->get_next()
4 /var/www/.../modules/mangoQueue/classes/controller/daemon.php(111):
Controller_Daemon->daemon()
5 [internal function]: Controller_Daemon->action_index()
6 /var/www/.../system/classes/kohana/request/client/internal.php(118):
reflectionMethod->invoke(Object(Controller_Daemon))
7 /var/www/.../system/classes/kohana/request/client.php(64):
Kohana_Request_Client_Internal->execute_request(Object(Request))
8 /var/www/.../system/classes/kohana/request.php(1138):
Kohana_Request_Client->execute(Object(Request))
9 /var/www/.../index.php(109): Kohana_Request->execute()
Driver version 1.2.12 definitely has issues with forking, but this is something that should be resolved in the forthcoming 1.3.0 release. In particular, PHP-426 is one of the later issues to address this problem, as it relocated connection selection from MongoCursor to MongoCursor::doQuery(), allowing the driver to operate correctly after a fork. I would keep an eye out for the next 1.3.0 pre-release (either beta3 or rc1), and certainly when the final 1.3.0 version is released via http://pecl.php.net/package/mongo.