craft 3 CMS dont run on production "Craft requires PHP 7.0 or later." - craftcms

craft 3 CMS dont run on production "Craft requires PHP 7.0 or later."
Hi,
craft 3 cms dont run on production and my php -v answer this message
PHP 7.0.30-1+ubuntu14.04.1+deb.sury.org+1 (cli)
Can you help me with this?
thanks,

I could solve by enabling version 7 with the following commands
a2dismod php5
a2enmod php7.0
sevice apache2 restart

Related

./prereqs-ubuntu.sh Error: Ubuntu focal is not supported

I'm trying to use composer and for the same I'm using the below command for installation.
curl -O https://hyperledger.github.io/composer/latest/prereqs-ubuntu.sh
chmod u+x prereqs-ubuntu.sh
These above commands successfully executed.
But when I executed this command (./prereqs-ubuntu.sh) then I'm getting below error
Terminal Throws Error ///Ubuntu focal is not supported
Please help
Hyperledger Composer Installation
I also find this kind of error during Hyperledger Composer installation this problem mainly depends on the Ubuntu version.
Steps to overcome this problem.
upgrade ubuntu version as per your ubuntu versoin please follow:
https://www.fosslinux.com/38303/how-to-upgrade-to-ubuntu-20-04-lts-focal-fossa.htm
open file prereqs-ubuntu.sh with your compatible editor
update line:
#Array of supported versions
declare -a versions=('trusty' 'xenial' 'yakkety', 'bionic');
with
# Array of supported versions
declare -a versions=('trusty' 'xenial' 'yakkety', 'bionic', 'focal');
After saving this file
Run command: ./prereqs-ubuntu.sh
I hope this problem will resolve if anything please feel free to write.

anycable in a separate server

I have my rails in a server A and I created a separate server where Go-lang is installed
My Goal is to use Anycable-Go with Rails but being in separated server.
I can't really find any clear explanation in google how to do that, but from the doc I tried the following in my "Go" server :
go get -u -f github.com/anycable/anycable-go/cmd/anycable-go
then
anycable-go --rpc_host=0.0.0.0:50051 --headers=cookie,x-api-token \
--redis_url=redis://{my_redis_username}:{my_redis_password}#{my_redis_machine_url} --redis_channel=anycable \
--host=0.0.0.0 --port=8084
The output looks like this :
Am really not that sure am on the right track so far... but if so, how am supposed to make my rails app connect/using this "anycable-go" server ?
You need to add anycable-rails gem to your app and run AnyCable RPC server (bundle exec anycable) along with the Rails server. See https://docs.anycable.io/#/using_with_rails

Icingaweb2 on a Server doesn't start

So, I installed Icingaweb2 on a Ubuntu 16.04 server, but when I type in the IP/icingaweb2 I only get the message
<?php
/*! Icinga Web 2 | (c) 2014 Icinga Development Team | GPLv2+ */
require_once '/usr/share/php/Icinga/Application/webrouter.php';
and not the Icingaweb2 Interface.
Did I forget to configurate something? Please help.
It's a PHP issue, need to upgrade to 7.0.
Run this:
apt-get -y install php7.0 libapache2-mod-php7.0
The underlying problem here is that Ubuntu 16.04 behaves differently when it comes to loading the PHP module. As such the packages require a specific fix only applied for 16.04
There was a discussion in German over here which turned into a research what changed with the latest Ubuntu release. One thing is - they prefer mpm_event over mpm_prefork as a module. The problem is - the PHP apache module is only compiled for mpm_prefork support but fails heavily when used with mpm_event (see this thread as well).
While the Ubuntu package may satisfy the dependency issues, it cannot forcefully change the mpm* modules. So now we have an open issue for Icinga Web 2 in order to update the documentation for making it work on Ubuntu 16.04. Until this is done please kindly check this solution.
apt-get install libapache2-mod-php7.0 php7.0-dom php7.0-gd
vim /etc/php/7.0/apache2/php.ini
<set timezone>
#set the correct worker
a2dismod mpm_event
a2enmod mpm_prefork
systemctl restart apache2
The PHP module is not compiled for supporting the mpm_event module at this time. PHP 7.0 itself may be thread-safe but not anything else running in that context of the apache webserver then. Not sure why Ubuntu chooses to not set mpm_prefork by default - upgrades pretty much hurt and I couldn't find any good changelog for that.

Why is PHP CodeSniffer Freezing?

I'm a Junior Programmer where I work. Our website was written using PHP 4. We're migrating from PHP 4 to PHP 5.3. There are roughly 5000 PHP files in around 595 directories. So, as you can imagine, the scope of this project is pretty huge.
We use Subversion for version control. I have two separate checkouts. I have two VMs that act as separate webhosts - one stack emulates our actual webserver (CentOS 4, PHP4, etc) and the other is a PHP 5.3 stack (Ubuntu 12.04 LTS).
I took the time to check the files for basic syntax errors using the following commands:
Edit: I ran the following recursive searches from the root of the website.
find ./ -type f -name \*.php -exec php -l {} \; < ~/php5_basic_syntax_assessment.txt
find ./ -type f -name \*.inc -exec php -l {} \; < ~/php5_basic_syntax_inc_assessment.txt
I realize that using php -l to check basic syntax doesn't reveal deprecated code structures/functions and doesn't provide warnings (IE: use preg_slice() instead of slice()). Therefore, I decided to install PHP CodeSniffer.
First, I installed PEAR: [I accepted all the default parameters]
cd ~/
mkdir pear
cd pear
wget http://pear.php.net/go-pear.phar
php go-pear.phar
Next, I installed git:
cd ~/
sudo apt-get update
sudo apt-get install git
Next, I installed PHP Code Sniffer
pear install PHP_CodeSniffer
Finally, I installed the following PHP 5.3 Compatibility standards for the PHP Code Sniffer:
git clone git://github.com/wimg/PHP53Compat_CodeSniffer.git PHP53Compatibility
I did all of the above so that I could assess the 5K PHP files in an automated kind of way. It would be extremely tedious and time consuming to go through each file to make sure they manually follow the PHP 5.3 coding standards.
Finally, here's the command I used to run the PHP Code Sniffer:
phpcs --standard=/home/my_user_name/PHP53Compatibility -p --report-file=/home/my_user_name/php53_assessment.txt /path/to/web/root
To make sure that the specific standards aren't the problem, I also ran the PHP Code Sniffer using the default standards:
phpcs -p --report-file=/home/my_user_name/php53_assessment.txt /path/to/web/root
Either way, the reports freeze in the same place. I've been awake for over 24 hours. I waited for 18 hours before stopping the first run by using CTRL+C. The second is still running and has been running for about an hour and a half.
So, what is causing my PHP Code Sniffer to freeze?
All help is very much appreciated.
Bit late, but I ran into the same issue. Limit the files to just PHP files should do the trick: phpcs -p -- ./**/*.php

Trying to set up .SSH keys to connect to Github via Cygwin

I've just installed Cygwin on Windows 7 to develop RoR apps with, trouble is I am trying to connect Git with my Github account through Cygwin but for some reason when I run the command ssh-keygen -t rsa -C "myemail#etc.com" it gives me back the message "bash: ssh-keygen: command not found"
I am following the Ruby on Rails Tutorial by Michael Hartle by the way but can't seem to find a solution.
Can anyone offer any advice?
Chances are you probably forgot to install the openssh package when you installed Cygwin.
I've used this guide before, and everything was flawless(for ssh):
http://allthingsmarked.com/2006/08/17/how-to-set-up-a-windows-ssh-server-for-vnc-tunneling/

Resources