rpjd Posted December 19, 2007 Share Posted December 19, 2007 Running PHP5 on XP. All ext's uncommented in php.ini include path="c:\Program Files\PHP\ext" in php.ini Yet when I try to execute a php script, php.exe cannot locate php_mbstring.dll or any other req'd extension in the \ext folder. I have uncommented all the mbstring attributes in php.ini and changed the language property from Japanese to All. Does anyone have a solution to this? Or might there may be something I may have overlooked? RPJD Quote Link to comment https://forums.phpfreaks.com/topic/82399-phpexe-unabe-to-locate-component/ Share on other sites More sharing options...
corbin Posted December 19, 2007 Share Posted December 19, 2007 Try include path="c:/Program Files/PHP/ext" or include path="c:\\Program Files\\PHP\\ext" That may or may not be it.... But try that first. Quote Link to comment https://forums.phpfreaks.com/topic/82399-phpexe-unabe-to-locate-component/#findComment-418894 Share on other sites More sharing options...
trq Posted December 19, 2007 Share Posted December 19, 2007 Extensions do not need to be in your include_path, extension_dir is the directive you need to set. Quote Link to comment https://forums.phpfreaks.com/topic/82399-phpexe-unabe-to-locate-component/#findComment-419033 Share on other sites More sharing options...
rpjd Posted December 20, 2007 Author Share Posted December 20, 2007 My extension_dir is extension_dir ="C:\Program Files\PHP\ext" This is my include path which I am not sure about! include_path = .:/usr/local/lib/php:./include Any advice? RPJD. Quote Link to comment https://forums.phpfreaks.com/topic/82399-phpexe-unabe-to-locate-component/#findComment-419086 Share on other sites More sharing options...
trq Posted December 20, 2007 Share Posted December 20, 2007 The include_path directive has nothing to do with extensions, it is the path php searches when you include files. If your trying to run cli scripts, make sure your actually changing the right php.ini. It is usually a different one to that used by mod_php (apache). Other than that, I can't be of much more help as I don't use windows. Quote Link to comment https://forums.phpfreaks.com/topic/82399-phpexe-unabe-to-locate-component/#findComment-419112 Share on other sites More sharing options...
wildteen88 Posted December 20, 2007 Share Posted December 20, 2007 Only enable a few extensions at a time don't enable every single extension. Some extensions listed within the php.ini rely upon external libraries for example php_mysql.dll requires a library called libmysql.dll which is located within PHP's installation folder (C:/Program Files/php). PHP doesn't check for these libraries where it has been installed. Instead it searches for these in key locations, these being within the C:/WINDOWS or C:/WINDOWS/SYSTEM32 folders or the Windows Registry or the Windows PATH environment variable. I always find it best to add PHP to the PATH. Rather than having to copy extensions/php libraries all over the place, doing so can cause problem when upgrading PHP. Adding PHP to PATH will allow PHP to access itself and so it can search for required libraries/files it'll need when starting up. You can readup on how to add PHP to the PATH here. You should not need to modify the include_path, the default setting should be ok. Quote Link to comment https://forums.phpfreaks.com/topic/82399-phpexe-unabe-to-locate-component/#findComment-419630 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.