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

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

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

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 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

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

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 parsed by

[PHP] Including files for templates

2008-03-23 Thread Terry Burns-Dyson
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(

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 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 which

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

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).

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 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 understand how to do

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 as a

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: /

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 my

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

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

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 if

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

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

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 my 1

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

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 missing

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 the Next

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

[PHP] including files outside of document root

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

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 write the

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 root... Which I

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

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 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

[PHP] Including files from another site

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

RE: [PHP] Including files from another site

2006-04-17 Thread Weber Sites LTD
://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

Re: [PHP] Including files from another site

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

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

Re: [PHP] Including files from another site

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

Re: [PHP] Including files from another site

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

Re: [PHP] Including files from another site

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

Re: [PHP] Including files from another site

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

Re: [PHP] Including files from another site

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

Re: [PHP] Including files from another site

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

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 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 all control their

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.

[PHP] Including files within a class definition

2004-07-04 Thread Cameron Just
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

[PHP] including files from different sub directories

2003-10-24 Thread Allex
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:

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:

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 (../globals.php)

[PHP] including files with open_basedir restriction

2003-06-25 Thread Adam Henry
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

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/or require

[PHP] including files in PHP-pdf development

2003-03-14 Thread Bill Hudspeth
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

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 built

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 and all

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,

Re: [PHP] including files...

2003-02-02 Thread Sunfire
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

RE: [PHP] including files...

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

[PHP] Including files and functions

2002-09-06 Thread Bård Tommy Nilsen
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

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!

[PHP] Including Files

2002-04-03 Thread Craig Donnelly
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

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

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 the

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,

[PHP] Including files variables ...

2001-12-28 Thread Evansville Scene
I'm having problems passing variables into included PHP files. How can I do this?

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

Re: [PHP] Including files variables ...

2001-12-28 Thread Dennis Moore
: 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

[PHP] Including files without loosing my string

2001-09-25 Thread Bård Tommy Nilsen
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;

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) ?php include 'index.php'; function func() { echo buddy; } ? index.php: ?php echo Hello; if (function_exists('func')) {

SV: [PHP] Including files without loosing my string

2001-09-25 Thread Bård Tommy Nilsen
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

Re: SV: [PHP] Including files without loosing my string

2001-09-25 Thread David Robley
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

SV: SV: [PHP] Including files without loosing my string

2001-09-25 Thread Bård Tommy Nilsen
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

Re: SV: SV: [PHP] Including files without loosing my string

2001-09-25 Thread David Robley
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: