Control Web Panel

WebPanel => PHP => Topic started by: Bernie on November 02, 2015, 11:27:25 AM

Title: Problem switching to PHP 5.4.45
Post by: Bernie on November 02, 2015, 11:27:25 AM
After switching to PHP 5.4.45 CWP Dashboard says itīs Version 5.4.45 installed.

info.php however says itīs still Version 5.4.27

Checking rebuild.log shows following:

cp: cannot stat `sapi/cli/php.1': No such file or directory
make: *** [install-cli] Error 1

This relates to php Bug #66842.

Any solution?

Thank you,
Bernie
Title: Re: Problem switching to PHP 5.4.45
Post by: Administrator on November 02, 2015, 06:14:32 PM
are you certain that you are not using php selector ?
Title: Re: Problem switching to PHP 5.4.45
Post by: Bernie on November 02, 2015, 06:25:48 PM
Sure am I sure.

Iīm using PHP Version Switcher to PHP 5.4.45 (recommended)  after upgrade to CWP Version 0.9.8.10 :)
Title: Re: Problem switching to PHP 5.4.45
Post by: Igor S. on November 03, 2015, 10:09:07 AM
Hello.

Check the rebuild log file, last 20-40 lines. It is should have some errors.
I guess you should to install some rpm package.
Title: Re: Problem switching to PHP 5.4.45
Post by: Bernie on November 03, 2015, 11:00:06 AM
Thank you for your help  :)

Cannot find any error messages in log at all (except the mentioned). Here the last lines of log

***

-lz -lm -lcrypt -lxml2 -lz -lm -lxml2 -lz -lm -lxml2 -lz -lm -lxml2 -lz -lm -lxslt -lxml2 -lz -lm -lcrypt  -o sapi/cgi/php-cgi
Generating phar.php
Generating phar.phar
PEAR package PHP_Archive not installed: generated phar will require PHP's phar extension be enabled.
directorytreeiterator.inc
directorygraphiterator.inc
invertedregexiterator.inc
clicommand.inc
pharcommand.inc
phar.inc

Build complete.
Don't forget to run 'make test'.

Make DONE!
####################
Installing PHP CLI binary:        /usr/local/bin/
Installing PHP CLI man page:      /usr/local/php/man/man1/
cp: cannot stat `sapi/cli/php.1': No such file or directory
make: *** [install-cli] Error 1
Make Install DONE!
####################
PHP Rebuild Completed
#########################

***

Hope it tells you more than me ...

Bernie
Title: Re: Problem switching to PHP 5.4.45
Post by: Igor S. on November 03, 2015, 12:14:44 PM
Hi,

I had same troubles, but PHP version have been switched.
Title: Re: Problem switching to PHP 5.4.45
Post by: Bernie on November 08, 2015, 10:53:42 AM
Meanwhile I figured it has to do with suPHP and php-cgi.

Iīm wondering my /usr/local/bin/php-config states version 5.4.27 instead of 5.4.45

Any suggestions on how to solve that?

Thanks
Bernie
Title: Re: Problem switching to PHP 5.4.45
Post by: zakrpa on November 09, 2015, 09:33:25 AM
have same issue and same errors strange...

php info:
PHP Version => 5.4.27

CWP:
You are running PHP version: 5.4.45

Shell command:
[root@srv1 ~]# php --version
PHP 5.4.45 (cli) (built: Nov  9 2015 10:31:22)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2014 Zend Technologies

Same log as mentioned before:
Generating phar.php
Generating phar.phar
PEAR package PHP_Archive not installed: generated phar will require PHP's phar extension be enabled.
clicommand.inc
directorytreeiterator.inc
invertedregexiterator.inc
directorygraphiterator.inc
pharcommand.inc
phar.inc

Build complete.
Don't forget to run 'make test'.

