setting include paths in php.ini
Posted by: Dmacman (---.eriepa.dsl-w.verizon.net)
Date: July 12, 2006 05:37PM

Hi everyone,

I have been using an ISP for our hosting and have a WAMP server setup on my machine for testing purposes. We are now setting up our own 'ISP' server and want to resolve, once and for all, the issues with includes.

In the past, when I tried to design a header for the pages and tried includes, once I was one or two directories deeper than the root, the includes would break and I would lose the paths for the images, etc.

So I went into my 'testing' server and tried changing the windows include path.

Here is the php.ini version that came when I installed WAMP...

include_path = ".;c:\php\includes"

but to get it to work, I had to change it to this...

include_path = ".;c:/php/includes" Actually ---> include_path = ".;c:/wamp/includes"

But that only recognizes files in that directory, not one level down. IE c:/wamp/includes/ITCM is not found.


So I read up on it and tried this...

include_path = ".;c:/wamp/includes.;c:/wamp/includes/ITCM"

and I still cannot see any files in the ITCM directory.

I am missing something big time here, but I don't know what?

I am trying to get this working on my machine, so I can apply my techniques on the new web server when it is installed on thursday.

Does anyone have any guidance on this.

Thanks in advance,

Don



Post Edited (07-12-06 18:37)

Options: ReplyQuote
Re: setting include paths in php.ini
Posted by: CyberSpatium (67.170.181.---)
Date: July 12, 2006 08:36PM

first, wamp should not be used for a production server. it has no securiy in place and is not designed to be a production server.

change your include_path setting back. when you include files you specify the path to use.

here is an example to correctly use included. I put all my includes in a special folder.
c:\wamp\www\testsite\library\includes

include('/testsite/library/includes/somefile.ini.php');
require('/testsite/library/includes/somefile.ini.php');
include_once('/testsite/library/includes/somefile.ini.php');
require_once('/testsite/library/includes/somefile.ini.php');

Options: ReplyQuote
Re: setting include paths in php.ini
Posted by: Dmacman (---.eriepa.dsl-w.verizon.net)
Date: July 12, 2006 09:34PM

Thanks for the answer.

Your responses raised a few more questions for me.

1) I read somewhere that the includes directory should be located outside your root (www) directory, and in your examples, it is nested inside.

2) You said WAMP was not meant for production servers. I did not realize that installing MySQL, PHP manually was more secure than letting WAMP install it? I changed the password for 'root' . What other security issues would be resolved by manually installing these programs?

I appreciate the feedback, and we are having our server installed Thursday and I need to install PHP5 and MySQL after that, so your responses will be GREATLT appreciated.

Thanks,
Don

Options: ReplyQuote


Sorry, only registered users may post in this forum.