gentoo

phpmyadmin 3.x Fatal error: Class ‘ArrayObject’ not found in…

Today I tried to install phpmyadmin 3.1.x at gentoo and my pretty fresh php install did not run with this version.

After correct login to phpmyadmin I go:

Fatal error: Class ‘ArrayObject’ not found in List.class.php on line 14.

The ArrayObject class is in SPL. PHP’s SPL (Standard PHP Library) is not enabled by default with the PHP5, and to turn it on you should reemerge your php with “spl” USE flag.

Tags: , , , ,

Sunday, December 28th, 2008 Linux No Comments

serious bug in xfs/lvm/raid10 ? no ideas…

I was trying to do some seriuos work, connected with migrating data to new server machine, which has four 73GB SCSI drives spinning up to 15000 rpm. The best performance for me should offer raid10, and as my test shown I was right. LVM over mdadm (software raid) device was a pretty good idea for better management of free space.

And so the story begun :)… as a result few days ago commited a bug in gentoo:

http://bugs.gentoo.org/show_bug.cgi?id=248674

it appears in PLD/centos too. I have no ideas of reason, or problem connected with this. Maybe you have some? Or you found sth like this:

raid10_make_request bug: can’t convert block across chunks or bigger than 256k

Tags: , , ,

Friday, November 28th, 2008 Linux, Security, considers No Comments

glsa-check… securitity in gentoo

what is glsa-check - you can find here http://gentoo-wiki.com/Glsa-check

why to use it - because it shows every possible security hole made by outdated software. Because the output of glsa-check is rather chatty - my own grep method is like this:

glsa-check -d affected |grep -e “Affected package”

Tags: ,

Sunday, June 1st, 2008 Linux, Security, Tips, considers No Comments

some apache performance issues

I had some problems with apache… the php was very very slow. The system has linux gentoo with hardened profile, so me and x0ff believed that this was the main reason of poor apache performance. But recompiling php without “-pic” flag does no effect.

after

# ab -c 100 -n 10000 http://localhost/test.php

Benchmarking localhost (be patient)
Completed 1000 requests
apr_socket_recv: Connection reset by peer (104)
Total of 1810 requests completed

and in apache log:

[Fri May 30 19:40:54 2008] [alert] (11)Resource temporarily unavailable: setuid: unable to change to uid: 81
[Fri May 30 19:40:54 2008] [alert] Child 16566 returned a Fatal error… Apache is exiting!
[Fri May 30 19:40:54 2008] [emerg] (22)Invalid argument: couldn’t grab the accept mutex

So… it is not - the performance problem, because only 1810 requests were done.

