Solved

PHP extension dir

Posted on 2011-09-04
4
472 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 83

Accepted Solution

by:
Dave Baldwin earned 500 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 109

Expert Comment

by:Ray Paseur
ID: 36481352
What DaveBaldwin said!

No points, please. ~Ray
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Developers of all skill levels should learn to use current best practices when developing websites. However many developers, new and old, fall into the trap of using deprecated features because this is what so many tutorials and books tell them to u…
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
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.

770 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