473,811 Members | 2,038 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Alternate location for php.ini

Is there a way to set php.ini to the alternate location?

I'm trying to use 2 version of PHP(php4 and php5), but php.ini is in the
way. Anyone knows how to circumvent this issues? Perhaps there is an env
variable we can set.

Thanks
Jul 17 '05 #1
6 14986
Artco News <ar*******@veri zon.net> wrote:
Is there a way to set php.ini to the alternate location?

I'm trying to use 2 version of PHP(php4 and php5), but php.ini is in the
way. Anyone knows how to circumvent this issues? Perhaps there is an env
variable we can set.


http://uk.php.net/manual/en/configuration.php

Second paragraph.

JOn

--
You cannot propel yourself forward by patting yourself on the back.

Jul 17 '05 #2
Are you using in CGI mode or SAPI mode? I'm using the SAPI mode. So, when I
run the phpinfo() it still look at my C:\WINDOWS directory.

I did the above definition and stop/start the apache2 and still no go. Any
idea where should you look. Thanks a bunch.

"Andy Hassall" <an**@andyh.co. uk> wrote in message
news:ok******** *************** *********@4ax.c om...
On Tue, 04 Nov 2003 19:09:57 GMT, "Artco News" <ar*******@veri zon.net> wrote:
I did set the PHPRC(c:\php\co nfig) env var as well as
PHP_INI(c:\php \config\php4.in i) env var but still no go.
PHPRC certainly works, I'm using it right now.

FWIW I used / instead of \, i.e. d:/php

Also make sure that your web server actually gets PHPRC in its

environment; it may be different from yours, particularly if it's running as LocalSystem
instead of a named user.

