Computer Webmaster Gaming Console Graphics Forum

Welcome to the Computer Webmaster Gaming Console Graphics Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact us.

MK PitStop Main Earn $25 Earn Money Posting Extras Members Blogs Image Hosting User Pages
Go Back   Computer Webmaster Gaming Console Graphics Forum > Webmaster Forum > Website Coding > PHP
Register FAQ/Rules Become A V.I.P. Member Search Today's Posts Mark Forums Read

PHP PHP for some can be one of the hardest website programming codes, so do you need help on your PHP script, if it is php4, php5 or lower this is the place for you for any PHP help.

Google
Reply
 
LinkBack Thread Tools Display Modes
Old 07-01-2007, 3:57 PM   #1
mr bungle
 
mr bungle's Avatar
 
Posts: n/a
My Photos: (0)

Banked:
MK Cash: $

I am Worth:
MK Cash: $
Donate

Recent Blog: None

Default iis & php

yes im another newby at all this but hopefully this is an easy quesion
to answer. i have WindowsXP Proffesional with iis and latest V of PHP im
dam sure ive set it up properly but when i write some simple scipts i
get Undefinde Variable errors. i have a coule of news posting scripts
that work okay on my computer but still get those errors, but the
scripts works fine...then i upload it to my server and the errors are
gone...so have i really set it up properly? anyone help?!
thanx in advance

 
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Reply With Quote
Advertisements
Old 07-01-2007, 3:57 PM   #2
Anthony Saffer
 
Anthony Saffer's Avatar
 
Posts: n/a
My Photos: (0)

Banked:
MK Cash: $

I am Worth:
MK Cash: $
Donate

Recent Blog: None

Default iis & php

> yes im another newby at all this but hopefully this is an easy quesion
> to answer. i have WindowsXP Proffesional with iis and latest V of PHP im
> dam sure ive set it up properly but when i write some simple scipts i
> get Undefinde Variable errors. i have a coule of news posting scripts
> that work okay on my computer but still get those errors, but the
> scripts works fine...then i upload it to my server and the errors are
> gone...so have i really set it up properly? anyone help?!
> thanx in advance


Are your errors coming from variables generated/created within a form being
submitted to your script? If so, the most likely reason you're getting the
error is because you're addressing the variables the "old" PHP way. Here's
an example:

Let's say that you have a form with one input field <input type="text"
name="username"> and you submit it to the verify.php script for processing.
Under the old way of doing things this variable was immediately available to
you as $username. This is because the "register_globals" option in the
php.ini file was set to 'on'.

Because this creates a security concern, the developer of PHP (I think as of
version 4) set this setting to "off" by default (and it should stay that
way). So now, this automatic variable transferrance doesn't happen. Instead,
you need to manually extract the variable from the $_POST[] array (which
contains all of the fields contained in the form). So, still assuming our
form has one field "username", we would address it in our "verify.php"
script one of two ways:

1) We can use $_POST['username'] each and every time we reference the
variable.
2) We can "import" the variable into a local variable as $username =
$_POST['username']; and then we can address it as simply $username from now
on.

Personally, I like to use method #1 because it helps me keep things clear.
But either works well.

If the above discussed problem is NOT what is causing your errors you might
want to go to http://www.phpfreaks.com, and read their IIS/PHP installation
guide to make sure everything is in working order.

HTH,
Anthony M. Saffer [Founder & CEO]
SCS Consulting Services
"Custom Software, database, and web application development"
www.safferconsulting.com
Ph: (918) 542-8251



 
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Reply With Quote
Old 07-01-2007, 3:57 PM   #3
mr bungle
 
mr bungle's Avatar
 
Posts: n/a
My Photos: (0)

Banked:
MK Cash: $

I am Worth:
MK Cash: $
Donate

Recent Blog: None

Default iis & php

that certainly cleared up a few things...but im still getting errors for
examle....
i type this....
<?php

$a = 2;
$b = 1;

if($a > $b) {
echo 'value in $a is greater than value in $b';
}

?>



.......i get this error...
Parse error: parse error, unexpected '<' in
C:\Inetpub\wwwroot\Projects\doodle\hs~dev.php on line

kinda a pain in the ass when its only a simple script!!! so what going on??

-------------------------------------------------------------------------------------------
Anthony Saffer wrote:
>>yes im another newby at all this but hopefully this is an easy quesion
>>to answer. i have WindowsXP Proffesional with iis and latest V of PHP im
>>dam sure ive set it up properly but when i write some simple scipts i
>>get Undefinde Variable errors. i have a coule of news posting scripts
>>that work okay on my computer but still get those errors, but the
>>scripts works fine...then i upload it to my server and the errors are
>>gone...so have i really set it up properly? anyone help?!
>>thanx in advance

