PHP Upgrade issues : Plesk / Redhat 4


PHP Upgrade issues : Plesk / Redhat 4

I was trying to upgrade the PHP version to php5 on a Redhat 4 server with Plesk 8.4 but had many issues, as the redhat mirrors do not have PHP5. PHP5 is available with Redhat 5. I used atomicrocketturtle repository for the installation, here is a guide for the upgrades http://www.atomicorp.com/wiki/index.php/PHP

I then tried the wiki but got errors for up2date

#  up2date php –dry-run
Unresolvable chain of dependencies:
php-domxml-4.3.9-3.22.12 requires php = 4.3.9-3.22.12
php-pear-4.3.9-3.22.12 requires php = 4.3.9-3.22.12
php-sqlite2-1.0.2-200608291859 requires php <= 4.4.0

Later I used yum which too gave me errors for php-pdo and php-xml :

# yum update php
Error: Missing Dependency: php-common = 5.2.5-3.el4.art is needed by package php-pdo

I fixed that error by installing php-pdo

# yum install php-pdo
# yum update php
Error: Missing Dependency: php-common = 5.2.5-3.el4.art is needed by package php-xml
# yum install php-xml

You need to modify the php.ini for the module path, the upgrade will not modify the path to php5

Edit the php.ini to one as below :

; Directory in which the loadable extensions (modules) reside.
;extension_dir = /usr/lib/php4
extension_dir = /usr/lib/php/modules

Now I had previously ioncube installed on the php4 which throwed errors 🙁

# php -v
Failed loading /usr/lib/php4/php_ioncube_loader_lin_4.3.so:
/usr/lib/php4/php_ioncube_loader_lin_4.3.so: undefined symbol: zend_hash_add_or_update

PHP 5.2.6 (cli) (built: May  2 2008 11:18:31)
Copyright (c) 1997-2008 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies
with Zend Extension Manager v1.2.2, Copyright (c) 2003-2007, by Zend Technologies
with Zend Optimizer v3.3.3, Copyright (c) 1998-2007, by Zend Technologies

I installed ioncube loader for php5 using :

# yum install php-ioncube-loader

Still the error was same, I debugged a  lot and found that there was ioncube_loader config file under php.d

# ls /etc/php.d | grep ioncube
ioncube.ini
ioncube-loader.ini

I removed the file ioncube-loader.ini which was for php4 and fixed the upgrade problems.

#  php -v
PHP 5.2.6 (cli) (built: May  2 2008 11:18:31)
Copyright (c) 1997-2008 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies
with the ionCube PHP Loader v3.1.32, Copyright (c) 2002-2007, by ionCube Ltd., and
with Zend Extension Manager v1.2.2, Copyright (c) 2003-2007, by Zend Technologies
with Zend Optimizer v3.3.3, Copyright (c) 1998-2007, by Zend Technologies


Hope this helps anyone in mess 🙂

DNS Cache Poisoning Test


Q. How do I verify that my ISP or my own recursive resolvers are free from DNS cache poisoning bug that is promised full disclosure of the flaw by Dan on August 7 at the Black Hat conference? How do I test my dns server for DNS cache pollution or DNS Cache Poisoning bug?

A. DNS cache poisoning (also known as DNS cache pollution) is a maliciously created or unintended situation that provides data to a Domain Name Server that did not originate from authoritative DNS sources. It occur if DNS “spoofing attack” has been encountered. An attacker will send malicious data / non-secure data in response to a DNS query. For example dns query for www.linuxbabu.net can be redirected to www.redhat.com.

how do I find out if my DNS server is open to such attack or not?

Visit Dan Kaminsky java script page to check your DNS

You can also use following command dig command, enter:
$ dig +short @{name-server-ip} porttest.dns-oarc.net txt
$ dig +short @ns1.example.com porttest.dns-oarc.net txt
$ dig +short @208.67.222.222 porttest.dns-oarc.net txt
Sample output:

z.y.x.w.v.u.t.s.r.q.p.o.n.m.l.k.j.i.h.g.f.e.d.c.b.a.pt.dns-oarc.net.
"208.67.222.222 is GOOD: 26 queries in 0.1 seconds from 26 ports with std dev 17746.18"

Another test,
$ dig +short @125.22.47.125 porttest.dns-oarc.net txtOutput:

z.y.x.w.v.u.t.s.r.q.p.o.n.m.l.k.j.i.h.g.f.e.d.c.b.a.pt.dns-oarc.net.
"125.22.47.139 is POOR: 42 queries in 8.4 seconds from 1 ports with std dev 0.00"


FIX :

Run yum update
yum updateOpen named.conf file and comment out following two lines:
query-source port 53;
query-source-v6 port 53;
Make sure recursion is limited to your LAN only. Set ACL. Restart bind to take effect:
rndc reload 

service named restart


Mailbox unavailable or not local error messages – Plesk

If you receive this error when adding a domain:

Unable to send notification: mail() failed: SMTP server response: 550 Requested action not taken: mailbox unavailable or not local

