I cant Install Symfony on OScentos7 - php

I run these two commands:
curl -1sLf 'https://dl.cloudsmith.io/public/symfony/stable/setup.rpm.sh' | sudo -E bash
sudo dnf install symfony-cli
then when I run the command:
symfony check:requirements
it returns me this:
/usr/local/bin/symfony: line 1: syntax error near unexpected token newline'
/usr/local/bin/symfony: line 1: ``'
my PHP version : PHP 8.1.15 (cli) (built: Jan 31 2023 15:13:17) (NTS gcc x86_64) Copyright (c) The PHP Group Zend Engine v4.1.15, Copyright (c) Zend Technologies
apache version : Server version: Apache/2.4.6 (CentOS) Server built: Mar 24 2022 14:57:57
my goal is to put my Project in production on an OScentos7 server

Related

IonCube not loaded with PHP

I am following the instructions here to install the Filerun app on my Nginx server, running on Ubuntu / Raspberry Pi 4.
I downloaded the aarch64 version of IonCube and created a file /etc/php/7.4/fpm/conf.d/00-ioncube.ini with contents
zend_extension = /usr/lib/php/ioncube/ioncube_loader_lin_7.4.so
I verified that the referenced so file exists.
I then ran sudo systemctl restart php7.4-fpm and it shows that the service is running.
But when I do php -v I don't see IonCube mentioned:
$ php --version
PHP 7.4.33 (cli) (built: Nov 8 2022 11:40:37) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
with Zend OPcache v7.4.33, Copyright (c), by Zend Technologies
And when I visit the actual site I get an error saying:
Site error: the ionCube PHP Loader needs to be installed.
I had the wrong version of IonCube. You can run php -i | head -5 to see the architecture:
phpinfo()
PHP Version => 7.4.33
System => Linux raspberrypi 5.15.76-v7l+ #1597 SMP Fri Nov 4 12:14:58 GMT 2022 armv7l
Build Date => Nov 8 2022 11:40:3
In my case it's armv7l (I was wrong to think it was aarch64).
Downloading the correct version from here solved the problem https://www.ioncube.com/loaders.php

XAMPP For Linux - PHP Version

I installed LAMPP by downloading installer and running (I already had older version installed):
chmod 755 xampp-linux-*-installer.run
sudo ./xampp-linux-*-installer.run
Once I start LAMPP:
sudo /opt/lampp/lampp start
I get the following output:
Starting XAMPP for Linux 7.3.2-0...
XAMPP: Starting Apache...ok.
XAMPP: Starting MySQL...ok.
XAMPP: Starting ProFTPD...ok.
I would assume that PHP version is 7.3.2
But when I run:
sudo /opt/lampp/bin/php -v
I get the following:
PHP 7.1.15 (cli) (built: Mar 13 2018 23:32:04) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2018 Zend Technologies
Also, when trying:
ls -l /opt/lampp/bin/php
I get the following output:
lrwxrwxrwx 1 root root 10 апр 10 2018 /opt/lampp/bin/php -> php-7.1.15
Can someone, please, explain me what's going on here and how can I run latest (7.3.2) PHP version in LAMPP

Apache does not compile php

I just installed a fresh ubuntu system from here (mini.iso)
I choosed no extras at all during the installation process.
These are all the commands which I have executed this far:
(Ignore 4 - 8)
Now I wrote a simple PHP test script (/var/www/html/index.php)
<?php
echo "Hello World";
?>
However, after calling this page from another computer, I literally get the output from the file, instead of the compiled php.
Output:
<?php
echo "Hello World";
?>
I have already restarted apache2, no change.
Apache version:
Server version: Apache/2.4.7 (Ubuntu)
Server built: Jul 15 2016 15:32:47
PHP version:
PHP 7.0.16-4+deb.sury.org~trusty+1 (cli) (built: Mar 2 2017 13:50:00) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies
with Zend OPcache v7.0.16-4+deb.sury.org~trusty+1, Copyright (c) 1999-2017, by Zend Technologies
Linux version:
Linux linux 3.13.0-110-generic #157-Ubuntu SMP Mon Feb 20 11:55:25 UTC 2017 i686 i686 i686 GNU/Linux
I already searched the internet, some other user sayed to check if the PHP module is loaded by checking the file httpd.conf, but there is no such file. I searched it by using find / -name "httpd.conf" which gave no results.
You need to install PHP apache2 module to work with PHP. You can install libapache2-mod-php from your terminal by typing the command
sudo apt-get install libapache2-mod-php
After that restart your apache. It will solve your problem.

Reinstall PHP on Fedora 22 Installed PHP was compiled

I'd like to know how can I reinstall PHP via dnf and make it default for apache. My problem is that I have a installed version of PHP but it was compiled and as I'm facing several problems with modules I didn't compile I thought it'd be easier do it this way. I'd like to remove this version that's installed too.
Here it's the result of how it's working on my machine right now:
$ uname -a
Linux dev 4.4.6-200.fc22.x86_64 #1 SMP Wed Mar 16 22:13:40 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
$ httpd -v
Server version: Apache/2.4.18 (Fedora)
Server built: Jan 4 2016 13:05:47
$ php -v
PHP Warning: PHP Startup: Unable to load dynamic library '/opt/php-5.6.19/lib/php/extensions/no-debug-non-zts-20131226/zip.so' - /opt/php-5.6.19/lib/php/extensions/no-debug-non-zts-20131226/zip.so: undefined symbol: executor_globals_id in Unknown on line 0
PHP 5.6.19 (cli) (built: Mar 17 2016 10:26:07)
Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
I'm just asking because I wasn't able to find how to do that here or several other places I've searched. Tks in advance.

Apache; Invalid command 'DavLockDB'

Just learning about PHP and MySQL. Attempting to enable PHP on Mac Mini. I've followed several thread regarding this, but have not found a solution.
Terminal Output:
Jessicas-Mac-mini:~ jessicaclark$ php -v
PHP 5.5.14 (cli) (built: Sep 9 2014 19:09:25)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2014 Zend Technologies
Jessicas-Mac-mini:~ jessicaclark$ cd /etc/apache2/
Jessicas-Mac-mini:apache2 jessicaclark$ sudo nano httpd.conf
Password:
Jessicas-Mac-mini:apache2 jessicaclark$ sudo apachectl restart
Password:
Jessicas-Mac-mini:apache2 jessicaclark$ httpd -v
Server version: Apache/2.4.9 (Unix)
Server built: Sep 9 2014 14:48:20
Jessicas-Mac-mini:apache2 jessicaclark$ apachectl configtest
AH00526: Syntax error on line 15 of /private/etc/apache2/extra/httpd-dav.conf:
Invalid command 'DavLockDB', perhaps misspelled or defined by a module not included in the server configuration
Supposed to be able to open http://localhost/
with 'It works!'...Any feedback appreciated!

Categories