# problems with php_admin_value in vhost.conf [SOLVED?]

## the_mgt

Hi!

I am using mod_php-4.4.0 and apache-2.0.54-r8.

With horror i realized last night, that since the last emerge world -DUva, the homepages i defined in syscp-vhosts.conf don't work anymore, if they have any php_admin_value entries. If i remove that entry, everything is fine, but it can't be the solution.... (Syscp [www.syscp.de] is a confixx-like programm, which has its own vhosts.conf, because a cronfile overwrites it, whenever a new host is added)

If they have an php_admin_value and i enter the url in my browser, the browser asks me if i want to download an octetstream. Even if the page is plain html. The apache errorlog says:  [notice] child pid 14754 exit signal Segmentation fault (11)  , when this happens.

If I reload or restart Apache, i get just one failure message, which i don't understand, but i don't think it is connected to the problem:  NameVirtualHost MyIP:0 has no VirtualHosts 

Which is strange, since i don't use any :port option on any ip. Just a  Listen MyIP:80  and it worked well before the last emerge...

Does anyone has a clue why this happens? And why it didn't happen before? I did not change anything in the config files, i think. And etc-update didn't want to change anything after the last update either.

I am clueless, please help.Last edited by the_mgt on Sat Aug 06, 2005 1:37 pm; edited 1 time in total

----------

## the_mgt

bump

what is it? is it me being stupid? nobody else with this problem??

----------

## the_mgt

Ok, changing php_admin_value to php_value solved the problem for now.

I still didn't figure out why it was working before and now isn't any more...

----------

## hanj

What versions of apache/mod_php are you running? What php_admin_value flags were your tying to set? I run php_admin_value(s) without any problems.

```
php_admin_value safe_mode 1

php_admin_value open_basedir /path/to/web/app

php_admin_value upload_tmp_dir /tmp

php_admin_value safe_mod_exec_dir /path/to/safe/bin

php_admin_value safe_mode_allowed_env_vars TZ
```

I opened up one vhost file.. and those are some php_admin_values I have set for it... no problems

Current apache and mod_php:

```
apache-2.0.54-r8

mod_php-4.4.0
```

hanji

----------

## the_mgt

I am running exact the same versions as you do, it all worked fine for a while, but was broken recently.

These are my values now:

```

php_value open_basedir /path/to/dir

php_value upload_tmp_dir /path/to/dir/tmp

php_value session.save_path  /path/to/dir/tmp

php_flag safe_mode On 

```

You use "safe_mode 1", but i think both work.

The vhost.conf these lines are in is included at the end of apache2.conf, so everything else should be loaded before.

The other error concerning the NameVirtualHost is solved now, i had "NameVirtualHost MYIP" set in both vhost.confs.

From what i read and understood, the php_values can be overriden by the user. The php_admin_values can not, right? Therefore i wold like to have the _admin_ ones.

----------

## hanj

Hello

I recently had problems with the session.save_path. I just remembered that when I saw your values. This happened with the new update to mod_php.

```
php_value session.save_path  /path/to/dir/tmp 
```

Once I removed that.. I was good times again. Maybe they changed session.save_path from php_admin_value to php_value??

hanji

----------

## the_mgt

Hi!

I just changed all entries but the save.path one back to _admin_ ones, to test if it would still work. It doesn't...

Apache log reports:

```

 [notice] child pid 8830 exit signal Segmentation fault (11)

```

The symptom is, that the page doesn't open.

Without squid, the browser wants to download an octetstream, with squid i get:

```

Zero Sized Reply 

Squid did not receive any data for this request.

```

----------

## hanj

Here is a 'bug' reported about apache crashing with every http request using mod_php 4.4.0 

https://bugs.gentoo.org/show_bug.cgi?id=98871

I think we should keep an eye on this. Hopefully someone else can shed some light on the problem. Can you show your USE flags.. just incase we can find a common thread there.. here are my flags for mod_php:

```
dev-php/mod_php-4.4.0  -X +apache2 -berkdb +crypt -curl -debug -doc -fdftk -firebird -flash -freetds +gd -gd-external -gdbm -gmp -hardenedphp -imap -informix -ipv6 -java +jpeg -kerberos -ldap -mcal -memlimit -mssql +mysql -nls -oci8 -odbc -pam +png -postgres +snmp -spell +ssl -tiff -truetype -xml2 -yaz
```

hanji

----------

## the_mgt

Hi hanj, thanks for your answers!

Interesting, they are talking about secured kernels. The Apache where this happens runs in a vserver. So there are some restrictions in usage of the kernel and hardware, but i can't imagine that this is the cause...

anyway, here are my useflag:

```

dev-php/mod_php-4.4.0  -X +apache2 +berkdb +crypt -curl -debug -doc -fdftk -firebird +flash -freetds +gd +gd-external +gdbm -gmp +hardenedphp +imap -informix +ipv6 +java +jpeg -kerberos +ldap -mcal +memlimit -mssql +mysql +nls -oci8 -odbc +pam +png -postgres -snmp +spell +ssl +tiff +truetype +xml2 -yaz 

```

I use some mmore than you, but as i said, it was working about a week ago, the last time i restarted apache. Because i got inly the usual errormessage, i thougt all was fine, so i didn't check anyth page, lazy me. And indeed, apache seems to have no problem with the config until a page is opened.

I will have an eye on this, since i want my _admin_values back.  :Evil or Very Mad: 

----------

