php-install Digest 17 Jan 2003 03:55:10 -0000 Issue 1205

Topics (messages 9714 through 9719):

Undefined variable
        9714 by: Stephen Goehler
        9715 by: Stephen Edmonds

Problems with ImageCreateTrueColor
        9716 by: Kieran Ashley
        9717 by: Pierre-Alain Joye

Php module
        9718 by: Sabina A. Schneider

Netscape error
        9719 by: M A

Administrivia:

To subscribe to the digest, e-mail:
        [EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
        [EMAIL PROTECTED]

To post to the list, e-mail:
        [EMAIL PROTECTED]


----------------------------------------------------------------------
--- Begin Message ---
Hey all,
Thanks in advance for your help...

I'm getting an undefined variable error in my code, and I'm not sure what is
wrong.  I just installed PHP, which is why I am posting here.

Contents of the HTML Form:
<form action="test.php" method=POST>
<input type="text" name="custname">
<input type=submit name="Submit" value="Submit">
</form>

Contents of test.php:
<?
echo "<p>Here are the results:</p>";
echo date("H:i, jS F");
echo $custname;
?>

I'm getting the following error:
NOTICE: undefined variable: custname on
d://**path here**/test.php on line 4.

(i just put "path name" rather than type out the whole long string)

I am running win 2000 server and using IIS 5.0.  I ran the PHP installer and
then added phpisapi to the windows directory and then added the phpisapi
filter in IIS.  The date above comes up correctly, but I can't get any
variables to move over from the form to the php file.

I searched through the help files and through a couple newsgroups with no
luck.  What am I doing wrong?

Thanks!

Steve


--- End Message ---
--- Begin Message ---
You are doing nothing wrong as such (Although some critics may claim its
sloppy coding, which personally i think is trash!). All that it is, is that
PHP is warning you that you are using a variable which does not have a value
assigned to it. Since this is from a form page, the most likely problem is
to do with 'Register Globals'.

When a form is submitted to a page, PHP takes the form details and creates
the variables again. Rather than creating '$custname = value', PHP now puts
all the values into a 'super-global array'. Basically, since your form uses
post to send the details, your variable is created in your script as

$_POST["custname"]

$_POST is the post superglobal. It contains all the values which come to
your script via a 'post' request. There are similar arrays for $_SESSION
variables, $_GET variables, $_COOKIE variables and so on. If you have a
problem finding out where your values have gone, a simple call to

phpinfo(32);

will show you all the variables in your script which you can access/use. You
can also find more infomation on superglobals at:
http://www.php.net/manual/en/security.registerglobals.php
http://www.php.net/manual/en/language.variables.predefined.php#language.vari
ables.superglobals

To stop the notice coming up in the future (i.e. if you do want to use an
empty variable for something) simply go to your php.ini and find error
reporting. Changing
error_reporting = E_ALL
to
error_reporting = E_ALL & ~E_NOTICE
will stop those notices poping up in the future.

Hope this answers your question. Any more problems, don't hesitate to email
again

----- Original Message -----
From: "Stephen Goehler" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, January 16, 2003 8:49 PM
Subject: [PHP-INST] Undefined variable


> Hey all,
> Thanks in advance for your help...
>
> I'm getting an undefined variable error in my code, and I'm not sure what
is
> wrong.  I just installed PHP, which is why I am posting here.
>
> Contents of the HTML Form:
> <form action="test.php" method=POST>
> <input type="text" name="custname">
> <input type=submit name="Submit" value="Submit">
> </form>
>
> Contents of test.php:
> <?
> echo "<p>Here are the results:</p>";
> echo date("H:i, jS F");
> echo $custname;
> ?>
>
> I'm getting the following error:
> NOTICE: undefined variable: custname on
> d://**path here**/test.php on line 4.
>
> (i just put "path name" rather than type out the whole long string)
>
> I am running win 2000 server and using IIS 5.0.  I ran the PHP installer
and
> then added phpisapi to the windows directory and then added the phpisapi
> filter in IIS.  The date above comes up correctly, but I can't get any
> variables to move over from the form to the php file.
>
> I searched through the help files and through a couple newsgroups with no
> luck.  What am I doing wrong?
>
> Thanks!
>
> Steve
>
>
>
> --
> PHP Install Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


--- End Message ---
--- Begin Message --- Hi, I'm running a Matrix server with a modified RedHat Linux install.

I've installed PHP 4.3.0, and GD 2.0.10, but the ImageCreateTrueColor and ImageCopyResampled functions are not available, trying to use them just causes browsers to stall, the document returns no data and no errors are left in the server logs.

I've tried running NM on the GD libraries, and both functions are there, I've tried reinstalling PHP 4.3.0 to use the supplied GD, AND compiling with my external libraries, but I'm still getting the same problems.

I really need those two functions to provide decent Image Upload services on the server, because 256 colours with ImageCreate/ImageCopyResized is just not good enough for my clients.

Can someone PLEASE help. I've tried #php on IRC and no-one seems to have a clue what the problem is.

My eternal gratitude in advance to anyone with any suggestions

Kieran

--- End Message ---
--- Begin Message ---
Hello,

Remove all files related to an external GD (including includes),
configure php using the option --with-gd, without arg. This will use the
bundled GD.

hth

pierre
--- End Message ---
--- Begin Message ---
    Hello everybody!!! I've installed Apache on my computer, Windows 2000 but it doesn't work with php. I've istalled the latest binary, but I can't find the php module to add it... What do I have to do??? I want to have the mysql database funtioning too, but it seems the modules doesn't come with the installer. What should I do? Thank you very much for you time!
 
  Sabina Alejandra Schneider
[EMAIL PROTECTED]
--- End Message ---
--- Begin Message ---

hi,

i am trying to install netscape but iam getting that error:
./netscape-installer-bin: error while loading shared libraries: libstdc++-libc6.1-1so.2: cannot open shared object file:no such file or directory

please help thanks


_________________________________________________________________
Protect your PC - get McAfee.com VirusScan Online http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963

--- End Message ---

Reply via email to