php-general Digest 17 Sep 2002 09:43:56 -0000 Issue 1590

Topics (messages 116569 through 116608):

global vs. per-site php.ini settings
        116569 by: Tomasz Orzechowski

Re: Problem with REMOTE_ADDR
        116570 by: Leif K-Brooks
        116573 by: Kevin S. Dome
        116574 by: Kevin Stone
        116575 by: Chris Cook
        116605 by: Krzysztof Dziekiewicz

Search for a string between two end points
        116571 by: Christopher J. Crane
        116572 by: Kevin Stone

jpeg thumbnail errors
        116576 by: Warwick Berg
        116577 by: John Holmes
        116578 by: Warwick Berg
        116582 by: Peter Houchin
        116604 by: Michael Egan

Regex for split() to split by , which is not in ()s?
        116579 by: Leif K-Brooks

Wanna crash PHP4 easily?
        116580 by: George Hester

Re: How to do Recurring Credit Card Charges?
        116581 by: Jonathan Rosenberg

Re: php's 27/10/2002 problem Important
        116583 by: Jim Winstead

Cookies
        116584 by: Matt Giddings

Re: Problems with php and qmail
        116585 by: Rick Widmer

can you get the name of an object from within it's own class?
        116586 by: Simon McKenna

Flash and PHP
        116587 by: Resarch and Development
        116588 by: Justin French

A problem with Sessions:  Developing and App inside PostNuke
        116589 by: Ricardo Fitzgerald
        116590 by: Ed Carp
        116593 by: Kelly Firkins

Re: How do I upgrade my version of PHP?
        116591 by: David Robley

Re: What unzip program to use?
        116592 by: YC Nyon

Browscap.ini new crashes PHP 4 newest
        116594 by: George Hester

ImageTTFText - absolute versus relative path names
        116595 by: thomas.emde.scaleon.de

Re: How to schedule a run for a php script.
        116596 by: Henry

COOKIE Question.
        116597 by: Tom Ray
        116598 by: Leif K-Brooks
        116599 by: Erwin
        116600 by: Tom Ray
        116606 by: Krzysztof Dziekiewicz

How to choose a crypt-standard in crypt()?
        116601 by: Uwe Birkenhain
        116603 by: Erwin

REGISTER_SHUTDOWN_FUNCTION() BUG -- Please Fix.
        116602 by: Jason Caldwell

Re: adding text to variables
        116607 by: Ford, Mike               [LSS]

Re: Creating Images (.GIF) with PHP from Text?
        116608 by: Paonarong Buachaiyo

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 ---
Greetings,

while it is easy to set the php-as-module settings on a per-vhost case
using php_admin_flag and php_admin_value it seems to be much harder to
achieve same for CGI.  I have gotten PHP/CGI to read site-specific INI
files, but it then subsequently ignores the 'global' INI settings set
in the php.ini file referenced by --with-config-file-path ./configure
parameter - which is exactly opposite to what I would like it to do.

questions:
        - is there a way to make PHP/CGI parse _multiple_ .ini files
          if so - in what what overrides what, what is the sequence?
        - is there a way to 'include' a 'global' .ini file into the
          per-site files, other that of putting the statements from
          the global one in the site-specific one?  i don't want to
          have to change every site-specific config when/if i need
          to change a 'global' setting (register_globals comes to
          mind)

any help will be most appreciated, thank you in advance
-- 
Tomasz Orzechowski                                           [EMAIL PROTECTED]
APK.net systems administration team                                TO630

--- End Message ---
--- Begin Message ---
Have you tried a web site such as www.getmyipaddress.com to see if it's 
on your end or your script's?

Chris Cook wrote:

> Hello all,
>
> Whenever I use REMOTE_ADDR, it gives me the IP of the server. Of 
> course, I am not interested in this and want the IP of the client. I 
> put this code in to resolve it and it still didnt work. What am I 
> doing wrong?
>
> Thanks for any help in advance,
> Chris
>
> if (getenv(HTTP_X_FORWARDED_FOR)) {
> $ip = getenv('HTTP_X_FORWARD_FOR');
> $host = gethostbyaddr($ip);
> } else {
> $ip = getenv('REMOTE_ADDR');
> $host = gethostbyaddr($ip);
> }
>
>
>
> _________________________________________________________________
> Send and receive Hotmail on your mobile device: http://mobile.msn.com
>
>


--- End Message ---
--- Begin Message ---
This is the string I use to display a user their ip address, I am not sure 
if this is what you are looking for but I figured I would drop my 2 cents 
in.

<?php echo $_SERVER['REMOTE_ADDR']?>







On Mon, 16 Sep 2002, Leif K-Brooks wrote:

> Have you tried a web site such as www.getmyipaddress.com to see if it's 
> on your end or your script's?
> 
> Chris Cook wrote:
> 
> > Hello all,
> >
> > Whenever I use REMOTE_ADDR, it gives me the IP of the server. Of 
> > course, I am not interested in this and want the IP of the client. I 
> > put this code in to resolve it and it still didnt work. What am I 
> > doing wrong?
> >
> > Thanks for any help in advance,
> > Chris
> >
> > if (getenv(HTTP_X_FORWARDED_FOR)) {
> > $ip = getenv('HTTP_X_FORWARD_FOR');
> > $host = gethostbyaddr($ip);
> > } else {
> > $ip = getenv('REMOTE_ADDR');
> > $host = gethostbyaddr($ip);
> > }
> >
> >
> >
> > _________________________________________________________________
> > Send and receive Hotmail on your mobile device: http://mobile.msn.com
> >
> >
> 
> 
> 
> 

-- 
-------------
Kevin S. Dome

--- End Message ---
--- Begin Message ---
$REMOTE_ADDR is not necessarily going to be the user.. as previously stated
quite often users are behind a router in which case $REMOTE_ADDR is going to
contain the IP of the Proxy server.  $HTTP_X_FORWARDED_FOR will only work if
the Proxy sends it which most do not.

