Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
PHP working, but not parsing properly
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Doomwookie
Tux's lil' helper
Tux's lil' helper


Joined: 07 Oct 2003
Posts: 143
Location: Dayton, Oh

PostPosted: Mon Jun 21, 2004 8:36 pm    Post subject: PHP working, but not parsing properly Reply with quote

I am having this really bizarre problem the installation of Apache2 and mod_php on my laptop. mod_php seems to be recognized and working, but if/elseif/else statements seem to be defaulting to else no matter what and hitting the submit button on forms seems to do nothing. Include statements and the commands like phpinfo() and isset() seem to be working ok. I've tried running several php-based scripts/sites I've made that work fine on any of my other systems.

Has anybody else experienced this? I'm baffled.
_________________
Doomwookie
Toshiba Satellite P25-S607
Gentoo/Windows MCE Dualboot
Back to top
View user's profile Send private message
Doomwookie
Tux's lil' helper
Tux's lil' helper


Joined: 07 Oct 2003
Posts: 143
Location: Dayton, Oh

PostPosted: Mon Jun 21, 2004 10:32 pm    Post subject: Reply with quote

My guess is it is something that has changed in the PHP configuaration recently. Most of the systems I have tested it are running slightly older versions that what is out at the moment. I tried installing php and apache in windows with the same result.

Below is a code snippet from one of the site scripts I've tried running. I have the variables being sent to the script through urls like you get when using get as the type for a form. This particular code changes the title graphic depending on what $section is set to in the url. Even if I try hardcoding the variable it always goes to else no matter what.

Code:
            <?php
               if ($section == 'buyer')
               {
                  echo '<center><img src="images/BuyerInfo.gif" width="371" height="81" border="0" alt="Buyer Information"></center>';
               }
               elseif ($section == 'seller')
               {
                  echo '<center><img src="images/SellerInfo.gif" width="350" height="78" border="0" alt="Seller Information"></center>';
               }
               else
               {
                  echo '<center><img src="images/BuyerSellerTitle.gif" width="306" height="148" border="0" alt="Buyer & Seller Information"></center>';
               }
            ?>

_________________
Doomwookie
Toshiba Satellite P25-S607
Gentoo/Windows MCE Dualboot
Back to top
View user's profile Send private message
Doomwookie
Tux's lil' helper
Tux's lil' helper


Joined: 07 Oct 2003
Posts: 143
Location: Dayton, Oh

PostPosted: Mon Jun 21, 2004 11:07 pm    Post subject: Reply with quote

Nevermind, found the problem. register_globals is now off by default,switching it on fixes everything. Explains why those scripts used to work but later stopped working on this laptop.
_________________
Doomwookie
Toshiba Satellite P25-S607
Gentoo/Windows MCE Dualboot
Back to top
View user's profile Send private message
Teetante
Guru
Guru


Joined: 02 Mar 2004
Posts: 515
Location: Oldenburg/Germany

PostPosted: Mon Jun 21, 2004 11:22 pm    Post subject: Reply with quote

Doomwookie wrote:
Nevermind, found the problem. register_globals is now off by default,switching it on fixes everything. Explains why those scripts used to work but later stopped working on this laptop.


register_globals is BAD!
NEVER turn it on really. It's a big hole in your security.
Just program right by using $_SERVER or $_GET/$_POST/$_REQUEST.
_________________
ICQ #81510866 - http://the-gay-bar.com - MSN tante@emptiness.de
Occam's Razor:
-"Entia non sunt multiplicanda praeter necessitatem."-
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot 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