Restoring VZRESTORE to a different IP

Community support for Plesk, CPanel, WebMin and others with insight from two of the founders of Plesk. Ask for help here! No question is too simple or complicated. :-)
faris
Long Time Forum Regular
Long Time Forum Regular
Posts: 2321
Joined: Thu Dec 09, 2004 11:19 am

Re: Restoring VZRESTORE to a different IP

Unread post by faris »

Again back to php -- remember there's no Zend Optimizer in 5.3. Only Zend Guard Loader. So you won't be seeing Zend Optimizer 3.3.3 listed in phpinfo(). Not going to happen.

VZ: Yes, absolutely you can backup to the same node and restore from that backup. I do it all the time. I have lost count how many times I did it for migration tests in the past 2 months: create nice Container with Plesk installed. Backup to same node. Do migration test. Play around. Restore to clean backup. Test again. Rince and Repeat. Ido all this on the same node because it is a little faster.

Note that when possible, the backup should be with the Container down. However, I have never had any problems doing a backup and restoring from that backup with the container up. Also note that I *ALWAYS* use vzAbackup under VZ4. There are those who prefer vzbackup. There are also those who say vzAbackup is unreliable. YMMV.
--------------------------------
<advert>
If you want to rent a UK-based VPS that comes with friendly advice and support from a fellow ART fan, please get in touch.
</advert>
KrazyBob
Forum Regular
Forum Regular
Posts: 310
Joined: Mon Mar 19, 2007 3:47 pm

Re: Restoring VZRESTORE to a different IP

Unread post by KrazyBob »

Thank you, Faris! I expect to see things to deal with and I appreciate knowing ahead of time to remove the bottom portion of php.ini. I know that section as a troublemaker already!

I am running:

vzabackup localhost -e 113

and it appears to be backing up the container locally.
KrazyBob
Forum Regular
Forum Regular
Posts: 310
Joined: Mon Mar 19, 2007 3:47 pm

Re: Restoring VZRESTORE to a different IP

Unread post by KrazyBob »

It's currently at PHP 5.3.3 and no entires in php.ini for Zend. I have not run yum yet. But I did get a good backup.
KrazyBob
Forum Regular
Forum Regular
Posts: 310
Joined: Mon Mar 19, 2007 3:47 pm

Re: Restoring VZRESTORE to a different IP

Unread post by KrazyBob »

Oh n. Is this what a normal backup looks like now? No tar?

Code: Select all

[root@hw006 af028e8e-aa6f-7347-90dd-68ef49ba0b14]# cd 20120620220028
[root@hw006 20120620220028]# ls -lah
total 18G
drwxr-xr-x 2 root root 4.0K Jun 20 16:51 .
drwxr-xr-x 3 root root 4.0K Jun 20 15:00 ..
-rw-r--r-- 1 root root  720 Jun 20 16:51 backup.dat
-rw-r--r-- 1 root root 1.5K Jun 20 16:51 info
-rw-r--r-- 1 root root 5.6K Jun 20 16:51 metadata
-rw-r--r-- 1 root root  18G Jun 20 16:51 private.ti
KrazyBob
Forum Regular
Forum Regular
Posts: 310
Joined: Mon Mar 19, 2007 3:47 pm

Re: Restoring VZRESTORE to a different IP

Unread post by KrazyBob »

This is what I was afraid of. I imagine the fix is easy but I don't recall what the fix was. I've seen it before.

Code: Select all

PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/sqlite3.so' - /usr/lib64/php/modules/sqlite3.so: undefined symbol: sqlite3_stmt_readonly in Unknown on line 0
PHP 5.3.14 (cli) (built: Jun 14 2012 16:34:56) 
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies
    with the ionCube PHP Loader v4.0.10, Copyright (c) 2002-2011, by ionCube Ltd., and
    with Zend Guard Loader v3.3, Copyright (c) 1998-2010, by Zend Technologies
KrazyBob
Forum Regular
Forum Regular
Posts: 310
Joined: Mon Mar 19, 2007 3:47 pm

Re: Restoring VZRESTORE to a different IP

Unread post by KrazyBob »

Zend Optimizer not installed

This file was encoded by the Zend Guard. In order to run it, please install the Zend Optimizer (available without charge), version 3.0.0 or later.
Seeing this message instead of the website you expected?
Shouldn't we have installed php-zend and not just Guard? I'm getting lost and approaching my paygrade. I read your warning that I would not see it, so then how do I get rid of the

