Afrobot » PHP http://afrobot.com Parse the time away Tue, 09 Sep 2008 10:59:28 +0000 http://wordpress.com/ en hourly 1 http://www.gravatar.com/blavatar/beaba5d4ba6f2f6b2b62cf0596ed3384?s=96&d=http://s.wordpress.com/i/buttonw-com.png Afrobot » PHP http://afrobot.com error: specifies multiple packages http://afrobot.com/2007/01/14/error-specifies-multiple-packages/ http://afrobot.com/2007/01/14/error-specifies-multiple-packages/#comments Sun, 14 Jan 2007 23:57:57 +0000 imkite http://afrobot.com/2007/01/14/error-specifies-multiple-packages/ ]]>

It seems as though there are issues with corrupt MySQL rpm’s in CentOS 4. I do not think this is the case for every install; Because, I know personally this was the first time I have ever ran across this issue and, I have installed CentOS a number of times before without any such problem.

However, today while trying to install the MySQL library gem I ran into problems when it tried to compile the source.

[afro@putz src]# sudo gem install mysql
Select which gem to install for your platform (x86_64-linux)
1. mysql 2.7.3 (mswin32)
2. mysql 2.7.1 (mswin32)
3. mysql 2.7 (ruby)
4. mysql 2.6 (ruby)
5. mysql 2.5.1 (ruby)
6. Cancel installation
> 3
Building native extensions. This could take a while...
*** extconf.rb failed ***

I was confused by this because everything seemed to be in working order. Initially I thought it might not be looking in the right place for the mysql library. I eventually gave up trying to include the correct location of the mysql libraries and, started to become weary of MySQL. Even though I was able to make a connection to the server; Something didn’t seem to be right.

I decided I would recompile PHP to see if it had any problems with the installed mysql rpm’s. Once everything was completed I was a little confused because, PHP didn’t seem to have a problem recognizing the lib’s.

Until, I received the most unusual error message:

[afro@putz src]# php -v
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php4/mysql.so' - /usr/lib64/php4/mysql.so: undefined symbol: empty_string in Unknown on line 0 =: Unable to initialize
Module compiled with module API=20020429, debug=0, thread-safety
PHP 5.2.0 (cli) (built: Jan 14 2007 16:18:28)
Copyright (c) 1997-2006 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2006 Zend Technologies[afro@putz src]#

So, I figured something wasn’t right and, downloaded the mysql rpm’s from one of the CentOS mirrors. This is when I ran into another problem. Even though this one wasn’t so unusual but, as equally frustrating.

[afro@putz sql]# rpm -Uvh mysqlclient10-3.23.58-4.RHEL4.1.x86_64.rpm
Preparing...                ########################################### [100%]
package mysqlclient10-3.23.58-4.RHEL4.1 is already installed
file /usr/lib64/mysql/libmysqlclient.so.10.0.0 conflicts with mysqlclient10-3.23.58-4.RHEL4.1
[afro@putz sql]# rpm -e mysqlclient10-3.23.58-4.RHEL4.1
error: "mysqlclient10-3.23.58-4.RHEL4.1" specifies multiple packages
[afro@putz sql]# rpm -e mysqlclient10-3.23.58-4.RHEL4.1 && rpm -e mysqlclient10-3.23.58-4.RHEL4.1
error: "mysqlclient10-3.23.58-4.RHEL4.1" specifies multiple packages
[afro@putz sql]# rpm -e mysqlclient10-3.23.58-4.RHEL4.1 ; rpm -e mysqlclient10-3.23.58-4.RHEL4.1
error: "mysqlclient10-3.23.58-4.RHEL4.1" specifies multiple packages
error: "mysqlclient10-3.23.58-4.RHEL4.1" specifies multiple packages

I have had this happen before and, every time it happens I will always forget what I did to fix the problem. So, I started looking around on Google and, finally found the solution.

[afro@putz sql]# rpm -e --nodeps --allmatches mysqlclient10-3.23.58-4.RHEL4.1
[afro@putz sql]#

So try using that command when rpm gives you multiple package errors.

 

Technorati Tags:

]]>
http://afrobot.com/2007/01/14/error-specifies-multiple-packages/feed/ 3 imkite
cpanel developers http://afrobot.com/2007/01/07/cpanel-developers/ http://afrobot.com/2007/01/07/cpanel-developers/#comments Sun, 07 Jan 2007 09:58:16 +0000 imkite http://afrobot.com/2007/01/07/cpanel-developers/ ]]>

I think everyone is sick of having to checkout the Support Forums to get insight about updates, release dates, things of that nature.

Can we get a Blog please? I think everyone has waited long enough.

Apache 2… How about it? Anyday now?

Technorati Tags:

]]>
http://afrobot.com/2007/01/07/cpanel-developers/feed/ 0 imkite
using the __construct() method http://afrobot.com/2006/10/31/using-the-__construct-method/ http://afrobot.com/2006/10/31/using-the-__construct-method/#comments Tue, 31 Oct 2006 03:16:28 +0000 imkite http://afrobot.com/2006/11/01/using-the-__construct-method/ ]]>

This is an example of how the __construct() method can be used to set variable values from another file.

Create a file called config.php, then add the following:

<?php

$sql['host'] = ‘host’;

$sql['name'] = ‘name’;

$sql['user'] = ‘user’;

$sql['pass'] = ‘pass’;

?>

Now create a file named simClass.php, add:

<?php

include ‘config.php’;

class sqlMngr {

public $conf = array();

public function __construct() {

global $sql; // I forgot this originally.

$conf['host'] = $sql['host'];

$conf['name'] = $sql['name'];

$conf['user'] = $sql['user'];

$conf['pass'] = $sql['pass'];

}

}

$obj = new sqlMngr();

print_r($obj->conf);

?>

]]>
http://afrobot.com/2006/10/31/using-the-__construct-method/feed/ 2 imkite
php_value http://afrobot.com/2006/10/30/php_value/ http://afrobot.com/2006/10/30/php_value/#comments Mon, 30 Oct 2006 09:22:09 +0000 imkite http://afro.wordpress.com/2006/10/30/php_value/ ]]>

This will only work within Apache 2 or else you are screwed. I wasted my whole day on this problem because the article about the Zend Framework did not mention this.If you using Apache 2 having trouble you should make sure

<IfModule mod_php5.c>

php_value the_setting “the_value”

</IfModule>

Is included within your .htaccess or httpd.conf. This was another detail left out of the article.

]]>
http://afrobot.com/2006/10/30/php_value/feed/ 0 imkite