Re: [PHP] Including files on NFS mount slow with APC enabled

2010-08-17 Thread Mark Hunting
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 performanc

Re: [PHP] Including files on NFS mount slow with APC enabled

2010-08-16 Thread Mark Hunting
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 de

Re: [PHP] Including files on NFS mount slow with APC enabled

2010-08-16 Thread Jonathan Tapicer
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

Re: [PHP] Including files for templates

2008-03-24 Thread Eric Butera
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 parse

Re: [PHP] Including files for templates

2008-03-24 Thread Philip Thompson
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 i

Re: [PHP] Including files for templates

2008-03-23 Thread Daniel Brown
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

Re: [PHP] including files outside of document root

2008-01-24 Thread Daniel Brown
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. -- Daniel P. Brown Senior Unix Geek and #1 Rated "Year's Coolest Guy" By Self Since Nineteen-Seventy-[mumble]. -- PHP General Mail

Re: [PHP] including files outside of document root

2008-01-24 Thread Jason Pruim
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 whic

Re: [PHP] including files outside of document root

2008-01-23 Thread Richard Lynch
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 so

Re: [PHP] including files outside of document root

2008-01-23 Thread Richard Lynch
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 t

Re: [PHP] including files outside of document root

2008-01-23 Thread Daniel Brown
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

Re: [PHP] including files outside of document root

2008-01-23 Thread Jason Pruim
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 somet

Re: [PHP] including files outside of document root

2008-01-23 Thread Daniel Brown
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

Re: [PHP] including files outside of document root

2008-01-23 Thread Jason Pruim
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 webro

Re: [PHP] including files outside of document root

2008-01-23 Thread Daniel Brown
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 po

Re: [PHP] including files outside of document root

2008-01-23 Thread Roberto Mansfield
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

Re: [PHP] including files outside of document root

2008-01-23 Thread Daniel Brown
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 se

Re: [PHP] including files outside of document root

2008-01-23 Thread Jason Pruim
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 Ap

Re: [PHP] including files outside of document root

2008-01-23 Thread Roberto Mansfield
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

Re: [PHP] including files outside of document root

2008-01-23 Thread Richard Lynch
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: "/ > volumes/raider/webserver/inclu

Re: [PHP] including files outside of document root

2008-01-23 Thread Daniel Brown
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

Re: [PHP] including files outside of document root

2008-01-23 Thread Zoltán Németh
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 > > understan

Re: [PHP] including files outside of document root

2008-01-23 Thread Thijs Lensselink
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,

Re: [PHP] including files outside of document root

2008-01-23 Thread Jason Pruim
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). Ho

Re: [PHP] including files outside of document root

2008-01-22 Thread Richard Lynch
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,

Re: [PHP] including files outside of document root

2008-01-22 Thread Daniel Brown
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

Re: [PHP] including files outside of document root

2008-01-22 Thread Richard Lynch
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 And

Re: [PHP] including files outside of document root

2008-01-22 Thread shiplu
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 roo

Re: [PHP] including files outside of document root

2008-01-22 Thread Daniel Brown
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 writ

Re: [PHP] Including files from another site

2006-04-17 Thread tedd
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. Fro

Re: [PHP] Including files from another site

2006-04-17 Thread Shaun
""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 a

Re: [PHP] Including files from another site

2006-04-17 Thread Richard Lynch
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

Re: [PHP] Including files from another site

2006-04-17 Thread Wolf
are looking at this from the wrong angle. >>>>>> What you should do, is password protect all CMS directories >>>>>> And then, anyone that needs access has to punch in a valid >>>>>> Username and password. >>>>>> >>>&

Re: [PHP] Including files from another site

2006-04-17 Thread Shaun
are looking at this from the wrong angle. >>>>> What you should do, is password protect all CMS directories >>>>> And then, anyone that needs access has to punch in a valid >>>>> Username and password. >>>>> >>>>> Have a look at :

Re: [PHP] Including files from another site

2006-04-17 Thread Wolf
>>>> >>>> berber >>>> >>>> Visit the Weber Sites Today, >>>> To see where PHP might take you tomorrow. >>>> PHP code examples : http://www.weberdev.com >>>> PHP & MySQL Forums : http://www.weberforums.com >

Re: [PHP] Including files from another site

2006-04-17 Thread Shaun
t; Sincerely >>> >>> berber >>> >>> Visit the Weber Sites Today, >>> To see where PHP might take you tomorrow. >>> PHP code examples : http://www.weberdev.com >>> PHP & MySQL Forums : http://www.weberforums.com >>> >>> >>> >>

Re: [PHP] Including files from another site

2006-04-17 Thread Wolf
//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: [PH

Re: [PHP] Including files from another site

2006-04-17 Thread Shaun
y > > berber > > Visit the Weber Sites Today, > To see where PHP might take you tomorrow. > PHP code examples : http://www.weberdev.com > PHP & MySQL Forums : http://www.weberforums.com > > > > -Original Message- > From: Shaun [mailto:[EMAIL PROTECTED]

RE: [PHP] Including files from another site

2006-04-17 Thread Weber Sites LTD
.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 Management System which has a database whi

Re: [PHP] Including files from another site

2006-04-17 Thread Shaun
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

2006-04-17 Thread Weber Sites LTD
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. Usual

Re: [PHP] including files from different sub directories

2003-10-24 Thread Curt Zirzow
* 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 ("../globa

Re: [PHP] including files from different sub directories

2003-10-24 Thread Marek Kilimajer
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:include_once('classes/dataaccess/dba

RE: [PHP] including files in PHP-pdf development

2003-03-17 Thread Ford, Mike [LSS]
> -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/

RE: [PHP] including files...

2003-02-02 Thread John W. Holmes
t; From: Sunfire [mailto:[EMAIL PROTECTED]] > 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 t

Re: [PHP] including files...

2003-02-02 Thread Sunfire
TECTED]>; "'Sunfire'" <[EMAIL 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

Re: [PHP] including files...

2003-02-02 Thread Justin French
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, Jus

RE: [PHP] including files...

2003-02-02 Thread John W. Holmes
> 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 an

Re: [PHP] including files...

2003-02-02 Thread Jason Wong
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 buil

RE: [PHP] Including files and functions

2002-09-06 Thread Jay Blanchard
[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! Ja

Re: [PHP] Including files & variables ...

2002-01-09 Thread Bas van Rooijen
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 wro

Re: [PHP] Including files & variables ...

2002-01-03 Thread Tamas Arpad
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

Re: [PHP] Including files & variables ...

2002-01-02 Thread Jason G.
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,

Re: [PHP] Including files & variables ...

2001-12-28 Thread Dennis Moore
Make sure you include the tags 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: Mond

Re: [PHP] Including files & variables ...

2001-12-28 Thread Bogdan Stancescu
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 in

Re: [PHP] Including files without loosing my string

2001-09-25 Thread David Robley
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) > > include 'index.php'; > > function func() { > echo "buddy"; > } > ?> > > index.php: > echo "Hello"; > if (function_exists('f