ZEND OPTIMIZER NOT INSTALLED warning? It is freaking my customer out.
faris
Long Time Forum Regular
Long Time Forum Regular
Posts: 2321
Joined: Thu Dec 09, 2004 11:19 am

Re: Restoring VZRESTORE to a different IP

Unread post by faris »

OK, my suggestion at this point, if you have not already done so, is to use the php.ini provided by 5.3 (probably saved as .rpmnew).

Using that as a starting point, adjust various settings (e.g. safe mode on, include path, upload limits etc) as were set in your old php.ini.

This is only if you've not done so already, obviously.

Code: Select all

php-common-5.3.14-6.el6.art.x86_64
php-mysql-5.3.14-6.el6.art.x86_64
php-xml-5.3.14-6.el6.art.x86_64
php-mcrypt-5.3.14-6.el6.art.x86_64
php-pear-db-1.7.13-2.el6.rf.noarch
php-zend-guard-loader-5.5.0-3.el6.art.x86_64
php-suhosin-0.9.33-1.el6.art.x86_64
php-cli-5.3.14-6.el6.art.x86_64
php-pdo-5.3.14-6.el6.art.x86_64
php-devel-5.3.14-6.el6.art.x86_64
php-gd-5.3.14-6.el6.art.x86_64
php-mbstring-5.3.14-6.el6.art.x86_64
php-imap-5.3.14-6.el6.art.x86_64
php-xmlrpc-5.3.14-6.el6.art.x86_64
php-pear-1.9.4-4.el6.noarch
php-ioncube-loader-4.0.10-1.el6.art.x86_64
php-eaccelerator-5.3.14_0.9.6.1-2.el6.art.x86_64
php-ldap-5.3.14-6.el6.art.x86_64
The packages above are what I have in all my installations.

The files below are in my php.d directory

Code: Select all

-rw-r--r--  1 root root    49 Jun 14 21:45 curl.ini
-rw-r--r--  1 root root    47 Jun 14 21:45 dom.ini
-rw-r--r--  1 root root  4615 Jun 15 19:29 eaccelerator.ini
-rw-r--r--  1 root root    57 Jun 14 21:45 fileinfo.ini
-rw-r--r--  1 root root    45 Jun 14 21:45 gd.ini
-rw-r--r--  1 root root    49 Jun 14 21:45 imap.ini
-rw-r--r--  1 root root    64 Jun 15 21:48 ioncube.ini
-rw-r--r--  1 root root    49 Jun 14 21:45 json.ini
-rw-r--r--  1 root root    49 Jun 14 21:45 ldap.ini
-rw-r--r--  1 root root    57 Jun 14 21:45 mbstring.ini
-rw-r--r--  1 root root    53 Jun 14 21:45 mcrypt.ini
-rw-r--r--  1 root root    53 Jun 14 21:45 mysqli.ini
-rw-r--r--  1 root root    51 Jun 14 21:45 mysql.ini
-rw-r--r--  1 root root    47 Jun 14 21:45 pdo.ini
-rw-r--r--  1 root root    59 Jun 14 21:45 pdo_mysql.ini
-rw-r--r--  1 root root    61 Jun 14 21:45 pdo_sqlite.ini
-rw-r--r--  1 root root    49 Jun 14 21:45 phar.ini
-rw-r--r--  1 root root    55 Jun 14 21:45 sqlite3.ini
-rw-r--r--  1 root root 20150 May 13 20:16 suhosin.ini
-rw-r--r--  1 root root    49 Jun 14 21:45 wddx.ini
-rw-r--r--  1 root root    59 Jun 14 21:45 xmlreader.ini
-rw-r--r--  1 root root    53 Jun 14 21:45 xmlrpc.ini
-rw-r--r--  1 root root    59 Jun 14 21:45 xmlwriter.ini
-rw-r--r--  1 root root    47 Jun 14 21:45 xsl.ini
-rw-r--r--  1 root root    57 Jun 15 21:48 zendguard.ini
-rw-r--r--  1 root root    47 Jun 14 21:45 zip.ini
sqlite3.ini contains:

Code: Select all

; Enable sqlite3 extension module
extension=sqlite3.so

sqlite3.so comes from php-pdo-5.3.14-6

Going to the Zend issue...there is no php-zend in the atomic repo - as far as I'm aware php-zend-guard-loader is it. Nothing more to load on the Zend-side.

I'm very much hoping you are working from a 5.1 or 5.2 php.ini and that using the 5.3 one may resolve the issue for you.

Otherwise would someone else PLEASE chime in with some other ideas?