The only solution is to use Sessions or Cookies to distinguish users behind
identical IPs.

-Kevin

----- Original Message -----
From: "Kevin S. Dome" <[EMAIL PROTECTED]>
To: "Leif K-Brooks" <[EMAIL PROTECTED]>
Cc: "Chris Cook" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Monday, September 16, 2002 4:36 PM
Subject: Re: [PHP] Problem with REMOTE_ADDR


> This is the string I use to display a user their ip address, I am not sure
> if this is what you are looking for but I figured I would drop my 2 cents
> in.
>
> <?php echo $_SERVER['REMOTE_ADDR']?>
>
>
>
>
>
>
>
> On Mon, 16 Sep 2002, Leif K-Brooks wrote:
>
> > Have you tried a web site such as www.getmyipaddress.com to see if it's
> > on your end or your script's?
> >
> > Chris Cook wrote:
> >
> > > Hello all,
> > >
> > > Whenever I use REMOTE_ADDR, it gives me the IP of the server. Of
> > > course, I am not interested in this and want the IP of the client. I
> > > put this code in to resolve it and it still didnt work. What am I
> > > doing wrong?
> > >
> > > Thanks for any help in advance,
> > > Chris
> > >
> > > if (getenv(HTTP_X_FORWARDED_FOR)) {
> > > $ip = getenv('HTTP_X_FORWARD_FOR');
> > > $host = gethostbyaddr($ip);
> > > } else {
> > > $ip = getenv('REMOTE_ADDR');
> > > $host = gethostbyaddr($ip);
> > > }
> > >
> > >
> > >
> > > _________________________________________________________________
> > > Send and receive Hotmail on your mobile device: http://mobile.msn.com
> > >
> > >
> >
> >
> >
> >
>
> --
> -------------
> Kevin S. Dome
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

--- End Message ---
--- Begin Message ---
Yep, my IP address appears fine through other servers. It makes me think 
that there is a possible misconfiguration with PHP or the server.

Thanks,
Chris


>From: Leif K-Brooks <[EMAIL PROTECTED]>
>To: Chris Cook <[EMAIL PROTECTED]>
>CC: [EMAIL PROTECTED]
>Subject: Re: [PHP] Problem with REMOTE_ADDR
>Date: Mon, 16 Sep 2002 18:27:19 -0400
>
>Have you tried a web site such as www.getmyipaddress.com to see if it's on 
>your end or your script's?
>
>Chris Cook wrote:
>
>>Hello all,
>>
>>Whenever I use REMOTE_ADDR, it gives me the IP of the server. Of course, I 
>>am not interested in this and want the IP of the client. I put this code 
>>in to resolve it and it still didnt work. What am I doing wrong?
>>
>>Thanks for any help in advance,
>>Chris
>>
>>if (getenv(HTTP_X_FORWARDED_FOR)) {
>>$ip = getenv('HTTP_X_FORWARD_FOR');
>>$host = gethostbyaddr($ip);
>>} else {
>>$ip = getenv('REMOTE_ADDR');
>>$host = gethostbyaddr($ip);
>>}
>>
>>
>>
>>_________________________________________________________________
>>Send and receive Hotmail on your mobile device: http://mobile.msn.com
>>
>>
>
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php




_________________________________________________________________
Send and receive Hotmail on your mobile device: http://mobile.msn.com

--- End Message ---
--- Begin Message ---
> Whenever I use REMOTE_ADDR, it gives me the IP of the server. Of course, I
> am not interested in this and want the IP of the client. I put this code in 
> to resolve it and it still didnt work. What am I doing wrong?

Try HTTP_CLIENT_IP. It is set in some situations.

--- End Message ---
--- Begin Message ---
How do you do a search between two strings.

For instance, if I wanted to remove everything between two string points,
like say the first occurrence between"<Table>" & "</Table>".

Normally, I split a string into pieces to get what I want like this.

list($Junk1, $DataStart) = split("<table>", $SomeString);
list($DataEnd, $Junk2) = split("</table", $DataStart);
print $DataStart;

In this case however, instead of printing out everything between those two
points, I want to remove it from the string. I just don't know how.



--- End Message ---
--- Begin Message ---
preg_replace();
http://www.php.net/manual/en/function.preg-replace.php
-Kevin

----- Original Message -----
From: "Christopher J. Crane" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, September 16, 2002 4:23 PM
Subject: [PHP] Search for a string between two end points


> How do you do a search between two strings.
>
> For instance, if I wanted to remove everything between two string points,
> like say the first occurrence between"<Table>" & "</Table>".
>
> Normally, I split a string into pieces to get what I want like this.
>
> list($Junk1, $DataStart) = split("<table>", $SomeString);
> list($DataEnd, $Junk2) = split("</table", $DataStart);
> print $DataStart;
>
> In this case however, instead of printing out everything between those two
> points, I want to remove it from the string. I just don't know how.
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

--- End Message ---
--- Begin Message ---
Hi all

I know very little about PHP and am enquiring for a mate who's got some
problems. Could some kind soul tell me what the errors below might mean?
He's using PHP 4.1.2. I can supply the scripts that cause the error if that
will help? He says they occur when a jpeg is being uploaded and created into
a thumbnail.

Thanks in advance.

Thanks
Warwick




When a jpeg is being uploaded and created into a thumbnail:

Warning: ImageCreateFromJpeg: No JPEG support in this PHP build in
/home/hsphere/local/home/nexcen0/datnet.org/classifieds/common.php on line
167

Warning: Supplied argument is not a valid Image resource in
/home/hsphere/local/home/nexcen0/datnet.org/classifieds/common.php on line
168

Warning: Supplied argument is not a valid Image resource in
/home/hsphere/local/home/nexcen0/datnet.org/classifieds/common.php on line
169

