# mysql does not respond to apache or php after upgrade? [SOLV

## undrwater

I've been running phpBB and a few other LAMP type web pages for a while now without issue.  Recently after an upgrade of mysql (to 4.1 [ i followed the upgrade doc and everything seemed to work ok]), everything that used mysql no longer works.

I don't have any error messages, and /var/log/mysql* shows nothing, but I'm having difficulties having the database picked up by the usual LAMP methods.

Using phpBB I went to the upgrade section, selected the appropriate version of mysql (4.x...i'm using the latest ebuild 4.1.14) entered the database name, user, and password that I'd set for mysql (mysql will show me the databases).

Once I set the admin name and password and click OK, nothing happens.  Even with dbinformer.php, nothing happens.  No error, no notice, no log, nothing.

I'd post more info...but I'm not sure where to start...it's got me boggled.

----------

## tornamodo

perhaps you did upgrade your apache or php - and updated your config files automatically?

then you'd have to enable the mysql module again... 

do you have mysql enabled in the php.ini? *Quote:*   

> grep 'mysql.so'  /etc/php/apache2-php4/php.ini

 

please post also the output of this php page - check for the environment variables:

```
<?php phpinfo(); ?>
```

also what says this? *Quote:*   

> /etc/init.d/mysql restart

 

----------

## undrwater

Thanks for the reply, Tornamodo!

```
 # grep 'mysql.so' /etc/php/apache2-php4/php.ini

# 
```

Looks like it's not there.  I've got 'mysql' in my USE flags...what should be in php.ini?

```

<?php phpinfo(); ?>
```

In firefox this returns a Google search with a '<' in the form field.  Links states 

```
bash: syntax error near unexpected token `('
```

```
 /etc/init.d/mysql restart

 * Stopping mysqld (/etc/mysql/my.cnf) ...                                [ ok ]

 * Starting mysqld (/etc/mysql/my.cnf) ...                                [ ok ]

#
```

So...maybe PHP is the issue?

----------

## loki99

Did you take a look at this?

----------

## tornamodo

when did you have the last look at your php.ini?

there should be a entry "mysql.so" which could need to be uncommented.

if I do a 'grep 'mysql.so' /etc/php/apache2-php4/php.ini' it says:

 *Quote:*   

> extension=mysql.so

 

in the file php.ini go to this section

 *Quote:*   

> ;;;;;;;;;;;;;;;;;;;;;;
> 
> ; Dynamic Extensions ;
> 
> ;;;;;;;;;;;;;;;;;;;;;;

 

and insert  *Quote:*   

> extension=mysql.so

 

restart apache then

btw, with

```
<?php phpinfo(); ?>
```

 i meant putting it into a file called "test.php", somewhere inside the apache shares.

if your apache is running, execute that file (eg. firefox > http://localhost/test.php) and you get lots of php infos!

----------

## undrwater

Hahahah   :Laughing:  I knew that!  I had just forgotten.

I found the reference to mysql.so and uncommented it.  Restarted apache, but still experiencing the same thing.

here's the test.php

```
PHP Version 4.3.8

System    Linux Zeus 2.6.13-gentoo-r2 #2 SMP Sat Sep 24 09:26:49 PDT 2005 i686

Build Date    Aug 7 2004 19:57:03

Configure Command    './configure' '--prefix=/usr' '--host=i686-pc-linux-gnu' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--datadir=/usr/share' '--sysconfdir=/etc' '--localstatedir=/var/lib' '--with-apxs2=/usr/sbin/apxs2' '--with-ndbm=/usr' '--with-db4=/usr' '--with-mcrypt=/usr' '--with-mhash=/usr' '--without-interbase' '--without-ming' '--without-swf' '--without-sybase' '--with-gdbm=/usr' '--without-fdftk' '--with-java=/opt/blackdown-jdk-1.4.2_rc1' '--without-mcal' '--without-unixODBC' '--without-pgsql' '--without-snmp' '--with-xpm-dir=/usr/X11R6' '--without-gmp' '--without-mssql' '--with-pdflib=/usr' '--without-gd' '--with-png=/usr' '--with-png-dir=/usr' '--with-jpeg=/usr' '--with-jpeg-dir=/usr' '--enable-exif' '--with-tiff=/usr' '--with-tiff-dir=/usr' '--with-mysql=/usr' '--with-mysql-sock=/var/run/mysqld/mysqld.sock' '--with-freetype-dir=/usr' '--with-ttf=/usr' '--with-t1lib=/usr' '--with-gettext' '--without-qtdom' '--with-pspell=/usr' '--with-openssl=/usr' '--without-imap' '--without-ldap' '--with-dom=/usr' '--with-dom-xslt=/usr' '--with-dom-exslt=/usr' '--without-kerberos' '--with-pam' '--disable-memory-limit' '--disable-ipv6' '--without-yaz' '--without-curl' '--enable-dbx' '--with-zlib=/usr' '--with-zlib-dir=/usr' '--with-sablot=/usr' '--enable-xslt' '--with-xslt-sablot' '--with-xmlrpc' '--enable-wddx' '--with-xml' '--enable-mbstring=all' '--enable-mbregex' '--with-bz2=/usr' '--with-crack=/usr' '--with-cdb' '--enable-pcntl' '--enable-bcmath' '--enable-calendar' '--enable-dbase' '--enable-filepro' '--enable-ftp' '--with-mime-magic=/usr/share/misc/file/magic.mime' '--enable-sockets' '--enable-sysvsem' '--enable-sysvshm' '--enable-sysvipc' '--with-iconv' '--enable-shmop' '--enable-dio' '--enable-yp' '--without-ncurses' '--without-readline' '--enable-inline-optimization' '--enable-track-vars' '--enable-trans-sid' '--enable-versioning' '--with-config-file-path=/etc/php/apache2-php4' '--without-pear'

Server API    Apache 2.0 Handler

Virtual Directory Support    disabled

Configuration File (php.ini) Path    /etc/php/apache2-php4/php.ini

PHP API    20020918

PHP Extension    20020429

Zend Extension    20021010

Debug Build    no

Thread Safety    disabled

Registered PHP Streams    php, http, ftp, https, ftps, compress.bzip2, compress.zlib 
```

I'm working on the apache upgrade according to the document loki99 referenced.

----------

## tornamodo

and what does the mysql-section further down the test.php page say?

----------

## undrwater

 *tornamodo wrote:*   

> and what does the mysql-section further down the test.php page say?

 

 :Embarassed: 

 *Quote:*   

> mysql
> 
> MySQL Support	enabled
> 
> Active Persistent Links 	0
> ...

 

----------

## tornamodo

looks like apache/php does just fine with your mysql now  :Razz: 

a easy way to administrate mysql is webmin (you can emerge it)

you can configure almost everything with that!

----------

## undrwater

I'll try webmin, but I'm still having the same problem.  For phpBB, the /install/install.php script will not return any info, error, message when i hit the submit button.  The page remains the same without change.

----------

## undrwater

It was the upgrade to apache that was needed.

----------

