ElasticBeanstalk and CodegeIgniter - amazon-web-services

I'm trying to get a code igniter (PHP) site working on Elasticbeanstalk using apache. When i run it php 5.6(EB stack), everything works fine, but when using Php 7.4, i get the following error:
/var/www/html/.htaccess: <IfModule not allowed here
I also tried using .ebextensions to override the Allowoverrride All but using that php code is displayed in browser rather executing it.
My EB Stack is :- PHP 7.4 running on 64bit Amazon Linux 2/3.1.0
Note: When i am running the same code in php 5.6 in elastic beanstalk it's working fine

7.4 will definitely be supported, and I would assume on release. No release date specified - but not long!

Related

/opt/alt/python39/bin/lswsgi: No such file or directory

I have a shared Cpanel host with the Litespeed web server. I want to deploy a Django application on it. After creating a Python application inside the Cpanel where I have not deployed the application on the host I try loading the website, and instead of displaying the Django version, I face 503 Unavailable!!
Also inside the "stderr.log" file, there is the following error.
/usr/local/lsws/fcgi-bin/lswsgi_wrapper: line 9: /opt/alt/python39/bin/lswsgi: No such file or directory
I'm creating the application with Python 3.9.
But it works when I create it with Python 3.8 and show the following message when I load the web,
It works!
Python 3.8.6
The issue is mostly caused by the lack of the Python 3.9 WSGI package. On out-of-date versions of LiteSpeed, the package needs to be installed manually.
To work around this, first ensure that LiteSpeed is up to date. LiteSpeed must be at version 5.4.10 for this to work. Once that is confirmed, execute the following script from LiteSpeed. It will pull the required Python Selector packages:
/usr/local/lsws/admin/misc/enable_ruby_python_selector.sh
Refer cpanel support

Issue while configuration oracle apex + ords + tomcat 9

I already configured Ords 20.0 with tomcat 9 , it works fine but some icons not come properly and got error message .
There is a script that you're missing to load the images.
Double check the installation guide. And if it's an upgrade you also need to run the script.
That combo of versions work fine for me.
After paste the images in route /i/. Run this command
java -jar ords.war validate

How to verify that chrome is working on my Amazon Linux AMI server?

On my server I am using Chromedp (a Go package) that runs a headless version of chrome to generate PDFs for me.
When I run this process on my windows machine it works great. Then when I try to run it on my Amazon Linux AMI server I always get the error message "context cancelled"
I asked on their github page if that was an issue with something I was doing and I was told that it might be happening if the browser crashes or fails to start.
How can I verify that my version of chrome is working through the command line?
I followed this guide when I was installing chrome.

PHP Parse error: syntax error, unexpected '?' in helpers.php 233

When I create a new Laravel project, the browser displays an error 500. I found this in the log:
PHP Parse error: syntax error, unexpected '?' in vendor/laravel/framework/src/Illuminate/Foundation/helpers.php on line 233
the code in 233 is:
return app('cache')->get($arguments[0], $arguments[1] ?? null);
But as i know, null coalescing operator( ?? ) is supported from PHP 7.0
My PHP Version:
PHP 7.1.8-2+ubuntu14.04.1+deb.sury.org+4 (cli) (built: Aug 4 2017 14:34:05) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2017 Zend Technologies
with Zend OPcache v7.1.8-2+ubuntu14.04.1+deb.sury.org+4, Copyright (c) 1999-2017, by Zend Technologies
Laravel Version: 5.5.0
Who knows what happened?
If I had to guess, I'd say you installed the PPA 7.1.8 as CLI only (php7-cli). You're getting your version info from that, but your libapache2-mod-php package is still 14.04 main which is 5.6. Check your phpinfo in your browser to confirm the version. You might also consider migrating to Ubuntu 16.04 to get PHP 7.0 in main.
I had approximately the same problem with Laravel 5.5 on ubuntu, finally i've found a solution here to switch between the versions of php used by apache :
sudo a2dismod php5
sudo a2enmod php7.1
sudo service apache2 restart
and it works
If you came across this error while using the command line its because you must be using php 7 to execute whatever it is you are trying to execute. What happened is that the code is trying to use an operator thats only available in php7+ and is causing a syntax error.
If you already have php 7+ on your computer try pointing the command line to the higher version of php you want to use.
export PATH=/usr/local/[php-7-folder]/bin/:$PATH
Here is the exact location that worked based off of my setup for reference:
export PATH=/usr/local/php5-7.1.4-20170506-100436/bin/:$PATH
The operator thats actually caused the break is the "null coalesce operator" you can read more about it here:
php7 New Operators
If you have newly upgraded your php version you might be forget to restart your webserver service.
I had the same error and the problem is that I had not correctly installed Composer.
I am using Windows and I installed Composer-Setup.exe from getcomposer.org and when you have more than one version of PHP installed you must select the version that you are running at this point of the installation
I had the same problem with the laravel initiation. The solution was as follows.
1st - I checked the version of my PHP. That it was 5.6 would soon give problem with the laravel.
2nd - I changed the version of my PHP to PHP 7.1.1. ATTENTION, in my case I changed my environment variable that was getting Xampp's PHP version 5.6 I changed to 7.1.1 for laragon.
3rd - I went to the terminal / console and navigated to my folder where my project was and typed the following command: php artisan serves.
And it worked! In my case it started at the port: 8000 see example below.
C: \ laragon \ www \ first> php artisan serves
Laravel development server started: http://127.0.0.1:8000
I hope I helped someone who has been through the same problem as me.
I had similar kind of problem. It looked like this:
Null coalescing operator( ?? ) is not supported by my version of PHP. As I had no option to upgrade the version, I wrote something like this: {{ $product->price ? $product->price:'' }} instead of {{ $product->price ?? '' }} and it solved the problem.

JHipster AWS Deploy Succeed, but Tomcat Answers 404 to All Requests

Friday headache is back again \o/ !
After some fiddling with AWS Console and the jhipster aws sub-generator I somehow managed to deploy my app "succesfully", but still, the tomcat running on my EC2 is returning a 404 http error on every single request I make.
From what I understood, every vital variable in my application-prod.yml is changed by the subgenerator using environment variables for the deploy, so that's probably not the problem.
I checked the java version I compile against it's 1.8, and the tomcat is 8.0, so the known issues of a mismatch between java version is a no-go.
I ran out of ideas on what can be wrong here...
An idea someone ? :)
Edit 06/03/2017:
Here is the catalina startup log
Link to logs