Warning: Supplied argument is not a valid Image resource in
/home/hsphere/local/home/nexcen0/datnet.org/classifieds/common.php on line
171

Warning: ImageJpeg: No JPG support in this PHP build in
/home/hsphere/local/home/nexcen0/datnet.org/classifieds/common.php on line
172

Warning: ImageCreateFromJpeg: No JPEG support in this PHP build in
/home/hsphere/local/home/nexcen0/datnet.org/classifieds/common.php on line
167

Warning: Supplied argument is not a valid Image resource in
/home/hsphere/local/home/nexcen0/datnet.org/classifieds/common.php on line
168

Warning: Supplied argument is not a valid Image resource in
/home/hsphere/local/home/nexcen0/datnet.org/classifieds/common.php on line
169

Warning: Supplied argument is not a valid Image resource in
/home/hsphere/local/home/nexcen0/datnet.org/classifieds/common.php on line
171

Warning: ImageJpeg: No JPG support in this PHP build in
/home/hsphere/local/home/nexcen0/datnet.org/classifieds/common.php on line
172

Warning: Cannot add header information - headers already sent by (output
started at
/home/hsphere/local/home/nexcen0/datnet.org/classifieds/common.php:167) in
/home/hsphere/local/home/nexcen0/datnet.org/classifieds/account.php on line
91



--- End Message ---
--- Begin Message ---
I may not be the brightest person, but I'd bet it all stems from there
being " No JPEG support in this PHP build "

---John Holmes...

> -----Original Message-----
> From: Warwick Berg [mailto:[EMAIL PROTECTED]]
> Sent: Monday, September 16, 2002 7:08 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] jpeg thumbnail errors
> 
> Hi all
> 
> I know very little about PHP and am enquiring for a mate who's got
some
> problems. Could some kind soul tell me what the errors below might
mean?
> He's using PHP 4.1.2. I can supply the scripts that cause the error if
> that
> will help? He says they occur when a jpeg is being uploaded and
created
> into
> a thumbnail.
> 
> Thanks in advance.
> 
> Thanks
> Warwick
> 
> 
> 
> 
> When a jpeg is being uploaded and created into a thumbnail:
> 
> Warning: ImageCreateFromJpeg: No JPEG support in this PHP build in
> /home/hsphere/local/home/nexcen0/datnet.org/classifieds/common.php on
line
> 167
> 
> Warning: Supplied argument is not a valid Image resource in
> /home/hsphere/local/home/nexcen0/datnet.org/classifieds/common.php on
line
> 168
> 
> Warning: Supplied argument is not a valid Image resource in
> /home/hsphere/local/home/nexcen0/datnet.org/classifieds/common.php on
line
> 169
> 
> Warning: Supplied argument is not a valid Image resource in
> /home/hsphere/local/home/nexcen0/datnet.org/classifieds/common.php on
line
> 171
> 
> Warning: ImageJpeg: No JPG support in this PHP build in
> /home/hsphere/local/home/nexcen0/datnet.org/classifieds/common.php on
line
> 172
> 
> Warning: ImageCreateFromJpeg: No JPEG support in this PHP build in
> /home/hsphere/local/home/nexcen0/datnet.org/classifieds/common.php on
line
> 167
> 
> Warning: Supplied argument is not a valid Image resource in
> /home/hsphere/local/home/nexcen0/datnet.org/classifieds/common.php on
line
> 168
> 
> Warning: Supplied argument is not a valid Image resource in
> /home/hsphere/local/home/nexcen0/datnet.org/classifieds/common.php on
line
> 169
> 
> Warning: Supplied argument is not a valid Image resource in
> /home/hsphere/local/home/nexcen0/datnet.org/classifieds/common.php on
line
> 171
> 
> Warning: ImageJpeg: No JPG support in this PHP build in
> /home/hsphere/local/home/nexcen0/datnet.org/classifieds/common.php on
line
> 172
> 
> Warning: Cannot add header information - headers already sent by
(output
> started at
>
/home/hsphere/local/home/nexcen0/datnet.org/classifieds/common.php:167)
in
> /home/hsphere/local/home/nexcen0/datnet.org/classifieds/account.php on
> line
> 91
> 
> 
> 
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php


--- End Message ---
--- Begin Message ---
Hi John

I don't know anything about it. Does this help?

http://dantehosting.com/phpinfo.php

Thanks
Warwick