--
Andy Hassall (an**@andyh.co. uk) icq(5747695) (http://www.andyh.co.uk)
Space: disk usage analysis tool (http://www.andyhsoftware.co.uk/space)

Jul 17 '05 #3
On Tue, 04 Nov 2003 19:58:45 GMT, "Artco News" <ar*******@veri zon.net> wrote:
Are you using in CGI mode or SAPI mode? I'm using the SAPI mode. So, when I
run the phpinfo() it still look at my C:\WINDOWS directory.

I did the above definition and stop/start the apache2 and still no go. Any
idea where should you look. Thanks a bunch.


As a module under Apache2.

The Apache service will run as a child of SERVICES.EXE; unless you restart
that it's not going to see the new environment. Rebooting is a fairly sure way
of getting it to restart. ;-)

--
Andy Hassall (an**@andyh.co. uk) icq(5747695) (http://www.andyh.co.uk)
Space: disk usage analysis tool (http://www.andyhsoftware.co.uk/space)
Jul 17 '05 #4
I follow your lead and still no go.

First I remove/rename c:\windows\php. ini
Then I created a directory: c:\apps\php\con fig\php.ini
Then I set envar phprc=c:\apps\p hp\config(then c:/apps/php/config). And no
luck as well.

I also rebooted my machine. Any ideas. Oh, BTW, I'm running php-4.3.4RC1
"Andy Hassall" <an**@andyh.co. uk> wrote in message
news:vj******** *************** *********@4ax.c om...
On Tue, 04 Nov 2003 19:58:45 GMT, "Artco News" <ar*******@veri zon.net> wrote:
Are you using in CGI mode or SAPI mode? I'm using the SAPI mode. So, when Irun the phpinfo() it still look at my C:\WINDOWS directory.

I did the above definition and stop/start the apache2 and still no go. Anyidea where should you look. Thanks a bunch.
As a module under Apache2.

The Apache service will run as a child of SERVICES.EXE; unless you

restart that it's not going to see the new environment. Rebooting is a fairly sure way of getting it to restart. ;-)

--
Andy Hassall (an**@andyh.co. uk) icq(5747695) (http://www.andyh.co.uk)
Space: disk usage analysis tool (http://www.andyhsoftware.co.uk/space)

Jul 17 '05 #5
On Tue, 04 Nov 2003 21:14:14 GMT, "Artco News" <ar*******@veri zon.net> wrote:
I follow your lead and still no go.

First I remove/rename c:\windows\php. ini
Then I created a directory: c:\apps\php\con fig\php.ini
Then I set envar phprc=c:\apps\p hp\config(then c:/apps/php/config). And no
luck as well.


It's PHPRC, not phprc.

Is the server picking it up in the environment? Echo out $_ENV['PHPRC'] in a
script.

If not - where did you set it?

--
Andy Hassall (an**@andyh.co. uk) icq(5747695) (http://www.andyh.co.uk)
Space: disk usage analysis tool (http://www.andyhsoftware.co.uk/space)
Jul 17 '05 #6
Thanks, that did it. When in doubt, REBOOT!
Thanks a bunch.

By the way, I was trying to install the latest snaps of PHP5 beta2. I had no
such luck. Perhaps you can give me some pointers. I did exactly what the
install.txt said but still got the following error:

The Apache service named reported the following error:
Cannot load X:/Apps/php/php5/php4apache2.dll into server: The specified
module could not be found. .

For more information, see Help and Support Center at
http://go.microsoft.com/fwlink/events.asp.

"Andy Hassall" <an**@andyh.co. uk> wrote in message
news:ut******** *************** *********@4ax.c om...
On Tue, 04 Nov 2003 21:14:14 GMT, "Artco News" <ar*******@veri zon.net> wrote:
I follow your lead and still no go.

First I remove/rename c:\windows\php. ini
Then I created a directory: c:\apps\php\con fig\php.ini
Then I set envar phprc=c:\apps\p hp\config(then c:/apps/php/config). And
noluck as well.


It's PHPRC, not phprc.

Is the server picking it up in the environment? Echo out $_ENV['PHPRC']

in a script.

If not - where did you set it?

--
Andy Hassall (an**@andyh.co. uk) icq(5747695) (http://www.andyh.co.uk)
Space: disk usage analysis tool (http://www.andyhsoftware.co.uk/space)

Jul 17 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1288
by: Guy Scharf | last post by:
We have a set of HTML files that serve as help to an application. When the user requests help, we start the default browser with the appropriate HTML file. Some of our HTML files will link to PDF and video files. The rub is that those files may or may not be present on the local hard drive. What we would like to do is: if the file is present on the hard drive, load it from there. If not present, load it from the web. We would like...
4
2067
by: Mark A | last post by:
Trying to upgrade alternate FP9 to alternate FP9a on Red Hat Linux. After running the following command: ../installAltFixPak -y it says it was successful, but no new directory is created in /opt/IBM/db2 Assuming that maybe fixpack 9a updates the existing /opt/IBM/db2/V8.FP9 directory, I ran db2iupdt on the instance (using root), but db2level still shows the signature for fixpack 9 (not 9a). "DB2 v8.1.0.88", "s050422"
2
3310
by: Hers2keep | last post by:
I have a report that prints daily. The report needs to print whether or not there are records available. I read in an old post on this group that putting an unbound text box in the report footer, with the following code in the OnNoData event would work like a charm -- Private Sub Report_NoData(Cancel As Integer) Dim NoInboundLoads As TextBox Me!NoInboundLoads = "No inbound loads scheduled for today." Cancel = False End Sub
1
4356
by: Eric Lindsay | last post by:
I am trying to understand the differences between and uses of persistent, default and alternate styles. I have read http://www.w3.org/TR/REC-html40/present/styles.html section 14.3.2 on specifying external style sheets in link using combinations of rel and using or not using the title attribute. I think I sort of understand rel="alternate stylesheet". It seems to be able to act something like the media="print" or media="handheld" or...
1
1840
by: delwar66 | last post by:
Hi Is anyone here who can help me to get this scripts running under alternate credentials................. ''''''''''''''''''''''''''' ''''''''''''''''''''''''''' ' Monitor EDID Information' strComputer = Trim(inputbox("Enter name or IP address of local or remote computer")) Dim oDisplaySubKeys : Set oDisplaySubKeys = CreateObject("Scripting.Dictionary")
5
27607
by: Michael R | last post by:
Searching the net I've found a simple technique to add row numbers and alternate colors (for the even and the uneven row) to a continuous form. 1st step: Create a textbox, send it to background and select the first color. .ControlSouce =fRowNum(False) .Name = RowNum 2nd step: Add the following function to the form module: (for row numbers) Public Function fRowNum(Reset As Boolean) As Long Static I As Integer
1
1649
by: Chandra | last post by:
If a iframe src link is not available, how can i provide a default site or alternate site for the iframe to use?
9
2501
by: johkar | last post by:
I need some browser implementation clarification. In the below example, the alternate stylesheet could be invoked by user agents that support alternate stylesheets or by script. Are there any browsers that don't recognize "alternate stylesheet" as a value of the rel attribute and just implement it automatically thus overriding sheet2.css? Just need to know what I need to worry about. <link href="sheet1.css" rel="stylesheet"...
6
4561
by: Mark A | last post by:
In version 8.2 ESE we used alternate fixpacks to allow multiple fixpack levels for different instances, and to allow an instance to be deprecated back to the previous fixpack (with certain limitations). In looking at V9.5 install procedures there are no alternate fixpacks. There is only a db2_install and a installFixPack script (not counting the db2setup GUI program). It looks to me like the installFixPack script is used to update...
0
9728
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9605
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10648
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10389
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10402
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
5554
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5692
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3867
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3018
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.