php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #17917 php_admin_value not allowed here
Submitted: 2002-06-21 20:56 UTC Modified: 2002-06-22 11:32 UTC
From: matt at haught dot com Assigned:
Status: Closed Package: Apache2 related
PHP Version: 4.2.1 OS: FreeBSD 4.4-RELEASE
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: matt at haught dot com
New email:
PHP Version: OS:

 

 [2002-06-21 20:56 UTC] matt at haught dot com
First off I AM using the lastest snapshot from snaps.php.net dated 200206211500.  This bug was closed but it is still there!  php_value and php_flag ARE working and those changes are reflected in phpinfo(), but the admin ones (php_admin_value and php_admin_flag) are not accepted by apache giving the error:

Syntax error on line 84 of /usr/local/etc/apache2/vhosts.conf:
php_admin_value not allowed here

AGAIN, THIS IS WITH THE LATEST SNAPSHOT php4-200206211500.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-06-21 21:02 UTC] matt at haught dot com
This is with apache-2.0.39
 [2002-06-22 08:26 UTC] sander@php.net
Hm, don't know if this is ok but try this patch:

Index: apache_config.c
===================================================================
RCS file: /repository/php4/sapi/apache2filter/apache_config.c,v
retrieving revision 1.21
diff -u -r1.21 apache_config.c
--- apache_config.c	17 May 2002 05:16:18 -0000	1.21
+++ apache_config.c	22 Jun 2002 12:23:55 -0000
@@ -165,9 +165,9 @@
                   "PHP Value Modifier"),
 	AP_INIT_TAKE2("php_flag", php_apache_flag_handler, NULL, OR_OPTIONS,
                   "PHP Flag Modifier"),
-	AP_INIT_TAKE2("php_admin_value", php_apache_admin_value_handler, NULL, ACCESS_CONF,
+	AP_INIT_TAKE2("php_admin_value", php_apache_admin_value_handler, NULL, ACCESS_CONF|RSRC_CONF,
                   "PHP Value Modifier (Admin)"),
-	AP_INIT_TAKE2("php_admin_flag", php_apache_admin_flag_handler, NULL, ACCESS_CONF,
+	AP_INIT_TAKE2("php_admin_flag", php_apache_admin_flag_handler, NULL, ACCESS_CONF|RSRC_CONF,
                   "PHP Flag Modifier (Admin)"),
 	AP_INIT_TAKE1("PHPINIDir", php_apache_phpini_set, NULL, RSRC_CONF,
                   "Directory containing the php.ini file"),

This should make the php_admin_value directive allowed inside and outside <location> or <directory> blocks.

If this patch is too mangled by this bug system, you can contact me directly and I'll send it you by mail.
 [2002-06-22 11:11 UTC] matt at haught dot com
I manually added the patch and now it is working.  I was trying to set the open_basedir setting inside just a <VirtualHost>. It works now that I applied the patch and it is refected in the output of phpinfo().
 [2002-06-22 11:32 UTC] sander@php.net
OK, I've comitted the patch to CVS. Thanks for your help!
 
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Sat Nov 26 23:05:53 2022 UTC