"John Holmes" <[EMAIL PROTECTED]> wrote in message
news:000001c25dd7$bfcefb40$b402a8c0@mango...
> I may not be the brightest person, but I'd bet it all stems from there
> being " No JPEG support in this PHP build "
>
> ---John Holmes...
>
> > -----Original Message-----
> > From: Warwick Berg [mailto:[EMAIL PROTECTED]]
> > Sent: Monday, September 16, 2002 7:08 PM
> > To: [EMAIL PROTECTED]
> > Subject: [PHP] jpeg thumbnail errors
> >
> > Hi all
> >
> > I know very little about PHP and am enquiring for a mate who's got
> some
> > problems. Could some kind soul tell me what the errors below might
> mean?
> > He's using PHP 4.1.2. I can supply the scripts that cause the error if
> > that
> > will help? He says they occur when a jpeg is being uploaded and
> created
> > into
> > a thumbnail.
> >
> > Thanks in advance.
> >
> > Thanks
> > Warwick
> >
> >
> >
> >
> > When a jpeg is being uploaded and created into a thumbnail:
> >
> > Warning: ImageCreateFromJpeg: No JPEG support in this PHP build in
> > /home/hsphere/local/home/nexcen0/datnet.org/classifieds/common.php on
> line
> > 167
> >
> > Warning: Supplied argument is not a valid Image resource in
> > /home/hsphere/local/home/nexcen0/datnet.org/classifieds/common.php on
> line
> > 168
> >
> > Warning: Supplied argument is not a valid Image resource in
> > /home/hsphere/local/home/nexcen0/datnet.org/classifieds/common.php on
> line
> > 169
> >
> > Warning: Supplied argument is not a valid Image resource in
> > /home/hsphere/local/home/nexcen0/datnet.org/classifieds/common.php on
> line
> > 171
> >
> > Warning: ImageJpeg: No JPG support in this PHP build in
> > /home/hsphere/local/home/nexcen0/datnet.org/classifieds/common.php on
> line
> > 172
> >
> > Warning: ImageCreateFromJpeg: No JPEG support in this PHP build in
> > /home/hsphere/local/home/nexcen0/datnet.org/classifieds/common.php on
> line
> > 167
> >
> > Warning: Supplied argument is not a valid Image resource in
> > /home/hsphere/local/home/nexcen0/datnet.org/classifieds/common.php on
> line
> > 168
> >
> > Warning: Supplied argument is not a valid Image resource in
> > /home/hsphere/local/home/nexcen0/datnet.org/classifieds/common.php on
> line
> > 169
> >
> > Warning: Supplied argument is not a valid Image resource in
> > /home/hsphere/local/home/nexcen0/datnet.org/classifieds/common.php on
> line
> > 171
> >
> > Warning: ImageJpeg: No JPG support in this PHP build in
> > /home/hsphere/local/home/nexcen0/datnet.org/classifieds/common.php on
> line
> > 172
> >
> > Warning: Cannot add header information - headers already sent by
> (output
> > started at
> >
> /home/hsphere/local/home/nexcen0/datnet.org/classifieds/common.php:167)
> in
> > /home/hsphere/local/home/nexcen0/datnet.org/classifieds/account.php on
> > line
> > 91
> >
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
>
>




--- End Message ---
--- Begin Message ---
>From your phpinfo you do not have jpeg support .

cheers

> -----Original Message-----
> From: Warwick Berg [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, 17 September 2002 9:27 AM
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP] jpeg thumbnail errors
>
>
> Hi John
>
> I don't know anything about it. Does this help?
>
> http://dantehosting.com/phpinfo.php
>
> Thanks
> Warwick
>
>
>
> "John Holmes" <[EMAIL PROTECTED]> wrote in message
> news:000001c25dd7$bfcefb40$b402a8c0@mango...
> > I may not be the brightest person, but I'd bet it all stems from there
> > being " No JPEG support in this PHP build "
> >
> > ---John Holmes...
> >
> > > -----Original Message-----
> > > From: Warwick Berg [mailto:[EMAIL PROTECTED]]
> > > Sent: Monday, September 16, 2002 7:08 PM
> > > To: [EMAIL PROTECTED]
> > > Subject: [PHP] jpeg thumbnail errors
> > >
> > > Hi all
> > >
> > > I know very little about PHP and am enquiring for a mate who's got
> > some
> > > problems. Could some kind soul tell me what the errors below might
> > mean?
> > > He's using PHP 4.1.2. I can supply the scripts that cause the error if
> > > that
> > > will help? He says they occur when a jpeg is being uploaded and
> > created
> > > into
> > > a thumbnail.
> > >
> > > Thanks in advance.
> > >
> > > Thanks
> > > Warwick
> > >
> > >
> > >
> > >
> > > When a jpeg is being uploaded and created into a thumbnail:
> > >
> > > Warning: ImageCreateFromJpeg: No JPEG support in this PHP build in
> > > /home/hsphere/local/home/nexcen0/datnet.org/classifieds/common.php on
> > line
> > > 167
> > >
> > > Warning: Supplied argument is not a valid Image resource in
> > > /home/hsphere/local/home/nexcen0/datnet.org/classifieds/common.php on
> > line
> > > 168
> > >
> > > Warning: Supplied argument is not a valid Image resource in
> > > /home/hsphere/local/home/nexcen0/datnet.org/classifieds/common.php on
> > line
> > > 169
> > >
> > > Warning: Supplied argument is not a valid Image resource in
> > > /home/hsphere/local/home/nexcen0/datnet.org/classifieds/common.php on
> > line
> > > 171
> > >
> > > Warning: ImageJpeg: No JPG support in this PHP build in
> > > /home/hsphere/local/home/nexcen0/datnet.org/classifieds/common.php on
> > line
> > > 172
> > >
> > > Warning: ImageCreateFromJpeg: No JPEG support in this PHP build in
> > > /home/hsphere/local/home/nexcen0/datnet.org/classifieds/common.php on
> > line
> > > 167
> > >
> > > Warning: Supplied argument is not a valid Image resource in
> > > /home/hsphere/local/home/nexcen0/datnet.org/classifieds/common.php on
> > line
> > > 168
> > >
> > > Warning: Supplied argument is not a valid Image resource in
> > > /home/hsphere/local/home/nexcen0/datnet.org/classifieds/common.php on
> > line
> > > 169
> > >
> > > Warning: Supplied argument is not a valid Image resource in
> > > /home/hsphere/local/home/nexcen0/datnet.org/classifieds/common.php on
> > line
> > > 171
> > >
> > > Warning: ImageJpeg: No JPG support in this PHP build in
> > > /home/hsphere/local/home/nexcen0/datnet.org/classifieds/common.php on
> > line
> > > 172
> > >
> > > Warning: Cannot add header information - headers already sent by
> > (output
> > > started at
> > >
> > /home/hsphere/local/home/nexcen0/datnet.org/classifieds/common.php:167)
> > in
> > > /home/hsphere/local/home/nexcen0/datnet.org/classifieds/account.php on
> > > line
> > > 91
> > >
> > >
> > >
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
>
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

--- End Message ---
--- Begin Message ---

Warwick,

There are different ways of compiling PHP which will determine which elements it can 
support.