My guess is that your sqlite problem may be down to the upgrade -- something from the old php installation is still there that 5.3 doesn't like.
--------------------------------
<advert>
If you want to rent a UK-based VPS that comes with friendly advice and support from a fellow ART fan, please get in touch.
</advert>
faris
Long Time Forum Regular
Long Time Forum Regular
Posts: 2321
Joined: Thu Dec 09, 2004 11:19 am

Re: Restoring VZRESTORE to a different IP

Unread post by faris »

One more thing I forgot to suggest KB!
There is a tiny, slight, very small, teeny-weeny possibility that php -v is not looking at /etc/php.ini so when you do a php -v you may not be getting the real picture.

Try:

php -v -c /etc/php.ini

EDIT: Makes no difference here -- I get same results.
--------------------------------
<advert>
If you want to rent a UK-based VPS that comes with friendly advice and support from a fellow ART fan, please get in touch.
</advert>
faris
Long Time Forum Regular
Long Time Forum Regular
Posts: 2321
Joined: Thu Dec 09, 2004 11:19 am

Re: Restoring VZRESTORE to a different IP

Unread post by faris »

And again, thinking about it, if you have an old php.ini then it may be trying to load things that should not be loaded, causing the Zend problem.
--------------------------------
<advert>
If you want to rent a UK-based VPS that comes with friendly advice and support from a fellow ART fan, please get in touch.
</advert>
KrazyBob
Forum Regular
Forum Regular
Posts: 310
Joined: Mon Mar 19, 2007 3:47 pm

Re: Restoring VZRESTORE to a different IP

Unread post by KrazyBob »

Thisn is getting crazy :)

Plesk 10.4.4 installed Centos 6 with PHP 5.3.3 as follows:

Code: Select all

CT-114-bash-4.1# php -v
PHP Warning:  Directive 'safe_mode' is deprecated in PHP 5.3 and greater in Unknown on line 0
PHP 5.3.3 (cli) (built: May  7 2012 20:13:47) 
Copyright (c) 1997-2010 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
    with the ionCube PHP Loader v4.0.7, Copyright (c) 2002-2011, by ionCube Ltd.
I made no changes until I yum installed Zend Guard and IONCube Loader. That's when the sqlite error occurred. I used old .ini files.

Starting first, sqlite files are loated here:

Code: Select all

[root@abbey ~]# locate sqlite.so
/usr/lib64/php/modules/pdo_sqlite.so
/usr/lib64/php-zts/modules/pdo_sqlite.so
/usr/lib64/qt4/plugins/sqldrivers/libqsqlite.so
/usr/lib64/sasl2/libsqlite.so
As I recall from the past adjustments need to be made. But I'll be damned if I remember. My prior notes from my own knowlegebase remind me (yes, I keep my own and it let's me help others later):
PHP - Updating IONCube Location & Zend Loader Location

yum install php-zend-gu*

-bash-3.2# vi /etc/php.d/ioncube.ini
; Enable ioncube extension module
zend_extension = /usr/lib64/php/ioncube/ioncube_loader_lin_5.3.so


The files are in /usr/lib64/php/ioncube/


Fixing the Zend Loader

#!/bin/bash
if [ -f /usr/lib64/php/ZendGuardLoader.so ]; then
mv /usr/lib64/php/ZendGuardLoader.so /usr/lib64/php/modules/ZendGuardLoader.so
fi
cat << EOF > /etc/php.d/zendguard.ini
zend_extension=/usr/lib64/php/modules/ZendGuardLoader.so
; Enables loading encoded scripts. The default value is On
zend_loader.enable=1
; Disable license checks (for performance reasons)
zend_loader.disable_licensing=0
; The Obfuscation level supported by Zend Guard Loader. The levels are detailed in the official Zend Guard Documentation. 0 - no obfuscation is enabled
zend_loader.obfuscation_level_support=3
; Path to where licensed Zend products should look for the product license. For more information on how to create a license file, see the Zend Guard User Guide
;zend_loader.license_path=
EOF
But I don't know about this on Centos 6.x and VZ4.

Keeping things simple I did nothing more than yum install as recommended.

I guess what it comes down to is fixing the sqlite errors. Then moving on to Zend.

Is Zend a casualty of the upgrade? No backwards compatibility? Hmm... I don't think so.

My daughter has cancer and we'll be at the hospital all day doing tests. If you all can help a struggling guy out it is appreciated. If I could afford a full time system admin. I'd hire one. But cancer is expensive. So I have to learn on the job, through your grace of helping a stranger out.

