I now notice that when I replace include_once with include the open()
call disappears. That's very nice, but why does include_once need to
open the file, even when apc.include_once_override is enabled? Is this a
bug?
On 08/16/2010 03:21 PM, Mark Hunting wrote:
I am struggling with the
I am struggling with the performance of some websites that use a lot of
includes (using include_once). The files are on a NFS mount (NFSv4), and
I use APC to speed things up. APC has enough memory, and I see all
included files are in the APC cache. apc.include_once_override is
enabled. This is on
Hi,
APC checks by default if every included file was modified doing a stat
call. You can disable it, setting apc.stat to 0
(http://www.php.net/manual/en/apc.configuration.php#ini.apc.stat). Try
if that improves the performance. Of course, you should manually
delete the APC opcode cache every time
Thanks for your answer. I have tested this option before, and it indeed
disables the stat() operation. However, it doesn't disable the open()
operation, which is about 10x slower than the stat() call (see my
example trace).
On 08/16/2010 07:21 PM, Jonathan Tapicer wrote:
Hi,
APC checks by
On Mar 23, 2008, at 12:10 PM, Daniel Brown wrote:
On Sun, Mar 23, 2008 at 6:32 AM, Terry Burns-Dyson
[EMAIL PROTECTED] wrote:
[snip!]
$pageTitle is in the template, it's replaced, $pageContent is in the
template, it's replaced. But any variables within the
page_to_display are
simply output
On Sun, Mar 23, 2008 at 7:32 AM, Terry Burns-Dyson
[EMAIL PROTECTED] wrote:
I'm trying to write a template system, my template is the HTML layout, and
my content is fetched from another source. However I don't quite understand
how to output the template so that all the variables are parsed by
I'm trying to write a template system, my template is the HTML layout, and
my content is fetched from another source. However I don't quite understand
how to output the template so that all the variables are parsed by PHP.
Simple version of what I'm trying to do;
ob_start( );
extract(
On Sun, Mar 23, 2008 at 6:32 AM, Terry Burns-Dyson
[EMAIL PROTECTED] wrote:
[snip!]
$pageTitle is in the template, it's replaced, $pageContent is in the
template, it's replaced. But any variables within the page_to_display are
simply output into the page rather than processed by PHP. I
On Jan 23, 2008, at 4:43 PM, Daniel Brown wrote:
On Jan 23, 2008 4:19 PM, Jason Pruim [EMAIL PROTECTED] wrote:
Okay, so I have this mostly working now! if I put my
ini_set(include_path, blah/to/balh); on each and every page. I
know I could include a file that is in the document root which
On Jan 24, 2008 1:05 PM, Jason Pruim [EMAIL PROTECTED] wrote:
You just made my life so much earlier! Thank you!
Yes, you guessed it. I am your father.
--
/Dan
Daniel P. Brown
Senior Unix Geek and #1 Rated Year's Coolest Guy By Self Since
Nineteen-Seventy-[mumble].
--
PHP General
On Jan 22, 2008, at 3:57 PM, Jason Pruim wrote:
Hi everyone,
Been doing some reading on security and have decided that I should
be storing my include files outside of the document root... Which I
understand how to do it, but what I'm wondering, is say I write the
Next Killer App (tm).
Quoting Jason Pruim [EMAIL PROTECTED]:
On Jan 22, 2008, at 3:57 PM, Jason Pruim wrote:
Hi everyone,
Been doing some reading on security and have decided that I should
be storing my include files outside of the document root... Which I
understand how to do it, but what I'm wondering,
2008. 01. 23, szerda keltezéssel 09.37-kor Jason Pruim ezt írta:
On Jan 22, 2008, at 3:57 PM, Jason Pruim wrote:
Hi everyone,
Been doing some reading on security and have decided that I should
be storing my include files outside of the document root... Which I
understand how to do
On Jan 22, 2008 8:48 PM, Richard Lynch [EMAIL PROTECTED] wrote:
On Tue, January 22, 2008 7:17 pm, Daniel Brown wrote:
You may disagree with me on this here, Rich, but the way I do it
is to have a single include_files.php file containing all of the files
that need to be included as a
On Wed, January 23, 2008 8:37 am, Jason Pruim wrote:
On Jan 22, 2008, at 3:57 PM, Jason Pruim wrote:
Hi everyone,
#1.When including files outside of the webroot do you need to
specify the entire path? Like for me, that would be something like: /
Jason Pruim wrote:
Been doing some reading on security and have decided that I should be
storing my include files outside of the document root... Which I
understand how to do it, but what I'm wondering, is say I write the
Next Killer App (tm). How would I port that code easily off of my
On Jan 23, 2008, at 2:50 PM, Roberto Mansfield wrote:
Jason Pruim wrote:
Been doing some reading on security and have decided that I should
be
storing my include files outside of the document root... Which I
understand how to do it, but what I'm wondering, is say I write the
Next Killer
On Jan 23, 2008 2:50 PM, Roberto Mansfield [EMAIL PROTECTED] wrote:
I tend to keep the directories in the document root, but I deny access
via an .htaccess file. This keeps the code in a simple directory
structure. Anyone else doing that?
My fear on that is if there's changes to the
Daniel Brown wrote:
On Jan 23, 2008 2:50 PM, Roberto Mansfield [EMAIL PROTECTED] wrote:
I tend to keep the directories in the document root, but I deny access
via an .htaccess file. This keeps the code in a simple directory
structure. Anyone else doing that?
My fear on that is if
On Jan 23, 2008 2:56 PM, Jason Pruim [EMAIL PROTECTED] wrote:
that's why I made my decision. Not to say it's the right one, just a
step in the right direction. To me it also seems more portable across
hosts to have access outside of your webroot vs. access to .htaccess
It's far more
On Jan 23, 2008, at 3:04 PM, Daniel Brown wrote:
On Jan 23, 2008 2:56 PM, Jason Pruim [EMAIL PROTECTED] wrote:
that's why I made my decision. Not to say it's the right one, just a
step in the right direction. To me it also seems more portable across
hosts to have access outside of your
On Jan 23, 2008 3:28 PM, Jason Pruim [EMAIL PROTECTED] wrote:
I didn't realize that... That's good info. I always hear people
talking about .htaccess files on all the different lists I'm on so I
thought it was an industry standard thing :)
Now I can shut my brain down because I learned my 1
On Jan 23, 2008, at 2:42 PM, Richard Lynch wrote:
On Wed, January 23, 2008 8:37 am, Jason Pruim wrote:
On Jan 22, 2008, at 3:57 PM, Jason Pruim wrote:
Hi everyone,
#1. When including files outside of the webroot do you need to
specify the entire path? Like for me, that would be
On Jan 23, 2008 4:19 PM, Jason Pruim [EMAIL PROTECTED] wrote:
Okay, so I have this mostly working now! if I put my
ini_set(include_path, blah/to/balh); on each and every page. I
know I could include a file that is in the document root which
specified that, but I was wondering if I was missing
On Wed, January 23, 2008 1:50 pm, Roberto Mansfield wrote:
Jason Pruim wrote:
Been doing some reading on security and have decided that I should
be
storing my include files outside of the document root... Which I
understand how to do it, but what I'm wondering, is say I write the
Next
On Wed, January 23, 2008 3:19 pm, Jason Pruim wrote:
Okay, so I have this mostly working now! if I put my
ini_set(include_path, blah/to/balh); on each and every page. I
know I could include a file that is in the document root which
specified that, but I was wondering if I was missing
Hi everyone,
Been doing some reading on security and have decided that I should be
storing my include files outside of the document root... Which I
understand how to do it, but what I'm wondering, is say I write the
Next Killer App (tm). How would I port that code easily off of my
server
On Jan 22, 2008 3:57 PM, Jason Pruim [EMAIL PROTECTED] wrote:
Hi everyone,
Hi, Jason!
Been doing some reading on security and have decided that I should be
storing my include files outside of the document root... Which I
understand how to do it, but what I'm wondering, is say I write the
On Jan 22, 2008 4:21 PM, Daniel Brown [EMAIL PROTECTED] wrote:
On Jan 22, 2008 3:57 PM, Jason Pruim [EMAIL PROTECTED] wrote:
Hi everyone,
Hi, Jason!
Been doing some reading on security and have decided that I should be
storing my include files outside of the document root... Which I
On MOST setups, you might have:
/yourhomedirectory
/httpd_docs_or_something_like_that
/index.php
/page2.php
/includes
/globals.inc
/connect.inc
/sql
So, pretty much, you'd do something like:
tar -cvf my_site.tar http_docs includes
gzip my_site.tar
On Jan 22, 2008 8:09 PM, Richard Lynch [EMAIL PROTECTED] wrote:
Nothing peeves me more than some badly-conceived web-app with no way
to move the include files out of the web-tree.
You may disagree with me on this here, Rich, but the way I do it
is to have a single include_files.php file
On Tue, January 22, 2008 7:17 pm, Daniel Brown wrote:
On Jan 22, 2008 8:09 PM, Richard Lynch [EMAIL PROTECTED] wrote:
Nothing peeves me more than some badly-conceived web-app with no way
to move the include files out of the web-tree.
You may disagree with me on this here, Rich, but the
Hi,
I have created a CMS where all sites on our server are administrated from
one central site, and HTML content is stored in the CMS database.
I want users to all control their sites database functions from the CMS
site, but I want to keep the database and database admin scripts in the
://www.weberdev.com/AdvancedSearch.php?searchtype=titlesearch=auth
berber
-Original Message-
From: Shaun [mailto:[EMAIL PROTECTED]
Sent: Monday, April 17, 2006 12:46 PM
To: php-general@lists.php.net
Subject: [PHP] Including files from another site
Hi,
I have created a CMS where all sites
] Including files from another site
Hi,
I have created a CMS where all sites on our server are administrated from
one central site, and HTML content is stored in the CMS database.
I want users to all control their sites database functions from the CMS
site, but I want to keep the database
: Re: [PHP] Including files from another site
Hi,
Thanks for your reply, sorry I should have been a little clearer in my
explanation. Here goes...
I have a dedicated UNIX server with many websites on it. On this server I
have also created a Content Management System which has a database which I
take you tomorrow.
PHP code examples : http://www.weberdev.com
PHP MySQL Forums : http://www.weberforums.com
-Original Message-
From: Shaun [mailto:[EMAIL PROTECTED]
Sent: Monday, April 17, 2006 2:52 PM
To: php-general@lists.php.net
Subject: Re: [PHP] Including files from another
To: php-general@lists.php.net
Subject: Re: [PHP] Including files from another site
Hi,
Thanks for your reply, sorry I should have been a little clearer in my
explanation. Here goes...
I have a dedicated UNIX server with many websites on it. On this server I
have also created a Content
To: php-general@lists.php.net
Subject: Re: [PHP] Including files from another site
Hi,
Thanks for your reply, sorry I should have been a little clearer in my
explanation. Here goes...
I have a dedicated UNIX server with many websites on it. On this server
I
have also created a Content
://www.weberforums.com
-Original Message-
From: Shaun [mailto:[EMAIL PROTECTED]
Sent: Monday, April 17, 2006 2:52 PM
To: php-general@lists.php.net
Subject: Re: [PHP] Including files from another site
Hi,
Thanks for your reply, sorry I should have been a little clearer in my
explanation
.
PHP code examples : http://www.weberdev.com
PHP MySQL Forums : http://www.weberforums.com
-Original Message-
From: Shaun [mailto:[EMAIL PROTECTED]
Sent: Monday, April 17, 2006 2:52 PM
To: php-general@lists.php.net
Subject: Re: [PHP] Including files from another site
Hi,
Thanks
Message-
From: Shaun [mailto:[EMAIL PROTECTED]
Sent: Monday, April 17, 2006 2:52 PM
To: php-general@lists.php.net
Subject: Re: [PHP] Including files from another site
Hi,
Thanks for your reply, sorry I should have been a little clearer in my
explanation. Here goes...
I have a dedicated
On Mon, April 17, 2006 5:45 am, Shaun wrote:
I have created a CMS where all sites on our server are administrated
from
one central site, and HTML content is stored in the CMS database.
I want users to all control their sites database functions from the
CMS
site, but I want to keep the
Richard Lynch [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
On Mon, April 17, 2006 5:45 am, Shaun wrote:
I have created a CMS where all sites on our server are administrated
from
one central site, and HTML content is stored in the CMS database.
I want users to all control their
The security issue is important because I don't want anyone to be able to
use the websites database admin scripts without logging into the CMS first.
Otherwise anyone who happened to type in www.oneofmywebsites.com/cms would
be able to make unwanted changes to that particular sites database.
Hi,
I have a program which generates classes based on table structures within
a database. However there are a few times where I need to put custom
methods within these generated classes.
I want to be able to do this but php gives an error for the following include
class generatedClass {
var
Hi all,
What's the syntax for including/requiring files located in directories
different than the root directory? Especially files from different sub
directories under the root? Going down (classes/globals.php) is ok,
but going up (../globals.php) makes problems
Example:
index.php:
including/requiring a file does not change the directory, the code is
simply inserted into the current context. So you should have:
index.php: include_once('classes/globals.php')
dbase.php: include_once('classes/globals.php')
controller.php:
* Thus wrote Allex ([EMAIL PROTECTED]):
Hi all,
What's the syntax for including/requiring files located in directories
different than the root directory? Especially files from different sub
directories under the root? Going down (classes/globals.php) is ok,
but going up (../globals.php)
In response to the post found at:
http://marc.theaimsgroup.com/?l=php-generalm=104913671122253w=2
I would like to use open_basedir to stop users from reading the contents
of system files, while using include/require to let users take advantage
of scripts that I have created. These scripts
-Original Message-
From: Bill Hudspeth [mailto:[EMAIL PROTECTED]
Sent: 14 March 2003 20:07
I am developing an application that ouputs the results of a
database query
to a PDF file using PHP. The only real problem I have
encountered is in
trying to use the include and/or require
Hello,
I am developing an application that ouputs the results of a database query
to a PDF file using PHP. The only real problem I have encountered is in
trying to use the include and/or require keywords. I have a block of
code in another file that needs to called several times from my main
On Sunday 02 February 2003 23:53, Sunfire wrote:
hi was just wondering if there was a way to have a php file with all
constant variables like db mysqluser and password and a few other things
defined in a file of its own and then be able to use the variables in it
for the project it was built
hi was just wondering if there was a way to have a php file with all
constant variables like db mysqluser and password and a few other
things
defined in a file of its own and then be able to use the variables in
it
for
the project it was built for?
the last i knew it could be done and all
on 03/02/03 5:28 AM, John W. Holmes ([EMAIL PROTECTED]) wrote:
Pretty much. Only addition is to make sure filename.inc can't be viewed
through the browser.
... by having apache refuse to server all .inc files through http, via the
use of a .htaccess file (assuming apache server)
Cheers,
PROTECTED];
[EMAIL PROTECTED]
Sent: Sunday, February 02, 2003 5:46 PM
Subject: Re: [PHP] including files...
on 03/02/03 5:28 AM, John W. Holmes ([EMAIL PROTECTED]) wrote:
Pretty much. Only addition is to make sure filename.inc can't be viewed
through the browser.
... by having apache
]]
Sent: Sunday, February 02, 2003 6:08 PM
To: Justin French; [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: [PHP] including files...
how do you tell it to refuse file.inc with a .taxis file? the server i
will
be running this on is a public server and they dont allow .taxis files
i
dont
Hello
I have A LOT of files that are already made, but does now
Want to make a printerfriendly version of every file, but
Ran into some problems
How can i solve this without have to change every READILE.HTM files ??
FILE 'DEFAULT.HTM'
if (eregi (PRINT.HTM, $PHP_SELF)) {
exit;
}
HERE IT
[snip]
I have A LOT of files that are already made, but does now
Want to make a printerfriendly version of every file, but
Ran into some problems
How can i solve this without have to change every READILE.HTM files ??
[/snip]
If I understand you have a look at CSS on http://www.w3c.org.
HTH!
Is there a way to setup either the apache/php directives to produce a custom
404 if an include file fails to be included ??
Or is this a job for .HTACCESS??
Regards,
~Craig
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
There's no need to 'pass' any variables.
HINT: pretend the include() command is being replaced with the code in your include
file,
this means that whatever variables are set/available at that point will also be
available in the include.
On Mon, 28 Jan 2002 18:54:02 -0800, Evansville Scene
On Wednesday 02 January 2002 20:43, you wrote:
What you need to do is simply set the variables before you include
the script.
When you include a script with include() or require(), they fall
into the same namespace as the include() or require() function that
called them.
I read that in the
What you need to do is simply set the variables before you include the script.
When you include a script with include() or require(), they fall into the
same namespace as the include() or require() function that called them.
Best Regards,
Jason Garber
IonZoft.com
At 06:54 PM 1/28/2002 -0800,
I'm having problems passing variables into included PHP files. How can I do this?
I may be repeating myself -- use the Nike solution: just do it! :-)
Global variables are implicitly passed to includes. Please provide more info if that's
not the case (not globals/globals somehow not being passed).
Bogdan
Evansville Scene wrote:
I'm having problems passing variables into
: Monday, January 28, 2002 9:54 PM
Subject: [PHP] Including files variables ...
I'm having problems passing variables into included PHP files. How can I do
this?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL
Hello !
I am trying to keep my string after including av file.
file1.php:
(accessed with file1.php?id=1)
?php
include 'index.php';
function func() {
echo buddy;
}
?
index.php:
?php
echo Hello;
if (function_exists('func')) {
call_user_func ('func');
}
The output should then be Hello buddy;
On Tue, 25 Sep 2001 17:01, Bård Tommy Nilsen wrote:
Hello !
I am trying to keep my string after including av file.
file1.php:
(accessed with file1.php?id=1)
?php
include 'index.php';
function func() {
echo buddy;
}
?
index.php:
?php
echo Hello;
if (function_exists('func')) {
after, and that is that the
id string cant be called after including index.php ...
Bård Tommy Nilsen
-Opprinnelig melding-
Fra: David Robley [mailto:[EMAIL PROTECTED]]
Sendt: 25. september 2001 09:56
Til: Bård Tommy Nilsen; [EMAIL PROTECTED]
Emne: Re: [PHP] Including files without
to pass it to
the function as a parameter or delcare it as global within the function.
-Opprinnelig melding-
Fra: David Robley [mailto:[EMAIL PROTECTED]]
Sendt: 25. september 2001 09:56
Til: Bård Tommy Nilsen; [EMAIL PROTECTED]
Emne: Re: [PHP] Including files without loosing my string
Can you write me an short example ??
Bård Tommy Nilsen
-Opprinnelig melding-
Fra: David Robley [mailto:[EMAIL PROTECTED]]
Sendt: 25. september 2001 10:11
Til: Bård Tommy Nilsen; [EMAIL PROTECTED]
Emne: Re: SV: [PHP] Including files without loosing my string
On Tue, 25 Sep 2001 17
On Tue, 25 Sep 2001 17:46, Bård Tommy Nilsen wrote:
Can you write me an short example ??
Bård Tommy Nilsen
[About passing arguments to functions and global scoping]
Declaring $id global:
function doit() {
global $id;
echo $id;
}
$id = 1;
doit();
output is 1
Passing $id as parameter:
72 matches
Mail list logo