#1  
Old 11th December 2007, 21:25
tal56 tal56 is offline
Member
 
Join Date: Oct 2007
Posts: 91
Thanks: 11
Thanked 2 Times in 2 Posts
Default PHP or Apache problem.

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
Reply With Quote
Sponsored Links
  #2  
Old 11th December 2007, 21:56
tal56 tal56 is offline
Member
 
Join Date: Oct 2007
Posts: 91
Thanks: 11
Thanked 2 Times in 2 Posts
Default

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
Reply With Quote
  #3  
Old 12th December 2007, 02:42
Leszek Leszek is offline
Senior Member
 
Join Date: Nov 2006
Location: Poland,Włocławek
Posts: 369
Thanks: 22
Thanked 42 Times in 35 Posts
Send a message via Skype™ to Leszek
Default

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.
Reply With Quote
  #4  
Old 12th December 2007, 05:25
tal56 tal56 is offline
Member
 
Join Date: Oct 2007
Posts: 91
Thanks: 11
Thanked 2 Times in 2 Posts
Default

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?
Reply With Quote
  #5  
Old 12th December 2007, 10:48
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 36,796
Thanks: 840
Thanked 5,612 Times in 4,423 Posts
Default

All properly written script import these variables with $_GET["varname"] and do not depend on register globals on.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #6  
Old 12th December 2007, 18:58
tal56 tal56 is offline
Member
 
Join Date: Oct 2007
Posts: 91
Thanks: 11
Thanked 2 Times in 2 Posts
Default

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
Reply With Quote
  #7  
Old 13th December 2007, 08:27
tal56 tal56 is offline
Member
 
Join Date: Oct 2007
Posts: 91
Thanks: 11
Thanked 2 Times in 2 Posts
Default

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.
Reply With Quote
  #8  
Old 13th December 2007, 18:41
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,747 Times in 2,578 Posts
Default

Quote:
Originally Posted by tal56
using $_request or $_get.
Make sure you use $_REQUEST and $_GET (in capital letters!).
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #9  
Old 13th December 2007, 18:43
tal56 tal56 is offline
Member
 
Join Date: Oct 2007
Posts: 91
Thanks: 11
Thanked 2 Times in 2 Posts
 
Default

Sounds good Falko. Thanks again !

Chris
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't start apache, virtualhosts problem. Xinil Installation/Configuration 10 6th June 2007 20:58
can't make work joomla + sef + .htaccess bochenn General 9 4th April 2007 14:47
PHP problem or MySql problem , maybe both? reddog Server Operation 7 16th August 2006 10:21
Problem with the installation of Dokeos (LMS) in ISPConfig jofranco General 4 28th April 2006 01:45
turn off "PHP Scripts" problem after updated php k-dev4edv Installation/Configuration 2 7th February 2006 10:34


All times are GMT +2. The time now is 02:33.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.