Bugs: Browse | Submit New | Admin

[#3272] PHP problem on machine that is already running PHP

Date:
2006-01-17 17:30
Priority:
3
Submitted By:
Curt Hibbs (curthibbs)
Assigned To:
Curt Hibbs (curthibbs)
Category:
None
State:
Open
Summary:
PHP problem on machine that is already running PHP

Detailed description
Elliot Smith <elliot@townx.org> 	Tue, Jan 17, 2006 at 10:58 AM
Reply-To: instantrails-developers@rubyforge.org
To: curt@hibbs.com, instantrails-developers@rubyforge.org
Curt Hibbs wrote:

> On 1/17/06, *Elliot Smith* <elliot@townx.org
> <mailto:elliot@townx.org>> wrote:
>
>     Hello all,
>
>     Finally got round to having a look at Instant Rails on Windows. It's a
>     pretty nice package, and seems to work well. I particularly like the
>     Apache/MySQL control panel. I have a few initial comments:
>
>     1. On my machine, I have IIS with PHP and XAMPP installed under
>     Windows.
>     To get IIS to work nicely with PHP, I ended up setting a PHPRC
>     environment variable so that PHP can find its config. file. However,
>     when I first tried to start IR, I got some nasty PHP errors, which are
>     down to this PHPRC variable pointing at a PHP installation
>     incompatible
>     with IR's PHP modules. The remedy would be one of: a) set the
>     environment variable when Apache starts inside IR; b) put a SetEnv
>     directive into IR's httpd.conf with the correct PHPRC path.
>
>
> b) Would be the way to go. If you choose "Configure >> Apache" from
> the main IR menu, you'll be editing the IR's httpd.conf template file.
> Could you do this and add the appropriate directives (be sure to use
> {$path} to represent the base path of the IR install.

I've done some research, and it seems (b) doesn't work when using PHP as
a module (it works if using PHP under CGI -
http://uk.php.net/configuration). There is a PHPIniDir directive for
Apache 2, but not our ancient Apache 1.3. I looked into command line
switches for apache.exe, but it doesn't look like there's anything
appropriate. This leaves the only option as setting the PHPRC variable
before Apache starts. This is easy on Linux (just edit the appropriate
script) but more difficult with the Apache binaries on Windows.

The only fix I can suggest with Apache 1.3 is to replace direct calls to
Apache.exe (which is presumably what the EasyPHP management app. is
doing) with calls to a batch file instead (e.g. apache/apache.bat), and
have a line at the top of the batch file to set the PHPRC variable:

set PHPRC=${path}\apache
${path}\apache\Apache.exe

We would need to rewrite a template config. file with the correct paths,
as done for httpd.conf etc.. This might seem a bit of a pain, but is
likely to occur wherever we have users who have an existing PHP
installation, either under IIS or Apache. It could go away if we moved
to Apache 2 (the default in XAMPP), where PHPIniDir becomes available.

Add A Comment: Notepad

Please login


Followup

No Followups Have Been Posted

Attached Files:

Name Description Download
No Files Currently Attached

Changes:

No Changes Have Been Made to This Item