Koozali.org: home of the SME Server

PHP et version

Offline ecureuil

  • *
  • 261
  • +0/-0
PHP et version
« on: February 21, 2020, 08:00:56 PM »
bonjour,

J'ai x version de PHP sur mon serveur
php-5.3.3-50
php56
php70
php71
php72
php73

Quand je mets <?php sur mon script php, quelle version est utilisée?

Comment fait-on pour utiliser une version donnée?

Différence entre toutes ces versions?

Merci
Anne

Offline ReetP

  • *
  • 3,731
  • +5/-0
Re: PHP et version
« Reply #1 on: February 22, 2020, 01:42:00 AM »
Have you tried using:

Code: [Select]
<?php
phpinfo
();
?>


https://www.php.net/manual/en/function.phpinfo.php

Which version have you got set, how and where?

This tells you all you need to know.

https://wiki.contribs.org/PHP_Software_Collections

Suggest you use either the installed version which is supported by RH until EOL, or the current supported 7.2 or 7.3
...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions of software
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Offline ecureuil

  • *
  • 261
  • +0/-0
Re: PHP et version
« Reply #2 on: February 22, 2020, 04:12:00 PM »
phpinfo je l'ai dans une de mes ibays... C'est comme cela que j'ai vu la version en cours d'utilisation de ma sme

Pour le reste, pas tout compris...
Pourquoi installer php Software Collections?

J'ai déjà plusieurs versions de php d'installées suite à certaines contrils que j'utilise.

Je suis entrain de mettre en place dans une ibay une appli php que je fais.

Je me fais aider sur https://forum.phpfrance.com/
https://forum.phpfrance.com/php-debutant/transformer-une-commande-bash-pour-inclure-dans-mon-php-t280813.html
Il y a une commande php qui ne passait pas.
$phone0 = str_replace(array(' ', '+33'), array('', '70'), $phone0);
Effectivement les crochets pour remplacer le mots-clés Array() ont été intégré en PHP 5.4
=> la version 5.4 est sortie en 2012 et n'a plus de support depuis 5 ans...

Normal, c'est php php-5.3.3-50 que j'ai sur ma sme.
Donc la commande, qu'on m'avait passée, n'était pas prête à fonctionner.

Comment les contribs qui utilise php 7 ont fait?

Anne

« Last Edit: February 22, 2020, 04:13:34 PM by ecureuil »

Offline ReetP

  • *
  • 3,731
  • +5/-0
Re: PHP et version
« Reply #3 on: February 22, 2020, 05:03:49 PM »
Quote
Why install php Software Collections?

Because they are designed to work with your server.

Because the contrib makes it easy when you don't really know what you are doing, and it works with SME so if you have issues we can help.

Most of this has already been explained a thousand times already.

Quote
I already have several versions of php installed following certain controls that I use.

In which case unless you give us a lot more information you are on your own.

We have no idea what you have installed or how.

The recommended method of adding newer versions of PHP is via the conteib and Software Collections. I really suggest you use them. I suggest you install/use PHP 7.2 or 7.3 globally.

We don't have the time to sit down and tell you how to install your custom PHP in a given location.

(Note phpinfo is just a php function. It will report what it see from wherever it is run.)

Versions
 
I have explained already. The installed version 5.3.x is supported by RH until RHEL6 is EOL.

Currently the lowest SCL version of PHP that is normally supported is 7.2

Do not use 5.4/5.6/7.0/7.1

https://www.php.net/supported-versions
...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions of software
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Offline ecureuil

  • *
  • 261
  • +0/-0
Re: PHP et version
« Reply #4 on: February 27, 2020, 05:26:33 AM »
bonjour,

Je viens d'installer php Software Collections.

Je fais comment pour utiliser?
C'est pour une ibay spécifique

Merci
Anne
« Last Edit: February 27, 2020, 05:46:02 AM by ecureuil »

Offline ReetP

  • *
  • 3,731
  • +5/-0
Re: PHP et version
« Reply #5 on: February 27, 2020, 09:22:24 AM »
...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions of software
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Offline ReetP

  • *
  • 3,731
  • +5/-0
Re: PHP et version
« Reply #6 on: February 27, 2020, 09:30:25 AM »
And look in server-manager.
...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions of software
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Offline ecureuil

  • *
  • 261
  • +0/-0
Re: PHP et version
« Reply #7 on: February 27, 2020, 09:37:44 PM »
And look in server-manager.

Oui j'ai vu qu'il y avait pour configurer par ibays dans le server-manager.
J'ai testé.
C'est très bien

Anne
« Last Edit: February 27, 2020, 09:40:10 PM by ecureuil »