Re: [PHP] include path in httpd.conf
Ash, Nice call. .htaccess was not being processed at all which led me to a cname configuration error for the sub domain. Thanks!. On 4/5/2010 8:27 PM, Ashley Sheridan wrote: On Mon, 2010-04-05 at 19:40 -0400, ad wrote: I have several virtual hosts on a dedicated server. In a IFmodule mod_php5c container in an httpd.conf include file I have the following to create a unique include path for each virtual host: IfModule mod_php5.c php_value include_path .:/home/virtual/site#/path/to/include php_admin_flag safe_mode off /IfModule For one of the virtual hosts I've set up a dev site in a subdomain at dev.site#.com for development. In the root directory of this development site I have an .htacces file to create another unique include_path solely for this development subdomain. php_value include_path .:/home/virtual/site#/path/to/dev/includes Also in the httpd.conf I have Directory /home/virtual/site#/path/to/dev/root/ Allow from all AllowOverride All Order allow,deny /Directory The configuration is CentOS 5.3, Apache/2.2.3, PHP 5.1.6 I recently upgraded the OS from FC6 and the PHP version and I have not been able to get the include_path to change for this dev.subdomain. Even after restarting apache it PHPinfo tells me it is reading the server php.ini and the virtual host include path for the httpd.conf but it is ignoring the .htaccess file. I've even tried putting the php.ini with specific settings in the /home/virtual/site#/root directory to no avail. Any ideas how to make this work or even a better set up? Thanks in advance. Are you able to determine if you can set any attributes with the .htaccess file? Is it possible the .htaccess isn't being processed at all? I'm not sure why the virtual server settings are being ignored in the httpd.conf file though. Have you checked any other .conf files in that directory to see that they are not being set there? As far as I can remember, the .conf files in that directory are executed in alphabetical order, so a different file might be overriding your settings? Thanks, Ash http://www.ashleysheridan.co.uk
Re: [PHP] include path file errors
2006-04-08 (토), 18:20 +0900, kmh496 쓰시길: hi, my webroot is /a/b/current/ i am in /a/b/current/d/file.php file.php has a line require_once ($_SERVER[document_root]./d/common.php); common.php has a line which says require_once ($_SERVER[document_root]./_common.php); // main include file for whole site it sends me no errors about missing files, but the variables inside main include file _common.php are not set and don't exist in file.php where is my mistake? I am going to say this is screwed up. i can't include a file inside another included file and access its variables. all i can do is include the main file in every single file in a backwards manner -- reaching down the chain -- because i find that if i do 2 includes then the initail data is no longer included. but sometimes there is magic going on, but then i move one file and then the whole system breaks, it makes me crazy. even more so because i can't explain it well because it's so freaky. is there no tutorial on advanced php with all this include stuff? i RTMFM but the page didn't address advanced questions like that. and despite my english i believe i am advanced level. thankx everybody. joseph -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] include path file errors
kmh496 wrote: 2006-04-08 (토), 18:20 +0900, kmh496 쓰시길: hi, my webroot is /a/b/current/ i am in /a/b/current/d/file.php file.php has a line require_once ($_SERVER[document_root]./d/common.php); common.php has a line which says require_once ($_SERVER[document_root]./_common.php); // main include file for whole site it sends me no errors about missing files, but the variables inside main include file _common.php are not set and don't exist in file.php where is my mistake? I am going to say this is screwed up. i can't include a file inside another included file and access its variables. all i can do is include the main file in every single file in a backwards manner -- reaching down the chain -- because i find that if i do 2 includes then the initail data is no longer included. but sometimes there is magic going on, but then i move one file and then the whole system breaks, it makes me crazy. even more so because i can't explain it well because it's so freaky. is there no tutorial on advanced php with all this include stuff? i RTMFM but the page didn't address advanced questions like that. and despite my english i believe i am advanced level. thankx everybody. joseph Just a thought: Are your variable definitions, by any chance, inside functions? That would explain why they aren't set when you continue. The 'global' statement will help in that case. I can assure you that includes are not advanced PHP. You should be able to do what you are trying to do. There is no doubt a simple explanation for your problem. Finding it is always the hard part. Patience and perserverence and calm rational thought will get you there. Good luck. John -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] include path file errors
kmh496 wrote: hi, my webroot is /a/b/current/ i am in /a/b/current/d/file.php file.php has a line require_once ($_SERVER[document_root]./d/common.php); common.php has a line which says require_once ($_SERVER[document_root]./_common.php); // main include file for whole site it sends me no errors about missing files, but the variables inside main include file _common.php are not set and don't exist in file.php where is my mistake? muchas gracias. KMH-- It's hard to say without seeing your code, but here are a few thoughts. Remember that require_once is conditional. A given file will only be included once for an entire response. (You might patch them from 'require_once' to 'require' to see if that makes a difference, although of course it may break something else.) You may need to do some basic trace debugging: i.e. inserting displays (echos to the output or error_log() entries) to trace exactly what is happening. Good luck! John -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] include path file errors
2006-04-08 (토), 12:18 -0400, John Hicks 쓰시길: kmh496 wrote: 2006-04-08 (토), 18:20 +0900, kmh496 쓰시길: hi, my webroot is /a/b/current/ i am in /a/b/current/d/file.php file.php has a line require_once ($_SERVER[document_root]./d/common.php); common.php has a line which says require_once ($_SERVER[document_root]./_common.php); // main include file for whole site it sends me no errors about missing files, but the variables inside main include file _common.php are not set and don't exist in file.php where is my mistake? Just a thought: Are your variable definitions, by any chance, inside functions? That would explain why they aren't set when you continue. The 'global' statement will help in that case. I can assure you that includes are not advanced PHP. You should be able to do what you are trying to do. There is no doubt a simple explanation for your problem. Finding it is always the hard part. Patience and perserverence and calm rational thought will get you there. the problem is when i want to expand a site with a new application, usually that comes in its own directory. but, to include the new application i have to wrap it inside the main directory -- in this case /a/b/current which requires of course that i call first /a/b/current/common.php which starts the sessions, sends the cookies, checks post variables. but that doesn't work, really, because then all of the includes for the application says include(main.php) ... but php thinks it's in /a/b/current not in /a/b/current/d/ . so it says cannot find include file main.php in path: path:::;; .. my wish list: 1) applications came with a configurable directory to preced every include or require. like, change include(main.php) -- include( $config[dir] . main.php ) alternatively, 2) all applications come with a unique prefix affixed to the files so they can simply be laid out in the document root and be visually and mentally and upgradably separate from the files of the other applications existing in the same $_SERVER[document_root] i honestly don't understand the include mechanism. i have encountered many cases ( sorry, can't be explicit) where a file which was 2 includes away wouldn't have any variables in the main script, unless i added a line to include that file in that file directly. as an example: /a/b/current/index.php include(common.php); include(lib/functions2.php); /a/b/current/lib/functions2.php you would think would be able to simply run with what was included above it but you can't. you have to redeclare include_once($g4[bbs]. /dbconfig.php); include_once($g4[bbs]. /common.php); the include of the common.php file. i am looking for the rule for that they say it's global, but it's not. However, i found that if you include common.php again then it finds the functions it misses, because it itself was included by common.php. as if the direction of the includes matters . explicitly: if common.php includes lib/functions.php common.php can access lib/functions.php but if lib/functions.php needs common.php then lib/functions.php needs to include common.php is that correct? because of these problems, when i have to wrap another application inside an existing SKIN and common.php, i end up changing the file names, running a SED script to replace all occurrences of filenames with their newly-uniquely-prefixed-names . -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Include path quirks
I've been attempting to write an application with a bit more ordered directory structure than I normally use, and I ran into the rather annoying problem with include() where relative paths are only based off of the current working directory, and not that of the included script. This makes it impossible to include script correctly, because the path from the working directory is different than that of the included file. The problem is I'm trying to include /include/global.php from /elements/nav.php but topnav is included by /index.php Which results in a failed top open stream error. Is there any way around this annoying idiosyncrasy? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Include path
Hello, I am a bit confused :-(, this is my server path: /home/sites/site80/web/articles/myfile.php from myfile.php I want to include header.php which is located in: /home/sites/site80/web/templates/ /* eg: /home/sites/site80/web/articles/myfile.php /home/sites/site80/web/templates/header.php */ After searching on google I tried using: $_SERVER[PATH_TRANSLATED]; but I think I am using it wrong coz its not working.. Please help. Thanks, Mag = -- - The faulty interface lies between the chair and the keyboard. - Creativity is great, but plagiarism is faster! - Smile, everyone loves a moron. :-) __ Do you Yahoo!? Vote for the stars of Yahoo!'s next ad campaign! http://advision.webevents.yahoo.com/yahoo/votelifeengine/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Include path
[snip] /home/sites/site80/web/articles/myfile.php from myfile.php I want to include header.php which is located in: /home/sites/site80/web/templates/ /* eg: /home/sites/site80/web/articles/myfile.php /home/sites/site80/web/templates/header.php */ [/snip] in /home/sites/site80/web/articles/myfile.php place the following line include /home/sites/site80/web/templates/header.php; -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Include path
PHP Gen wrote: Hello, I am a bit confused :-(, this is my server path: /home/sites/site80/web/articles/myfile.php from myfile.php I want to include header.php which is located in: /home/sites/site80/web/templates/ include('/home/sites/site80/web/templates/header.php'); Are you looking for a relative path or wondering why include('header.php') doesn't work, or what? -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine for PHP Professionals www.phparch.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Include path
--- Jay Blanchard [EMAIL PROTECTED] wrote: [snip] /home/sites/site80/web/articles/myfile.php from myfile.php I want to include header.php which is located in: /home/sites/site80/web/templates/ /* eg: /home/sites/site80/web/articles/myfile.php /home/sites/site80/web/templates/header.php */ [/snip] in /home/sites/site80/web/articles/myfile.php place the following line include /home/sites/site80/web/templates/header.php; :-) Good solution, but the problem is once the program is completed it goes out of my hands and most prolly the client wont know the exact paths, the templates folder would *always* be one below...but the path before the /templates will change. Anyway, heres what I have come up with, comments are welcome: $pieces = explode(/, $_SERVER[PATH_TRANSLATED]); $a=count($pieces); $f=; for($i=1; $i $a-2; $i++) {$f=$f.$pieces[$i]./;} $include_path= /.$f; -Mag = -- - The faulty interface lies between the chair and the keyboard. - Creativity is great, but plagiarism is faster! - Smile, everyone loves a moron. :-) __ Do you Yahoo!? Vote for the stars of Yahoo!'s next ad campaign! http://advision.webevents.yahoo.com/yahoo/votelifeengine/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Include path
Good solution, but the problem is once the program is completed it goes out of my hands and most prolly the client wont know the exact paths, the templates folder would *always* be one below...but the path before the /templates will change. if you dont know what directory it will be in, how can you include it? Anyway, heres what I have come up with, comments are welcome: $pieces = explode(/, $_SERVER[PATH_TRANSLATED]); $a=count($pieces); $f=; for($i=1; $i $a-2; $i++) {$f=$f.$pieces[$i]./;} $include_path= /.$f; Have you tried $_SERVER['DOCUMENT_ROOT'].'/'; -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Include path
Have you tried; Include ../templates/header.php; Warren Vail -Original Message- From: PHP Gen [mailto:[EMAIL PROTECTED] Sent: Friday, July 23, 2004 12:28 PM To: Jay Blanchard; php php Subject: RE: [PHP] Include path --- Jay Blanchard [EMAIL PROTECTED] wrote: [snip] /home/sites/site80/web/articles/myfile.php from myfile.php I want to include header.php which is located in: /home/sites/site80/web/templates/ /* eg: /home/sites/site80/web/articles/myfile.php /home/sites/site80/web/templates/header.php */ [/snip] in /home/sites/site80/web/articles/myfile.php place the following line include /home/sites/site80/web/templates/header.php; :-) Good solution, but the problem is once the program is completed it goes out of my hands and most prolly the client wont know the exact paths, the templates folder would *always* be one below...but the path before the /templates will change. Anyway, heres what I have come up with, comments are welcome: $pieces = explode(/, $_SERVER[PATH_TRANSLATED]); $a=count($pieces); $f=; for($i=1; $i $a-2; $i++) {$f=$f.$pieces[$i]./;} $include_path= /.$f; -Mag = -- - The faulty interface lies between the chair and the keyboard. - Creativity is great, but plagiarism is faster! - Smile, everyone loves a moron. :-) __ Do you Yahoo!? Vote for the stars of Yahoo!'s next ad campaign! http://advision.webevents.yahoo.com/yahoo/votelifeengine/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Include path
$baseDir = $_SERVER[DOCUMENT_ROOT]; $templatesDir = $baseDir . /templates/; include($templatesDir . header.php); include($templatesDir . body.php); include($templatesDir . footer.php); :-) Good solution, but the problem is once the program is completed it goes out of my hands and most prolly the client wont know the exact paths, the templates folder would *always* be one below...but the path before the /templates will change. Anyway, heres what I have come up with, comments are welcome: $pieces = explode(/, $_SERVER[PATH_TRANSLATED]); $a=count($pieces); $f=; for($i=1; $i $a-2; $i++) {$f=$f.$pieces[$i]./;} $include_path= /.$f; -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Include path
Have you tried $_SERVER['DOCUMENT_ROOT'].'/'; sorry, I meant include($_SERVER['DOCUMENT_ROOT'].'/templates/header.php'); -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Include path (SOLVED)
Hey everyone, ** Have you tried $_SERVER['DOCUMENT_ROOT'].'/'; ** Matt, DAMN! THATS what I was looking for. No, didnt try that, took the long route home instead, but atleast brushed up on php's explode function. ** $baseDir = $_SERVER[DOCUMENT_ROOT]; $templatesDir = $baseDir . /templates/; include($templatesDir . header.php); include($templatesDir . body.php); include($templatesDir . footer.php); ** Ed, perfect. ** Have you tried; Include ../templates/header.php; ** Warren, yep, tried that and also ../../templates/header.php; and more, it was going to the root (/home/sites/ etc) Thanks, everyone. Cheers, -Mag = -- - The faulty interface lies between the chair and the keyboard. - Creativity is great, but plagiarism is faster! - Smile, everyone loves a moron. :-) __ Do you Yahoo!? Yahoo! Mail - 50x more storage than other providers! http://promotions.yahoo.com/new_mail -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Include Path Troubles... I figured it out!
Hi all, If you're having trouble with PHP includes and directories, are on a shared server, etc. this function is totally cool: ini_set(include_path,.:/your/dir/to/whatever:/another/dir/to/whatever); make sure you put the '.:' at the begginning and seperate with a ':'. I'm using it and it works really well if you put it at the top of all your pages! The include_path returns to the normal value when the script is completed. -Michael -- Mike [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: php include path setting in .htaccess
php_value include_path /includefiles/://includefiles/ Bill wrote: How can I set the php include path on an Apache machine using htaccess Assuming I'm puting it outside of the web root, I think it is something like: php_include_path /includefiles/://includefiles/ but that generates server errors Any suggestions? kind regards, bill hollett -- PHP General Mailing List (http://wwwphpnet/) To unsubscribe, visit: http://wwwphpnet/unsubphp
[PHP] include path-problem
Hi I have a problem with the include command.I want to include a txt file in a php file.But this txt file must include in every php file on the server and these phpfiles are in different directories. Here is the Problem : www.domain.com/index2.php and www.domain.com/support/shop.php must include the txt file from www.domain.com/includes/news.txt. So i used for this problem ?php include(/server/path/includes/news.txt); ? for every php file.But this works only for the www.domain.com/index2.php file. So what should i do to get the txt file in the www.domain.com/support/shop.php file ? Thank you very much for support !!! chris
[PHP] include path syntax for php.ini under windows
Hi, I would like to know the correct syntax of include_path for php.ini under windows. I have tried to set the include path as C:\home\main\require but it doesn't work. Thanks in advance Mark -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] include + path
Hello All, I have a app that is used to track stats, it was designed to be used on the smae server that the website being tracked is, it uses an include and a path statement to register a hit in the page being displayed. Does anyone know of a method where I could get the remote website to invoke the stat counter? ie is there something that can be used on the remote site to call a php file on another server, this other file would be on the same server as the stats php app and therefore include the include function and the path, the main problem or hold up as I see it is the need for a path and not being able to use a http:// path, if the above is not clear I will e-mail off list if reqd. an example is.. each page being tracked needs something like this locally $file_include_dir = /stats/include/'; include($file_include_dir.'stats/include/visitor.inc.php3'); how could this be invoked remotely, or how else does anyone see this as being able to be done, in the remote page I want the effect to be transparent Thanks... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] include + path
Easy, ... Use JavaScript or simple HTML... javascript: script Language=JavaScript src=yousite/yourscripts/statcounter.php/script Now you've just been called from another server! Now from within your script you can get lots of informations like: $HTTP_REFERER ... -elias http://www.eassoft.cjb.net Greg Wright [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hello All, I have a app that is used to track stats, it was designed to be used on the smae server that the website being tracked is, it uses an include and a path statement to register a hit in the page being displayed. Does anyone know of a method where I could get the remote website to invoke the stat counter? ie is there something that can be used on the remote site to call a php file on another server, this other file would be on the same server as the stats php app and therefore include the include function and the path, the main problem or hold up as I see it is the need for a path and not being able to use a http:// path, if the above is not clear I will e-mail off list if reqd. an example is.. each page being tracked needs something like this locally $file_include_dir = /stats/include/'; include($file_include_dir.'stats/include/visitor.inc.php3'); how could this be invoked remotely, or how else does anyone see this as being able to be done, in the remote page I want the effect to be transparent Thanks... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] include + path
Hello All, I have a app that is used to track stats, it was designed to be used on the smae server that the website being tracked is, it uses an include and a path statement to register a hit in the page being displayed. Does anyone know of a method where I could get the remote website to invoke the stat counter? ie is there something that can be used on the remote site to call a php file on another server, this other file would be on the same server as the stats php app and therefore include the include function and the path, the main problem or hold up as I see it is the need for a path and not being able to use a http:// path, if the above is not clear I will e-mail off list if reqd. an example is.. each page being tracked needs something like this locally $file_include_dir = /stats/include/'; include($file_include_dir.'stats/include/visitor.inc.php3'); how could this be invoked remotely, or how else does anyone see this as being able to be done, in the remote page I want the effect to be transparent Thanks... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] include + path how to invoke a remote PHP script
Hello All, I have a app that is used to track stats, it was designed to be used on the smae server that the website being tracked is, it uses an include and a path statement to register a hit in the page being displayed. Does anyone know of a method where I could get the remote website to invoke the stat counter? ie is there something that can be used on the remote site to call a php file on another server, this other file would be on the same server as the stats php app and therefore include the include function and the path, the main problem or hold up as I see it is the need for a path and not being able to use a http:// path, if the above is not clear I will e-mail off list if reqd. an example is.. each page being tracked needs something like this locally $file_include_dir = /stats/include/'; include($file_include_dir.'stats/include/visitor.inc.php3'); how could this be invoked remotely, or how else does anyone see this as being able to be done, in the remote page I want the effect to be transparent Thanks... PS apologies if this is a double message. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] include path per script
Martn Marqus schrieb: Is it posible to change the value of include_path in a php script without changing it in php.ini? Try ini_set() friends, http://www.php.net/manual/en/function.ini-set.php . Ulf -- Neu: PEAR Menu 3 - Navigationsstrukturen dynamisch dargestellt http://www.ulf-wendel.de/projekte/menu/tutorial.php | http://www.phpdoc.de -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] include path confusion
Thanks for the info Brian. But what about the path you have in the include statement? IE: include "../path1/file.php" Does it ignore the path? Try the path? Or just append that path to the end of each path in the include_path? Best regards, Randy Wednesday, January 10, 2001, 5:06:44 PM, you wrote: BC Hello Randy, BC (R == "Randy") [EMAIL PROTECTED] writes: R How I think it SHOULD work is like DOS - First it looks at where R you say it is. If not there, it looks in the current directory. BC Let's not forget Unix. ;-) R If not there, it looks in the directories in the path. I'm sure PHP R doesn't work this way, but I can't figure out how it does work. BC % egrep include /usr/local/lib/php3.ini BC include_path = ; UNIX: "/path1:/path2" Windows: "\path1;\path2" BC It checks each path in order. It will stop when it finds the file in BC the first available location. R Please, if anybody understands this, let me know. BC -Brian BC -- BC An adequate bootstrap is a contradiction in terms. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] include path confusion
Thanks for the info Brian. But what about the path you have in the include statement? IE: include "../path1/file.php" Does it ignore the path? Try the path? Or just append that path to the end of each path in the include_path? Best regards, Randy Wednesday, January 10, 2001, 5:06:44 PM, you wrote: BC Hello Randy, BC (R == "Randy") [EMAIL PROTECTED] writes: R How I think it SHOULD work is like DOS - First it looks at where R you say it is. If not there, it looks in the current directory. BC Let's not forget Unix. ;-) R If not there, it looks in the directories in the path. I'm sure PHP R doesn't work this way, but I can't figure out how it does work. BC % egrep include /usr/local/lib/php3.ini BC include_path = ; UNIX: "/path1:/path2" Windows: "\path1;\path2" BC It checks each path in order. It will stop when it finds the file in BC the first available location. R Please, if anybody understands this, let me know. BC -Brian BC -- BC An adequate bootstrap is a contradiction in terms. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] include path confusion
Randy wrote: Thanks for the info Brian. But what about the path you have in the include statement? IE: include "../path1/file.php" Does it ignore the path? Try the path? Or just append that path to the end of each path in the include_path? Best regards, Randy My experience is that "../path1/file.php" is appended to all paths in the include path, as well as your current path. Current path, btw, if you are using a lot of included files are always the path of the inital script called. -- Paul K Egell-Johnsen Utvikler/PR Manager eZ systems as http://ez.no/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] include path confusion
Hello Randy, (R == "Randy") [EMAIL PROTECTED] writes: R Thanks for the info Brian. But what about the path you have in the R include statement? IE: include "../path1/file.php" R Does it ignore the path? Try the path? Or just append that path to R the end of each path in the include_path? Using PHP 3.0.18, every, single time I've used something like: include('../farmers/underwear.php'); It works as expected. -Brian -- Crashing is the only thing windows does quickly. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] include path confusion
(BC == "Brian Clark") [EMAIL PROTECTED] writes: R Thanks for the info Brian. But what about the path you have in the R include statement? IE: include "../path1/file.php" R Does it ignore the path? Try the path? Or just append that path to R the end of each path in the include_path? BC Using PHP 3.0.18, every, single time I've used something like: BC include('../farmers/underwear.php'); BC It works as expected. I'm half alseep. I see what you're saying. I suppose if you did: include('corn.php'); It's going to try each path. Ie. ".:/include:/usr/src" ./corn.php (if not in .) /include/corn.php (if not in /include) /usr/src/corn.php (if not in /usr/src) Error. And I *suspect* that even if you use ../corn.php, it's going to try the include paths in the same way. ../corn.php is equivalent to ./../corn.php -Brian -- Like punning, programming is a play on words. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] include path confusion
Hello Randy, (R == "Randy") [EMAIL PROTECTED] writes: R How I think it SHOULD work is like DOS - First it looks at where R you say it is. If not there, it looks in the current directory. Let's not forget Unix. ;-) R If not there, it looks in the directories in the path. I'm sure PHP R doesn't work this way, but I can't figure out how it does work. % egrep include /usr/local/lib/php3.ini include_path = ; UNIX: "/path1:/path2" Windows: "\path1;\path2" It checks each path in order. It will stop when it finds the file in the first available location. R Please, if anybody understands this, let me know. -Brian -- An adequate bootstrap is a contradiction in terms. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]