Error in phpldapadmin on Ubuntu 18.04 "Fatal error: Cannot redeclare password_hash() in ...../lib/functions.php on line 2236" - ldap

Until writing this question, there is no entry for "Php LDAP Admin" on the Ubuntu 18.04 repositories. I had to install and deploy it manually as a php program. I did this, but unfortunately, I faced this error:
Fatal error: Cannot redeclare password_hash() in ..../phpldapadmin/lib/functions.php on line 2236
I checked the code either with phpv5.6 and phpv7.2; the error remains same as above.
Any idea?

It seems that, the best solution for the short-time is using the project under the Ubuntu 16.04. When you install the phpLDAPadmin from Ubuntu 16.04 repositories, it automatically checks for php7.0 and installs it if it does not exist.
On Ubuntu 18.04, there is no entry for phpLDAPadmin yet, but with some efforts may you could deploy the code with php7.0. Furthermore, it could be beneficial to check following link, to patch some major bugs and also update phpLDAPadmin from v1.2.2 to v1.2.3:
http://www.jouvinio.net/wiki/index.php/PhpLDAPAdmin_Update_Version_1.2.2_vers_1.2.3

Related

How to fix HTTPD (Apache) Error 256 on OSX Monterey 12.5

I have a Apache2 installed with Homebrew on a Mac running OSX Monterey. I haven't done LAMP development for a while, so I'm not sure when the error started, but I've recently updated OSX to 12.5. When I returned to working on a LAMP project, my Apache installation stopped working. Running brew services produced the following output: Name Status User File httpd error 256 root ~/Library/LaunchAgents/homebrew.mxcl.httpd.plist mysql started Nizz0k ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist.
Running the stop, start, and restart commands produces "success" output in the terminal, but Apache doesn't work. I can't navigate to my local vhosts, and of course, running brew services still shows an error.
In running apachectl -e error Apache complains about permissions to the error logs
I have tried:
uninstalling and reinstalling HTTPD
The apr-utilities fix.
confirming Mac installed Apache is stopped.
At this point, I think my problem is that there was conflicting information about how to run Apache on Homebrew. Earlier versions apparently required sudo, but running it this was now produces warnings like this:
Warning: Taking root:admin ownership of some httpd paths:
/usr/local/Cellar/httpd/2.4.54/bin
/usr/local/Cellar/httpd/2.4.54/bin/httpd
/usr/local/opt/httpd
/usr/local/opt/httpd/bin
/usr/local/var/homebrew/linked/httpd
This will require manual removal of these paths using `sudo rm` on
brew upgrade/reinstall/uninstall.
Warning: httpd must be run as non-root to start at user login!
/Library/LaunchDaemons/homebrew.mxcl.httpd.plist: service already bootstrapped
Bootstrap failed: 37: Operation already in progress
Error: Failure while executing; `/bin/launchctl bootstrap system /Library/LaunchDaemons/homebrew.mxcl.httpd.plist` exited with 37.
The issue is even after removing the paths as suggested in the error, a reinstallation brings Root back as the owner.
I do have the same problem with nginx.
Manually unloaded it and then restarting it worked fine.
Try:
sudo launchctl bootout system /Library/LaunchDaemons/homebrew.mxcl.httpd.plist
sudo brew services start httpd

WSL Stopped working with error: 0x80070003

WSL2 stopped working. When, I do a new installation of linux distro, it throws the following error on click of the launch button:
Installing, this may take a few minutes...
WslRegisterDistribution failed with error: 0x80070003
Error: 0x80070003 The system cannot find the path specified.
Press any key to continue...
the wsl --help command works fine
however wsl -l command and other wsl commands throw the following error
The system cannot find the path specified.
Check if you have any .wslconfig inside your profile in %USERPROFILE% folder and delete it! I finally got it working
FIY: https://github.com/microsoft/WSL/issues/3232#issuecomment-777023885
I was getting the same issue and it was due to my bad attempt at deleting the installed Distro. If yours is the same case, this should be pretty easy to fix, use the wsl --unregister <DISTRO_NAME> which in my case was debian so wsl --unregister debian unregistered the old path for the Debian executable and then I installed Debian again. This worked for my personal case but I thought it might help someone on the internet.

Installation of Wpasupplicant failed on ubuntu 16.04 server, problems with libnl-3-dev

