Page 1 of 1
include_path in php.ini on local server
Posted: Sun Jan 15, 2012 12:47 pm
by wmike1503
Hi,
I am trying to set a new include_path. My site is on a local server with various sub-directories for different web projects.
I have a php tutorial site in the following share on a QNAP server - qweb/phplearning. I want to add this directory to the include_path. I'm struggling with the correct syntax to use.
Any help gratefully received. Sorry if this is a bit basic.
Cheers,
Mike
Re: include_path in php.ini on local server
Posted: Sun Jan 15, 2012 5:47 pm
by Christopher
Re: include_path in php.ini on local server
Posted: Mon Jan 16, 2012 2:32 am
by wmike1503
Hi Christopher,
Thanks for that.
Yes, I've already looked at those links. My problem is the syntax - I've tried various forms, .:/qweb/phplearning , .:/localhost/phplearning, .:ip/phplearning. None of them seem to work. I am, obviously not getting the correct syntax. That is my question - what am I doing wrong. I am sure it is a simple mistake. I understand that you seperate each folder with :
Cheers,
Mike
Re: include_path in php.ini on local server
Posted: Mon Jan 16, 2012 12:06 pm
by Tiancris
The separator character depends on the server operating system:
- Linux uses ":".
- Windows uses ";".
It is better to use the PHP constant PATH_SEPARATOR.
Re: include_path in php.ini on local server
Posted: Mon Jan 16, 2012 2:19 pm
by wmike1503
Hi,
Thanks for that, yep I understand that - on Linux. Path_Seperator - getting more confused

.
I simply wish to understand the correct syntax for point the path to the local hosted directory as described above.
Cheers,
Mike
Re: include_path in php.ini on local server
Posted: Mon Jan 16, 2012 7:32 pm
by Christopher
You absolute path may be something like "/home/qweb/phplearning". If you can login to a shell in that computer, "cd" to that directory and then run the command "pwd" to show the current absolute path.