[RTFM! From the ‘install.txt’…]
15. How do I make the php.ini file available to PHP on windows?
There are several ways of doing this. If you are using Apache, read
their installation specific instructions (Apache 1, Apache 2),
otherwise you must set the PHPRC environment variable:
On Windows NT, 2000, XP and 2003:
* Go to Control Panel and open the System icon (Start -> Settings ->
Control Panel -> System, or just Start -> Control Panel -> System
for Windows XP/2003)
* Go to the Advanced tab
* Click on the 'Environment Variables' button
* Look into the 'System variables' pane
* Click on 'New' and enter 'PHPRC' as the variable name and the
directory where php.ini is located as the variable value (e.g.
C:\php)
* Press OK and restart your computer
Cheers:
GREG COCKS
gcocks |at| stoller.com
--------------------------------
________________________________________
From: Greg Cocks
Sent: Tuesday, January 08, 2008 12:34 PM
To: '[email protected]'
Subject: Changing/checking php.ini, and yet still the 'wrong' include_path
Hello,
I am doing some tidying, and so getting rid of the PHP that comes with
MapServer MS4W package – and replacing with a clean install of PHP5, moving my
root to the ‘default’ directory, etc, etc…
On a Windows XP ‘test server’ running IIS 5.1 (getting a ‘proof of concept’ up
for a client, 2003 + IIS 6 when they give me some $$ for a server! ☺ (and
IIS as that is the company ‘standard’… ☺ ))
I got everything running OK with PHP installed as C:\php\ using the MSI
installed and IIS CGI…
All the PHP code seems to work just nicely that I have started using… except
when I tried to get PEAR up and going…
Ran the go-pear.bat as am using some of these packages in the web/PHP pages
already written and in use… runs fine at the command line (list, install,
upgrade, etc) BUT…
When I go to a web page that worked fine previously, I get:
Fatal error: require_once() [function.require]: Failed opening required
'numbers/Roman.php' (include_path='.;C:\php5\pear') in
C:\Inetpub\wwwroot\standard_format_items\bottom_navigation_bar.php on line 21
As you can see the include path is wrong…
Looking at phpinfo.php, it and the extensions directory also show C:\php5\
instead of C:\php\
- C:\php\php.ini has the right include path
- I checked that the Windows PATH was C:\php\
- I had a look in the registry as per the manual install notes at php.net and
no sign of \php5\ (although the keys they mention are NOT there…)
- did a couple of restarts, in case it needed to ‘take’
- checked C:\windows\pear.ini
Where the heck is this erroneous C:\php5\ and .;C:\php5\pear values kept? And
how do I change them?
Thanks in advance…
(and I would rather not change the directory name to C:\php5\, with all that
entails! ☺ )
----------
Regards,
GREG COCKS
GIS Analyst V
gcocks |at| stoller.com
S. M. Stoller Corp
105 Technology Drive, Suite 190
Broomfield, CO 80021
www.stoller.com
303-546-4300
303-443-1408 fax
303-546-4422 direct
303-828-7576 cell