The first error you report shows that the particular build of PHP being used hasn't 
been compiled to create images from JPEGS. The remaining errors flow on from this as 
no image has been supplied to them.

You would need to recompile PHP so that such support is offered - no mean feat from my 
own experiences. I gave up :-(

Michael Egan


-----Original Message-----
From: Warwick Berg [mailto:[EMAIL PROTECTED]]
Sent: 17 September 2002 00:08
To: [EMAIL PROTECTED]
Subject: [PHP] jpeg thumbnail errors


Hi all

I know very little about PHP and am enquiring for a mate who's got some
problems. Could some kind soul tell me what the errors below might mean?
He's using PHP 4.1.2. I can supply the scripts that cause the error if that
will help? He says they occur when a jpeg is being uploaded and created into
a thumbnail.

Thanks in advance.

Thanks
Warwick




When a jpeg is being uploaded and created into a thumbnail:

Warning: ImageCreateFromJpeg: No JPEG support in this PHP build in
/home/hsphere/local/home/nexcen0/datnet.org/classifieds/common.php on line
167

Warning: Supplied argument is not a valid Image resource in
/home/hsphere/local/home/nexcen0/datnet.org/classifieds/common.php on line
168

Warning: Supplied argument is not a valid Image resource in
/home/hsphere/local/home/nexcen0/datnet.org/classifieds/common.php on line
169

Warning: Supplied argument is not a valid Image resource in
/home/hsphere/local/home/nexcen0/datnet.org/classifieds/common.php on line
171

Warning: ImageJpeg: No JPG support in this PHP build in
/home/hsphere/local/home/nexcen0/datnet.org/classifieds/common.php on line
172

Warning: ImageCreateFromJpeg: No JPEG support in this PHP build in
/home/hsphere/local/home/nexcen0/datnet.org/classifieds/common.php on line
167

Warning: Supplied argument is not a valid Image resource in
/home/hsphere/local/home/nexcen0/datnet.org/classifieds/common.php on line
168

Warning: Supplied argument is not a valid Image resource in
/home/hsphere/local/home/nexcen0/datnet.org/classifieds/common.php on line
169

Warning: Supplied argument is not a valid Image resource in
/home/hsphere/local/home/nexcen0/datnet.org/classifieds/common.php on line
171

Warning: ImageJpeg: No JPG support in this PHP build in
/home/hsphere/local/home/nexcen0/datnet.org/classifieds/common.php on line
172

Warning: Cannot add header information - headers already sent by (output
started at
/home/hsphere/local/home/nexcen0/datnet.org/classifieds/common.php:167) in
/home/hsphere/local/home/nexcen0/datnet.org/classifieds/account.php on line
91




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

--- End Message ---
--- Begin Message ---
I'm looking for a regex which splits a string by commas, but only if the 
comma is not in parenthesis.   I know I'm being lazy and should write it 
myself, but that's just it... I'm lazy!

--- End Message ---
--- Begin Message ---
In Windows 2000 SP2 IIS 5 PHP 4.2.3

Get this new browscap.ini at

http://www.garykeith.com/browscap.asp

Then in your php.ini point browscap variable to browscap.ini file in
C:\WINNT\System32\inetsvr

and watch the fun begin.

--
George Hester
______________________________


--- End Message ---
--- Begin Message ---
----Original Message-----
> From: Monty [mailto:[EMAIL PROTECTED]]
> Sent: Monday, September 16, 2002 14:23 PM
>
>
> JR, thanks a lot for your advice. I have a few
> additional questions if you don't mind me asking...

> 1) Can you explain how you produce the encrypted
> e-mail? Is that something done with PHP or another
> piece of software?

If I had had mcrypt available in PHP when I first built this, I would have
just used this facility.  But the first server I was on didn't have mcrypt,
so I rolled my own implementation of TEA.

> 2) What info do you encrypt? The info Authoize.Net
> returns to you, or the info they filled out in the
> form before you send if off to AuthNet for
> verification?

I encrypt the information that Authorize.Net requires for a batch
transaction, along with few additional pieces of information (e.g., a unique
transaction #, cardholder name).

> My concern is being sure I only keep a list
> of valid and approved credit card numbers, not
> any that are declined. And I'm not sure at
> whether or not AuthNet will return the CC
> number after being approved.

I don't think A.N returns the CC #.  But, that's no problem, I just retain
it in the PHP page & use it if the authorization succeeds.  Does this make
sense?

> 3) How do you deal with members who want to change
> their credit card number or cancel their membership?
> Do you update the CC list you keep manually?

Yep.  Just update the DB by hand.  It's fast & easy.

> Monty

--
JR

--- End Message ---
--- Begin Message ---
Rick Widmer <[EMAIL PROTECTED]> wrote:
> At 02:56 PM 9/16/02 +0000, Jim Winstead wrote:
>>Mahmut Kursun <[EMAIL PROTECTED]> wrote:
>> > If you are trying to code a sequantial date requiring algorithm you will
>> > see that for 27/10/2002 you have two timestamps!!!!
>> >
>> > And that is a serious bug I think. Any comments!
>>
>>10/27/2002 must be a twenty-five hour day in your timezone. (end of
>>daylight savings time?)
> 
> No.  In fact there are 86,400 (60 * 60 * 24) seconds that occur during
> 10/27/2002 and most every other day. If you don't look at the HH:MM:SS
> part of a timestamp there are usually 86,400 different timestamp values
> that will return the same MM/DD/YYYY.  Daylight savings time may
> affect the number of seconds in a given day.

in fact, there are 90,000 (60 * 60 * 25) seconds that occur during a day
on which the observation of daylight saving time is ended, giving you
an amazing 90,000 different timestamp values that will return the same
MM/DD/YYYY. in fact, about 3,600 of them will even give you the same
HH:MM:SS!