Because system is hardened, i have a lot of limits in /etc/security/limits.conf. I was not sure if apache uses these vaules (because they are connected with PAM!!!!), but apache did ;(

http://bugs.gentoo.org/show_bug.cgi?id=64700

so the way to make it work was adding to
/etc/init.d/apache2 a line:

ulimit -u unlimited

the whole start section looks now like this

start() {
checkconfig || return 1
ebegin “Starting apache2″
[ -f /var/log/apache2/ssl_scache ] && rm /var/log/apache2/ssl_scache
ulimit -u unlimited
${APACHE2} ${APACHE2_OPTS} -k start
eend $?
}

to be sure that everything works fine a did a ab test one more time (with pic enabled).

# ab -c 100 -n 10000 http://localhost/test.php
This is ApacheBench, Version 2.0.40-dev <$Revision: 1.146 $> apache-2.0
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright 2006 The Apache Software Foundation, http://www.apache.org/

Benchmarking localhost (be patient)
Completed 1000 requests
Completed 2000 requests
Completed 3000 requests
Completed 4000 requests
Completed 5000 requests
Completed 6000 requests
Completed 7000 requests
Completed 8000 requests
Completed 9000 requests
Finished 10000 requests

Server Software: Apache
Server Hostname: localhost
Server Port: 80

Document Path: /test.php
Document Length: 45361 bytes

Concurrency Level: 100
Time taken for tests: 48.260264 seconds
Complete requests: 10000
Failed requests: 100
(Connect: 0, Length: 100, Exceptions: 0)
Write errors: 0
Total transferred: 455159500 bytes
HTML transferred: 453609500 bytes
Requests per second: 207.21 [#/sec] (mean)
Time per request: 482.603 [ms] (mean)
Time per request: 4.826 [ms] (mean, across all concurrent requests)
Transfer rate: 9210.29 [Kbytes/sec] received

Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 13 46.3 0 361
Processing: 9 466 200.4 472 4058
Waiting: 1 422 101.7 458 756
Total: 20 479 194.3 475 4058

Percentage of the requests served within a certain time (ms)
50% 475
66% 486
75% 498
80% 509
90% 546
95% 616
98% 708
99% 860
100% 4058 (longest request)

Without “pic” enabled i got:

Requests per second: 234.96 [#/sec] (mean)

so there is no big difference.

The test.php script consist of:

<?
phpinfo();
?>

niggle: note that there is no security problem with no limit - the apache has internal limiting functions

Tags: , , , , ,

Friday, May 30th, 2008 Linux, Security, Tips, considers No Comments

problem with app-antivirus/clamav-0.93 in gentoo

Today i tried to update the clamav to the newer version, and i got some strange message:

* Messages for package app-antivirus/clamav-0.93:
*
* ERROR: app-antivirus/clamav-0.93 failed.
* Call stack:
* ebuild.sh, line 49: Called src_compile
* environment, line 2828: Called econf ’src_compile’ ’src_compile’ ‘–disable-zlib-vcheck’ ‘–enable-id-check’ ‘–enable-bzip2′ ‘–enable-nls’ ‘–with-iconv’
* ebuild.sh, line 513: Called die
* The specific snippet of code:
* die “econf failed”
* The die message:
* econf failed
*
* If you need support, post the topmost build error, and the call stack if relevant.
* A complete build log is located at ‘/var/tmp/portage/app-antivirus/clamav-0.93/temp/build.log’.
* The ebuild environment file is located at ‘/var/tmp/portage/app-antivirus/clamav-0.93/temp/environment’.

It is strange because i have the newest gcc, without this bug… the avaliable answers on the Net - upgrade the gcc to version without bug (does not affect my configuration), the another one is to change /etc/make.conf file from sth like

CFLAGS=”-O0…”

insead of recommended

-O2

then the emerge process will go dapperly

Tags: ,

Thursday, May 1st, 2008 Linux, Security, Tips No Comments

why emerge -pv world does not upgrade everything

Today my friend showed me an glsa-check tool. I was mixed because there was a package not listed at my almost every day duty ‘emerge -pv world’ (to check what needs upgrade). I do some research and:

# cat /var/lib/portage/world |wc -l
107
# epm -qa |wc -l
366

so there is a difference, but it is not bad, but… I tried to:

# regenworld
add to world: dev-lang/perl
add to world: sys-apps/debianutils
add to world: dev-libs/libxml2

nothing new…
finally guys from #gentoo.pl gave me a tip to use ‘emerge -pvuD world’, and that is my new everyday duty :)

Tags: , ,

Saturday, April 5th, 2008 Linux, Tips No Comments

ccache in gentoo - It’s realy easy!

I tried to use ccache some time ago, but without success. Today was the second time, and it started to work, in just few simple steps.

1. check the portage version (because only versions 2.0.46-r11 or higher are supported)

emerge –version

2. emerge ccache

emerge -v dev-util/ccache

3. Find your CHOST

emerge –info |grep -e CHOST

4. Insert your CHOST value end envoke this command

ccache-config –install-links i686-pc-linux-gnu

5. Edit /etc/make.conf and insert there

FEATURES=”ccache”
CCACHE_DIR=”/var/tmp/ccache”
CCACHE_SIZE=”2G”

6. emerge or reemerge something (for testing)… whatever, maybe sth non-important
7. then check if ccache works by invoking:

CCACHE DIR=”/var/tmp/ccache” ccache -s

you should get sth like this

cache directory /var/tmp/ccache
cache hit 13
cache miss 270
called for link 7
compile failed 20
preprocessor error 11
not a C/C++ file 5
autoconf compile/link 174
no input file 33
files in cache 540
cache size 1.5 Mbytes
max cache size 2.0 Gbytes

Tags: , ,

Tuesday, February 26th, 2008 Linux, Tips No Comments