FS#23108 - [php] open_basedir in the configuration needs some addition

Attached to Project: Arch Linux
Opened by anonymous (arch_archer) - Wednesday, 02 March 2011, 22:23 GMT
Last edited by Pierre Schmitz (Pierre) - Friday, 08 April 2011, 09:26 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Pierre Schmitz (Pierre)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

I am using Nginx + PHP-FPM bundle for PHP development, recently I wanted to install phpMyAdmin for MySQL administration.
I added the virtual host for phpMyAdmin to the Nginx configuration but it didn't work. After several minutes of researching the log and configuration files I figured out that the problem is the open_basedir directive in /etc/php.ini configuration file:

; open_basedir, if set, limits all file operations to the defined directory
; and below. This directive makes most sense if used in a per-directory
; or per-virtualhost web server configuration file. This directive is
; *NOT* affected by whether Safe Mode is turned On or Off.
; http://php.net/open-basedir
open_basedir = /srv/http/:/home/:/tmp/:/usr/share/pear/

The thing is that the "phpmyadmin" package installs itself to the /usr/share/webapps/phpMyAdmin directory, which is not mentioned in the "open_basedir".

Please patch it, to be something like this:

open_basedir = /srv/http/:/home/:/tmp/:/usr/share/pear/:/usr/share/webapps/

Thanks.
This task depends upon

Closed by  Pierre Schmitz (Pierre)
Friday, 08 April 2011, 09:26 GMT
Reason for closing:  Won't implement
Additional comments about closing:  see my comment
Comment by Massimiliano Torromeo (mtorromeo) - Thursday, 03 March 2011, 13:04 GMT
+1 That's the exact edit that I do every time I install php on a new machine.
Comment by Pierre Schmitz (Pierre) - Thursday, 03 March 2011, 13:33 GMT
I tend to disagree here:
* Even though php is shipped with some sane defaults you most likely always need to adjust the php.ini file to your needs.
* In general config files should be seen as examples; we don't provide any magic to guess what users might want.
* /usr/share/webapps/ is not defined in any standard I know about.
* phpMyAdmin is the only package that uses this directory.
Comment by anonymous (arch_archer) - Thursday, 03 March 2011, 16:47 GMT
>> phpMyAdmin is the only package that uses this directory.

Hmm, when I saw phpMyAdmin there I imagined that all webapps are going there by some arch-way thing, but if not, then you are right that there is no need for "magic" just for one package.

Loading...