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
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
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
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
I'm not sure I understand what you are trying to do.
What is the connection between frames and security?
In general, assuming that all users have access to
The same scripts, you need to include in all of your
Scripts some kind of security logic that tells the
Script which user can do what.
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
use to store HTML content for all the other
: 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.
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)
-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
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
[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!
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 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
Make sure you include the tags ?php ? in your include file for PHP
parsing. Included files are assumed to be text otherwise. You need to
provide more information if you have another problem.
- Original Message -
From: Evansville Scene [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent:
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')) {
56 matches
Mail list logo