module pcntl already loaded in unknown on line 0 - apache

After installation pcntl encounters an error while running tests (make test)
Module 'pcntl' already loaded in unknown on line 0
Thus on many forums the same - comment out in the *.ini files row
Disable_functions =
pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl
I found it in the file /etc/php5/apache2/php.ini, commented out, restart apache2, did not help. Restarting the server does not help.
How do I fix this error?
ubuntu 14.04
apache 2.4.7
php5 5.5.9

Related

How can I solve this problem of installation xampp on fedora?

When I run xampp on fedora this error is showing up on application log
Starting Apache Web Server...
Exit code: 8
Stdout:
apache config test fails, aborting
Stderr:
httpd: Syntax error on line 522 of /opt/lampp/etc/httpd.conf: Syntax error on line 10 of /opt/lampp/etc/extra/httpd-xampp.conf: Cannot load modules/libphp7.so into server: libnsl.so.1: cannot open shared object file: No such file or directory
can anyone tell me how can I solve this?
it seems you're missing libnsl. install it through this command:
sudo dnf install libnsl
In case this doesn't work you can then download it manually:
Visit https://pkgs.org/
In the search box (pkgs.org of course) type libnsl.so.1 and choose the appropriate OS. The version shown might be higher e.g libnsl-2.28-9.fc29.x86_64.rpm, but it doesn't matter, the file needed is also included in this very package.
In the terminal, navigate to the directory where the .rpm was downloaded.
Type the following command to install it:
sudo rpm libnsl-2.XX-X.fc29.x86_64.rpm
Upon completion everything should be working fine.
A quick Google search returns this: https://www.reddit.com/r/Fedora/comments/8hlhlv/xampp_with_fedora_28/
The suggested fix is installing libnsl from this source:
https://www.rpmfind.net/linux/rpm2html/search.php?query=libnsl.so.1%28%29%2864bit%29&submit=Search+...&system=fedora&arch=

Xamp on fedora fails to start

I installed xampp and its been working fine, until I started getting the following error whenever I tried to start xampp:
XAMPP is currently only availably as 32 bit application. Please use a 32 bit compatibility librar
y for your system.
After commenting the lines of code in /opt/lampp/lampp that referenced this error I now get a new error when launching xampp with /opt/lampp/lampp start:
Starting XAMPP for Linux 7.2.3-0...
XAMPP: Starting Apache...fail.
httpd: Syntax error on line 522 of /opt/lampp/etc/httpd.conf: Syntax error on line 10 of /opt/lam
pp/etc/extra/httpd-xampp.conf: Cannot load modules/libphp7.so into server: libnsl.so.1: cannot op
en shared object file: No such file or directory
XAMPP: Starting MySQL...ok.
XAMPP: Starting ProFTPD...ok.
I have php-7.2.3 installed in /opt/lampp/bin and apache and everything else was working before. How do I get Apache to launch?
it seems you're missing the libnsl, install it through this command:
# sudo dnf install libnsl
In case this doesn't work you can then download it manually:
visit https://pkgs.org/
in the search box (pkgs.org of course) type libnsl.so.1 and choose the appropriate OS. The version shown might be higher e.g libnsl-2.28-9.fc29.x86_64.rpm, but it doesn't matter, the file needed is also included in this very package.
in the terminal, navigate to the directory where the .rpm was downloaded.
then type the following command to install it:
# sudo rpm libnsl-2.XX-X.fc29.x86_64.rpm
Upon completion everything should be working fine.

php7 ubuntu 16 upgrade php files break at "->" in php files

Following an upgrade of Ubuntu 14 to 16 LTS, php has been automatically updated to version 7. Running my index.php file now breaks at the first "->" and the php code is printed in my browser from that point...
i.e.
$obj->print(); // in php file
Output is...
print();
in the web-browser.
There are no errors being output in the configured or any other error file.
Finally just reinstalled php7.0 and php5.6 from the command line along with all the required packages.
https://askubuntu.com/questions/756879/cant-install-php5-on-ubuntu-16-04

Error installing libapache2-mod-rpaf for detecting IPs using nginx as a reverse proxy

I've seen here, that I should install mod_rpaf so that Apache will be able to detect the IPs coming from the Nginx reverse proxy.
Even seen that there is a bug on Ununtu SO, and it should be solved changing the first line on /etc/apache2/mods-available/rpaf.conf.
The first line contains <IfModule rpaf_module>. I've tried replacing with <IfModule mod_rpaf-2.0.c>, but nothing changes when I restart the Apache.
This is the output when I try to install this module:
apt-get install libapache2-mod-rpaf
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
libapache2-mod-rpaf
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/9,126 B of archives.
After this operation, 67.6 kB of additional disk space will be used.
Selecting previously unselected package libapache2-mod-rpaf.
(Reading database ... 28714 files and directories currently installed.)
Unpacking libapache2-mod-rpaf (from .../libapache2-mod-rpaf_0.6-2ubuntu1_amd64.deb) ...
Setting up libapache2-mod-rpaf (0.6-2ubuntu1) ...
Enabling module rpaf.
* Restarting web server apache2 [fail]
* The apache2 configtest failed.
Output of config test was:
apache2: Syntax error on line 140 of /etc/apache2/apache2.conf: Syntax error on line 1 of /etc/apache2/mods-enabled/rpaf.load: API module structure 'rpaf_module' in file /usr/lib/apache2/modules/mod_rpaf.so is garbled - expected signature 41503234 but saw 41503232 - perhaps this is not an Apache module DSO, or was compiled for a different Apache version?
Action 'configtest' failed.
The Apache error log may have more information.
invoke-rc.d: initscript apache2, action "restart" failed.
dpkg: error processing libapache2-mod-rpaf (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
libapache2-mod-rpaf
E: Sub-process /usr/bin/dpkg returned an error code (1)
Per the error, you already have a version of /usr/lib/apache2/modules/mod_rpaf.so on your system with a filehash that differs from what the package config is expecting (expected signature 41503234 but saw 41503232), so you either need to:
1) Work out what installed the conflicting version and uninstall it:
dpkg -S /usr/lib/apache2/modules/mod_rpaf.so
apt-get --purge remove <package>
Or if manually added:
mv /usr/lib/apache2/modules/mod_rpaf.so /usr/lib/apache2/modules/mod_rpaf.so.bak
apt-get install libapache2-mod-rpaf
This may break other stuff.
2) Manually download, re-compile and install from source, should solve the immediate issue, but you'll hit the same conflicting signature issue if you try to update via apt.
3) Unpack the deb file, hack the hash in the config, repackage and install.

Transport Layer Security module fails to load

I am using Ubuntu 12.04 LTS, and Apache 2.4.
I've installed TLS by following the steps on this link: https://help.ubuntu.com/community/GnuTLS
When restarting Apache I get the following error:
apache2: Syntax error on line 212 of /etc/apache2/apache2.conf:
Syntax error on line 1 of /etc/apache2/mods-enabled/gnutls.load:
Cannot load /usr/lib/apache2/modules/mod_gnutls.so into server:
/usr/lib/apache2/modules/mod_gnutls.so: undefined symbol: unixd_config
If I remove the #gnutls.conf file from the /etc/apache2/mods-enabled directory Apache restarts.
What is causing the module not to load?
Your level of mod_gnutls isn't aware of Apache 2.4, one breaking change in 2.4 is the symbol unixd_config is replaced by ap_unixd_config. There will probably be a slew of similar issues.