2

my php.ini(C:\php) file include path

; Windows: "\path1;\path2"
include_path = ".;C:\php\extras;C:\php\extras\doctrine-dbal"

but phpinfo() look as include_path =.;C:\php\pear

how can i change include path as include_path = ".;C:\php\extras;C:\php\extras\doctrine-dbal"

i'm sure there ara no more php.ini file and my apache web server were restart

when i view include path using

<?php
phpinfo();
?>

enter image description here

enter image description here

Duleep
  • 569
  • 5
  • 25
  • 49

2 Answers2

4

You can modify the value in your php.ini configuration file or you can use the set_include_path function at runtime. There may be various versions of php.ini configuration files on your system/server. Refer to you phpinfo() output for what location is being used for your instance.

Your location appears to be C:\php\php.ini per the Loaded Configuration File directive so you would want to modify that version.

;;;;;;;;;;;;;;;;;;;;;;;;;
; Paths and Directories ;
;;;;;;;;;;;;;;;;;;;;;;;;;

; UNIX: "/path1:/path2"
;include_path = ".:/php/includes"
;
; Windows: "\path1;\path2"
;include_path = ".;c:\php\includes"
;
; PHP's default setting for include_path is ".;/path/to/php/pear"
; http://php.net/include-path
Robert
  • 8,717
  • 2
  • 27
  • 34
  • i know but i want to change in the php.ini file. when i change that not effected in phpinfo() – Duleep Jul 10 '12 at 03:09
  • yes i restarted, but nothing change in my include path (is there any module need to enable in apache server) – Duleep Jul 10 '12 at 03:28
1

Make sure you are looking at the right php.ini.

Besides that, you could set the include path in you code by using set_include_path function.

xdazz
  • 158,678
  • 38
  • 247
  • 274
  • i'll post complete phpinfo() in that show to me Loaded Configuration File in the C:\php\php.ini location – Duleep Jul 10 '12 at 03:16