Bob
faris
Long Time Forum Regular
Long Time Forum Regular
Posts: 2321
Joined: Thu Dec 09, 2004 11:19 am

Re: Restoring VZRESTORE to a different IP

Unread post by faris »

Can someone else please chip in with some advice? I can't do this on my own.

KB - you've got some stuff going on here that's very confusing. It is causing me to slightly lose the plot.

So, we'd better get a few things straight before we proceed.

You mentioned in a PM that you had a container with a fresh install, and obviously there's also the container with the upgraded 5.1.6 to 5.3.14.

We need to stick to one or the other of these because I'm finding it difficult to tell which one we are talking about at any one time.

For example, in your last post you show a php -v where php 5.3.3 with IonCube loaded is installed. Is this is the stock Centos 6 version of php, and therefore the clean install? I thought it was, but then you mentioned using old .ini files, which implies it might be an upgrade. So I'm confused again.

[Incidentally, at one point you appeared to be confusing Zend Engine with Zend Optimizer a couple of times -- but maybe it was just a typo? When you see something that's version 2.3.0, that's the Zend Engine and is what you are supposed to have and will be there by default]

So let's stick to the upgraded container that went from 5.1.6 to 5.3.14.

That's the one with the sqlite3.so error and the one where people with ZendGuard/ZendEncoder-encoded code are seeing the worrying error message and therefore the one that's important as far as I can tell.


In that one, php -v from the command line gives you:

Code: Select all

PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/sqlite3.so' - /usr/lib64/php/modules/sqlite3.so: undefined symbol: sqlite3_stmt_readonly in Unknown on line 0
PHP 5.3.14 (cli) (built: Jun 14 2012 16:34:56) 
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies
    with the ionCube PHP Loader v4.0.10, Copyright (c) 2002-2011, by ionCube Ltd., and
    with Zend Guard Loader v3.3, Copyright (c) 1998-2010, by Zend Technologies
Note that in your last post you did a "locate sqlite.so" but the file in question is sqlite3.so. Also I don't know which system you did that locate on - fresh or upgraded.

If you look for sqlite3.so on an atomic 5.3.14 system it should look like this:

Code: Select all

# locate sqlite3.so
/usr/lib64/libsqlite3.so.0
/usr/lib64/libsqlite3.so.0.8.6
/usr/lib64/php/modules/sqlite3.so
/usr/lib64/php-zts/modules/sqlite3.so
/usr/lib64/python2.6/lib-dynload/_sqlite3.so
/usr/lib64/sw/sqlite37/libsqlite3.so.0
/usr/lib64/sw/sqlite37/libsqlite3.so.0.8.6
/var/asl/usr/lib64/php/modules/sqlite3.so
/var/asl/usr/lib64/php-zts/modules/sqlite3.so

#ls -al /usr/lib64/php/modules/sqlite3.so
-rwxr-xr-x 1 root root 48464 Jun 14 21:45 /usr/lib64/php/modules/sqlite3.so


As for ZendGuard....the output of php -v indicated Zend Guard Loader is loaded. So there should not be any Zend Guard errors from applications. But somehow your customers are getting them. I do not understand that.

Do you get the same output confirming ZendGuard is loaded when you look at a php page with phpinfo() in it on an actual website on the server?


Also take a look in /etc/php.d/ and look for things that are NOT in the list I posted or are older than the upgrade date.

For example, might there be a zend-optimizer.ini or something in there, trying to load something it shouldn't?

Is there an .ini in there that's trying to load a version of sqlite3.so that it shouldn't?

Finally, I don't suppose it is beyond the realms of possibility that your customer is using a script that's incompatible with 5.3 or that the script somehow doesn't work with the latest ZendGuard Loader.

The only thing that bothers me is that the RPM says "php-zend-guard-loader-5.5.0" while the ZendGuard Loader is listed as 3.3 in php -v (on my systems too -- this is not just yours). This may be perfectly normal, but seems a little odd to me.