if this issue didn't come up twice a year, it would almost be funny.

(and for this keeping score at home, 10/27/2002 is indeed when the DST
changeover happens this year in the US and EU.)

jim
--- End Message ---
--- Begin Message ---
I recently installed Apache 2.0.40 and PHP 4.2.3 on my windows 2000 box.
Now I'm having tons of troubles with cookies working and all I'm trying
to do is drop a session id and an expiration time.  Sounds simple, and
was actually working on my linux box before the motherboard died.  I
believe I was running PHP 4.0.6 on RedHat 7.2 at the time.  Has anything
changed?  I've RTFM and haven't seen any changes in the setcookie()
function.

A second note, I was initially testing the cookies while running the
browser and server on the same box.  I thought that this particular
setup my have been the culprit until I tried using a second machine on
my network and received the same errors.

Ok, now for the cookie behavior.  The cookie will be set upon initially
hitting the site.  But, when I set the cookies on subsequent runs
nothing happens, the data doesn't get updated like it should.  Any
suggestions?

Thanks,
Matt

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.386 / Virus Database: 218 - Release Date: 9/9/2002
 

--- End Message ---
--- Begin Message ---
At 03:20 PM 9/16/02 -0500, Michael J Humphries wrote:
>I am running a Bulletin Board system with the following
>RH 7.2
>Apache
>VBulletin (which is all coded in PHP)
>PHP4
>
>But my qmail Server is on another physical server and I need to ask how
>to configure php to recognize the second server for SMTP mail out
>functions.


    http://cr.yp.to/qmail/mini.html

Be sure to link (ln -s) /sbin/sendmail to /var/qmail/bin/sendmail and set your
sendmail path to /sbin/sendmail.  You could set the sendmail path to
/var/qmail/bin/senamil, but there may be other programs on the web server
that expect a sendmail program at /sbin/sendmail. Some systems use
/usr/sbin/sendmail instead of /sbin/sendmail.  Follow the standard convention
for your distribution.

Rick

--- End Message ---
--- Begin Message ---
Hi all,

I'm new to the php world and have just finished building my first class,

It works pretty well, but i've run into a quandary adding debug code,
my problem is thus:

Many objects get created by this class, often in the same php script,
and the debug log is an actual file.  At the moment i'm naming the file
after the name of the class, but what I would really like to do is name
the log file after the name of the object instantiated from the class. e.g.

class flashPash {
....
   $this->fpLog = fopen("flashPash.log","w+");
....
 function debugLog($LogMsg) {
  if (($this->debug == true) && (!empty($this->fpLog)))
   fwrite($this->fpLog,$LogMsg."\n");
 }
}

$fpObject = new flashPash();
$fpObject->debug = true;
....


so...is there a way I can get the variable name "fpObject" from within
flashPash itself?  i.e. so I can make the logfile "fpObject.log" instead
of "flashPash.log"

 I realise it would be trivial to create a new property of the class to
store the debug log filename, but i'm hoping I can avoid this?

"get_object_vars" & "get_class" appear to be heading in the right
direction...but not quite...so...any ideas?  is this actually possible?
I kinda want to go down the hierarchical tree, instead of going up it :)

thanks for any help.   php rocks!
si



--- End Message ---
--- Begin Message ---
Hello. If anyone has had experience with writing scripts that create 
.swf file on the fly I would appreciate it if you could refer me to 
tutorials and documentation regarding this topic.

Thanks in advance.

=================================
Ivan R. Quintero E.
Dealante Research and Development
Panama City, Republic of Panama

--- End Message ---
--- Begin Message ---
http://www.php.net/manual/en/ref.ming.php
http://www.php.net/manual/en/ref.swf.php

Plenty of user examples and documentation to get you started.


Justin French


on 17/09/02 11:21 AM, Resarch and Development ([EMAIL PROTECTED]) wrote:

> Hello. If anyone has had experience with writing scripts that create
> .swf file on the fly I would appreciate it if you could refer me to
> tutorials and documentation regarding this topic.
> 
> Thanks in advance.
> 
> =================================
> Ivan R. Quintero E.
> Dealante Research and Development
> Panama City, Republic of Panama
> 

--- End Message ---
--- Begin Message ---
Hi to all,

I'm developing different applications using PHP and MySQL within PNuke,
because PN API is very complex and I didn't have time to deeply study it I
decide the best aproach to my application, was to create an independent user
(from that in PN member), with it's own session and login method, so I
developed such a system and it works outside PostNuke, but because PN
creates their own sessions, when I add PN header and footer, and try to
execute my app I got "Warning: Cannot Session cookie - headers already sent
by ... and Warning: Cannot send Session cache limiter - headers already sent
...", I understand this happened because this is within PN there are already
headers sent and that's why when I call my session I got this error message,
so my question is if there is a way to overcome this ?

Regards,
Rick
AXIS Computers

--- End Message ---
--- Begin Message ---
> I'm developing different applications using PHP and MySQL within PNuke,
> because PN API is very complex and I didn't have time to deeply study it I

If you don't have time to understand what you're doing, then how do you
expect to do a good job?  You might want to start off with something
simpler, like Escapade or Roxen or something similar.

And what does this have to do with MySQL?

sql,query
--
Ed Carp, N7EKG          http://www.pobox.com/~erc               214/986-5870
Licensed Texas Peace Officer
Computer Crime Investigation Consultant

Director, Software Development
Escapade Server-Side Scripting Engine Development Team
Pensacola - Dallas - London - Dresden
http://www.squishedmosquito.com

--- End Message ---
--- Begin Message ---
Ricardo,

Your problem is with PHP, look up in that manual for "Header already 
sent"

Kelly
On Monday, September 16, 2002, at 10:42  PM, Ricardo Fitzgerald wrote:

