php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #19657 confirm that auto_pre/append causes a disk read for every script invocation
Submitted: 2002-09-29 07:50 UTC Modified: 2003-01-21 02:59 UTC
From: jc at mega-bucks dot co dot jp Assigned:
Status: Closed Package: Documentation problem
PHP Version: 4.2.3 OS: Red Hat Linux 7.2
Private report: No CVE-ID: None
 [2002-09-29 07:50 UTC] jc at mega-bucks dot co dot jp
I am not sure, but I have been told that the php/ini directive auto_pre/append cause a disk read of the pre/appended file for every PHP script that is called even if PHP is used as an Apache module.

If this is true could you add it to the documentation on those two php.ini directives.

The reason I needed to know was that it would have been efficient for me to define() very large strings that I use in almost all my scripts as constants and have a string_constants.inc file auto-prepended if PHP kept the file in memory and didn't do a disk read for every php script invocation.

But since it doesn't (I am told) then my idea is not feasible :(

Thanks!

Patches

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-09-30 04:28 UTC] hholzgra@php.net
from: http://www.php.net/manual/en/features.http-auth.php

"The HTTP Authentication hooks in PHP are only available when it is running as an Apache module and is hence not available in the CGI version."
 [2002-09-30 04:29 UTC] hholzgra@php.net
ooops .... wrong window ... reopening
 [2002-09-30 05:01 UTC] hholzgra@php.net
from: http://www.php.net/manual/en/print/configuration.php#ini.auto-prepend-file

"Specifies the name of a file that is automatically parsed before the main file. The file is included as if it was called with the include() function,..."

i think it is clear enough that there is no special 
cacheing or optimization done on auto_prepend?



 [2002-09-30 08:32 UTC] jc at mega-bucks dot co dot jp
The docs don't day *anything* on the subject of caching or optimization in the context of pre/append or include(). That's why I had to ask around.

From the part you quoted all that is assured is that the behaviour is just as if an include() had been called.

But reading the docs for include() also doesn't mention if any caching is done.

I couldn't find anywhere in the docs that said clearly and definitively "No optimization/caching is done" or the inverse.

I just needed a yes/no answer and I couldn't find it in the docs. I'm not saying it isn't in there somewhere but I really couldn't find it.
 [2003-01-21 02:51 UTC] philip@php.net
I don't feel anything needs to be documented here.  It's been analyzed, imho the added text would only confuse people.  It might also make it seem that everything is "unoptimized"
 [2003-01-21 02:59 UTC] jc at mega-bucks dot co dot jp
Ok. I'll defer to your judgment on this :)
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Aug 21 06:01:27 2024 UTC