View Full Version : PHP or Apache problem.
tal56
11th December 2007, 21:25
Hi guys,
I'm using ISPconfig 2.1.18 on Centos 5, followed the perfect install and everything is working great except for Apache and/or PHP.
When I have a link like this for example :
www.mydomain.com/index.php?name=chris&do=read
My apache does not seem to read the stuff after the "?"
So as you can see, I'm trying to install forums and stuff and nothing is working. Anything I click on, it just goes to the default "index.php" file.
Is there a module I missed or something not set correctly? Thanks
tal56
11th December 2007, 21:56
Ok, I fixed this by adding this :
php_admin_flag register_globals on
php_admin_flag register_long_arrays on
To the Apache Directives on ISPconfig. Hopefully this is the correct way to fix this? From reading on google it seems that Register_Global is turned off by default, so if I want all sites to have it on, I need to turn this on globally, which from what I can read is bad for security.
Can anyone confirm if what I did on a per site basis is the best way to add this functionality to each site? Or should I be editing the .htaccess instead? Thanks
Leszek
12th December 2007, 02:42
It all depends on how You write the script.
Remember that setting register_globals in most cases is dangerous.
Consider rewriting Your scripts for security reasons.
tal56
12th December 2007, 05:25
Well this is not a script I wrote, it's just a forum program. I don't see how you can get around it because most forums pass data through links such as :
www.mydomain.com/index.php?data1=no&do=viewpage
If register globals is turned off and that information after the "?" is not passed then the programs wont work. Or how can you even link to a specific page within the script?
till
12th December 2007, 10:48
All properly written script import these variables with $_GET["varname"] and do not depend on register globals on.
tal56
12th December 2007, 18:58
I know that already, however how do you pass a parameter through a link if register globals are turned off?
Like even for this forum "vbullitin" you still have the data ?do=newreply&noquote=1 etc.
So for this site that this forum is hosted, register_globals is turned on? If not how else can you make it work? Because when I turn it off, none of the data after the "?" is interpreted. Thanks
tal56
13th December 2007, 08:27
Well after doing a lot more reading, looks like I need to do some changes to my php scripts in order to make it work with php5. I think I understand what needs to be done to make it work with the information using $_request or $_get. Thanks for your help guys.
falko
13th December 2007, 18:41
using $_request or $_get.
Make sure you use $_REQUEST and $_GET (in capital letters!).
tal56
13th December 2007, 18:43
Sounds good Falko. Thanks again !
Chris
vBulletin® v3.8.4, Copyright ©2000-2010, Jelsoft Enterprises Ltd.