> Hi to all,
>
> I'm developing different applications using PHP and MySQL within PNuke,
> because PN API is very complex and I didn't have time to deeply study 
> it I
> decide the best aproach to my application, was to create an 
> independent user
> (from that in PN member), with it's own session and login method, so I
> developed such a system and it works outside PostNuke, but because PN
> creates their own sessions, when I add PN header and footer, and try to
> execute my app I got "Warning: Cannot Session cookie - headers already 
> sent
> by ... and Warning: Cannot send Session cache limiter - headers 
> already sent
> ...", I understand this happened because this is within PN there are 
> already
> headers sent and that's why when I call my session I got this error 
> message,
> so my question is if there is a way to overcome this ?
>
> Regards,
> Rick
> AXIS Computers
>
>
> ---------------------------------------------------------------------
> Before posting, please check:
>    http://www.mysql.com/manual.php   (the manual)
>    http://lists.mysql.com/           (the list archive)
>
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail 
> <[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>

--- End Message ---
--- Begin Message ---
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] says...
> > 
> > patch is a *nix program to apply patches such as the one you have
> > downloaded. man is a *nix program which displays help about the program
> > supplied as an argument to man - so 'man patch' will show you the manual
> > page for patch.
> > 
> > -- 
> > David Robley
> 
> David, if I downloaded the patch which is named "php-4.2.3.tar.gz, do I just
> put this file on my server then type:
> 
>     patch php-4.2.3.tar.gz
> 
> Is that all I need to do? And do you know if this will preserve all my ini
> and setup settings automatically?
> 
> Sorry for the novice questions, I've never applied a patch on Linux before.
> Thanks for the help.
> 
> Monty

That's not a patch, that is the complete source for php 4.2.3 in 
compressed tar format - commonly known as a tarball.

Normal procedure is to unpack that, probably in /usr/local/src but up to 
you, then run configure with the options you need, and then install 
according to the type of configure you selected (cgi, apache loadable 
module)

There is a fair amount of documentation in the root of the source 
distribution - taken with the manual section on installation that should 
give you a start.


-- 
David Robley
Temporary Kiwi!

Quod subigo farinam
--- End Message ---
--- Begin Message ---
My application lets users to upload a zip file into the server. Once done, i
will use php execute function to run a command line to unzip the uploaded
file into a
sub-directory.
I don't know what zip/unzip software to use.
Will a old pkunzip (from dos days) work or can i get the winzip or pkzip
(windows version) to work as a command line.

TIa
Nyon


--- End Message ---
--- Begin Message ---
Something snatched my last post on this so this is more of a test right now.
I'll explain how to crash PHP 4 with browscap.ini if this makes it.

--
George Hester
______________________________


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

I have the problem that I get an error message "Could not find/open font" when I
use the ImageTTFText function and use a relative path to
specify the location of the font file. Absolute paths are working correctly.
Using mod_perl 4.1.0, apache 1.3.23 and gdlib 1.8.4. I found a slight
hint in the commented manual that relative paths are not working at all. Is this
correct or is there any possibility to use relative paths with this
function?

regards,
Thomas


--- End Message ---
--- Begin Message ---
Sorry this is late,

If you do not have PHP compiled for command line use then use crontabs and
wget. There are security issues, but some checks like the browser and IP
address can be used to protect yourself a bit.

HTH

Henry

"Yc Nyon" <[EMAIL PROTECTED]> wrote in message
news:003201c25b3a$c2248800$7bcc97ca@domain...
> I want to run a php script at specific intervals, say every 4 hours. In
Cold
> Fusion, i can use the CFschedule tag but how about php?
>
> TIA
> Nyon
>


--- End Message ---
--- Begin Message ---
I'm having some issue's with $_COOKIE and $HTTP_COOKIE_VARS, I can't 
seem to retrieve data from them.

First I set the cookie like so:
setcookie ("Access", "Test_Value",time()+31536000);

Then I check my Cookies in Netscape and I can see that I have the cookie 
stored. But when I go to the page that has

print $HTTP_COOKIE_VARS["Access"];
print $_COOKIE["$Access"];
and even
print "$Access";

I don't get the value set in the cookie, and I don't know why...any 
help, please?

--- End Message ---
--- Begin Message ---
First of all, the second try should be print $_COOKIE["Access"]; with no 
second $.  But, more importantly, I would reccomend you change the 
cookie name to access.  This may not be the problem, but case in names 
seems to generally cause problems.

Tom Ray wrote:

> I'm having some issue's with $_COOKIE and $HTTP_COOKIE_VARS, I can't 
> seem to retrieve data from them.
>
> First I set the cookie like so:
> setcookie ("Access", "Test_Value",time()+31536000);
>
> Then I check my Cookies in Netscape and I can see that I have the 
> cookie stored. But when I go to the page that has
>
> print $HTTP_COOKIE_VARS["Access"];
> print $_COOKIE["$Access"];
> and even
> print "$Access";
>
> I don't get the value set in the cookie, and I don't know why...any 
> help, please?
>
>


--- End Message ---
--- Begin Message ---
> First I set the cookie like so:
> setcookie ("Access", "Test_Value",time()+31536000);
> 
> Then I check my Cookies in Netscape and I can see that I have the
> cookie stored. But when I go to the page that has
> 
> print $HTTP_COOKIE_VARS["Access"];
> print $_COOKIE["$Access"];
> and even
> print "$Access";

What about $_COOKIE["Access"] ???

