PHP extension dir

Posted on 2011-09-04
Medium Priority
Last Modified: 2012-05-12
Everytime I nedd to change my PHP extension file localtion I have to amend php.ini, namely the following lines:
; Directory in which the loadable extensions (modules) reside.
; http://php.net/extension-dir
; extension_dir = "./"
; On windows:
; extension_dir = "ext"
extension_dir = "C:\Myapplication\WBS\php\ext\"

Whenever the "Myapplication" Directory has spaces between the path, for example "Program Files"  PHP can´t reach the directory where the extensions reside.
Can anyone give some clue to solve this?
Kind regards
Question by:luciliacoelho
  • 2
LVL 15

Expert Comment

ID: 36480445
You need to generate Windows Short File Names:


Open a CMD promt in Windows and type:

dir *. /x

This will give you the short names.

For example, "program files" becomes "PROGRA~1"

15/05/2011  11:47    <DIR>          PROGRA~1     Program Files
LVL 15

Expert Comment

ID: 36480446
More information on short names can be found here: http://answers.google.com/answers/threadview/id/522710.html
LVL 84

Accepted Solution

Dave Baldwin earned 2000 total points
ID: 36480779
The strongest recommendation is to put your files in directories without that problem.  "C:\PHP\ext" is what is recommended.
LVL 111

Expert Comment

by:Ray Paseur
ID: 36481352
What DaveBaldwin said!

No points, please. ~Ray

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Build an array called $myWeek which will hold the array elements Today, Yesterday and then builds up the rest of the week by the name of the day going back 1 week.   (CODE) (CODE) Then you just need to pass your date to the function. If i…
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

587 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question