Welcome to MobyThreads.com!
FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in
All support for the MobyThreads Threaded phpBB MOD can now be found on welsolutions at this forum

Help sought for Apache/PHP setup problem

 
   Web Hosting and Web Master Forums (Home) -> Apache RSS
Next:  mod_auth_digest and php: HTTP Error 400  
Author Message
user2797

External


Since: May 31, 2004
Posts: 1



(Msg. 1) Posted: Mon May 31, 2004 8:21 pm
Post subject: Help sought for Apache/PHP setup problem
Archived from groups: alt>apache>configuration (more info?)

I have set up Apache 1.3.31 and PHP 4.3.4 on my Debian unstable box.
Most scripts are run by mod_php (with the user ID of the Apache
process).

I want to run one application under a different user ID, so I have to
use use the CGI interface for this:

<Directory /usr/share/foo>
  Options +FollowSymLinks
  AllowOverride All
  order allow,deny
  allow from all

  Action php-cgi /cgi-bin/php4
  AddHandler php-cgi php
</Directory>

This works fine--scripts below /usr/share/foo are run with php-cgi
interpreter. However, some options need to be changed so that the
application doesn't complain[1], but I can't just edit the system-wide
php.ini.

Basically, I see four approaches:

(1) Use an own php.ini in the current working directory
(2) Set options on the command line
(3) Set path to php.ini via command line
(4) Set the PHPRC evnironment variable to my own php.ini

1. won't work because Apache sets the working directory to
/usr/lib/cgi-bin. (php4 changes that to the location of the script
after startup and reading php.ini.) Perhaps there is a way to tell
Apache not to do that, but I haven't found that option yet.

I haven't succeeded in setting up 2. or 3. so far. Apparently, php4
tries to execute its own binary[2] whenever I change the "Action"
statement to something like this

Actions php-cgi /cgi-bin/php4?-option

.... which is recognized fine by other CGI scripts. The php4 that is
shipped with woody (4.1.2-6woody3) doesn't have this problem.

4. So I tried adding

SetEnv PHPRC /usr/share/foo/php.ini

.... but this didn't work either. Apparently, either Apache or PHP sets
this variable to REDIRECT_PHPRC, and thus, /etc/php4/cgi/php.ini is
read again.

I'd like to do without any wrapper scripts. Installing (and
maintaining) a seaparate php4 installation just for one application is
not an option, either.

Can anyone here provide a aolution or hints?

-Hilko

[1]
ERROR: Your .htaccess is not active - you need to set register_globals = Off!
ERROR: Your .htaccess is not active - you need to set allow_call_time_pass_reference = Off!
ERROR: Your .htaccess is not active - you need to set magic_quotes_gpc = Off!
ERROR: Your .htaccess is not active - you need to set short_open_tag = Off!
ERROR: Your .htaccess is not active - you need to set error_reporting = 2047!
Too many errors to continue.

[2]
Warning: Unexpected character in input: '' (ASCII=15) state=1 in
/usr/lib/cgi-bin/php4 on line 2753

Parse error: parse error in /usr/lib/cgi-bin/php4 on line 2753<!-- ~MESSAGE_AFTER~ -->

 >> Stay informed about: Help sought for Apache/PHP setup problem 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
problem with virtual server setup - Hi, I am having problems with the virtual setup of my apache... What bugs me is that I can ping the IP number but when I tried to access it thru the webbrowser, nothing happend. I have Apache 2.0 | Linux 9 | Kernel 2.4.20-8 here is a copy of my..

Apache on OPENVMS setup - Open VMS 7.3-1 java version "1.4.1" Java(TM) 2 Runtime Environment, Standard Edition Classic VM (build 1.4.1-2, 09/09/2003-17:28, native threads, jit) I can view normal html pages on the web site but when I try the example programs the html c...

Apache and SSL setup help needed.... - I'm trying to replace an old Mandrake 7 based web server with a new one with Redhat 9. I have installed Redhat 9 along with Apache and OpenSSL etc and almost everything seems to be running fine. The only problem comes when I try to access secure pages....

Is this proxy setup possible using Apache? - Hi all! I would like a proxy setup with the following qualities: Generally pages are proxyed the normal way using mod_proxy. If the file part of the URL is a specific text the page returned from the proxy is not the specified URL but another one on a...

Is this proxy setup possible using Apache? - Hi all! I would like a proxy setup with the following qualities: Generally pages are proxyed the normal way using mod_proxy. If the file part of the URL is a specific text the page returned from the proxy is not the specified URL but another one on a...
   Web Hosting and Web Master Forums (Home) -> Apache All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]