Can a URL be added to PHP's open_basedir?

38 Views Asked by At

I'm facing an issue with PHP's open_basedir directive with relation to a composer package that I don't have control over, and use of a Google Font.

The package I'm using is matthiasmullie/minify, which uses is_file() during it's execution. One of the things it's trying to minify is a Google Font CSS file. The error message is coming from an @font-face segment which links to a src font file...

is_file(): open_basedir restriction in effect. 
File(/https://fonts.gstatic.com/s/roboto/v30/KFOlCnqEu92Fr1MmEU9fBBc4.woff2) 
is not within the allowed path(s): ...

Disabling open_basedir is a common "solution" for people, but removing security features is not a solution.

I have a number of local paths specified for my resources, but I can't seem to find any documentation on whether I can specify a remote URL such as https://fonts.gstatic.com (without trailing slash to allow for all sub-dirs). Altering my routines to skip minify on the google fonts calls will be a PITA, so I'm hoping for a different solution.

Does anyone know if this is possible, or can you point to the documentation that might outline it's syntax if it differs or there are options or consequences of this?

Thanks!

0

There are 0 best solutions below