then you need to add a valid mailbox to your Plesk admin setup. To resolve this issue log into Plesk and click on:

Server
Edit (under personal information)
Replace the email address with a valid, working address.

Keep in mind this error shouldn’t prohibit you from creating a site, it is just notifying you that the “site created” email will not be sent.

How to add GD support to PHP on a Linux server with Plesk

Adding GD graphic libraries support to php on your linux server with Plesk is relatively simple.

First, log into your server using ssh to get to a command line prompt.

Second, type the following command to install a version of php with GD support:

up2date php-gd

Third, restart your web service with this command:

service httpd restart

That is it. Your web server is now runing php with GD.

How do I retrieve the Plesk control panel password?

You can always get the Plesk password if you have Administrative access to the server. If you have also lost administrative access to the server, refer to [How do I reset the password on my server]

For Windows,

1. From the Start menu, select Run.
2. Enter the following command:
“C:\Program Files\SWsoft\Plesk\admin\bin\plesksrvclient.exe” -get

For Linux,
1. Via SSH, run the following command:
cat /etc/psa/.psa.shadow

How to install Zend Optimizer with the (IonCube) Loader? (RHEL, Plesk)

How to install Zend Optimizer with the (IonCube) Loader?

  1. wget http://downloads.zend.com/optimizer/3.3.3/ZendOptimizer-3.3.3-linux-glibc23-i386.tar.gz
  2. tar zxvf ZendOptimizer-3.3.3-linux-glibc23-i386.tar.gz
  3. cd ZendOptimizer-3.3.3-linux-glibc23-i386
  4. php -v (Check php version note it down)
  5. php -i | grep php.ini (note down the php.ini path)
  6. httpd -v (Check version)
  7. ./install
  8. After the above it will prompt for various path of apache, php
  9. php -v (if it gives error) “PHP Fatal error: [ionCube Loader] The Loader must appear as the first entry in the php.ini file in Unknown on line 0”
  10. Comment the zend in php.ini
  11. nano -w /etc/php.ini
  12. #[Zend]
    #zend_extension=/usr/local/Zend/lib/ZendExtensionManager.so
    #zend_extension_ts=/usr/local/Zend/lib/ZendExtensionManager_TS.so
    #zend_extension_manager.optimizer=/usr/local/Zend/lib/Optimizer-3.3.3
    #zend_extension_manager.optimizer_ts=/usr/local/Zend/lib/Optimizer_TS-3.3.3 
    #zend_optimizer.version=3.3.3
  13. Make a zend.ini in /etc/php.d/ directory
  14. copy the zend so to it
  15. [Zend]
    zend_extension_manager.optimizer=/usr/local/Zend/lib/Optimizer-3.3.3
    zend_extension_manager.optimizer_ts=/usr/local/Zend/lib/Optimizer_TS-3.3.3
    zend_optimizer.version=3.3.3
    zend_extension=/usr/local/Zend/lib/ZendExtensionManager.so
    zend_extension_ts=/usr/local/Zend/lib/ZendExtensionManager_TS.so
  16. restart httpd | /etc/init.d/httpd restart
  17. check the if it is loaded or not php -v
  18. [root@rshagrawal php.d]# php -v
    PHP 4.3.9 (cgi) (built: Sep 12 2007 11:09:31)
    Copyright (c) 1997-2004 The PHP Group
    Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies
    with the ionCube PHP Loader v3.1.16, Copyright (c) 2002-2006, by ionCube Ltd., and
    with Zend Extension Manager v1.2.2, Copyright (c) 2003-2007, by Zend Technologies
    with Zend Optimizer v3.3.3, Copyright (c) 1998-2007, by Zend Technologies

Thats all you are done.

=======================
Reference ::

http://kb.swsoft.com/en/631

 

Need Assistance with nominal fee contact [email protected]

Service Unavailable error message on a server with Plesk Windows

Plesk Error : Service Unavailable

Error under Event Viewer :

The identity of application pool ‘PleskControlPanel’ is invalid, so the World Wide Web Publishing Service can not create a worker process to serve the application pool. Therefore, the application pool has been disabled.

Try Plesk Reconfigurator > Repair Plesk Installation with checked option Plesk Services this fixed the issue which I faced.

Plesk – Cannot FTP to a domain after its physical hosting has been recreated

1. Physical hosting on a domain had been removed.

2. Then it was recreated using the same FTP user name.

3. After that it’s impossible to login by ftp to the domain, the FTP server returns an error:

530 User fp1 cannot log in, home directory inaccessible.
CAUSE
IIS cache causes this problem.
RESOLUTION
Here is two possible ways to resolve:

1. Clean up IIS FTP service cache. To reset FTP cache restart IIS FTP service

net stop MSFTPSvc
net start MSFTPSvc

2. Disable IIS FTP cache. To completely disable caching set the following parameter:

HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\InetInfo\Parameters\DisableMemoryCache DWORD 1