Grtz Erwin
--- End Message ---
--- Begin Message ---
I do the print $_COOKIE["Acccess]"; and I still don't see any data print.

Leif K-Brooks wrote:

> First of all, the second try should be print $_COOKIE["Access"]; with 
> no second $.  But, more importantly, I would reccomend you change the 
> cookie name to access.  This may not be the problem, but case in names 
> seems to generally cause problems.
>
> Tom Ray wrote:
>
>> I'm having some issue's with $_COOKIE and $HTTP_COOKIE_VARS, I can't 
>> seem to retrieve data from them.
>>
>> First I set the cookie like so:
>> setcookie ("Access", "Test_Value",time()+31536000);
>>
>> Then I check my Cookies in Netscape and I can see that I have the 
>> cookie stored. But when I go to the page that has
>>
>> print $HTTP_COOKIE_VARS["Access"];
>> print $_COOKIE["$Access"];
>> and even
>> print "$Access";
>>
>> I don't get the value set in the cookie, and I don't know why...any 
>> help, please?
>>
>>
>
>
>


--- End Message ---
--- Begin Message ---
> I'm having some issue's with $_COOKIE and $HTTP_COOKIE_VARS, I can't
> seem to retrieve data from them.

> First I set the cookie like so:
> setcookie ("Access", "Test_Value",time()+31536000);
Try this: setcookie("Access", "Test_Value",time()+31536000,"/");
 - slash as 4th parametr.



-- 
Krzysztof Dziekiewicz

--- End Message ---
--- Begin Message ---
Hi,
is it possible to tell php which crypting it should use in crypt()?

My problem:
The program is running on a linux-server (of course) and there is DES
available and MD5; crypt() uses MD5.
At home I'm developing on a win98 machine and there seems only DES to be
available.

Of course it would be usefull to use both times the same encryption - but
how to tell the server to use DES??

Thank's for any help,
Uwe


--- End Message ---
--- Begin Message ---
Uwe Birkenhain wrote:
> Hi,
> is it possible to tell php which crypting it should use in crypt()?
>
> My problem:
> The program is running on a linux-server (of course) and there is DES
> available and MD5; crypt() uses MD5.
> At home I'm developing on a win98 machine and there seems only DES to
> be available.
>
> Of course it would be usefull to use both times the same encryption -
> but how to tell the server to use DES??

You should use a 2 character string as salt, to tell PHP that it should use
DES instead of MD5.

Quote from http://www.php.net/crypt: "Some operating systems support more
than one type of encryption. In fact, sometimes the standard DES-based
encryption is replaced by an MD5-based encryption algorithm. The encryption
type is triggered by the salt argument. At install time, PHP determines the
capabilities of the crypt function and will accept salts for other
encryption types. If no salt is provided, PHP will auto-generate a standard
two character salt by default, unless the default encryption type on the
system is MD5, in which case a random MD5-compatible salt is generated. PHP
sets a constant named CRYPT_SALT_LENGTH which tells you whether a regular
two character salt applies to your system or the longer twelve character
salt is applicable."

HTH
Erwin

--- End Message ---
--- Begin Message ---
I'm posting this here to give this BUG attention.  It's a pretty serious one
for Win32 users, and it would be great if it could be fixed *very
quickly* -- I posted this in the Bug Reports on PHP.net on May 27th, 2002.

Here's the link: http://bugs.php.net/bug.php?id=17461

I need to use this function to perform certain *required* tasks on a
Timeout -- however (and please read the Bug Report, before replying) the
Timeout functionality of this function DOES NOT work on Win32 builds.

If your a C/C++ / PHP contributor and have a moment to look into this -- it
would be great -- I would love to see this fixed in release 4.2.4 !!!

Thanks
Jason


--- End Message ---
--- Begin Message ---
> -----Original Message-----
> From: Jason [mailto:[EMAIL PROTECTED]]
> Sent: 16 September 2002 20:44
> 
> 
> I'm using PHP, MySql, DreamweaverMX, and PHAkt 2. I want to 
> add a comma (
> , ) to the end of a variable, but only if it exists in the database.
> (Meaning I don't want a comma with no variable.) I seem to 
> remember a format
> that didn't use an if/else statement that looked something like:
> <?php echo xxx( $variable, \,) ?>

This may not be what you were thinking of exactly, but my usual approach to this is to 
use the ?: ternary operator thusly:

    echo isset($variable)?"$variable,":'';

or, to omit empty strings and zero values also:

    echo empty($variable)?'':"$variable,";

Cheers!

Mike

---------------------------------------------------------------------
Mike Ford,  Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS,  LS6 3QS,  United Kingdom
Email: [EMAIL PROTECTED]
Tel: +44 113 283 2600 extn 4730      Fax:  +44 113 283 3211 
--- End Message ---
--- Begin Message ---
"Jason Caldwell" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
> How can I create a dynamic image with PHP?
>
> Here's what I want to do; I have a counter (kinda) on my website.. and
this
> counter appears in a certain font -- which most computer systems will not
> have on their systems.
>
> So -- I want my PHP script to take a variable value; say 34,000 and save
> that as a .GIF or .JPG with a Blue Background, and White OCR A Extended
> 12point non-aliased Font.  With the word "Counter: " in-front of the
value.
>
> Is this possible with PHP (I hope...!)  Or, is there a *command line*
> utility out there for the Win32 platform that does this?

Yes Jason  it possible if you have GD library (http://www.boutell.com/gd/) .
but i'm not sure if it had in the Win32 platform.

For the tutorial read this article
http://www.phpbuilder.com/columns/rasmus19990124.php3.

With my simple code but with unix host and use TTF font. (read another
function at http://th2.php.net/manual/en/ref.image.php)

<?PHP
header ("Content-type: image/png");

$im = imagecreate (100, 20);
$bg = imagecolorallocate ($im, 0, 0, 255);
$white = imagecolorallocate ($im, 255, 255, 255);

imagettftext ($im, 12, 0, 5, 14, $white,
"/home/your_directoty/fonts/ARIAL.TTF", "Counter:34000");
imagepng ($im);
imagedestroy ($im);
?>

PS. Yes GIF is removed from gd because of copyright protect but you can use
PNG.

?>


> Thanks
> Jason
>
>
>


--- End Message ---

Reply via email to