PHP version “>= 8.0.2”.
I have a headache about the PHP version. I have Debian buster, but the required PHP version is 7.3, so, it’s impossible to install OJS 3.4 that requires PHP version “>= 8.0.2”.
Steps I took leading up to the issue
I hope that I successfully installed the PHP version 8.3.12, but the composer dependencies already block the installation of OJS3.4 because it’s continues to see the older PHP version 7.3
even if when I check the version installed in the Debian buster, the OS print as result the Version 8.3.12.
Does somebody in the community face the same issue? How does it fix it? Or somebody in the community have some suggestion on how to solve the issue?
With regards,
Jehu Njikonga
Hi @njikonga-med,
If you’ve got multiple versions of PHP installed (which I think you do), you’ll need to make sure the right version of PHP is executed. See if your OS has a binary installed in the path including the version number, e.g. php8.1
, and use that instead when running Composer.
If you’re working with the .tar.gz distribution of OJS, it’s not necessary to install Composer dependencies; they’re already in the package.
Regards,
Alec Smecher
Public Knowledge Project Team
Hi @asmecher , thank you for also be available to provide us support. I really appreciate. I tried to install another versions of PHP in Debian 10, buster edition, but it seems that it’s not possible via the aptitude Debian package. I tried the installation locally and instruct the linux OS system $PATH to point to the new PHP version.
But I still face the problem I mentioned above, so I tried the docker solution: GitHub - pkp/docker-ojs: Open Journal Systems (OJS) is a journal management and publishing system. and configure the platform but when I follow the instruction to install the journal, the following error was thrown:
Errors occurred during installation A database error has occurred: SQLSTATE[HY000] [2002] No such file or directory (SQL: create table `journals` (`journal_id` bigint not null auto_increment primary key, `path` varchar(32) not null, `seq` double(8, 2) not null default '0' comment 'Used to order lists of journals', `primary_locale` varchar(14) not null, `enabled` smallint not null default '1' comment 'Controls whether or not the journal is considered \"live\" and will appear on the website. (Note that disabled journals may still be accessible, but only if the user knows the URL.)', `current_issue_id` bigint null) default character set utf8 collate 'utf8_general_ci')
Could you have any suggestion?
Hi @njikonga-med,
Could you post the Docker question as a new topic as it’s different than the subject of the original post? That’ll help keep the forum organized.
As for running several versions of PHP on the server – I run Ubuntu on my development machine and have run several versions of PHP successfully without needing to install them via apt. (I generally build them from source). It should work just fine as long as you can specify the path to the PHP executable when running e.g. Composer – for example:
/path/to/php8.2 path/to/composer.phar install`
I think you’re probably very close to getting that working, and jumping over to Docker might bring a whole lot of other issues with it, so your earlier approach might be worth a bit more time first!
Regards,
Alec Smecher
Public Knowledge Project Team
Hello @asmecher ,
I will post the new Docker question as a new topic.
As per running several versions of PHP on the linux machine, (I’ m using Debian Buster), without using the aptitude, could you please indicate the link or the steps you follow to achieve that goal?
I am asking because i follow the PHP documentation of building the installation from source
Compiling PHP on Ubuntu boxes
And following your suggestions, I need also to install Composer on my linux Debian buster.
Please let me know
With Regards
Jehu Njikonga
Hi @njikonga-med,
It’s been a while but I don’t think there were any specific directions I followed – the ./configure
command took a few runs to figure out how to get all the extensions enabled, but then it was straight forward. Then running Composer with the right /path/to/php /path/to/composer.phar
was the only thing needed. Sorry I can’t help more specifically!
Regards,
Alec Smecher
Public Knowledge Project Team
Hello @asmecher ,
I fixed the issue following the tutorial on how to install it on Debian Buster 10, This tutorial explain how Butterfly Builder a tool is used to compile PHP
[https://www.librebyte.net/en/systems-deployment/butterfly-builder-a-tool-to-compile-php/]
Ho it can be help someone else struggling with Debian Buster.
With regards
1 Like