# [solved]Apache2 started with warnings. how to correct?

## clouds222

I encountered errors visting phpmyadmin,

I've build somme vhosts, myphp.xxxx.com. when I visit http://192.168.0.4/myphp, it work OK, but error ocurs when I visit http://myphp.xxxx.com

and alerts 

```

Cannot start session without errors, please check errors given in your PHP and/or webserver log file and configure your PHP installation properly.

```

docroot:192.168.0.4:       /var/www/localhost/htdocs/myphp

but my other codes/vhost build the same way works correctly. 

I change the config file change $cfg[ 'Servers '][$i][ 'auth_type ']   =   'cookie '; to $cfg[ 'Servers '][$i][ 'auth_type ']   =   'http'. It does work correctly, is there anything wrong with my pHP.ini?

I tried to restart apache, and I got the warnings logs in log file like below,

```

[Sat Jul 18 17:31:18 2009] [notice] caught SIGTERM, shutting down

PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php5/lib/php/extensions/no-debug-non-zts-20060613/php_bz2.dll' - /usr/lib/php5/lib/php/extensions/no-debug-non-zts-20060613/php_bz2.dll: cannot open shared object file: No such file or directory in Unknown on line 0

PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php5/lib/php/extensions/no-debug-non-zts-20060613/php_mysql.dll' - /usr/lib/php5/lib/php/extensions/no-debug-non-zts-20060613/php_mysql.dll: cannot open shared object file: No such file or directory in Unknown on line 0

PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php5/lib/php/extensions/no-debug-non-zts-20060613/php_pdo_mysql.dll' - /usr/lib/php5/lib/php/extensions/no-debug-non-zts-20060613/php_pdo_mysql.dll: cannot open shared object file: No such file or directory in Unknown on line 0

PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php5/lib/php/extensions/no-debug-non-zts-20060613/php_zip.dll' - /usr/lib/php5/lib/php/extensions/no-debug-non-zts-20060613/php_zip.dll: cannot open shared object file: No such file or directory in Unknown on line 0

[Sat Jul 18 17:31:22 2009] [notice] Apache/2.2.11 (Unix) mod_ssl/2.2.11 OpenSSL/0.9.8k PHP/5.2.10-pl1-gentoo configured -- resuming normal operations

```

php -i

```

PHP Version => 5.2.10-pl1-gentoo

System => Linux Gentoo_Jimmy 2.6.29-gentoo-r5 #4 SMP Sat Jul 18 10:37:38 CST 2009 i686

Build Date => Jul 17 2009 17:47:32

Configure Command =>  './configure'  '--prefix=/usr/lib/php5' '--host=i686-pc-linux-gnu' '--mandir=/usr/lib/php5/man' '--infodir=/usr/lib/php5/info' '--sysconfdir=/etc' '--cache

-file=./config.cache' '--with-pcre-regex=/usr' '--enable-cli' '--disable-cgi' '--with-config-file-path=/etc/php/cli-php5' '--with-config-file-scan-dir=/etc/php/cli-php5/ext-acti

ve' '--without-pear' '--disable-bcmath' '--with-bz2' '--enable-calendar' '--without-curl' '--without-curlwrappers' '--disable-dbase' '--enable-exif' '--without-fbsql' '--without

-fdftk' '--disable-filter' '--enable-ftp' '--with-gettext' '--without-gmp' '--disable-hash' '--disable-ipv6' '--disable-json' '--without-kerberos' '--enable-mbstring' '--with-mc

rypt' '--without-mhash' '--without-msql' '--without-mssql' '--with-ncurses' '--with-openssl' '--with-openssl-dir=/usr' '--disable-pcntl' '--disable-pdo' '--without-pgsql' '--dis

able-posix' '--without-pspell' '--without-recode' '--disable-shmop' '--without-snmp' '--disable-soap' '--disable-sockets' '--without-sybase' '--without-sybase-ct' '--disable-sys

vmsg' '--disable-sysvsem' '--disable-sysvshm' '--without-tidy' '--disable-tokenizer' '--disable-wddx' '--disable-xmlreader' '--disable-xmlwriter' '--without-xmlrpc' '--without-x

sl' '--enable-zip' '--with-zlib' '--disable-debug' '--enable-dba' '--without-cdb' '--with-db4' '--disable-flatfile' '--with-gdbm' '--disable-inifile' '--without-qdbm' '--with-fr

eetype-dir=/usr' '--with-t1lib=/usr' '--enable-gd-jis-conv' '--with-jpeg-dir=/usr' '--with-png-dir=/usr' '--without-xpm-dir' '--with-gd' '--with-mysql=/usr' '--with-mysql-sock=/

var/run/mysqld/mysqld.sock' '--with-mysqli=/usr/bin/mysql_config' '--with-readline' '--without-libedit' '--without-mm' '--without-sqlite'

Server API => Command Line Interface

Virtual Directory Support => disabled

Configuration File (php.ini) Path => /etc/php/cli-php5

Loaded Configuration File => /etc/php/cli-php5/php.ini

Scan this dir for additional .ini files => /etc/php/cli-php5/ext-active

additional .ini files parsed => (none)

PHP API => 20041225

PHP Extension => 20060613

Zend Extension => 220060519

Debug Build => no

Thread Safety => disabled

Zend Memory Manager => enabled

IPv6 Support => disabled

Registered PHP Streams => https, ftps, compress.zlib, compress.bzip2, php, file, data, http, ftp, zip

Registered Stream Socket Transports => tcp, udp, unix, udg, ssl, sslv3, sslv2, tls

Registered Stream Filters => zlib.*, bzip2.*, convert.iconv.*, string.rot13, string.toupper, string.tolower, string.strip_tags, convert.*, consumed

This program makes use of the Zend Scripting Language Engine:

Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies

 

----------

## clouds222

BTW, there are 3 folders in /etc/php/,

apache2-php5

cgi-php5

cli-php5

will anyone tell me witch is the used config?

----------

## Ox-

/etc/php/cli-php5 is the configuration for command line PHP (which was run when you did "php -i")

/etc/php/cgi-php5 is configuration for PHP running under CGI or FastCGI

/etc/php/apache2-php5 is configuration for mod_php

I don't know exactly what's causing your problem, but it looks like you are simply missing libraries needed for your build.  Try "revdep-rebuild" to rebuild them.

----------

## clouds222

Got it, thanks.

----------

