I was using Chef to provision Apache with PHP module using the httpd cookbook. However, installing mod_php with that cookbook would install the PHP 5 module , even though I had remi set up to install PHP 7 (php -v outputs version 7.1).
How do I manually install (using yum or something) Apache PHP 7 module (php7_module) on Centos 6.7?
It is installing PHP5 because that cookbook is suppose to support only upto that. If you want a change, you can go and change/update/wrapper the module_helper.rb file for your environment and test it out.
https://github.com/chef-cookbooks/httpd/blob/master/libraries/httpd_module.rb
Related
I'm getting the error message below from a Symfony 2.8 application running PHP 7.2.8 on an Amazon Linux 2 server.
Fatal error: Uncaught RuntimeException: Extension DOM is required. in /var/www/html/my-app/vendor/symfony/symfony/src/Symfony/Component/Config/Util/XmlUtils.php:45
php-xml is installed. Other common/related libraries are installed too - php-mbstring, php-common.
In phpinfo, I cannot see the "DOM" section. Below is the screen shot of the installed php-related libraries (yum list installed | grep php*)
What am I missing here?
After 2 days of nit-picking it turned out restarting php-fpm resolves the issue, though I was restarting httpd all along.
sudo systemctl restart php-fpm
Did you verify the extension is enabled in your php.ini? Did yyou happen to install the correct version of php-xml? I had a few issues while installing PHP 7.x and installing extensions. It installed 5.6 extensions instead of 7.x when no version is specified.
Try these commands
To list all modules:
php -m
And/or to list the detailed configuration:
php -i
Check the output for the php-xml extension and if it is loaded.
I read that maybephp-mbstring has to be installed too. But i am not too sure of this, altough i usually have it installed.
In CentOS (and RHEL, i suppose) PHP module (extension) dom is provided by
php74-php-xml
https://centos.pkgs.org/7/remi-x86_64/php74-php-xml-7.4.11-1.el7.remi.x86_64.rpm.html
php74-php-dom
php74-php-domxml
php74-php-simplexml
php74-php-xml = 7.4.11-1.el7.remi
php74-php-xmlreader
php74-php-xmlwriter
php74-php-xsl
I am using and trying to configure the below things:
CentOS 6.5
Apache 2.4
PHP 5.6 --with-ldap
Found an error ldap not found.
yum list installed | grep openldap
shows openldap installed:
openldap.x86_64 2.4.40-16.el6 #base
Please suggest
Why trying to build from sources, when binary packages exists ?
See PHP Configuration Tips, initially written for CentOS 7 but suitable for CentOS 6 using the httpd24 collection.
See section 2 about Running a recent PHP version.
The ldap extension is available in the repository.
I'm currently developing a web page with PHP, and I had to install Pthread extension, I made it in the server (Ubuntu 14) so, before I had all working well, the problem came when I installed the extension, to install this extension I had to compile the php to make the needed configurations of PHP. Now, when I open a simple page, apache shows me the php code, it means that php is not interpreting or is not loaded in the modules of apache.
I went to /etc/apache2/mods-enabled but there's nothing of PHP, but in the linux terminal PHP is working well (so, it's installed). then I made:
sudo a2enmod php5
And I get this response:
ERROR: Module php5 does not exist!
then , I made:
a2query -m php5
but I get:
No module matches php5
I have installed PHP 5.6version, so how can I enable this module in apache. I cannot install the standar version of PHP, I need this one for the mentioned reason. Thanks!
Apache needs a PHP module to execute PHP. In some distros (Debian, etc.) there is a specific package for this. In Ubuntu: libapache2-mod-php5
It does not impact the php installation install but only adds the apache module.
Once installed, one only need to activate the module.
Everything is in the title : can I use https and the Auth:: class whithout having installed php mcrypt ? (I'm on a redhat enterprise linux 6.1 on architecture s390x, it's just impossible to find pre-compiled packages).
If it's possible then I would just use Laravel whithout Mcrypt...
mcrypt is a requirement of Laravel, you simply cannot run a laravel app without having mcrypt installed.
The following link may help with installing mcrypt:
http://injustfiveminutes.com/2012/11/23/install-php-mcrypt-extension-on-rhel-6/
Excerpt:
The php-mcrypt extension is not available on Redhat Enterprise Linux 6
although some applications such as Magento or phpMyAdmin require it to
work properly. We can easily install it though from the Fedora Project
repositories.
1) Download the following RPM pacakges:
wget http://dl.fedoraproject.org/pub/epel/6/x86_64/php-mcrypt-5.3.3-1.el6.x86_64.rpm
wget http://dl.fedoraproject.org/pub/epel/6/x86_64/libmcrypt-2.5.8-9.el6.x86_64.rpm
2) Install them using YUM:
$ yum localinstall php-mcrypt-5.3.3-1.el6.x86_64.rpm
$ libmcrypt-2.5.8-9.el6.x86_64.rpm
3) Reload Apache server to load the extension up:
$ service httpd restart
I have installed MongoDB service in my Centos 6 cloud server. Now i need to install in my server php-pecl-mongo-1.2.10-1.el6.remi.x86_64.rpm... but it gives "packages not found". Can anyone fix this problem? My php version is PHP 5.3.3.
I am using putty for configuring Centos 6 server. I have admin privilege to configure php.ini.
You could:
try RPM installing php-pecl-mongo without a specific version
point to a specific RPM url for installation, eg. using rpmfind.net => php-pecl-mongo
install using sudo pecl install mongo per the Unix installation instructions