php version too small (5.3.10) for drush - need to upgrade

Alles, was PHP betrifft, kann hier besprochen werden.

php version too small (5.3.10) for drush - need to upgrade

Postby lch » 13. June 2015 00:57

I installed your lampp a week or so ago and it went ok but now the php version is only 5.3.10, and
that is old old . I get warnings about it and now I can't install drush because it wants php >= 5.4.5

If I do php --version i get 5.3.10
Inside localhost/phpmyadmin the webhost part of php 5.6.8 but that is not true.

I now want to install php5.5.25 from php.net can I upgrade php like thiis? Do I have to uninstall the old 5.3.10 one first? Now do
I uninstall the existing 5.3.10? If I do this will my drupal pick up on this new php?
lch
 
Posts: 8
Joined: 04. June 2015 19:14
Operating System: linux mint 13 mate desktop

Re: php version too small (5.3.10) for drush - need to upgra

Postby glitzi85 » 13. June 2015 01:42

You seem to have a messed up system....

could you please execute this commands an post the output:

Code: Select all
wheries php
locate php
dpkg -l

Unfortunately the Mint packaging website seems to be broken, so helping you might be harder than usual.
User avatar
glitzi85
 
Posts: 1920
Joined: 05. March 2004 23:26
Location: Dahoim

Re: php version too small (5.3.10) for drush - need to upgra

Postby Nobbie » 13. June 2015 11:54

lch wrote:If I do php --version i get 5.3.10


This is the version which is installed in your Linux Mint environment, obviously you have installed PHP as well as via Xampp as via Mint Installer.

lch wrote:
Inside localhost/phpmyadmin the webhost part of php 5.6.8 but that is not true.


It is true, because if you call localhost/phpmyadmin via a browser, the Xampp Apache delivers the contents and this Apache calls the PHP Version from Xampp (which is installed in /opt/lampp):

But the drush Installer does not know, that there is a Xampp installation, it simply executes a "php --version" and this does not yield to Xampps PHP, but to the PHP from Linux Mint (which is in /usr/bin/php).

You should remove the Mint PHP installation (via Mint Installer) and after you should modify the login in your Linux, you should extend the PATH Variable to include the /opt/lampp/bin folder, where the Xampp executables are stored.
Nobbie
 
Posts: 13165
Joined: 09. March 2008 13:04

Re: php version too small (5.3.10) for drush - need to upgra

Postby lch » 13. June 2015 22:29

looked at this aid to help me.
firefox http://serverfault.com/questions/420286/how-do-i-upgrade-from-php-5-3-to-php-5-4-6-in-ubuntu

went after this PPA

sudo add-apt-repository ppa:ondrej/php5-oldstable 2>&1
then this one. cause wanted even more modern one.
sudo add-apt-repository ppa:ondrej/php5 2>&1
This was part of the output and I should have read it more carefull.

You are about to add the following PPA to your system:
This branch follows latest PHP packages as maintained by me & rest of the
Debian pkg-php team.
It's not ubuntu- it's Debian!!o

went ahead and did this
sudo apt-get update 2>&1

Got rid of the old php first
sudo apt-get remove php* --purge 2>&1

Then did this one.
sudo apt-get install php5

----------
and the version IS higher
php -version
PHP 5.5.25-1+deb.sury.org~precise+2 (cli) (built: May 24 2015 15:49:54)
Copyright (c) 1997-2015 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2015 Zend Technologies
with Zend OPcache v7.0.4-dev, Copyright (c) 1999-2015, by Zend Technologies
----------

but things are really hosed up. When I tried to start the lamp server
I get this.
Starting XAMPP for Linux 5.6.8-0...
XAMPP: Starting Apache...fail.
XAMPP: Another web server is already running.
XAMPP: Starting MySQL...ok.
XAMPP: Starting ProFTPD...ok.

AND going to localhost in the browser
I get this splash screen.

This is the default welcome page used to test the correct operation of the
Apache2 server after installation on Debian systems. If you can read this page,
it means that the Apache HTTP server installed at this site is working
properly. You should replace this file (located at \texttt{/var/www/html/index.html})
before continuing to operate your HTTP server.

If you are a normal user of this web site and don't know what this page is
about, this probably means that the site is currently unavailable due to
maintenance. If the problem persists, please contact the site's administrator.
Configuration Overview

Debian's Apache2 default configuration is different from the upstream default
configuration, and split into several files optimized for interaction with
Debian tools. The configuration system is fully documented in /usr/share/doc/apa
che2/README.Debian.gz. Refer to this for the full documentation. Documentation
for the web server itself can be found by accessing the manual if the
apache2-doc package was installed on this server.

now localhost/myphpadmin does now work at all. I have a mess.

whereis php 2>&1
php: /usr/bin/php /usr/bin/X11/php /usr/share/php /opt/lampp/bin/php /usr/share/man/man1/php.1.gz


