Closed r-a-y closed 9 years ago
Thanks for the PR, @r-a-y. I wonder if we can just drop the use of set_include_path()
altogether, and let relative paths do all the work. See 73fa32e. Does this work on your installation?
Does this work on your installation?
Unfortunately, that did not work. Got the same fatal error as the above. I haven't delved too deep to see what might be causing the relative path issue though.
Cool, thanks for getting back. I'll check this out in nginx to get a better sense of what's going on.
On 06/17/15 21:47, r-a-y wrote:
Does this work on your installation?
Unfortunately, that did not work. Got the same fatal error as the above. I haven't delved too deep to see what might be causing the relative path issue though.
— Reply to this email directly or view it on GitHub https://github.com/chnm/anthologize/pull/88#issuecomment-113008676.
Really weird. I'm testing on nginx now and it's working fine, so it must be something about the way your PHP is configured or something like that. I don't understand why the include path has to be changed.
Moving the set_include_path()
call is no problem, but wiping out the current include path makes me somewhat nervous, just in case any WP code tries to do anything funny after the path has been changed. So I'm wary of making the change without understand it a bit better.
I thought at first that this might be a problem with PHP not allowing overrides (see eg http://blog.calevans.com/2008/02/14/set_include_path-failing/) but this doesn't seem likely, given that set_include_path()
does in fact work sometimes.
I'll dig a little more. If I can't find anything, I'll just accept your change and see if anything breaks :)
Yeah, I have a feeling it's to do with the PHP set up on the production server as I can't reproduce this locally.
I'll see what I can gather from the production environment and get back to you.
Commit 9fc76d0 is more safe and simply moves the 'pear_ext'
directory to the beginning in set_include_path()
. This fixed things for us as well.
:+1: Thanks, @r-a-y !
Hi,
On our nginx set up, we were experiencing a fatal error when attempting to do an epub export:
We narrowed the problem down to
set_include_path()
, which we addressed by:pear_ext
directory (without prepending the current include path); and byset_include_path()
call further down the file just beforerequire_once( 'Archive.php' )
is called.I also tested this on a WAMP stack and this also worked, but might require additional testing on other environments.