You are not logged in.
Pages: 1
Hi, i need to install an older version of php in order to use magento. I installed this package but when i type
php -v the answer of the terminal is
zsh: command not found: php . The output of
ls /usr/bin | grep php is
php70
php-cgi70
php-config70
phpdbg70
php-fpm70
phpize70
Offline
Movng to Newbie Corner...
Offline
I used downgrader to downgrade php7.1.3 to php 7.0.9. Now the problem is that i can't run php because it require icu 57 instead icu 58. I installed icu 57 and i copy the entire /usr/bin folder in a new folder. Finally i reinstalled icu 58. Now if i type
LD_LIBRARY_PATH= /usr/bin/oldlib php -v everything works fine. Since i can't use it like this, is it possible to run php using oldlib every time it is called?
Offline
Why do you need the binary to be named php?
Offline
Because otherwise magento do not find it. If there is a better way to do it, please explain me.
Offline
The icu package is a make dependency and should only be required when you build your older php version. Instead of messing around with your system folders, downgrading icu temporarily is a better option.
But that aside, why does Magento require an older version of PHP? Are you using an older version of the software itself? This seems to indicate that your problem really should not occur. Please provide us with the following information:
- What exact version of Magento are you trying to run.
- What are the exact steps you use to launch the program.
- What is the resulting error message / warning.
Edit: Apparently it is not compatible after all. Could you please still provide the information requested above? Also, what happens if you try to run PHP without messing with the shared library path?
Last edited by robg (2017-03-21 09:50:50)
Offline
I realize that many programs failed to execute because of the icu and readline downgrade. Maybe it is better to change strategy. I removed php 7.0.9. The version of magento was the 2.1.5 and the web installer recognize the php version. Now i installed php55 because i need to use magento 1.7.0.2 for my project.
- I'm trying to run magento 1.7.0.2
- I just run the http://localhost/magento/setup/
- Now i do not get any error because of the apache server thet fail to start with php55. I do not know how to configure php55 with apache. Thats the output of systemctl status httpd
● httpd.service - Apache Web Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; disabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Tue 2017-03-21 11:56:07 CET; 6s ago
Process: 24603 ExecStop=/usr/bin/httpd -k graceful-stop (code=exited, status=1/FAILURE)
Process: 24597 ExecStart=/usr/bin/httpd -k start -DFOREGROUND (code=exited, status=1/FAILURE)
Main PID: 24597 (code=exited, status=1/FAILURE)
mar 21 11:56:07 pc systemd[1]: Started Apache Web Server.
mar 21 11:56:07 pc httpd[24597]: httpd: Syntax error on line 186 of /etc/httpd/conf/httpd.conf: Cannot load modules/libphp5.so into server: /etc/httpd/modules/libphp5.so: cannot open shared obj
mar 21 11:56:07 pc systemd[1]: httpd.service: Main process exited, code=exited, status=1/FAILURE
mar 21 11:56:07 pc httpd[24603]: httpd: Syntax error on line 186 of /etc/httpd/conf/httpd.conf: Cannot load modules/libphp5.so into server: /etc/httpd/modules/libphp5.so: cannot open shared obj
mar 21 11:56:07 pc systemd[1]: httpd.service: Control process exited, code=exited status=1
mar 21 11:56:07 pc systemd[1]: httpd.service: Unit entered failed state.
mar 21 11:56:07 pc systemd[1]: httpd.service: Failed with result 'exit-code'.
Offline
Now i do not get any error because of the apache server thet fail to start with php55. I do not know how to configure php55 with apache
Please consult this. In a nutshell: Provide us with all the steps you took, i.e., what exact sequence of commands did you install php, apache, e.t.c. with, what configuration files did you edit and what is their content. Without this information we really won't be able to help you out.
As for not knowing how to properly configure things: The wiki is your friend. Have you had a look at it?
Offline
I suggest that you use some form of container when you want outdated software instead of messing up your system.
Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest
Offline
Since it seems it is not easy to configure php, i decided to install xampp with php 5.4 and works fine.
Offline
@Adam_h94
Hi...
I took the time to experiment with magento, just for the sake of making it work.
The experiment ended with success, however I did have to do modifications in the code to make it work.
Apache from official repo - 2.4.25-1
PHP 7.1 from the official repo - 7.1.3-1
PHP extensions required during setup - all from the official repo, enabled manually in /etc/php/php.ini
Here's what I did:
1) Download the latest Magento (2.1.5) manually from the original website.
2) Create your own PKGBUILD or just use mine if that soothes you and then just makepkg.
# Maintainer: David Roheim <david.roheim@gmail.com>
pkgname=('magento')
pkgver=2.1.5
pkgrel=1
pkgdesc="Magento Community Edition ${pkgver} - PHP based e-commerce"
license=('OSL3')
arch=('any')
url='http://www.magentocommerce.com/'
source=("Magento-CE-2.1.5-2017-02-20-05-39-14.tar.bz2")
noextract=('Magento-CE-2.1.5-2017-02-20-05-39-14.tar.bz2')
sha256sums=('2f356ee6e2a9f19b28f033a8250113a859a5236a564e4bf2ac643c3eb6f22e9a')
depends=('php' 'php-mcrypt' 'php-gd' 'mariadb-clients' 'curl' 'gd')
optdepends=('redis' 'php-redis')
options=(!strip)
install=${pkgname}.install
prepare() {
mkdir $srcdir/$pkgname
tar xf Magento-CE-2.1.5-2017-02-20-05-39-14.tar.bz2 -C $srcdir/$pkgname
}
build_magento() {
true
}
package_magento() {
install -d -m755 ${pkgdir}/usr/share/webapps/${pkgname}
install -d -m755 ${pkgdir}/etc/webapps/${pkgname}
install -D -m644 ${srcdir}/${pkgname}/LICENSE.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.txt" || return 1
# install -D -m644 ${srcdir}/${pkgname}/LICENSE.html "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.html" || return 1
install -D -m644 ${srcdir}/${pkgname}/LICENSE_AFL.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE_AFL.txt" || return 1
mv ${srcdir}/${pkgname}/.htaccess ${pkgdir}/etc/webapps/${pkgname}/htaccess
mv $srcdir/$pkgname/app/etc $pkgdir/etc/webapps/${pkgname}
mv $srcdir/$pkgname $pkgdir/usr/share/webapps/
ln -s /etc/webapps/${pkgname}/etc ${pkgdir}/usr/share/webapps/${pkgname}/app/etc
ln -s /etc/webapps/${pkgname}/htaccess ${pkgdir}/usr/share/webapps/${pkgname}/.htaccess
}
# vim:set ts=2 sw=2 sts=2 et :3) Edit /usr/share/webapps/magento/vendor/magento/framework/Encryption/Crypt.php
In every mcrypt_* function, add @ in front of it. I saw this here:
https://www.cadence-labs.com/2016/09/ma … eprecated/
4) Edit /usr/share/webapps/magento/setup/src/Magento/Setup/Model/PhpReadinessCheck.php
$normalizedPhpVersion = $this->getNormalizedCurrentPhpVersion('7.0.6');
5) open_basedir in /etc/php/php.ini should look similar to this:
/tmp/:/usr/share/pear/:/usr/share/webapps/magento:/etc/webapps/magento:/etc/ssl/certs
6) The apache vhost is like this for me:
<VirtualHost *:80>
DocumentRoot "/usr/share/webapps/magento"
ServerName mg.domain.ltd
ServerAdmin magento@sucks
ServerAlias localhost mg.localhost
ErrorLog "/var/log/httpd/magento_error_log"
CustomLog "/var/log/httpd/magento_access_log" combined env=!loopback
<Directory "/usr/share/webapps/magento">
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>7) I saw you are struggling with php's module in Apache. This is how you load it:
LoadModule php7_module modules/libphp7.soand
Include conf/extra/php7_module.confat the bottom, where usually we "Include" stuff.
Make sure you google more next time ![]()
Last edited by smirky (2017-03-22 13:00:50)
Personal spot :: https://www.smirky.net/ :: Try not to get lost!
Offline
Pages: 1