I have a new instance of EC2 running Amazon Linux2 with PHP. I am unable to enable PHP GMP for CLI. I am able to install GMP using:
`yum install gmp-devel`
I have also tried modifying my php.ini by adding:
`extension=gmp.so`
and restarting the web server. I cannot find any documentation on GMP other than Amazon stating that the GMP extension is part of the core. (https://aws.amazon.com/amazon-linux-2/faqs/) I am verifying the extension using PHP as follows:
`if (!extension_loaded("gmp")) die("NO GMP");`
Soooo aggravating! What am I doing wrong?
I had the same problem.
you can restart app server from elastic beanstalk for fixed this issue
screenshot
Related
I am about two days into attempting to install FFMPEG-php with dependencies on an AWS EC2 instance running the Amazon Linux AMI. I've installed FFMPEG, and have read reportedly successful instructions on installing on Red Hat/Fedora. I have followed a number of tutorials and forum articles to do so, but have had no luck yet. As far as I can tell, the main problems are as followed:
I have installed all the dependency for ffmpeg-php. I run the following command successfully.
$wget http://downloads.sourceforge.net/project/ffmpeg-php/ffmpeg-php/0.6.0/ffmpeg-php-0.6.0.tbz2
$tar xvfj ffmpeg-php-0.6.0.tbz2
$phpize
But when I run the following command it throw the error like below:
$sudo ./configure
configure: error: ffmpeg shared libraries not found. Make sure ffmpeg is compiled as shared libraries using the --enable-shared option}
I have used enable shared option with shared enable option but it throw the same error.
On to my question: Has anyone successfully installed FFMPEG-php on Amazon Linux? Is there a fundamental incompatibility? If anyone could share specific instructions on installing ffmpeg-php on amazon linux I would be greatly appreciative. Any other insights/experiences would also be appreciated.
I am pretty new to Amazon EC2.
I followed the instructions given in mongodb official site for installing mongodb on Amazon Linux. I have a Yii-2(basic) project to host on my amazon Linux server. mongoDB is already installed in the and even I Imported some dumps over there. But when i run the project
Class 'MongoClient' not found
How can I configure mongodb on amazone linux?
(now when i do sudo service mongod restart it is showing FAILED)
I installed mongodb using yum.
PHP version 5.6
Amazon Linux
these are my configuration. I am sure I am using latest versions since it is a fresh installation. Please help me out. Thanks in advance!
From the error message it seems that you haven't installed the PHP Mongo Driver in your server.
To check if you have it, try a php_info() and check if the entry "mongo" is present
If it's not present install it using the instructions found in the link above, or check here
I have been trying to install memcached on an ubuntu server and I followed a lot of tutorials over the internet. I am using 32-bit ubuntu 12.04, php version 5.4.7, xampp server 1.8.1 which are all 32-bit versions. In the end, I followed the tutorial in the below link and I installed all the things listed with no error.
http://stevelove.org/2009/09/30/how-to-install-php-memcached-on-an-ubuntu-server/
The only problem I have is that when I installed memcached using "sudo pecl install memcached" command, the extension couldn't be added to php.ini file. Then I used phpinfo() to learn which php.ini file I am using and added extension=memcached.so to the ini file. When I restarted xampp server, php.ini file doesn't work and it tries to download the pages. In the php error log, I get this error.
[30-May-2013 16:42:48 UTC] PHP Warning: PHP Startup: Unable to load dynamic library '/opt/lampp/lib/php/extensions/no-debug-non-zts-20100525/memcache.so' - /opt/lampp/lib/php/extensions/no-debug-non-zts-20100525/memcache.so: cannot open shared object file: No such file or directory in Unknown on line 0
Since I couldn't enable the extension, even though memcached is listed as installed with php -m command, I get Class memcached not found error when I try to execute my php code.
Can someone please help me with this issue?
Maybe because you installed the server but not the extension, try
sudo apt-get install php5-memcached
ps: memcache != memcached
Firstly, thank you for your answer Mohammad. I know that memcache is not memcached and as I said, when I list modules, memcached seems installed (not memcache) but when I use phpinfo(), memcached is not listed.
It turns out that even though I installed memcached, problem was xampp installation. I removed lampp and php5 installed in ubuntu and purged everything I installed. Then I installed xampp with development packages and re-installed libmemcached etc. It works fine now.
If there is anybody having similar problem, I can explain in detail.
I have RabbitMQ running on one of our servers and am trying to connect to it via PHP. I am developing on a Windows7 machine and my first line of code reads:
$cnn = new AMQPConnection();
It gives me the error:
Fatal error: Class 'AMQPConnection' not found in
I know that it is something that I need to install but what is it ? I am new to PHP so a little help would be nice.
Ps: I can connect to the RMQ server via the RabbitMQ admin web interface.
Thank you
Jack
Installation guide for php_amqp 1.4.0 (Stable version):
Download proper package for your php version from https://pecl.php.net/package/amqp/1.4.0/windows
Unpack php_amqp.dll to X:/php/ext/ directory
Unpack rabbitmq.1.dll to X:/Windows/system (not system32) directory
Modify php.ini file and add "extension=php_amqp.dll" line at the end of extensions list
Verify module installation by executing command "X:/php/php.exe -m" in command line
Restart webserver
I am developing on a Windows7 machine
You may be out of luck using that specific code. That class is from the PECL aqmp extension. Inside the installation instructions, it states:
Note to Windows users: This extension does not currently support Windows since the librabbitmq library does not yet support Windows.
You will want to use another library to speak to your message queue instead.
The rabbitmq-c library supports windows now, and the php_amqp pecl extension builds on windows as well. The documentation just hasn't been updated, nor are there any official binary builds in the wild. However, I managed to get them to build and have some 32 bit dll's available for download here:
http://www.nathanjohnson.info/?p=77
# AMQP installation php.net:
Note to Windows users: This extension does not currently support Windows since the librabbitmq library does not yet support Windows.
But here at RabbitMQ website is a windows installer...
Apparently this php.net page is outdated
To install do like this:
Download the correct package for your php from this official PECL amqp 1.4.0 page
unzip
add amqp.dll to your php ext folder
add rabbitmq.1.dll to your windows system 32 folder.
This according to the post on the blog I found here i think it is from the same #NathanJohnson who posted also here.
How I got it working:
My System Config: Win 7 Pro, (x64) XAMPP running PHP 5.6(x86)
Follow instruction from here to install RabbitMQ:
https://www.rabbitmq.com/install-windows.html
Now download compatible extension from here
https://pecl.php.net/package/amqp/1.4.0/windows
in my case it is "5.6 Thread Safe (TS) x86"
Now from zip file (php_amqp-1.4.0-5.6-ts-vc11-x86.zip) downloaded copy dll "php_amqp.dll" to your php extension folder in my case it is "xampp/php/ext" and copy dll "rabbitmq.1.dll" to "Windows\system" directory.
now register your php_amqp dll in php.ini file as
"extension=php_amqp.dll"
now restart apache.
Done. Now you should not get AMQPConnection not found exception.
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