Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

PHP extension dir

Posted on 2011-09-04
4
Medium Priority
?
489 Views
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
Lucilia
0
Comment
Question by:luciliacoelho
  • 2
4 Comments
 
LVL 15

Expert Comment

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

http://support.microsoft.com/kb/142982

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
0
 
LVL 15

Expert Comment

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

Accepted Solution

by:
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.
0
 
LVL 111

Expert Comment

by:Ray Paseur
ID: 36481352
What DaveBaldwin said!

No points, please. ~Ray
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Many old projects have bad code, but the budget doesn't exist to rewrite the codebase. You can update this code to be safer by introducing contemporary input validation, sanitation, and safer database queries.
There are times when I have encountered the need to decompress a response from a PHP request. This is how it's done, but you must have control of the request and you can set the Accept-Encoding header.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
Suggested Courses

824 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