Results 1 to 10 of 10
-
07-31-2002, 06:36 PM #1Web Hosting Master
- Join Date
- Nov 2000
- Location
- Dundee, UK
- Posts
- 1,366
Suexec and enviromental variables.
Hello,
I enabled suexec on my servers last week. Ever since some of the enviromental variables used by php scripts and cgi scripts have stopped working. Have a look at http://66.54.138.67/mail.php
Does any one know how to resolve this?
-
07-31-2002, 06:44 PM #2Web Hosting Master
- Join Date
- Jan 2002
- Location
- Kuwait
- Posts
- 679
What ENV's are you missing?
-
07-31-2002, 07:03 PM #3Web Hosting Master
- Join Date
- Nov 2000
- Location
- Dundee, UK
- Posts
- 1,366
Have a look at SCRIPT_URI, and HTTP_REFERER on the phpinfo page. They are not correcy.
-
07-31-2002, 07:55 PM #4Web Hosting Master
- Join Date
- Mar 2002
- Location
- Servers
- Posts
- 806
_SERVER["HTTP_REFERER"] is correct. I think you should not worry about _ENV variables.
× Dedicated Servers × cPanel Shared/Reseller Hosting
× VPS × Backups × Cloud × Colocation × Managed Services
× Webx Networks × Serving world wide since 1997
-
07-31-2002, 08:00 PM #5Web Hosting Master
- Join Date
- Nov 2000
- Location
- Dundee, UK
- Posts
- 1,366
The problem is scripts use that, so i need to worry about it
-
07-31-2002, 08:31 PM #6Web Hosting Master
- Join Date
- Jan 2001
- Posts
- 2,605
If you need other environment variables, you can add them into suexec & recompile.
Dr. Colin Percival, FreeBSD Security Officer
Online backups for the truly paranoid: http://www.tarsnap.com/
-
07-31-2002, 08:32 PM #7Web Hosting Master
- Join Date
- Nov 2000
- Location
- Dundee, UK
- Posts
- 1,366
Ok, so the problem is they arent in suexec when i rebuilt apache?
-
07-31-2002, 08:44 PM #8Web Hosting Master
- Join Date
- Jan 2001
- Posts
- 2,605
Somewhere around line 128 in suexec.c you'll find char *safe_env_lst[] defined; any environment variables not in that list will not be passed through to the cgi script.
Add the necessary entries, recompile, reinstall.Dr. Colin Percival, FreeBSD Security Officer
Online backups for the truly paranoid: http://www.tarsnap.com/
-
08-01-2002, 05:45 AM #9Web Hosting Master
- Join Date
- Apr 2001
- Location
- Depok, Indonesia
- Posts
- 988
Originally posted by cperciva
If you need other environment variables, you can add them into suexec & recompile.
-
08-01-2002, 01:15 PM #10Junior Guru Wannabe
- Join Date
- Nov 2001
- Posts
- 47
I would say the same as priyadi:
the php scripts shouldn't be affected.
What is the problem/error you get, with the env.-vars?
Is it limited to php and/or cgi?