php-windows Digest 15 Jun 2003 10:55:44 -0000 Issue 1777

Topics (messages 20318 through 20324):

Re: absolute include files
        20318 by: DvDmanDT
        20319 by: DvDmanDT

Re: Php_gd.dll
        20320 by: Wential
        20321 by: Stephen

Re: Subject: absolute include files
        20322 by: Neil Smith

Re: Help please: undefined index in sample code
        20323 by: Adam Goossens

Grrrrr!  Definitive guide for setup on XP Pro?
        20324 by: Stuart Felenstein

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 ---
Oh, I think you have the register_globals problem... Search the manual for
'register_globals' for more info...
"Dj Dust" <[EMAIL PROTECTED]> skrev i meddelandet
news:[EMAIL PROTECTED]
> hiya
>
> I've been tearing my hair out for 2 days now trying to get this to work
and
> I'm sure the answer has gotta be pretty simple...
>
> I'm using PHP for the first time and have got some pages uploaded to my
live
> site and they work like a dream - the problem is that they won't work
> locally using PHPdev.
>
> Every page on site uses the following include code on every page:
>
> <?php
> include($DOCUMENT_ROOT . "/include/header.htm");
> ?>
>
> the theory is that no matter where you are in the site hierarchy (there's
a
> lot of directories within directories) it should still work.
>
> Like I said, it DOES work fine when I upload the pages to my ISP but only
> the top level files of the site work locally. If you go down into
> sub-directories I get the following error:
>
> "Warning: Failed opening '/include/header.htm' for inclusion
> (include_path='.;C:/phpdev/php/includes;C:/phpdev/php/class') in
> c:\phpdev\www\curve-online.co.uk\discography\official.php on line 12"
>
> Any idea how I can get my local server working the same as my ISP server?
>
> cheers
>
> daz
>
>



--- End Message ---
--- Begin Message ---
Assuming it's not a downloaded script that is...
"Dash McElroy" <[EMAIL PROTECTED]> skrev i meddelandet
news:[EMAIL PROTECTED]
> daz,
>
> This should be easy enough. First, have you checked to see if
> register_globals is on or off on your local machine? It defaults to off,
> so $DOCUMENT_ROOT would become $_SERVER['DOCUMENT_ROOT'].
>
> Check a phpinfo() screen and see what variables are different between your
> host and your local box. Just a simple file with only the following line:
>
>   <?php phpinfo(); ?>
>
> will suffice.
>
> Another thing you could do is to declare a php include directory and stuff
> all your include files into there.
>
> -Dash
>
> On Sat, 14 Jun 2003, dj dust wrote:
>
> > hiya
> >
> > I've been tearing my hair out for 2 days now trying to get this to work
and
> > I'm sure the answer has gotta be pretty simple...
> >
> > I'm using PHP for the first time and have got some pages uploaded to my
live
> > site and they work like a dream - the problem is that they won't work
> > locally using PHPdev.
> >
> > Every page on site uses the following include code on every page:
> >
> > <?php
> > include($DOCUMENT_ROOT . "/include/header.htm");
> > ?>
> >
> > the theory is that no matter where you are in the site hierarchy
(there's a
> > lot of directories within directories) it should still work.
> >
> > Like I said, it DOES work fine when I upload the pages to my ISP but
only
> > the top level files of the site work locally. If you go down into
> > sub-directories I get the following error:
> >
> > "Warning: Failed opening '/include/header.htm' for inclusion
> > (include_path='.;C:/phpdev/php/includes;C:/phpdev/php/class') in
> > c:\phpdev\www\curve-online.co.uk\discography\official.php on line 12"
> >
> > Any idea how I can get my local server working the same as my ISP
server?
> >
> > cheers
> >
> > daz
> >
> >
> >
> > --
> > PHP Windows Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >



--- End Message ---
--- Begin Message ---
I added them to the extensions directory and uncommented them. The
result is an unending series of server pop-up errors all begin with
"WARNING - Function Registration Failed - duplicate name -" followed by
"imagecolorallocate", "imagecolorresolve", "imagecolorset", "gd_info",
and a few others. I think you will probably get the idea. 

