# [SOLVED]More php mysql wows....

## einstein1981

ok, so after last emerge world problems with mysql etc... so I finally fixed the mysql problem, and then tried firing up my apache and I had this error:

```
Bob mysql # /etc/init.d/apache2 start

 * Apache2 has detected a syntax error in your configuration files:

Syntax error on line 440 of /etc/apache2/httpd.conf:

Cannot load /usr/lib/apache2/modules/libphp4.so into server: libmysqlclient.so.12: cannot open shared object file: No such file or directory

```

So i say , well I need to recompile the php module for apache with mysql. so i do :

```
 USE="mysql" emerge -v mod_php

```

and it ends with this :

```
  File "/usr/bin/java-config", line 14, in ?

    from java_config import jc_options

ImportError: No module named java_config

 * You need to use java-config to set your JVM to a JDK!

!!! ERROR: dev-php/mod_php-4.4.0-r3 failed.

!!! Function php-sapi_check_java_config, Line 201, Exitcode 0

!!! You need to use java-config to set your JVM to a JDK!

!!! If you need support, post the topmost build error, NOT this status message.

```

so well still don;t have my web server up and running.

Also , is there a way to directly map ( like in packages.mask) that evertime apache, php or mysql have to be compiled, they do so with each others flags?

thank you

charles

----------

## TheRAt

 *einstein1981 wrote:*   

> 
> 
> ```
>   File "/usr/bin/java-config", line 14, in ?
> 
> ...

 

The error message you posted instructs you on how to solve the problem.. Have you tried to set your JVM to a JDK, rather than a JRE?

----------

## einstein1981

well actually i did install the sun-sdk yesterday...

but when I try the /usr/bin/java-config comand i get this :

```
Bob charz # /usr/bin/java-config

Traceback (most recent call last):

  File "/usr/bin/java-config", line 14, in ?

    from java_config import jc_options

ImportError: No module named java_config

```

so i really don;t know what to do... heh...

----------

## kashani

If you don't need java in your PHP I'd add a -java when you emerge mod_php to get youself up and running again. Then you can sort things out later. 

kashani

----------

## einstein1981

Makes sense.... Thanks for the quick fix!

Trying it out... will edit this post if something goes wrong.

Thanks again

----------

## HongPong

I had the same error and just re-emerged the java-config package. It worked. I ask no questions.

----------

## Monkeh

The problem here, is that you have blindly updated your system. Specifically, Python and MySQL. First, run /usr/sbin/python-updater. Then, run /usr/bin/revdep-rebuild. In future, check what you update.

----------

## vulcan_

this command  *Quote:*   

> python-updater

 , just where could i have found out about it without reading >100 forum postings? There is no documentation on the tools that are critical to maintaining a gentoo system. dispatch-conf, java-config etc. .. all created ad hoc by hackers who solve symptoms without addressing the problems underneath.

yet another case of features broken by an emerge -u system. Lord help me when i have to do emerge -u world.

----------

## einstein1981

Well vulcan, you seem to have forgotten the complexity that programing such a script brings.

It´s not straightforward all the time.

As for the special comands you have to read a lot ( which I have learned to do in gentoo).

Also , about my problem, it was only beacuse the emerge -u world updated mysql. Ifyou read on the mysql site UPGRADING a version is never straightforward and they have their own hw toos. And, I personally consider it to be completly NORMAL to have such problems.

Try and imagine for a second , a script that backsup ANY DB in your MYSQL, then backs up the config , and the removes the current version, then downloads the new one, installs it, updates any deamons needed, then creates your new user, with the same password as before, restores the db, and the config---- I seem to think that it´s not your every day Hello World program...

Now, I am very thankful for this forum, since I have ALWAYS found what i´m looking for here .

So to answer your question vulcan, don´t get pissed off because of these little problems .. Just read on...

BTW , I am thinking of not using the portage version of mysql, but download instead from the site, and manually install, this way i won´t have to upgrade unless I want to... ( or is there a way to remove a package from world?)

Thanks again

Charles

----------

## vulcan_

nuff said

thanks for the calm reply, i don't like to be a source of flames.

as for protecting a package against upgrade .. there is a way. the file /etc/portage/package.mask  is read by portage and entries in it will be ignored in the update process.

```

 package.mask

                     A list of DEPEND atoms to mask.  Useful if specific versions of pack-

                     ages do not work well for you.  For example, you swear by the  Nvidia

                     drivers, but only versions earlier than 1.0.4496.  No problem!

                     Format:

                     - comments begin with #

                     - one DEPEND atom per line

                     Example:

                     # mask out versions 1.0.4496 of the nvidia

                     # drivers and later

                     >=media-video/nvidia-kernel-1.0.4496

```

hope this helps

----------

## einstein1981

Thanks will look into it, when I'm at my computer

----------

## dustfinger

 *Monkeh wrote:*   

> The problem here, is that you have blindly updated your system. Specifically, Python and MySQL. First, run /usr/sbin/python-updater. Then, run /usr/bin/revdep-rebuild. In future, check what you update.

 

Someone should consider adding this step to the gentoo documentation on mysql-upgrading.  Of course, it is a python specific issue, and so I do understand why it is not in the mysql-upgrading documentation.  Still having said that, The majority of people reading that documentation probably also have Python installed, and are not likely going to know about this step.  Just my thoughts.

Thank you Monkeh.

dustfinger.

-- EDIT --

I take that back.  Adding every little tidbit to the gentoo doc's is just asking for documentation bloat.  The gentoo wiki on the otherhand is designed for these sorts of tips.

-----------

----------