locate php|wc
6533 6533 373861
this is a big file
locate php|head -n 10
/etc/php5
/etc/alternatives/php
/etc/alternatives/php.1.gz
/etc/apache2/mods-available/php5.conf
/etc/apache2/mods-available/php5.load
/etc/apache2/mods-enabled/php5.conf
/etc/apache2/mods-enabled/php5.load
/etc/apt/sources.list.d/ondrej-php5-oldstable-precise.list
/etc/apt/sources.list.d/ondrej-php5-oldstable-precise.list.save
/etc/apt/sources.list.d/ondrej-php5-precise.list
locate php|tail -n 10
/var/lib/dpkg/info/pkg-php-tools.list
/var/lib/dpkg/info/pkg-php-tools.md5sums
/var/lib/ucf/cache/:etc:drupal:6:sites:default:dbconfig.php
/var/lib/ucf/cache/:etc:drupal:7:sites:default:dbconfig.php
/var/lib/ucf/cache/:etc:php5:mods-available:gd.ini
/var/lib/ucf/cache/:etc:php5:mods-available:mysql.ini
/var/lib/ucf/cache/:etc:php5:mods-available:mysqli.ini
/var/lib/ucf/cache/:etc:php5:mods-available:opcache.ini
/var/lib/ucf/cache/:etc:php5:mods-available:pdo.ini
/var/lib/ucf/cache/:etc:php5:mods-available:pdo_mysql.ini


dpkg -l|wc
2127 18826 215609
dpkg -l|head -n 10
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Description
+++-===========================-===========================-====================
==================================================
ii accountsservice 0.6.15-2ubuntu9.7 query and
manipulate user account information
ii acl 2.2.51-5ubuntu1 Access control list
utilities
ii acpi-support 0.140.2 scripts for
handling many ACPI events
ii acpid 1:2.0.10-1ubuntu3 Advanced Configurati
on and Power Interface event daemon
ii activity-log-manager-common 0.9.4-0ubuntu3.2 blacklist
configuration for Zeitgeist (assets)


dpkg -l|tail -n 10
ii yelp-xsl 3.4.1-1 XSL stylesheets for
the yelp help browser
ii youtube-dl 2015.05.20-1~webupd8~precis downloader of
videos from YouTube and other sites
ii zeitgeist 0.9.0-1ubuntu1 event logging
framework
ii zeitgeist-core 0.9.0-1ubuntu1 event logging
framework - engine
ii zeitgeist-datahub 0.8.2-1ubuntu2 event logging
framework - passive logging daemon
ii zenity 3.4.0-0ubuntu4 Display graphical
dialog boxes from shell scripts
ii zenity-common 3.4.0-0ubuntu4 Display graphical
dialog boxes from shell scripts (common files)
ii zip 3.0-4 Archiver for .zip
files
ii zlib1g 1:1.2.3.4.dfsg-3ubuntu4 compression library
- runtime
ii zlib1g-dev 1:1.2.3.4.dfsg-3ubuntu4 compression library
- development

I never did an install from mint package. I had a working lamp etc from apache frields
before I got upset that drush did not like my lower version of php and decided to
"fix" it. Now things are really broken.
Looks like I might have the Debian linux version of php.

What to do now I have no idea.
I did not wait before I do the install of the Debian version of php.

Could I just blow this mess away using

1) sudo apt-get remove php* --purge 2>&1

find a better ppa repository
2) sudo add-apt-repository ppa:?? whatever

3) sudo apt-get install php5

I reeally wanted that drush command line app. Installed symphony etc
and got really tired of trying to work from the drush gui screen
to find modules etc. Hoping to move back to command lines again.
lch
 
Posts: 8
Joined: 04. June 2015 19:14
Operating System: linux mint 13 mate desktop

Re: php version too small (5.3.10) for drush - need to upgra

Postby lch » 13. June 2015 22:45

ok went into package manager. blew all php stuff away.
php -version now is not found at all
Can you tell me what next?
lch
 
Posts: 8
Joined: 04. June 2015 19:14
Operating System: linux mint 13 mate desktop

Re: php version too small (5.3.10) for drush - need to upgra

Postby lch » 14. June 2015 01:53

how to uninstall lampp so i can start over? Just erase directory /opt/lampp ? there is a mysql stil in /usr/bin
and mysql is still running