-----Original Message-----
From: malte [mailto:[EMAIL PROTECTED] 
Sent: Saturday, June 14, 2003 5:13 PM
To: Wential
Subject: Re: [PHP-WIN] Php_gd.dll


well, here you got em.. put them in your php extension dir (normally
c:\php\extensions\)
malte

----- Original Message -----
From: "Wential" <[EMAIL PROTECTED]>
To: "'malte'" <[EMAIL PROTECTED]>
Sent: Saturday, June 14, 2003 10:32 PM
Subject: RE: [PHP-WIN] Php_gd.dll


> I got the same error. I've searched my entire hard drive for both 
> php_gd.dll and php_gd2.dll and the don't exist.
>
> -----Original Message-----
> From: malte [mailto:[EMAIL PROTECTED]
> Sent: Saturday, June 14, 2003 4:20 PM
> To: Wential
> Subject: Re: [PHP-WIN] Php_gd.dll
>
>
> try php_gd2.dll
> mfg
> malte
> ----- Original Message -----
> From: "Wential" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Saturday, June 14, 2003 7:45 PM
> Subject: [PHP-WIN] Php_gd.dll
>
>
> > I'm running Windows 2000 Server with PHP 4.3.1; when I try to 
> > uncomment extension=php_gd.dll it errors saying that file doesn't 
> > exist. I keep getting told the newer versions of PHP came with Gdlib

> > enabled and installed. How do I install it and most importantly find

> > that missing php_gd.dll?
> >
> > Wential
> >
> >
> > --
> > PHP Windows Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
>


--- End Message ---
--- Begin Message ---
That means that you somehow have got them included twice! Are you trying to
use gd and gd2 at the same time? I do not beleve that you can run both GD
and GD2, as they use the same functions (hence the pop up error messages)

Stephen

----- Original Message ----- 
From: "Wential" <[EMAIL PROTECTED]>
To: "'malte'" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Saturday, June 14, 2003 10:45 PM
Subject: RE: [PHP-WIN] Php_gd.dll


> I added them to the extensions directory and uncommented them. The
> result is an unending series of server pop-up errors all begin with
> "WARNING - Function Registration Failed - duplicate name -" followed by
> "imagecolorallocate", "imagecolorresolve", "imagecolorset", "gd_info",
> and a few others. I think you will probably get the idea.
>
> -----Original Message-----
> From: malte [mailto:[EMAIL PROTECTED]
> Sent: Saturday, June 14, 2003 5:13 PM
> To: Wential
> Subject: Re: [PHP-WIN] Php_gd.dll
>
>
> well, here you got em.. put them in your php extension dir (normally
> c:\php\extensions\)
> malte
>
> ----- Original Message -----
> From: "Wential" <[EMAIL PROTECTED]>
> To: "'malte'" <[EMAIL PROTECTED]>
> Sent: Saturday, June 14, 2003 10:32 PM
> Subject: RE: [PHP-WIN] Php_gd.dll
>
>
> > I got the same error. I've searched my entire hard drive for both
> > php_gd.dll and php_gd2.dll and the don't exist.
> >
> > -----Original Message-----
> > From: malte [mailto:[EMAIL PROTECTED]
> > Sent: Saturday, June 14, 2003 4:20 PM
> > To: Wential
> > Subject: Re: [PHP-WIN] Php_gd.dll
> >
> >
> > try php_gd2.dll
> > mfg
> > malte
> > ----- Original Message -----
> > From: "Wential" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Saturday, June 14, 2003 7:45 PM
> > Subject: [PHP-WIN] Php_gd.dll
> >
> >
> > > I'm running Windows 2000 Server with PHP 4.3.1; when I try to
> > > uncomment extension=php_gd.dll it errors saying that file doesn't
> > > exist. I keep getting told the newer versions of PHP came with Gdlib
>
> > > enabled and installed. How do I install it and most importantly find
>
> > > that missing php_gd.dll?
> > >
> > > Wential
> > >
> > >
> > > --
> > > PHP Windows Mailing List (http://www.php.net/)
> > > To unsubscribe, visit: http://www.php.net/unsub.php
> > >
> >
>
>
> -- 
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>



--- End Message ---
--- Begin Message --- I always use "./includes/blah.php"

That seems to work for every top level, with includes in a subdirectory, and use

"../includes/blah.php" for subdirectory off main site - I dont go deeper than that but it works fine.

Hope it works out
Cheers - Neil.

At 19:16 14/06/2003 +0000, you wrote:
From: "dj dust" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Date: Sat, 14 Jun 2003 14:34:25 +0100
MIME-Version: 1.0
Content-Type: text/plain;
        charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Subject: absolute include files

hiya

I've been tearing my hair out for 2 days now trying to get this to work and
I'm sure the answer has gotta be pretty simple...

I'm using PHP for the first time and have got some pages uploaded to my live
site and they work like a dream - the problem is that they won't work
locally using PHPdev.

Every page on site uses the following include code on every page:

<?php
include($DOCUMENT_ROOT . "/include/header.htm");
?>

the theory is that no matter where you are in the site hierarchy (there's a
lot of directories within directories) it should still work.

Like I said, it DOES work fine when I upload the pages to my ISP but only
the top level files of the site work locally. If you go down into
sub-directories I get the following error:

"Warning: Failed opening '/include/header.htm' for inclusion
(include_path='.;C:/phpdev/php/includes;C:/phpdev/php/class') in
c:\phpdev\www\curve-online.co.uk\discography\official.php on line 12"

Any idea how I can get my local server working the same as my ISP server?

cheers

daz


--- End Message ---
--- Begin Message --- Stuart,

This problem occurs when you try to access an index in an array that does not exist.

First off, make sure that your variables are getting passed to the script via POST. Do this by calling the function print_r(), and passing the $_POST array as an argument to it.

print_r($_POST);

That will dump the entire contents of the _POST array onto the screen, so you may check exactly what's in there. This may give you a clue as to what is going wrong. I tested your script on my 4.3.2 build, and it worked fine.

If $_POST doesn't work, give $HTTP_POST_VARS a try. If that doesn't work, I'm stumped. What web server are you using?

-Adam.

Stuart Felenstein wrote:
I can't believe Chapter 1 , section 1 and I'm off to a bad start already. Using this form and script, I keep getting "undefined index" for the variables I declare in the script. Running PHP 4.3.2 on XP Pro. Thanks.
Stuart
Form:
<form action="processorder.php" method=post>
<table border=0>
<tr bgcolor=#cccccc>
<td width=150>Item</td>
<td width=15>Quantity</td>
</tr>
<tr>
<td>Tires</td>
<td align="center"><input type="text" name="tireqty" size="3" maxlength="3"></td>
</tr>
<tr>
<td>Oil</td>
<td align="center"><input type="text" name="oilqty" size="3" maxlength="3"></td>
</tr>
<tr>
<td>Spark Plugs</td>
<td align="center"><input type="text" name="sparkqty" size="3" maxlength="3"></td>
</tr>
<tr>
<td colspan="2" align="center"><input type="submit" value="Submit Order"></td>
</tr>
</table>
</form>
Script:
<html>
<head>
<title>Bob's Auto Parts - Order Results</title>
</head>
<body>
<h1>Bob's Auto Parts</h1>
<h2>Order Results</h2>
<?php
//create short variable names
$tireqty = $_POST['tireqty'];
$oilqty = $_POST['oilqty'];
$sparkqty = $_POST['sparkqty'];
?>
<?php
echo '<p>Your order is as follows: </p>';
echo $tireqty.' tires<br />';
echo $oilqty.' bottles of oil<br />';
echo $sparkqty.' spark plugs<br />';
?>
</body>
</html>




--- End Message ---
--- Begin Message ---
I had to do a system restore yesterday and basically blew out my PHP setup.  What I 
seem to not be able to find is a definitive guide to setting up PHP properly.  I have 
followed the install guidelines on php.net (documentation) for Windows.  What I found 
though before, was that it was not completely accurate and some of the comments 
helped.  For instance, in the documentation it says to put php.ini into the root 
directory, which by the way suggested would be /winnt.  No there is no /winnt under 
XP.  So following the other possiblity I dropped it into /windows.  Nothing happened 
so following someone's comment I put it into /system 32 along with php4apache2 and 
php4ts.  This seemed to turn it on.  This though confuses me as it still states to 
reference php4apache2 in the http.conf file as apache/sapi/php4apache2.  If I copied 
it over to system32 should I reference it there.
 
Anyway is there a definitive guide for install, or some proven method to get PHP 
4.3.2, Apache 2 (latest stable) and XP Pro all singing the same tune?
 
Thanks
Stuart

--- End Message ---

Reply via email to