Magento on PHP 7.2 wamp server - wamp

i am configuring an existing magento project on local system with WAMP server php version 7.2, while installing magento i get error "PHP extension "mcrypt" must be loaded."
Problem is mycrypt is no longer supported in php 7.2, can anyone suggest how can i resolve it?

mcrypt has been moved from php to pecl since 7.2
You still can install it.
Install dependencies
gcc make autoconf libc-dev pkg-config
install the lib itself
libmcrypt-dev
I assume php7.2 and pecl are installed so you just install mcrypt-1.0.1 (or whatever version is in rep.) with pecl
pecl install mcrypt-1.0.1

Related

How can i use the upgraded version of Sqlite3 for my Django project?

I am trying to create a django application on a server running on Centos 7. When i tried to migrate the application, i got the error:"SQLite 3.8.3 or later required (found 3.7.17)."
Thereafter I installed the latest-version of Sqlite3. When i run sqlite3 --version, it showns 3.28.0 which is the latest version.
Howevere, when I tried my migrate the project I got the same error i.e "SQLite 3.8.3 or later required (found 3.7.17)." Can someone please suggest how to ensure that python/django is configured with the latest version of sqlite3 rather than the older one which came along with the OS?
Unfortunately CentOS only has v3.7.17 in their repos.
So you need to install v3.8.3 or the latest from source.
To do that, you can install from source (I'm not sure how to use the precompile binaries)
Download the source code from sqlite downloads
cd /opt
wget https://www.sqlite.org/2019/sqlite-autoconf-3280000.tar.gz
tar -xzf sqlite-autoconf-3280000.tar.gz
cd sqlite-autoconf-3280000
./configure
make
sudo make install

rbenv install not downloading ruby version

Installing ruby version with rbenv rbenv install -lreturns the proper list. However
$ rbenv install 2.3.4 -v
fails on the download, even though it can be downloaded via a browser. My hunch about an improper version of openssl (due to some distant memory of having such issues - tls version? - in the past) is supported in verbose mode:
ruby-build: use openssl from homebrew
/var/folders/kV/kVDOSPkcEuqSVnTjenAVRE+++TI/-Tmp-/ruby-build.20170601122915.1010 ~ Downloading ruby-2.3.4.tar.bz2...
-> https://cache.ruby-lang.org/pub/ruby/2.3/ruby-2.3.4.tar.bz2
curl: (35) error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version
error: failed to download ruby-2.3.4.tar.bz2
how to overcome? can I point rbenv to use the downloaded tarball?
The reason is because rbenv use old system curl and old system openssl with it, which knows nothing about protocols TLS v 1.1-1.3. For me, installing new version of curl and openssl with brew did the work:
brew install openssl#1.1
brew install curl
Then add installed curl to your PATH (before default path, which is /usr/bin), and ensure that openssl of actual brew's version is also there (add this to your ./bash_profile or ./zshrc or etc):
export PATH="/usr/local/opt/openssl#1.1/bin:$PATH"
export PATH="/usr/local/opt/curl/bin:$PATH"
You can make sure after relaunch of terminal that latest versions of this programs will be used by trying
which -a openssl
which -a curl
openssl version -a
curl -V
First two commands should output all paths with the programs, but top ones should be brew versions. Last two commands should show latest versions of programs (1.1.0f and 7.55 for me now).
Now try
rbenv install [version]
Works on MacOS Sierra with enabled SIP.

Missing libpq header files on CentOS when attempting to install psycopg2 module

I have been searching the web hours on end for several days and I am unable to install psycopg2 library on my Linux machine (CentOS - 2.6.32-431.3.1.el6.x86_64 GNU/Linux).
I know that the problem is that I am missing the libpq header files since I am getting this message after attempting pip install psycopg2: libpq-fe.h: No such file or directory
http://initd.org/psycopg/docs/install.html#install-from-source
Almost all the articles I found pointed me to use apt-get on CentOS but apt-get is not a standard tool on CentOS 6.3 so I've been trying yum install instead.
However, every time I try to use sudo yum install to download something the package is not available. For example:
yum install postgresql-devel
Loaded plugins: fastestmirror, refresh-packagekit, security
Setting up Install Process
Loading mirror speeds from cached hostfile
drivesrvr | 2.2 kB 00:00
No package postgresql-devel available.
Error: Nothing to do
I've tried this for:
yum install postgresql-server
yum install python-devel
service postgresql initdb
service postgresql start
yum install python-psycopg2
Any ideas? Without the the libpq header files I can't install the psycopg2 module that is necessary for my Python program. This is for Python 2.7.12. And PostgreSQL 9.3.13.
I had this exact issue on Fedora 2016.09 box on Amazon. I was able to install postgresql-devel via yum, but that didn't do the trick; the version seemed to be out of date.
I solved it using:
sudo yum install /usr/include/libpq-fe.h
This installs an updated version of postgresql-devel which allows psycopg2 to compile correctly when installing through pip.

installing laravel on EC2 - mbstring issue

I have installed Laravel 5.2 successfully on my Mac machine. But now I am walking through the procedures to install Laravel on AWS.
Once I got the instance running, I installed apache, php and mysql with the following command:
sudo yum install -y httpd24 php56 mysql55-server php56-mysqlnd
The php version is 5.6.17
I then did the following:
composer global require "laravel/installer"
and updated the path: export PATH=$PATH:~/.composer/vendor/bin
when I navigate to /var/www/html and do "laravel new ", the project gets created but I receive an mbstring extension problem. Below is a text dump of what I saw:
laravel new hws3
Crafting application...
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Installation request for laravel/framework v5.2.29 -> satisfiable by laravel/framework[v5.2.29].
- laravel/framework v5.2.29 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
I've scoured the internet and only found a solution for Windows. I am using Amazon Linux. Any guidance would be most appreciated.
It seems you have php 5.6 installed.
You need to install mbstring for that particular version of php.
Run sudo yum install php56-mbstring
credits: Alex Andrei answered here
If you want to install Laravel with composer, This is the right answer!
sudo su //to be root
yum install php56-mbstring

Cross compile on Fedora 18 for Centos 6.4

I am working on a Project, which uses classes from the C++11 standard, on a Fedora 18 machine and want to deploy it on a Centos 6.4 server.
I was able to resolve all loader errors except for the libc and libc++ versions, which are GLIBC_2.11, GLIBCXX_3.4.15 and on my Fedora machine GLIBC_2.14 and at least GLIBCXX_3.4.17 respectively.
Is it possible to tell the compiler to compile/link for the server versions or older compatible versions of the libraries?
When i run ldd executable i get
./executable: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by ./executable)
./executable: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.15' not found (required by ./executable)
Thanks in advance!
Instead of manually copying libraries to a separate directory you could set up a chroot contaiing the CentOS build env, using mock and the epel-6-x86_64 config.
Use yum in the mock chroot to install the packages you want (e.g. Qt) and build in there, that will ensure the code only uses the CentOS 6 libs that are installed in the chroot, not the rest of the packages on your Fedora OS.
Update:
When I'm using a mock chroot for building GCC I do this:
# only need these steps once to setup the chroot
mock -r fedora-19-x86_64 --init
mock -r fedora-19-x86_64 --install yum
mock -r fedora-19-x86_64 --shell 'mkdir -p /builddir/gcc/src /builddir/gcc/build'
su -c 'mount --bind $PATH_TO_GCC_SOURCES /var/lib/mock/fedora-19-x86_64/root/builddir/gcc/src'
# enter root password
mock -r fedora-19-x86_64 --shell
# now in chroot
yum install gmp-devel mpfr-devel libmpc-devel flex autogen
su - mockbuild
cd gcc/build
../src/configure --prefix=/builddir/gcc/install ... etc. ...
For your purpose you'd replace fedora-19 with epel-6
The bind mount means I don't need to have the GCC sources in the chroot, I can use the existing copy in my normal filesystem. See http://gcc.gnu.org/wiki/InstallingGCC for info on building GCC
Once you install GCC in the chroot you can use it to build your own programs then package them up for CentOS.
To go back into the chroot again later:
mock -r fedora-19-x86_64 --shell
su - mockbuild