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
Related
I created a LAMP stack instance on Google Cloud Platform, launched with PHP 7.0, I need Laravel installed so I installed PHP 7.2 from the SSH console (debian).
While using php -v it shows that the current installed version is 7.2 while the vm instance informations shows that it's still using 7.0 instead and also the Laravel script is not working because I suppose PHP 7.0 is still in use.
I already found ways on how to require using a different version on App Engine, but I need this for Compute Engine (LAMP stack on debian 9).
Thanks.
Be sure to upgrade PHP to 7.2 after installing it. You can follow the guide over here to find the steps needed to do this.
Hope you find this helpful.
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
I wrote a small content management system using laravel 5.4 version. But the web hosting company uses PHP 5.3 version. When I upload my website, I got errors. Is there any way to run laravel 5.4 applications on servers with the PHP version 5.0 to 5.4? Changing the web hosting company is not a choice.
Thank you for your help in advance!
There is no way around minimum PHP requirements. You would have to change providers or get your provider to update PHP version (which they should do).
Best option in this case is to upgrade your PHP on your Web Host if that is an option.
(1) If your host is running Windows you can find the PHP install info here.Also check here.
(2) If your web host is running Debian GNU based Linux then just run following command:
apt-get install php5-common libapache2-mod-php5 php5-cli
I'm trying to get my offline Laravel 5 webapp deployed. First of all I created a new droplet at DigitalOcean. Via ssh access I installed a fully working LAMP stack (I got the apache test-page at my ip-address).
After that, I pulled my git repo into the /var/www/html folder. Using composer install all my dependencies were installed.
When I visit my-ip-addres/public, I get a laravel error
PDOException in Connector.php line 55: could not find driver
I thought maybe my PDO module wasn't installed correctly but when I look in my phpinfo() file, everything looks correct.
Is there anyone who can help me out with this problem?
run this command sudo apt-get install phpX-mysql X: php version (7.0 or 5.6 or ...) and then service apache restart .
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.