Make DONE!
####################
Installing PHP CLI binary:        /usr/local/bin/
Installing PHP CLI man page:      /usr/local/php/man/man1/
cp: cannot stat `sapi/cli/php.1': No such file or directory
make: *** [install-cli] Error 1
Make Install DONE!
####################
PHP Rebuild Completed
#########################
Title: Re: Problem switching to PHP 5.4.45
Post by: Farukh Khan on November 09, 2015, 11:27:57 AM
Same problem here too. Two PHP version shows at my CWP phpinfo(). I just rebuild my PHP to 5.4.45 using PHP version switcher but still the same problem. Showing 5.4.45 and also 5.4.27.
Title: Re: Problem switching to PHP 5.4.45
Post by: zakrpa on November 09, 2015, 11:36:53 AM
well I have new problem now :) trying to fix those smal problems now I have or not have one bigger :)

tested how its working with 5.5.30 everything goes ok and reversed to 5.4.45 becouse one of my sites works with older joomla.

CWP:
PHP Info
You are running PHP version: 5.4.45
Warning: file_get_contents(http://127.0.0.1/phpinfo.php): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in /usr/local/cwpsrv/htdocs/resources/admin/modules/php_info.php(1) : eval()'d code(1) : eval()'d code on line 3
phpinfo()
PHP Version => 5.4.27

but my website joomla says its 5.5.30

and its dead :D
Title: Re: Problem switching to PHP 5.4.45
Post by: zakrpa on November 09, 2015, 01:23:50 PM
Ok this is last info I managed to make all working for now but seems there are some bugs because I really don't change settings often.

I compiled and installed php 5.5.30

PHP Version Switcher - You are running PHP version: 5.5.30 this seems ok

PHP info shows me this:

You are running PHP version: 5.5.30
Warning: file_get_contents(http://127.0.0.1/phpinfo.php): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in /usr/local/cwpsrv/htdocs/resources/admin/modules/php_info.php(1) : eval()'d code(1) : eval()'d code on line 3
phpinfo()
PHP Version => 5.4.27


Next problem appear when I tried to downgrade php to 5.4.45 which is recommended. Seems my clients didn't changed php... php info on client side show me its 5.5.30 so my friends site stopped to work because old joomla platform.
Tried to install older versions via php selector options without success. nothing happens and my logs are empty.
At the end I searched fix for myself and found scripts which CWP try to download and execute to install. Scripts are saved in folder /usr/local/src and then I executed them manually.

I installed 2 versions older for that joomla platform:
PHP 5.3 Installed    [Edit Flags] [Reset Flags] [list Modules]
PHP 5.4 Installed    [Edit Flags] [Reset Flags] [list Modules]

seems that php 5.4 gives some internal server errors (don't know why worked before fine on same joomla and php) but on 5.3 works fine with htaccess edited like showed in wiki tutorial.

I will try to figure out why my CWP did not do downgrade and why my php selector did not work.. Seems my logs are clean without any error and seems like CWP just downloaded scripts in that folder without execution.

Sorry for bad English and long post.
Hope so this information will help someone.

Regards
[/list][/list]
Title: Re: Problem switching to PHP 5.4.45
Post by: Bernie on November 16, 2015, 07:29:02 PM
Very disapointing, noone takes care about this issue. Do only 4 users have the problem?
Title: Re: Problem switching to PHP 5.4.45
Post by: zakrpa on November 16, 2015, 07:59:55 PM
well for now I don't care about info pages.
3 different information pages gives 3 different info's. I only hope so there is no some kind of security issue. But I figure it out how to install different versions manually, that fixed my problem with old joomla page.

don't think that only few of us have that problem maybe others didn't notice it yet or maybe someone put spell on us :D
Title: Re: Problem switching to PHP 5.4.45
Post by: erntesky on November 21, 2015, 05:30:51 PM
Really the same problem... Main PHP version: 5.4.45, PHP Selector version: PHP 5.4.35... How to fix it?
Title: Re: Problem switching to PHP 5.4.45
Post by: Administrator on November 21, 2015, 11:19:11 PM
looks like this is an issue with newer php versions not having linux coding standards, we have updated php build scripts so now it should be working.
Title: Re: Problem switching to PHP 5.4.45
Post by: erntesky on November 22, 2015, 07:29:36 AM
Sounds good... So I have to recompile the php with "PHP Version Switcher" and will be show the right php version everywhere? I already recompile the php and still shown different php versions...

Dashboard/Application Version/PHP version: 5.4.45
PHP Settings/PHP Info/You are running PHP version: 5.4.45
PHP Settings/PHP Info/PHP Version 5.6.14
PHP Settings/PHP Info/phpinfo() PHP Version => 5.4.27
PHP Settings/PHP Selector/PHP 5.4 Installed/[list Modules]/PHP 5.4.35
PHP Settings/PHP Selector/PHP 5.6 Installed/[list Modules]/PHP 5.6.3
...[/list][/list]
Title: Re: Problem switching to PHP 5.4.45
Post by: Bernie on November 22, 2015, 09:28:01 AM
Itīs working for me,

Thanks :)
Title: Re: Problem switching to PHP 5.4.45
Post by: Administrator on November 22, 2015, 09:24:19 PM
Sounds good... So I have to recompile the php with "PHP Version Switcher" and will be show the right php version everywhere? I already recompile the php and still shown different php versions...


You need to recompile all versions you have
Title: Re: Problem switching to PHP 5.4.45
Post by: erntesky on November 23, 2015, 07:32:31 AM
How to recompile all versions, what is the best way?
Title: Re: Problem switching to PHP 5.4.45
Post by: erntesky on January 01, 2016, 11:31:21 PM
Anybody know how to recompile / reinstall all php versions in "PHP Selector" ? ???
Title: Re: Problem switching to PHP 5.4.45
Post by: zakrpa on January 02, 2016, 12:17:09 PM
hi,
this should work:

1. Install Dependencies
2. check php version which you need to compile / recompile or install
3. click start compiler at the bottom list

regards
Title: Re: Problem switching to PHP 5.4.45
Post by: erntesky on January 02, 2016, 03:07:06 PM
I already tried, but is not working for me... The log in the console "tail -f /var/log/php-selector-rebuild.log" show me the installation is done, but that is not the fresh installation. The log show me the first installation, so reinstall / recompile is not start! How can I fix it, or recompile all my php versions in "php selector"?
Title: Re: Problem switching to PHP 5.4.45
Post by: zakrpa on January 02, 2016, 04:28:04 PM
did you read this post and try to find scripts like me...
I had same issue without any logs or like that...

this is post

http://forum.centos-webpanel.com/php/problem-switching-to-php-5-4-45/msg4767/#msg4767

there is path where scripts are downloaded I executed them manually seems it works...

try and let us know...
Title: Re: Problem switching to PHP 5.4.45
Post by: erntesky on January 02, 2016, 05:19:43 PM
I tried before but not seen any "updated" scripts... The scripts included with the older php versions... I don't know why, or whats happened but I checked again the "/usr/local/src" location and find the updated scripts. I started the scripts and its works! Thanks for your help!!! :)

From the "PHP Selector", PHP5.4 - PHP5.5 - PHP5.6 are missing the following:

[Zend Modules]
the ionCube PHP Loader (enabled) + Intrusion Protection from ioncube24.com (unconfigured)

How can I add to .configure?
Title: Re: Problem switching to PHP 5.4.45
Post by: zakrpa on January 02, 2016, 05:36:06 PM
well didnt check where are php.ini files of this additional versions have to check and let you know but you can configure / edit flags before executing scripts in php selector and see does it works..

glad it works I spent whole day figuring out whats the problem but not to broke server...

let us know does edit flags works :)
Title: Re: Problem switching to PHP 5.4.45
Post by: erntesky on January 02, 2016, 05:51:27 PM
Yeah, its working and I so happy... Thank you again!!! :)

I already configured few flags, but I really don't know how to add fow show the following:

[PHP Modules]
geoip (I figured out with secondary php.ini but I want add automatic...)
iconv (That is shown and added by "--with-iconv")
ionCube Loader (What is the config for that?)

[Zend Modules]
the ionCube PHP Loader (enabled) + Intrusion Protection from ioncube24.com (unconfigured)

That things is already shown by the main php, but I really don't know how to add to "php selector" all php versions?
Title: Re: Problem switching to PHP 5.4.45
Post by: TheRavenKing on February 17, 2017, 04:54:47 PM
@ erntesky,
Hiya, did you find out how to add the IonCube Loader in any of the php versions with php selector, when adding it manual in the php ini file I get an 500 error...

Without adding in the 5.6 php.ini file I get this:
ionCube Loader
Status: Run-time loading should be possible on your system but no suitable Loader was found.
Instructions: The Loader for Linux (PHP 5.6) is required.

After compiling add:
echo "zend_extension = /usr/local/sourceguardian/ixed.5.6.lin" >> /opt/alt/php56/usr/php/php.ini
echo "zend_extension = /usr/local/ioncube/ioncube_loader_lin_5.6.so" >> /opt/alt/php56/usr/php/php.ini

500