/home/lh/drupal/newphp>ps -ef|grep sql|xfold -x
root 11534 1 0 16:33 pts/0 00:00:00 /bin/sh /opt/lampp/bin/mysqld_sa
fe --datadir=/opt/lampp/var/mysql --pid-file=/opt/lampp/var/mysql/lh-Satellite-L
755D.pid
mysql 11894 11534 0 16:33 pts/0 00:00:04 /opt/lampp/sbin/mysqld --basedir
=/opt/lampp --datadir=/opt/lampp/var/mysql --plugin-dir=/opt/lampp/lib/mysql/plu
gin/ --user=mysql --log-error=/opt/lampp/var/mysql/lh-Satellite-L755D.err --pid-
file=/opt/lampp/var/mysql/lh-Satellite-L755D.pid --socket=/opt/lampp/var/mysql/m
ysql.sock --port=3306
lh 18325 7252 0 20:51 pts/0 00:00:00 grep sql
/home/lh/drupal/newphp>ps -ef|grep sql|xfold -s
root 11534 1 0 16:33 pts/0 00:00:00 /bin/sh /opt/lampp/bin/mysqld_sa
fe --datadir=/opt/lampp/var/mysql --pid-file=/opt/lampp/var/mysql/lh-Satellite-L
755D.pid
mysql 11894 11534 0 16:33 pts/0 00:00:04 /opt/lampp/sbin/mysqld
--basedir=/opt/lampp --datadir=/opt/lampp/var/mysql --plugin-dir=/opt/lampp/lib/
mysql/plugin/ --user=mysql --log-error=/opt/lampp/var/mysql/lh-Satellite-L755D.e
rr --pid-file=/opt/lampp/var/mysql/lh-Satellite-L755D.pid --socket=/opt/lampp/va
r/mysql/mysql.sock --port=3306
lh 18328 7252 0 20:51 pts/0 00:00:00 grep sql

I think I would like to cleanly uninstall lampp and then reinstall it.
lch
 
Posts: 8
Joined: 04. June 2015 19:14
Operating System: linux mint 13 mate desktop

Re: php version too small (5.3.10) for drush - need to upgra

Postby lch » 14. June 2015 04:16

ok got it all reloaded. Now I have php 5.6.8 and drush should work.Thanks. Was a nasty mistake.
there is no php now /usr/bin but it is in /opt/lampp/bin and version is 5.6.8 which is enough for drush.
thanks.
lch
 
Posts: 8
Joined: 04. June 2015 19:14
Operating System: linux mint 13 mate desktop

Re: php version too small (5.3.10) for drush - need to upgra

Postby lch » 15. June 2015 20:33

ALL IS WORKING FINE. Now i just need to figure out some detail of the xampp install.

somehow xampp or somebody, is helping me by adding
/opt/lampp/bin to my path-
which is fine, but I need know how and where this is done.
I use ksh and in my .profile
and have added my local bin export PATH=".:$HOME/bin:$PATH"
and that works out fine too
but what mysterious xampp agent has appended
/opt/lampp/bin onto the end of the my path/

[-----------------
echo $PATH|tr ':' '\n'
.
/home/lh/bin
/usr/local/sbin
/usr/local/bin
/usr/sbin
/usr/bin
/sbin
/bin
/usr/games
/opt/lampp/bin

env |grep PATH
001 MANDATORY_PATH=/usr/share/gconf/default.desktop.mandatory.path
002 DEFAULTS_PATH=/usr/share/gconf/default.desktop.default.path
003 WINDOWPATH=8
004 PATH=.:/home/lh/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
:/usr/games:/opt/lampp/bin
005 LIBGL_DRIVERS_PATH=/usr/lib/fglrx/dri:/usr/lib/x86_64-linux-gnu/dri:/usr/lib/dri
:/usr/lib32/fglrx/dri:/usr/lib/i386-linux-gnu/dri
]-----------------

[-------------------------------
here is the raw path, what i get with root

sudo cat /etc/environment
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games"

-------------------------------
but there is no lampp bin for root like there is for my usr shell
I could make it so by hacking /etc/environment
carefully to make sure "/opt/lampp.bin" does not end up in the path twice.
sudo -i sh -c env
001 SUDO_GID=1000
002 MAIL=/var/mail/root
003 USER=root
004 SHLVL=1
005 HOME=/root
006 COLORTERM=mate-terminal
007 SUDO_UID=1000
008 LOGNAME=root
009 _=/bin/sh
010 TERM=dumb
011 USERNAME=root
012 PATH=.:/home/lh/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
013 DISPLAY=:0.0
014 LANG=en_US.UTF-8
015 XAUTHORITY=/home/lh/.Xauthority
016 SUDO_COMMAND=/bin/bash -c sh -c env
017 SHELL=/bin/bash
018 SUDO_USER=lh
019 PWD=/root
]--------------------------------------------
lch
 
Posts: 8
Joined: 04. June 2015 19:14
Operating System: linux mint 13 mate desktop

Re: php version too small (5.3.10) for drush - need to upgra

Postby Nobbie » 16. June 2015 13:32

lch wrote:but what mysterious xampp agent has appended
/opt/lampp/bin onto the end of the my path/


Either the Bitnami Installer (what i dont think), or simply yourself (maybe months ago and you simply forgot it).
Nobbie
 
Posts: 13165
Joined: 09. March 2008 13:04


Return to PHP

Who is online

Users browsing this forum: No registered users and 45 guests