Digital Masters Magazine

Home of Digital Masters

  • Design
  • Photo
  • Video
  • Web
  • Code
  • UX
  • Mobile
Home Archives for PHP
How to Install mcrypt on CentOS 6.x

November 17, 2013 By Digital Masters Leave a Comment

How to Install mcrypt on CentOS 6.x

mcrypt is an amazingly useful php extension you may not be able to live without for long. Here is how to set it up on CentOS 6.x.

Step 1. Make yourself comfortable in a temp directory somewhere on your system:

cd /tmp/

For the following steps, you need to be root, so will either have to prefix commands with sudo, or switch to root; for example on AWS, this is done using:

sudo su

Step 2. Get yourself the rpms to set up repositories:

wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm

and install:

rpm -Uvh remi-release-6*.rpm epel-release-6*.rpm

Step 3. Run an update based on the newly set up repositories (just in case):

yum update

Step 4. Install the php-mcrypt module:

yum install php-mcrypt*

Step 5. The mcrypt module needs to be enabled in its own mcrypt.ini file (in the modules directory of your php installation):

extension=mcrypt.so 

as well as inside of your php.ini file (php must be compiled with support for this module):

extension=mcrypt.so

If, at this point, you are wondering where the .ini files are hiding, you can command your php server to disclose their location using:

php-fpm -i

Step 6. Once you ensured that the module will be loaded, restart your server:

service nginx restart; service php-fpm restart

Done.

Filed Under: Webmasters' Insights Tagged With: Linux, PHP

How to Find the Location of php.ini on a Web Server

September 14, 2012 By Digital Masters Leave a Comment

How to Find the Location of php.ini on a Web Server

When running Apache with PHP on a Unix/Linux server, you can find the location of the php.ini file easily. Open a terminal window and type:

php -i | grep php.ini

The server will respond with something like this:

Configuration File (php.ini) Path => /some/path/directory
Loaded Configuration File => /some/path/directory/php.ini

The php.ini file includes the active configuration of the PHP interpreter. To ensure that this file cannot be misused, you should set user privileges on it to 640:

cd /some/path/directory/
sudo chmod 640 php.ini

Filed Under: Tip of the Day, Web, Webmasters' Insights Tagged With: Apache, PHP

Treat yourself to the best of our content

Sharing is caring

Tweets by 4digitalmasters
Manhattan beauty

Is this your cup of AI?

Speed is everything: shiny car engine rendering

How to force an older PC to upgrade Windows 10 to Windows 11 when it refuses to go along for the ride

Photo by Warren Wong on Unsplash

The tech revolt. Say goodbye to your favorite search engine that’s been wasting your precious clicks on silly captchas

Change language settings in Adobe Photoshop 2020

How to change the language of Adobe Photoshop

Apple MacBook Pro (16-Inch, 16GB RAM, 1TB Storage) - Space Gray

The new 16-inch MacBook Pro: Faster, slightly heavier but still ultra-light and #WorthTheWait

Change language settings in Adobe Photoshop 2020

If you want to run any of your apps of the Adobe Creative Cloud in another language, you have come to the right place. (There is no need to purchase another license; this is just a setting of your current install.)

Apple MacBook Pro (16-Inch, 16GB RAM, 1TB Storage) - Space Gray

Apple’s new 16-inch MacBook Pro sports even cooler looks than its predecessor. It is also truly different.

What’s up

ActionScript Adobe Adobe CC All-in-One WP Migration Angular 2 Apache Apple assistive technology Belarc Advisor bootable Windows 10 Upgrade DVD crawl disabilities DNG Download tool now Dreamweaver Event Viewer Google GPU HTML iOS iPhone JavaScript Microsoft Windows 10 OpenSSH OS X PayPal performance photos Photoshop PHP product key RAW RSS SEO speed SSD Tim Cook TypeScript upgrade deadline Wall Street Windows Windows 10 Windows 10 Fall Creator's Update Windows 10 free upgrade WordPress

Categories

  • Home
  • Subscribe
  • Advertise
  • Privacy Policy
  • Legal
  • Contact Us

Copyright © 2023 ·Streamline Pro Theme · Genesis Framework by StudioPress · WordPress · Log in