*** You can always try installing the loader manually from the file you can download from the Zend website (but remove the rpm version first or at least make sure two aren't trying to be loaded).

I'm now at the end of my suggestion list - I've got nothing more. And this is taking far too long to do by posts and stuff and there's no guarantee anybody is going to be able to help in this way.

I think it would be far better to get someone to take a look at your system and resolve the problem for you. I can't imagine it will take an expert very long to figure out. And I'm not talking about me. Breun was offering professional services at one time, particularly related to Plesk. I don't know if he still does or if this comes under what his company is williing to do. The Promethius/Atomicorp guys know it all and then some, of course. There are undoubtedly others on the forum too.

Faris.
--------------------------------
<advert>
If you want to rent a UK-based VPS that comes with friendly advice and support from a fellow ART fan, please get in touch.
</advert>
breun
Long Time Forum Regular
Long Time Forum Regular
Posts: 2813
Joined: Sat Aug 20, 2005 9:30 am
Location: The Netherlands

Re: Restoring VZRESTORE to a different IP

Unread post by breun »

Zend Engine, Zend Optimizer and Zend Guard Loader are all totally different beasts. (And then there's also Zend Studio, Zend Server, Zend Unlimited, Zend DBi and maybe a couple more Zend things.)

Zend Optimizer is available for PHP versions up to PHP 5.2.x and was replaced with Zend Guard Loader for PHP 5.3.x and later. If your clients need to run applications that require Zend Optimizer to decode, then these applications won't work with PHP 5.3.x, since there is no version of Zend Optimizer which works with PHP 5.3.x or later.

Zend Guard Loader is not backwards compatible with Zend Optimizer, but can only decode applications which are encoded for use with Zend Guard Loader. If your clients can install a version of their encoded (usually commercial, closed source) application which is compatible with Zend Guard Loader, then they could upgrade their application and it would work with PHP 5.3 with Zend Guard Loader installed, but if that's such a version of their encoded applications is not available they can only run on older (unsupported, end of life) versions of PHP with Zend Optimizer.
Lemonbit Internet Dedicated Server Management
KrazyBob
Forum Regular
Forum Regular
Posts: 310
Joined: Mon Mar 19, 2007 3:47 pm

Re: Restoring VZRESTORE to a different IP

Unread post by KrazyBob »

I am sorry to have confused the issue. The server with PHP 5.2.16 and ZXend 3.3.3 is VZ3 and was shown as an example. Let's deal with just the VZ4 that appears the same no matter how I run it.

Code: Select all

CT-113-bash-4.1# php -v
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/sqlite3.so' - /usr/lib64/php/modules/sqlite3.so: undefined symbol: sqlite3_stmt_readonly in Unknown on line 0
PHP 5.3.14 (cli) (built: Jun 14 2012 16:34:56) 
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies
    with the ionCube PHP Loader v4.0.10, Copyright (c) 2002-2011, by ionCube Ltd., and
    with Zend Guard Loader v3.3, Copyright (c) 1998-2010, by Zend Technologies
It is odd that the older server has a new version of Zend but that's how it worked out.

So, I have a sqlite error and a Zend Engine error. I followed your very simple instruction, nothing more.
faris
Long Time Forum Regular
Long Time Forum Regular
Posts: 2321
Joined: Thu Dec 09, 2004 11:19 am

Re: Restoring VZRESTORE to a different IP

Unread post by faris »

The older server doesn't really have a newer version of ZendGuard.

On the old one, there was ZendOptimizer (3.3.3) and on the new one there's ZendGuard Loader (3.3). Different things but both enable php scripts encrypted/obfusticated/(or compiled or whatever it is) with ZendGuard to run.

OK, so this one with 5.3.14 that we are talking about and has the sqlite3.so problem was a fresh centos 6, no php installed at all (not even the stock one) and then all you did was "yum install php"? So fresh php.ini, fresh everything?

What php bits do you have (rpm -qa php-*)?
And does phpinfo() running on a php page in a website on this server show ZendGuard 3.3 is loaded?
--------------------------------
<advert>
If you want to rent a UK-based VPS that comes with friendly advice and support from a fellow ART fan, please get in touch.
</advert>
KrazyBob
Forum Regular
Forum Regular
Posts: 310
Joined: Mon Mar 19, 2007 3:47 pm

Re: Restoring VZRESTORE to a different IP

Unread post by KrazyBob »

CT-113-bash-4.1# rpm -qa php-*
php-cli-5.3.14-6.el6.art.x86_64
php-ioncube-loader-4.0.10-1.el6.art.x86_64
php-common-5.3.14-6.el6.art.x86_64
php-pdo-5.3.14-6.el6.art.x86_64
php-gd-5.3.14-6.el6.art.x86_64
php-zend-guard-loader-5.5.0-3.el6.art.x86_64
php-xml-5.3.14-6.el6.art.x86_64
php-imap-5.3.14-6.el6.art.x86_64
php-devel-5.3.14-6.el6.art.x86_64
php-mysql-5.3.14-6.el6.art.x86_64
php-mbstring-5.3.14-6.el6.art.x86_64
Post Reply