installed mcrypt but still undefined function mcrypt_create_iv() - apache

I have :
1- installed mcrypt
2- checked phpinfo(); and doubled checked that php.ini is my app config file.
3- got mcrypt path from my /usr/local which is /usr/local/Cellar/php53-mcrypt/5.3.29/mcrypt.so , and included it in my php.ini which is the ini file for my application like the following :
extension="/usr/local/Cellar/php53-mcrypt/5.3.29/mcrypt.so" .
4- restarted with sudo apachectl restart
and after restarting apache the error still appears :(
PHP Fatal error: Call to undefined function mcrypt_create_iv()
what am I missing here?

Related

PHP 8.1 Redis session handler issue

Warning: ini_set(): Session save handler "redis" cannot be found on my page where I have use the code as shown below
ini_set('session.save_handler', 'redis');
This code works fine if the PHP version is 7.4 but when I upgraded PHP to PHP8 or PHP8.1 it stops working and gives me a warning "Warning: ini_set(): Session save handler "redis" cannot be found"
Also when I run the phpinfo() I do not find any PHP extension for Redis which is visible in case of PHP7.4
It looks like redis extension isn't available at your php modules. Check by using this command:
php -m | grep redis
So if it's empty, you need to install and configure it properly:
Visit this link to check how to install php redis extension.
Open your php.ini file (php --ini to check location)
Check for extension_dir property and make sure it points to correct extensions directory.
Add this code below - extension=redis.so
Restart your PHP-FPM service
Now try it once more:
php -m | grep redis
Should return redis now. Now ini_set command should work!

nginx ldap module error

I was trying to include the LDAP module to nginx. I could add the module and make install nginx successfully, however, while trying to restart the nginx, I get the following error:
sudo /usr/local/nginx/sbin/nginx -c /var/www/conf/nginx.conf -t
nginx: [emerg] dlopen() "/usr/local/nginx/modules/ngx_http_auth_ldap_module.so" failed (/usr/local/nginx/modules/ngx_http_auth_ldap_module.so: undefined symbol: ngx_ssl_handshake) in /var/www/conf/nginx.conf:11
nginx: configuration file /var/www/conf/nginx.conf test failed
When I looked at the ngx_http_auth_ldap_module.c file, I found that there is a call to this function. I am not sure where is this function being called from. Is there any other library that needs to be installed?
I have already installed the following:
openssl-devel.x86_64
openldap-devel.x86_64
zlib-devel.x86_64
I figured it out that I wasn't configuring nginx with the http_ssl_module option.
To make it work, I re-configured the nginx as:
./configure --add-module=/path/to/ldap_module --with-http_ssl_module
And then issued make and install commands. The ngx_ssl_handshake error got removed.

mod_wsgi-express: error: Invalid command was specified

I am trying to run wsgi application (hello.wsgi) on localhost through apache24 with mod_wsgi module but it shows this:
cd c:/apache24/bin
mod_wsgi-express start-server hello.wsgi
Usage: mod_wsgi-express command [params]
Commands:
module-config
module-location
mod_wsgi-express: error: Invalid command was specified.
Please help me!
On Windows the start-server command is not available. Using pip install mod_wsgi on Windows is only for getting the mod_wsgi module compiled. Once you have it compiled, run:
mod_wsgi-express module-config
Copy the output from that into your Apache configuration file to have it load the mod_wsgi module. Then configure Apache manually to host your specific WSGI application.
See section "Connecting into Apache installation" in:
https://pypi.python.org/pypi/mod_wsgi
for more details about the module-config command.

Unable to start Apache server [apache-2.2.29]

I have installed Apache as root and provisioned port 7773 in my httpd.conf file.
When I try to start apachectl then I get the error below:
[root#iam-dev bin]# ./apachectl -k start
httpd: Syntax error on line 420 of /home/app/apache-2.2.29/conf/httpd.conf: Syntax error on line 9 of /home/app/apache-2.2.29/conf/webgate.conf: Cannot load /home/app/Middleware/Apache22_WebgateR2PS2_Home/webgate/apache/lib/webgate.so into server: /home/app/Middleware/Apache22_WebgateR2PS2_Home/webgate/apache/lib/webgate.so: undefined symbol: nzos_GetSSLSessionID
You need to set LD_LIBRARY_PATH env variable to point /home/app/Middleware/Apache22_WebgateR2PS2_Home/webgate/apache/lib and the Apache Home lib dir. Like,
export LD_LIBRARY_PATH=/home/app/Middleware/Apache22_WebgateR2PS2_Home/webgate/apache/lib:<Apache Instal Dir>/lib
Also, you can find out the libs that are not getting resolved using following command.
ldd home/app/Middleware/Apache22_WebgateR2PS2_Home/webgate/apache/lib/webgate.so
HTH,
Anil

installing mod_headers on Linux, apache 2.2.21

Trying to install the mod_headers to be able to append a HTTP header with the Header directive. But the installation process doesn't show the header module as being installed.
Did the following steps. Switched over to the httpd installation and under the modules/metadata directory did:
apxs -c mod_headers.c
the so file is created under the metadata/.libs directory (not sure why). Added the module with:
apxs -i -a -n mod_headers ./metadata/.libs/mod_headers.so
Restarted apache and tried a dump of the modules but getting:
httpd: Syntax error on line 54 of /www/fkwiki/apache/conf/httpd.conf: Can't locate API module structure `mod_headers' in file /www/fkwiki/apache/modules/mod_headers.so: /www/fkwiki/apache/modules/mod_headers.so: undefined symbol: mod_headers
Got a warning in the installation of the module (i.e. apxs -i ....):
Warning! dlname not found in /www/fkwiki/apache/modules/mod_headers.so
Anybody else have the same problem?