I am trying to install the latest Wpa_Supplicant on Ubuntu 16.04 server from the official website. According to http://deployingradius.com/scripts/eapol_test/ I uncommented CONFIG_EAPOL_TEST=yes and run make eapol_test but I get failed:
/usr/bin/ld: cannot find -lnl
collect2: error: ld returned 1 exit status
Makefile:1613: recipe for target 'eapol_test' failed
make: *** [eapol_test] Error 1
However, when I did the same but using Ubuntu 14.04 server, everything is ok!
I realized that the package libnl-devresolves the problem of **/usr/bin/ld: cannot find -lnl** for ubuntu14.04. However, the Ubuntu 16.04 does not have libnl-dev in his repository, instead of It has libnl-3-dev, but wpa_supplicant failed when I run make eapol_test.
Could anyone help me install wpa_supplicant on ubuntu 16.04 plz?, I am trying run everything on ubuntu 16.04 and not on ubuntu 14.04.
Thank you in advance,
Javier
You might try the following:
install the package libnl-genl-3-dev
in the .config file uncomment the following (2nd) line:
# Use libnl 3.2 libraries (if this is selected, CONFIG_LIBNL20 is ignored)
CONFIG_LIBNL32=y
I could then link the target correctly, because it then used "-lnl-3" instead of "-lnl"

Redis desktop dependency on libicu52 for ubuntu12.04

I want to use a redis browser and I found redis-desktop-manager.
(http://redisdesktop.com/download)
I downloaded a deb file but it requested libicu52.
Frist. How can I install this one in Ubuntu12.04.
Second. I found later that it seems to support Ubuntu version 14+.
Would I run this on 12.04 version?
For the dependency of libicu52 Redis Desktop fail to install. You can follow bellow step:
Step 1: To download the libicu52 file. Run the command in the terminal:
wget http://security.ubuntu.com/ubuntu/pool/main/i/icu/libicu52_52.1-8ubuntu0.2_amd64.deb
Step 2: Install libicu52 by executing this command:
dpkg -i libicu52_52.1-8ubuntu0.2_amd64.deb
Now, Attempt once again to install redis-desktop-manager client from debian file, I believe now everything is fine ;)
FYI, redis-desktop-manager installs and runs perfectly on my 15.10 systems.
You can probably compile redis-desktop-manager from source on your system, using the libicu* version that comes with 12.04. I would also consider upgrading: 12.04 is no longer supported, has been replaced as an LTS by 14.04 and it generally far behind.
FWIW redis-desktop-manager installs and runs fine on my 15.04 and 15.10 systems.

(httpd) Getting some problems with Mod_security Installation

I'm using Webuzo on my first unmanaged VPS (CentOS 6.4,OpenVZ). I tried to install Mod_Security following this guide. I installed Modsecurity-apache_2.6.6 but there's a problem in Step3 that prevents me from installing OWASP Mod_Security Core Rule Set
wget http://www.modsecurity.org/download/modsecurity-apache_2.6.6.tar.gz
The Download address has been removed. So I found another guide for the rule set but I can't get this command to work
git clone https://github.com/SpiderLabs/owasp-modsecurity-crs.git
It returns "-bash: git: command not found"
What command should I use to get OWASP CRS?
Also, I suspect the mod_security installation is incomplete since httpd server is unable to restart after installing modsecurity. Here's the configuration error:
[root#xx ~]# httpd -t
Syntax error on line 7 of /etc/httpd/conf.d/modsecurity.conf:
Invalid command 'SecRuleEngine', perhaps misspelled or defined by a module not included in the server configuration
Should I uninstall Mod_Secuirty first since everything seems to have become a mess now?
Any help is appreciated.
The apache binary in case of Webuzo is located at /usr/local/apps/apache and the modules are located at /usr/local/apps/apache/modules/lib.
Also the apache configurations in case of Webuzo are located at /usr/local/apps/apache/etc/ and /usr/local/apps/apache/etc/conf.d/
It seems you are trying to compile mod_security at an inappropriate location.
As you are having error with modsecurity.conf, I wonder whether you have followed the step
Step 4: Configuring Mod_Security
In the guide you have followed.
"-bash: git: command not found"
This error can be resolved by installing the package that includes git. try
yum install git-core -y
Both guide1 and guide2 are good to install mod_sec and follow any one. :)