>
>
> Are your errors coming from variables generated/created within a form being
> submitted to your script? If so, the most likely reason you're getting the
> error is because you're addressing the variables the "old" PHP way. Here's
> an example:
>
> Let's say that you have a form with one input field <input type="text"
> name="username"> and you submit it to the verify.php script for processing.
> Under the old way of doing things this variable was immediately available to
> you as $username. This is because the "register_globals" option in the
> php.ini file was set to 'on'.
>
> Because this creates a security concern, the developer of PHP (I think as of
> version 4) set this setting to "off" by default (and it should stay that
> way). So now, this automatic variable transferrance doesn't happen. Instead,
> you need to manually extract the variable from the $_POST[] array (which
> contains all of the fields contained in the form). So, still assuming our
> form has one field "username", we would address it in our "verify.php"
> script one of two ways:
>
> 1) We can use $_POST['username'] each and every time we reference the
> variable.
> 2) We can "import" the variable into a local variable as $username =
> $_POST['username']; and then we can address it as simply $username from now
> on.
>
> Personally, I like to use method #1 because it helps me keep things clear.
> But either works well.
>
> If the above discussed problem is NOT what is causing your errors you might
> want to go to http://www.phpfreaks.com, and read their IIS/PHP installation
> guide to make sure everything is in working order.
>
> HTH,
> Anthony M. Saffer [Founder & CEO]
> SCS Consulting Services
> "Custom Software, database, and web application development"
> www.safferconsulting.com
> Ph: (918) 542-8251
>
>
>


 
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Reply With Quote
Old 07-01-2007, 3:59 PM   #4
Dave Darden
 
Dave Darden's Avatar
 
Posts: n/a
My Photos: (0)

Banked:
MK Cash: $

I am Worth:
MK Cash: $
Donate

Recent Blog: None

Default iis & php

So what line is the error on and what does the code look like surrounding that
line?
Is it the line with <?php (That is the only line in your example that contains
'<' ) or is it some other line?
Also for your echo line to work you will need to use double quotes ( " ) instead
of single quotes ( ' ).
Single quotes prevents the variable value substitution that you intend.


"mr bungle" <aaron@modnet.com.au> wrote in message
news:3F269479.30906@modnet.com.au...
> that certainly cleared up a few things...but im still getting errors for
> examle....
> i type this....
> <?php
>
> $a = 2;
> $b = 1;
>
> if($a > $b) {
> echo 'value in $a is greater than value in $b';
> }
>
> ?>
>
>
>
> ......i get this error...
> Parse error: parse error, unexpected '<' in
> C:\Inetpub\wwwroot\Projects\doodle\hs~dev.php on line
>
> kinda a pain in the ass when its only a simple script!!! so what going on??
>
> ------------------------------------------------------------------------------

-------------
> Anthony Saffer wrote:
> >>yes im another newby at all this but hopefully this is an easy quesion
> >>to answer. i have WindowsXP Proffesional with iis and latest V of PHP im
> >>dam sure ive set it up properly but when i write some simple scipts i
> >>get Undefinde Variable errors. i have a coule of news posting scripts
> >>that work okay on my computer but still get those errors, but the
> >>scripts works fine...then i upload it to my server and the errors are
> >>gone...so have i really set it up properly? anyone help?!
> >>thanx in advance

> >
> >
> > Are your errors coming from variables generated/created within a form being
> > submitted to your script? If so, the most likely reason you're getting the
> > error is because you're addressing the variables the "old" PHP way. Here's
> > an example:
> >
> > Let's say that you have a form with one input field <input type="text"
> > name="username"> and you submit it to the verify.php script for processing.
> > Under the old way of doing things this variable was immediately available to
> > you as $username. This is because the "register_globals" option in the
> > php.ini file was set to 'on'.
> >
> > Because this creates a security concern, the developer of PHP (I think as of
> > version 4) set this setting to "off" by default (and it should stay that
> > way). So now, this automatic variable transferrance doesn't happen. Instead,
> > you need to manually extract the variable from the $_POST[] array (which
> > contains all of the fields contained in the form). So, still assuming our
> > form has one field "username", we would address it in our "verify.php"
> > script one of two ways:
> >
> > 1) We can use $_POST['username'] each and every time we reference the
> > variable.
> > 2) We can "import" the variable into a local variable as $username =
> > $_POST['username']; and then we can address it as simply $username from now
> > on.
> >
> > Personally, I like to use method #1 because it helps me keep things clear.
> > But either works well.
> >
> > If the above discussed problem is NOT what is causing your errors you might
> > want to go to http://www.phpfreaks.com, and read their IIS/PHP installation
> > guide to make sure everything is in working order.
> >
> > HTH,
> > Anthony M. Saffer [Founder & CEO]
> > SCS Consulting Services
> > "Custom Software, database, and web application development"
> > www.safferconsulting.com
> > Ph: (918) 542-8251
> >
> >
> >

>



 
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Reply With Quote
Featured Websites
Free Space
Free Space
Free Space Free Space
Reply
Tags: ,




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Featured Websites




All times are GMT +1. The time now is 12:36 PM.


Powered by: vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO 3.0.0
Cheap Computers
MK PitStop Copyright 2005 - 2008

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98