Novice PHP User: Very basic problem with IIS 
Author Message
 Novice PHP User: Very basic problem with IIS

Come on guys... Nobody to help me :(

AK

Quote:

> Hello PHPers,

> I am just learning PHP in my spare time. I finally managed to download
> PHP 4.30 and am using it on Windows XP PRO on HP 753n PC.

> Here are two questions:

> 1. During installation, if I use php4isapi.dll in configuration panel,
> php doesn't execute. If I use php.exe, it works fine.  I was following
> Professional PHP Programming book by Castagnetto et al...  Am I
> missing any thing?

> 2. Here is the second problem with a super simple example:

> in an HTML file, I have this:

> <FORM METHOD="GET" ACTION="verify.php">
> <p><center>Revenue: <INPUT TYPE="text" NAME="revenue"
> size=10></center></p>
> <p><center>Expenses: <INPUT TYPE="text" NAME="expense"
> size=10></center></p>
> <p><center><INPUT TYPE="submit" Name="submit"
> value="ACCEPT"></center></p>

> verify.php has the following:
> <?php
> echo "testing revenues $revenue<BR>";
> echo "testing expenses $expense<BR>";
> ?>
> when it gets submitted I do see
> http://localhost/ak/php_testing/verify.php?revenue=222&expense=221&su...

> but the output has nothing for two variables:
> testing revenues
> testing expenses
> It is all blank..

> Is it an installation issue? phpinfo() is too long to send.  Can I
> debug this problem from the output of phpinfo()? Did I forget
> something to click somewhere or I need to send a check to Bill Gates
> to use PHP on Windows ;-)

> Hope to hear from you gurus soon,

> Ashwini
> Chicago



Mon, 27 Jun 2005 08:14:40 GMT  
 Novice PHP User: Very basic problem with IIS
Quote:
> > echo "testing revenues $revenue<BR>";
> > echo "testing expenses $expense<BR>";

Try this :
echo 'testing revenues ' . $_GET['revenue'] . '<br />';
echo 'testing expenses ' . $_GET['expense'] . '<br />';
In your php.ini, register_globals is set to 0. This means you can't use
directly $revenue. the script has to use $_GET['variable'] or
$_POST['variable'] depending on how you pass this variable. It's better than
using register_globals = 1, because now you have to know where your variable
is coming from.
Regards,
Philippe


Mon, 27 Jun 2005 15:53:23 GMT  
 Novice PHP User: Very basic problem with IIS
Thank you Philippe...

It works like a charm... I changed the default for now.

Ashwini

Quote:

> > > echo "testing revenues $revenue<BR>";
> > > echo "testing expenses $expense<BR>";
> Try this :
> echo 'testing revenues ' . $_GET['revenue'] . '<br />';
> echo 'testing expenses ' . $_GET['expense'] . '<br />';
> In your php.ini, register_globals is set to 0. This means you can't use
> directly $revenue. the script has to use $_GET['variable'] or
> $_POST['variable'] depending on how you pass this variable. It's better than
> using register_globals = 1, because now you have to know where your variable
> is coming from.
> Regards,
> Philippe



Tue, 28 Jun 2005 10:49:54 GMT  
 Novice PHP User: Very basic problem with IIS
Quote:
> Thank you Philippe...
You're welcome.

> It works like a charm... I changed the default for now.

You have changed register_globals to "on" ? well, it works ok, but this
isn't a very good practice for now.
Please have a look to
http://www.php.net/manual/en/security.registerglobals.php
Moreover, it's easier IMHO to write a code with register_globals off,
because we have to know where the variables are coming from.
Best regards,
Philippe


Tue, 28 Jun 2005 15:53:55 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. PHP installation problems on Win2K and IIS 5.0

2. php install problem - probably to do with session/cookie storage, or IIS authentication

3. Basic Problem in installing PHP,

4. Problem with PHP to Add New User IDs/Passwords

5. PHP used with iis

6. php iis ntfs

7. MS SQL SERVER 2000 + PHP + IIS 5.0

8. Php authentication and IIS (CGI build)

9. cannot get IIS to work with PHP

10. Mail function on PHP and IIS

11. Installing PHP on IIS 6.0 (Windows.NET) Issues

12. PHP and IIS 5

 

 
Powered by phpBB® Forum Software