Re: [PHP] MySql number/string comparing ideas...

2001-07-25 Thread Brad Wright

I would use something like this:

Select * from table where value1  500 AND value2  100


hope this helps,
brad

 From: elias [EMAIL PROTECTED]
 Date: Fri, 13 Jul 2001 07:06:26 -0700
 To: [EMAIL PROTECTED]
 Subject: [PHP] MySql number/string comparing ideas...
 
 Hi!
 
 How is it possible to do a MySql query for something like:
 
 SELECT value from table WHERE value  '500x100'
 
 should return all values that part1 must be less than 500 and part2 less
 than 100? like 499x99 and reject something like: 500x101
 
 please give me suggestions!
 
 
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]
 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] new lines in text fields

2001-07-25 Thread Brad Wright

use the 'nl2br' fuction‹ Inserts HTML line breaks before all newlines in a
string

 From: Mat Marlow [EMAIL PROTECTED]
 Date: Fri, 6 Jul 2001 16:06:58 +0100
 To: [EMAIL PROTECTED]
 Subject: [PHP] new lines in text fields
 
 Hi all,
 I am in desperate need for a solution to HTML text fields not storing new
 lines. I'm storing news articles in a database but all the text just ends up
 in a big block because it ignores line breaks. Is thre a way around this
 without having to upload text files?
 
 Thanks,
 
 Mat
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]
 


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Syntax Eyes

2001-07-25 Thread Morten Winkler Jørgensen

CD Hey, I need a set of extra eyes:

OK. I'll put on my magic X-ray typ-oh-glasses ;)

CD $res_id = mysql_query (update contacts_data set (
CD description='$description',
CD data='$data',
CD filename='$input_file_name',
CD filesize='$input_file_size',
CD filetype='$input_file_type'
CD where uid='$uid'
CD ));

My glasses suggests that it might be this:
   You are writing
   UPDATE adf SET (asdf = 'asd', sadf='ert', ..., WHERE uid =
   'myuid')

   but try moving the WHERE clause outside the parentheses like

   UPDATE adf SET (asdf = 'asd', sadf='ert') WHERE uid =
   'myuid'

Of cause my glasses might be broken or need a recompile...
   
Kind regards,
Morten Winkler



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] komodo

2001-07-25 Thread Joseph Blythe

Hey,

Is anyone on this list using ActiveState's Komodo (http;//activestate.com)
on a windows box to remotely debug php scripts running on a linux server? Is
this possible? I have read the documents and don't get it at all! Although
local debugging under windows works just fine.

If you are using komodo under linux or windows would you please let me know
your findings as this looks slightly better (and alot faster) then the Zend
IDE.

Regards,

Joseph


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] WSIWYG Editor using PHP?

2001-07-25 Thread Joseph Blythe

You might want to look at Komodo (http://www.activestate.com) I just
downloaded the windblows version (there is also Linux version 25mb though)
which is a fairly basic text editor with php syntax highlighting (and a few
other neat fetures) with a built in debugger which can apparently debug
scripts remotely.

Regards,

Joseph

-Original Message-
From: chip [mailto:chip]On Behalf Of Chip
Sent: Wednesday, 25 July 2001 3:56 PM
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] WSIWYG Editor using PHP?

I use FreeBSD. Thanks for the link, looks like Bluefish has made some big
improvements since I tried it over a year ago, same with Glimmer . Maybe
I'll take another look at those. I usually just use a text editor with
syntax highlighting, can't get a fancy gui editor to work nearly as fast as
that.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: WSIWYG Editor using PHP?

2001-07-25 Thread Adrian Ciutureanu

EZEdit editor works 99% on client (JavaScript) and it works only in a IE5+
browser. You'll need ColdFusion only for remote file acces (commands like
insert picture).

Bob Clingan [EMAIL PROTECTED] wrote
 Does anyone know of any WSIWYG editors that you can plug into a site using
 PHP. I recently used EZEdit which uses ColdFusion and was wondering if
 anything similar had been down with PHP.

 URL for EZEdit:

 http://www.siteobjects.com/index.cfm?fuseAction=showezedit

 Thanks.

 --Bob

 CC me I'm in digest mode




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] WSIWYG Editor using PHP?

2001-07-25 Thread Joseph Blythe

sorry should be http://activestate.com

-Original Message-
From: Joseph Blythe [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, 25 July 2001 4:25 PM
To: Chip
Cc: [EMAIL PROTECTED]
Subject: RE: [PHP] WSIWYG Editor using PHP?

You might want to look at Komodo (http://www.activestate.com) I just
downloaded the windblows version (there is also Linux version 25mb though)
which is a fairly basic text editor with php syntax highlighting (and a few
other neat fetures) with a built in debugger which can apparently debug
scripts remotely.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] problem running php

2001-07-25 Thread raj kumar

Hi,
Though i am running php on apache server on my win98 machine perfectly,
recently i install apache and php on my win2000 server, apache start very
well but php is not working,  as it seems, though  when i run phpinfo out of
my server with php.exe it runs but it dosen't show in browser whenever i go
through localhost\phpinfo.php. What's matter. I faced this problem on my
win98 maching too, but somehow it worked, and probable that too after
installing PWS and making script executable one.
I will thankful to you if u solve my problem with explanation.

Regards,
Raj k Bhatt


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] session cookies not destroyed

2001-07-25 Thread Brad Wright

Hi all,
I was wondering if anyone has had any problems with sessions and  IE 5.0
(mac). As I (limitedly) understand it, the session cookie (kept by IE)
should be destroyed when I quit IE. It should, therefor, not be there when I
restart IE. 
HOWEVER..
I seem to get very unpredictable behaviour in that sometimes the cookie is
destroyed and sometimes it isn't. The only constant seems to be that if I
close IE, then restart the computer, the cookie is always gone. But if i
don't restart the computer, the cookie is sometimes destroyed and sometimes
not.

Has anyone experienced this problem. even better, does anyone know how
to solve this problem. :)


Thanks in advanced,
Brad


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] MySql number/string comparing ideas...

2001-07-25 Thread elias

well yes,
somehow my field has like:

field1
--
1.2
99.123
500x120
561x112
5.5

so as you see this 'field1' have both normal numeric values and sometimes
'YYYxYYY' values...
I thought that MySql can somehow compare  with another number  and
compare correctly x with anoter value just like it: x
anyway...I just forgot about it and droped the YYYxYYY from my table and
only allowed numerical input,

The problem is that I'm using the same field for two type of data storage...

Brad Wright [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 I would use something like this:

 Select * from table where value1  500 AND value2  100


 hope this helps,
 brad

  From: elias [EMAIL PROTECTED]
  Date: Fri, 13 Jul 2001 07:06:26 -0700
  To: [EMAIL PROTECTED]
  Subject: [PHP] MySql number/string comparing ideas...
 
  Hi!
 
  How is it possible to do a MySql query for something like:
 
  SELECT value from table WHERE value  '500x100'
 
  should return all values that part1 must be less than 500 and part2 less
  than 100? like 499x99 and reject something like: 500x101
 
  please give me suggestions!
 
 
 
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]
 




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: String Comparison

2001-07-25 Thread Adrian Ciutureanu

Note that using strings without quotes generates a warning that is not
displayed in the default configuration of PHP. The message looks like
Warning: Use of undefined constant anyString - assumed 'anyString' in
test.php on line 3
(line 3: echo anyString;)
If you want to see these warnings, set
error_reporting = E_ALL
instead of
error_reporting = E_ALL  ~E_NOTICE
in php.ini



--- Jason Bell [EMAIL PROTECTED] wrote

Hello.

I'm trying to compare two strings, and performa function if the are the
same.  Easy right?  I thought so until I tried it...

$query = select type from images where id=$id;
$result = mysql_query($query);
$type = mysql_result($result,0,type);
print $type;
if (image/pjpeg == $type) { print Type is JPG; };

returned:

image/pjpeg
Warning: Division by zero in /home/daelic/www/photo/mkthumb.php on line 8


Any idea on why this won't work?

Thanks!

Jason




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: Client Machine Name

2001-07-25 Thread Adrian Ciutureanu

http://php.net/manual/en/language.variables.predefined.php
$REMOTE_HOST = gethostbyaddr($REMOTE_ADDR);

Dominic [EMAIL PROTECTED] wrote
 It's there anyway to find out the client machine name by using php?
 Thanks!

 Dominic



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] MySql number/string comparing ideas...

2001-07-25 Thread Brad Wright

elias,
I would have to agree with Lawrence, and recommend re-designing your
database, unless there is a specific reason preventing you doing this (ie
like months of your life invested in the product  ; )

otherwise, only allowing numerical input is a good start tho :)

brad
 From: elias [EMAIL PROTECTED]
 Date: Wed, 25 Jul 2001 10:22:32 +0200
 To: [EMAIL PROTECTED]
 Subject: Re: [PHP] MySql number/string comparing ideas...
 
 well yes,
 somehow my field has like:
 
 field1
 --
 1.2
 99.123
 500x120
 561x112
 5.5
 
 so as you see this 'field1' have both normal numeric values and sometimes
 'YYYxYYY' values...
 I thought that MySql can somehow compare  with another number  and
 compare correctly x with anoter value just like it: x
 anyway...I just forgot about it and droped the YYYxYYY from my table and
 only allowed numerical input,
 
 The problem is that I'm using the same field for two type of data storage...
 
 Brad Wright [EMAIL PROTECTED] wrote in message
 [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 I would use something like this:
 
 Select * from table where value1  500 AND value2  100
 
 
 hope this helps,
 brad
 
 From: elias [EMAIL PROTECTED]
 Date: Fri, 13 Jul 2001 07:06:26 -0700
 To: [EMAIL PROTECTED]
 Subject: [PHP] MySql number/string comparing ideas...
 
 Hi!
 
 How is it possible to do a MySql query for something like:
 
 SELECT value from table WHERE value  '500x100'
 
 should return all values that part1 must be less than 500 and part2 less
 than 100? like 499x99 and reject something like: 500x101
 
 please give me suggestions!
 
 
 
 
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
 
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]
 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] compiling apache with php4

2001-07-25 Thread Niemann, Markus

Hi,

I`ve a problem compiling the apache:

./configure --prefix=/www --activate-module=src/modules/php4/libphp4.a

When I do so, following message occurs:

Configuring for Apache , Version 1.3.20

+ using installation path layout: Apache (config.layout)
configure:Error: invalid option
--activate-module=src/modules/php4/libphp4.a



In the directory ../src/modules/php4/ was no libphp4.a file. Only a
libmodphp4.a file. So I copied libphp4.a in this directory.
After that the following message occured:

Configuring for Apache , Version 1.3.20

+ using installation path layout: Apache (config.layout)
configure:Error: Module source already has to be below src/module/
to be activated

Using SuSe Linux 7.2...

Please could qanyone help me?!

Markus

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] php stand alone

2001-07-25 Thread Adrian D'Costa

I need both.

Adrian

On Tue, 24 Jul 2001, Tyler Longren wrote:

 when you configure php, don't specify a web server to use.
 
 ./configure --with-mysql
 would do the trick.
 
 ./configure --with-apxs=/path/to/apxs --with-mysql
 would not do the trick
 
 Tyler
 
 
  -Original Message-
  From: Adrian D'Costa [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, July 24, 2001 7:14 AM
  To: php general list
  Subject: [PHP] php stand alone
  
  
  Hi,
  
  How do I compile php to work as a stand alone.  Right now it is working
  thru the web but need to run it from a cron job.
  
  TIA
  
  Adrian
  
  
  -- 
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]
  
 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] php stand alone

2001-07-25 Thread Adrian D'Costa

Hi,

Thanks.  I will look at that **manual**.  But your suggestion of running
lynx is interesting.  

What I want to do is receive a mail to a account with a preset
subject.  On arriving at that account the php script will get the 
contents of the subject and preform other tasks.  Will the Lynx do it?

Adrian

On Tue, 24 Jul 2001, Gunther E. Biernat wrote:

 How do I compile php to work as a stand alone.  Right now it is working
 thru the web but need to run it from a cron job.
 
 Have a look at http://www.php.net/manual/en/install.commandline.php
 
 The easiest thing of course would be to just call lynx (or any other command line 
browser taht is able to do a HTTP request and exit (that's why the -dump)) within 
your cron table, e.g.: 
 
 0 23 * * * lynx -dump localhost/path/to/some/php/robot.php  /dev/null
 
 
 
 mit freundlichen Gruessen / yours sincerely
 
 
 Gunther E. Biernat
 Web Application Engineer
 __
 
 RealNetworks GmbH   Tel.: +49-40-415204-24
 Weidestraße 128 Fax.: +49-40-415204-11
 22083 Hamburg   Mail: [EMAIL PROTECTED]
 Germany URL : http://de.real.com
 __
 
 
 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] php stand alone

2001-07-25 Thread Adrian D'Costa

This is on my intranet and is connected for a few minutes to pick up the
mail.

Adrian

On Tue, 24 Jul 2001, scott [gts] wrote:

 but remember, if you put your cron/admin scripts into
 a directory on a publicly accessable webserver, you
 run the risk of having anonymous websurfers run your
 scripts at inopportune moments.
 
  -Original Message-
  From: Gunther E. Biernat [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, July 24, 2001 8:32 AM
  To: Adrian D'Costa; php general list
  Subject: Re: [PHP] php stand alone
 
 
  How do I compile php to work as a stand alone.  Right now it is working
  thru the web but need to run it from a cron job.
 
  Have a look at http://www.php.net/manual/en/install.commandline.php
 
  The easiest thing of course would be to just call lynx (or any other
  command line browser taht is able to do a HTTP request and exit (that's
  why the -dump)) within your cron table, e.g.:
 
  0 23 * * * lynx -dump localhost/path/to/some/php/robot.php  /dev/null
 
 
 
  mit freundlichen Gruessen / yours sincerely
 
 
  Gunther E. Biernat
  Web Application Engineer
  __
 
  RealNetworks GmbH   Tel.: +49-40-415204-24
  Weidestraße 128 Fax.: +49-40-415204-11
  22083 Hamburg   Mail: [EMAIL PROTECTED]
  Germany URL : http://de.real.com
  __
 
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
 
 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] newbie seeks template info

2001-07-25 Thread Daniel Goldin \(E-mail\)

Could somebody point me to a good primer--and I mean PRIMER--that explains
how templates work in php. I'm thinking--not too clearly, I admit--about
apps like Smarty and PhpLib and Pear, which I've heard so much about.

I would like to know how to use templates--particularly to separate
structure from content.

I am a true newbie, picking up a little programming in the course of
learning php. And loving it! Well-commented examples are always very helpful
too--perhaps most helpful of all.

Thanks beforehand for any help.

Best,

Daniel


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] MySql number/string comparing ideas...

2001-07-25 Thread elias

Thank you Brad and Lawrence.

I have agreed to only allow numerical input on this specific field.
And make a new one that allows X and Y ...

Thanks again.

Brad Wright [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 elias,
 I would have to agree with Lawrence, and recommend re-designing your
 database, unless there is a specific reason preventing you doing this (ie
 like months of your life invested in the product  ; )

 otherwise, only allowing numerical input is a good start tho :)

 brad
  From: elias [EMAIL PROTECTED]
  Date: Wed, 25 Jul 2001 10:22:32 +0200
  To: [EMAIL PROTECTED]
  Subject: Re: [PHP] MySql number/string comparing ideas...
 
  well yes,
  somehow my field has like:
 
  field1
  --
  1.2
  99.123
  500x120
  561x112
  5.5
 
  so as you see this 'field1' have both normal numeric values and
sometimes
  'YYYxYYY' values...
  I thought that MySql can somehow compare  with another number 
and
  compare correctly x with anoter value just like it: x
  anyway...I just forgot about it and droped the YYYxYYY from my table and
  only allowed numerical input,
 
  The problem is that I'm using the same field for two type of data
storage...
 
  Brad Wright [EMAIL PROTECTED] wrote in message
  [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
  I would use something like this:
 
  Select * from table where value1  500 AND value2  100
 
 
  hope this helps,
  brad
 
  From: elias [EMAIL PROTECTED]
  Date: Fri, 13 Jul 2001 07:06:26 -0700
  To: [EMAIL PROTECTED]
  Subject: [PHP] MySql number/string comparing ideas...
 
  Hi!
 
  How is it possible to do a MySql query for something like:
 
  SELECT value from table WHERE value  '500x100'
 
  should return all values that part1 must be less than 500 and part2
less
  than 100? like 499x99 and reject something like: 500x101
 
  please give me suggestions!
 
 
 
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail:
[EMAIL PROTECTED]
 
 
 
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]
 




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] URGENT: function mail()

2001-07-25 Thread Gernot

i've the following problem

i know how to set the charset in the header of a mail using the php
mail-function. but i also need to set it for the subject  (iso-8859-2)


i hope someone can help me



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] PHP function to extract EXIF data from JPGs?

2001-07-25 Thread Seb Frost

Let me know if you find anything out about this because it's something I too
would like to use.

- seb


-Original Message-
From: Richard Kitamura - Media Net Link, Inc. [mailto:[EMAIL PROTECTED]]
Sent: 24 July 2001 23:40
To: [EMAIL PROTECTED]
Subject: [PHP] PHP function to extract EXIF data from JPGs?



Does anyone have a PHP function that extracts EXIF data from a JPG image
that they can send or post?  I read about re-compiling with the EXIF flag,
but would rather avoid doing that for a little while.

Thanks,
Richard Kitamura


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] URGENT: function mail()

2001-07-25 Thread Lawrence . Sheed

Have a look at the internet - google is good for this

http://www.imc.org/mail-i18n.html#MIME

Internationalized text and names appear in both parts of Internet mail
messages: in the headers, and in the body of the message. RFC 2047 covers
how to use international characters in some parts of non-MIME headers, such
as addresses and subject headers. RFC 2231 extends the concepts in RFC 2047
to cover MIME parameter values, and also specifies a method for using
language tagging for international characters in these headers. RFC 2046
describes how to specify the charset for each part of the body of the
message


so, you're looking for RFC2047

http://www.imc.org/rfc2047

In that it describes how to do it something like

=?iso-8859-2q?this is some text?=

would probably work for you, but you'll need to encode the characters
correctly according to the rfc.

cheers,

Lawrence.

-Original Message-
From: Gernot [mailto:[EMAIL PROTECTED]]
Sent: July 25, 2001 4:53 PM
To: [EMAIL PROTECTED]
Subject: [PHP] URGENT: function mail()


i've the following problem

i know how to set the charset in the header of a mail using the php
mail-function. but i also need to set it for the subject  (iso-8859-2)


i hope someone can help me



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] URGENT: function mail()

2001-07-25 Thread Lawrence . Sheed

Feeling a little guilty for not being that helpful (rfc's aren't that easy
to use sometimes)

From the top of my head

Two types of encoding based on the RFC

B (Base64)
Q (Quoted?)


so for funky foreign text, non ascii would be something like


$subject= base64_encode ($subject);
$subject= =?ISO-8859-2?B?. $subject. =?=;

for normal ascii range
//Replace space with =20
$subject = ereg_replace ( , =20, $subject);
$subject = =?ISO-8859-2?Q?. $subject .=?=;


As i've said off the top of my head, read the spec carefully for exact
output.  you should get the general idea from the above though.


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]
Sent: July 25, 2001 5:45 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: RE: [PHP] URGENT: function mail()


Have a look at the internet - google is good for this

http://www.imc.org/mail-i18n.html#MIME

Internationalized text and names appear in both parts of Internet mail
messages: in the headers, and in the body of the message. RFC 2047 covers
how to use international characters in some parts of non-MIME headers, such
as addresses and subject headers. RFC 2231 extends the concepts in RFC 2047
to cover MIME parameter values, and also specifies a method for using
language tagging for international characters in these headers. RFC 2046
describes how to specify the charset for each part of the body of the
message


so, you're looking for RFC2047

http://www.imc.org/rfc2047

In that it describes how to do it something like

=?iso-8859-2q?this is some text?=

would probably work for you, but you'll need to encode the characters
correctly according to the rfc.

cheers,

Lawrence.

-Original Message-
From: Gernot [mailto:[EMAIL PROTECTED]]
Sent: July 25, 2001 4:53 PM
To: [EMAIL PROTECTED]
Subject: [PHP] URGENT: function mail()


i've the following problem

i know how to set the charset in the header of a mail using the php
mail-function. but i also need to set it for the subject  (iso-8859-2)


i hope someone can help me



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] phpinfo - mysql - windows

2001-07-25 Thread Gaylen Fraley

I've just installed mysql 3.23.39 binary under windows.  However, when I run
phpinfo it shows 3.23.32 .  When I run mysqladmin version, it shows 3.23.39
.  Why the conflict?  Thanks.

--
Gaylen




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: phpinfo - mysql - windows

2001-07-25 Thread Gaylen Fraley

That's what I figured.  Problem is I don't use the compiled version in
windoz.  I compile my own under Linux, but not windows.  BUMMER!

--
Gaylen

Henrik Hansen [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 [EMAIL PROTECTED] (Gaylen Fraley) wrote:

   I've just installed mysql 3.23.39 binary under windows.  However, when
I run
   phpinfo it shows 3.23.32 .  When I run mysqladmin version, it shows
3.23.39
   .  Why the conflict?  Thanks.

 I think the version you get from phpinfo is the version of the bundeld
 mysql client. To upgrade this recompile php and specify a mysql source
dir.

 --
 Henrik Hansen



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] include (foo.php) not working

2001-07-25 Thread Jon Hubbard

I have a strange problem which I cannot seem to resolve.

I am running PHP 4.0.6 on my Mac OSX using apache and MySQL.

Everything works fine except for one problem.  Like many developers I make
extensive use of the include funtion but it does not seem to work correctly
on this installation.

when I include the statement ? include (foo.php); ? then rather than
parsing the file and displaying the results the whole file is just dumped to
screen as a text file.  Interesting the same problem occurs whatever the
file extension so the same thing happens for foo.htm, foo.html and foo.txt!

I do not get this problem with my SUSE Linux 7.1 box which is also running
PHP, Apache and MySQL.

I did compile and make the PHP from the source.

Your help and advice would be much appreciated.

TIA

Jon



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] php

2001-07-25 Thread Eduardo Kokubo

Hi,
Is it possible to compress an entire directory using an external program like 
pkzip? If it is possible, how can I do it?



RE: [PHP] php

2001-07-25 Thread Jon Haworth

Yes it is - have a look at www.php.net/exec to see how you can run commands
from your PHP scripts.

HTH
Jon


-Original Message-
From: Eduardo Kokubo [mailto:[EMAIL PROTECTED]]
Sent: 25 July 2001 12:55
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: [PHP] php


Hi,
Is it possible to compress an entire directory using an external program
like pkzip? If it is possible, how can I do it?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] mail()

2001-07-25 Thread Zherdev Anatoly

I want to get name of virtual host that send mail from mail() function for
prevention spamming, but
when php starting as apache module sendmail executed from mail() function
in 
php script has'nt apache environment, but only shell environment.

Can i configure php for getting apache environmet from sendmail ? 
php 4.0.6

--
öÅÒÄÅ× áÎÁÔÏÌÉÊ.
scriptenvironment

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] include (foo.php) not working

2001-07-25 Thread Andy Warwick

 I am running PHP 4.0.6 on my Mac OSX using apache and MySQL.

 when I include the statement ? include (foo.php); ? then rather than
 parsing the file and displaying the results the whole file is just dumped to
 screen as a text file.  Interesting the same problem occurs whatever the
 file extension so the same thing happens for foo.htm, foo.html and foo.txt!

Jon

Make sure you have Unix line endings on the file, rather than Mac (if you
are using BBedit - which I heartily recommend - you can change this in the
preferences and from the pop-up menu just below the title bar).

I had the same problem the other day and that solved it for me.

Regards

-- 
Andy Warwick   

email: [EMAIL PROTECTED] PGP ID: 0xB1D73499

Creed New Media Designtel: 07976 205085
Nottingham, England   url: http://www.creed.co.uk

website production - internet programming - new media consultancy
cdrom multimedia - graphic design - digital image retouching




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] php

2001-07-25 Thread Seb Frost

Install winzip.  Create new archice.  Drag and drop directory from explorer
or whatevr into it.

Couldn't be easier.

- seb

-Original Message-
From: Eduardo Kokubo [mailto:[EMAIL PROTECTED]]
Sent: 25 July 2001 12:55
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: [PHP] php


Hi,
Is it possible to compress an entire directory using an external program
like pkzip? If it is possible, how can I do it?


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] include (foo.php) not working

2001-07-25 Thread ilari . kaartinen

 when I include the statement ? include (foo.php); ? then rather than
 parsing the file and displaying the results the whole file is just dumped to
 screen as a text file.  Interesting the same problem occurs whatever the
 file extension so the same thing happens for foo.htm, foo.html and foo.txt!

From PHP manual:

The require() statement replaces itself with the specified file, much like the C 
preprocessor's #include works. 

--
 - Castus Ilarius, Magister Ludi Machinationis

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: error using imagecreate function

2001-07-25 Thread venomous

This is the code just a normal imagecreate function
?php
file://draw1.php
Header(Content-type: image/jpeg);
$image = ImageCreate(200,150);
$gray = ImageColorAllocate($image,204,204,204);
$blue = ImageColorAllocate($image,0,0,255);
ImageLine($image,10,10,150,30,$blue);
ImageJPEG($image);
ImageDestroy($image);
?

I think the fault is that i don't use the gd library but i don't know how i
must install it on my NT 4.0 apache 1.3.2 server




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] include (foo.php) not working

2001-07-25 Thread maatt

Errr... feel embaressed asking but I've done the same...

You do have ?php ? tags around your code? Easy to leave off when there's
no HTML in the page.

Matt

Ilari Kaartinen [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
  when I include the statement ? include (foo.php); ? then rather than
  parsing the file and displaying the results the whole file is just
dumped to
  screen as a text file.  Interesting the same problem occurs whatever the
  file extension so the same thing happens for foo.htm, foo.html and
foo.txt!

 From PHP manual:

 The require() statement replaces itself with the specified file, much like
the C preprocessor's #include works.

 --
  - Castus Ilarius, Magister Ludi Machinationis



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Security Question

2001-07-25 Thread Shrout, Ryan

In a lot of PHP code that I have seen, there are lines such as this:

mysql_connect('localhost', 'mysql_login()', 'mysql_password()');

that is used to hide the login and password from someone should they
somehow view the code instead of the output of the PHP file.  My question
is, how do I set up those functions mysql_login and mysql_password?  Are
they just standard functions defined in a header someplace?  Or is this even
the best, most secure way of handling it?

Ryan Shrout

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Security Question

2001-07-25 Thread B. van Ouwerkerk


somehow view the code instead of the output of the PHP file.  My question
is, how do I set up those functions mysql_login and mysql_password?  Are
they just standard functions defined in a header someplace?  Or is this even
the best, most secure way of handling it?

Include your login and password from an includefile which is outside your 
HTML directory.

Bye,



B.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Help with regular expresions! [ASAP]

2001-07-25 Thread PsychoSphere2K

Hi!

I have a fairly large PHP based website.
Unfortuantely, I didn't make extensive use of stylesheets.

I'm hoping for some help with regular expressions matching ( and =
replacing ) some tags.
I use output buffering, so it would be a simple case of adding some =
lines to my
output hanlder.

eg:
replacing   input   with  input   class =3D something  
and  body   with  body  class =3D something_else 

Some code, with comments would be really great.

Thanks in advance.

Peter Gibson





[PHP] Headers

2001-07-25 Thread Richard Baskett

What does the header look like when you submit a form using the POST method?
I would like to transfer some php variables to another page using the
header() function.  The Location part I have down no problem, but I don't
want to do something like this:

header(Location:mypage.html?variable1=total)

This shows all the variables in the URL.  Is there a way to use a header to
POST variables to the Location part of the header?

Any help would be greatly appreciated! :)

Rick


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Calling a webpage with POST arguments

2001-07-25 Thread Peter Ostry

Maybe this was already diskussed, but I am rather new to PHP...

I have to call a page on a remote webserver and include some variables. 
Since the whole stuff comes from a database and is too long for an URL 
ist must be done with POST.
Can I call a website with POST arguments from within PHP? It's like a 
webform, but without the user clicking on the submit button.

TIA,
Peter

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: Help with regular expresions! [ASAP]

2001-07-25 Thread maatt

$tag_name = input;
$new_class = yourclass;
eregi_replace(($tag_name), \\1 class=\$yourclass\, $yourstring);

will work for simple cases, but isn't going to give you much more power than
just applying a style to the tag iself  - 'input  { border : 1px }' say). If
the design is consistent, you can usually find longer blocks of unique text
for replacing headers, subheads, etc.

I'd run the scripts over your templates (backup first), not do output
buffering - manually tweaking a couple of exceptions is a hell of a lot
faster than building re's to catch them.

Matt

Psychosphere2k [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
Hi!

I have a fairly large PHP based website.
Unfortuantely, I didn't make extensive use of stylesheets.

I'm hoping for some help with regular expressions matching ( and =
replacing ) some tags.
I use output buffering, so it would be a simple case of adding some =
lines to my
output hanlder.

eg:
replacing   input   with  input   class =3D something  
and  body   with  body  class =3D something_else 

Some code, with comments would be really great.

Thanks in advance.

Peter Gibson






-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Opening another page in code

2001-07-25 Thread Nelson Goforth

This seems simple, but for some reason I can't find what I'm looking 
for in books or the archive.  Might just be looking for the wrong 
words.

I just want to open another page, sending some parameters, at a point 
in a script - without the user clicking on anything (I can do this in 
a form - I want to do it WITHOUT the form).

Like:if($test) {
   GO_TO_PAGE (http://www.site.dom/page.php?id=838383);
  }

Except with code that actually works, of course.

I tried header (Location:...) but got an error message that I can't 
add to the headers.

What have I missed?

Thanks,
Nelson
-- 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: Client Machine Name

2001-07-25 Thread Dominic

I think this only can get the machine name of vistors ISP...
It's there anyway to get visters OWN machine name?
Thanks!!!

Dominic

http://php.net/manual/en/language.variables.predefined.php
$REMOTE_HOST = gethostbyaddr($REMOTE_ADDR);


 It's there anyway to find out the client machine name by using php?
 Thanks!

 Dominic



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: Help with regular expresions! [ASAP]

2001-07-25 Thread James Holloway

Hi Peter,

You could try this:

?

$string = Blah iitalic/iinput type=\name\ Blah bbold/b;

$new_string = preg_replace(/input(.*?)/i, input\\1 class=3D,
$string);

echo $stringbrbr$new_string;

?

preg_replace = regular expression replacement
input = first part of tag
(.*?) = whatever, but not:


.* is greedy... Match any character . as many times * as necessary, made
less greedy because the ? looks for whatever's to the right of it  If
you did:

preg_replace(/input(.*)/i, input\\1 class=3D, $string);

it might replace input type=text name=blahinput type=file with
input type=text name=blahinput type=file class=3D

Instead of
input type=text name=blah class=3Dinput type=file class=3D
Which is what you want.

The \\1 is what you have captured from the first (and in this case, only)
set of parentheses ()

The i after the delimiter means case insensitive.

Note, I didn't have time to check that this works, but you get the principle
:)

James

Psychosphere2k [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
Hi!

I have a fairly large PHP based website.
Unfortuantely, I didn't make extensive use of stylesheets.

I'm hoping for some help with regular expressions matching ( and =
replacing ) some tags.
I use output buffering, so it would be a simple case of adding some =
lines to my
output hanlder.

eg:
replacing   input   with  input   class =3D something  
and  body   with  body  class =3D something_else 

Some code, with comments would be really great.

Thanks in advance.

Peter Gibson






-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] can't get gd working at all

2001-07-25 Thread Matt Greer

I'm trying to get a simple piece of code involving gd functions to work just
to ensure gd is working properly on my server. I took this straight from my
book. All that comes up is a broken image. I talked with my host and they
assured me gd is installed and working properly on the server. Any ideas?

Here's what I'm trying to do:

?php
//draw1.php
Header(Content-type: image/jpeg);
$image = ImageCreate(200,150);
$gray = ImageColorAllocate($image,204,204,204);
$blue = ImageColorAllocate($image,0,0,255);
ImageLine($image,10,10,150,30,$blue);
ImageJPEG($image);
ImageDestroy($image);
?

This is from chapter 16 of Beginning PHP4 from Wrox press.

Thanks,
Matt


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Syntax Eyes

2001-07-25 Thread Mark Roedel

 -Original Message-
 From: Clayton Dukes [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, July 24, 2001 10:53 PM
 To: Matthew Loff; 'Php-General'
 Subject: Re: [PHP] Syntax Eyes
 
 
 Okay, I figured out the @header will actually reset the 
 headers, but it still just prints the raw data to the
 screen instead of the actual image.  How can I fix this?

Errr...actually, no it won't.

@header(), as opposed to header(), simply says If you run into any
errors, don't bother telling me about them.  The fact that, as you say,
the raw data gets printed instead of an image, should tell you that the
header isn't having any effect.

The general rule is that you can't send headers once you've started
sending output to the browser.  In this case, I'm wondering why you want
image data and html tags in the same file anyway...is that really what
you intended?  (Remember, a web browser is basically going to be
expecting a single file in response to a single request...)


---
Mark Roedel ([EMAIL PROTECTED])  ||  There cannot be a crisis next week.
Systems Programmer / WebMaster  ||   My schedule is already full.
 LeTourneau University  ||-- Henry Kissinger


 
 echo /TDTD NOWRAP ALIGN=\LEFT\ BGCOLOR=\#C8CCC8\;
   if($db-f(bin_data))
   {
 /*
 This doesn't help...
 @header (Content-disposition: filename=.$filename);
 @header( Content-type: image/jpeg );
 */
  $db-p(bin_data);
 
 
   } else {
  echo No Picture Available;
 
 
 -Clayton
 
 
 
 - Original Message -
 From: Matthew Loff [EMAIL PROTECTED]
 To: 'Clayton Dukes' [EMAIL PROTECTED]; 'Php-General'
 [EMAIL PROTECTED]
 Sent: Tuesday, July 24, 2001 11:20 PM
 Subject: RE: [PHP] Syntax Eyes
 
 
 
  Output control functions will let you buffer the output, and you can
  decide to send a header instead of flushing the buffer to 
 the client:
 
  http://www.php.net/manual/en/ref.outcontrol.php
 
  ob_start()  flush()  should accomplish this all for you.
 
 
  -Original Message-
  From: Clayton Dukes [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, July 24, 2001 11:14 PM
  To: Php-General
  Subject: Re: [PHP] Syntax Eyes
 
 
  Nevermind, I got it...
 
  Now, how do you reset header information if you need to redclare the
  header(); 
 
  ie:
  Warning: Cannot add header information - headers already 
 sent by (output
  started at ...

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Propably easy regex question

2001-07-25 Thread Sheridan Saint-Michel

I would just do something like

if(substring($text, 0, 1) == )
{
  $text =  . $text;
}
else
{
  $text =   . $text;
}

Where $text is a line of text from your message.

Hope that helps
Sheridan

- Original Message -
From: Nicklas af Ekenstam [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, July 24, 2001 4:23 PM
Subject: [PHP] Propably easy regex question


 Hi

 Could anyone help me with a code snippet that would take a string and add
'
 ' to it at the start of every new line just as a mail client does when
 replying to a mail?
 I.e. I would like this:

 Hello,

 How are you?

 To look like this:

  Hello,
 
  How are you?

 When it's done.

 (Actually I would love it if it would also look for existing  at the
 beginning of a line, and if there are any, just add the  and not the
white
 space but perhaps thats too much to ask for ;-)

 Thanks!

 - Nille


 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Supressing warnings on max file size exceeded

2001-07-25 Thread Bing

How do I suppress the following message when posting a file to a .php-script?

Warning: Max file size exceeded - file [uploadedfile] not saved in 
/home/html/org.begravningar/intradev_html/forum.php on line 0

It's a warning on line 0, and even if I put error_reporting(0) on line 1 it doesn't 
help. Since the warning is always present all cookies (or other headers) fail too.

Putting a limit in the input-tag for the file only triggers the warning earlier..

Any suggestions?


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] new problem

2001-07-25 Thread Eduardo Kokubo

Hello,
I have to transfer a directory and all it's files and subdirectories from one 
server to another or from one acount to another, but I guess ftp_put or copy can not 
do it ( This directory must not be compressed). ANY help woud be very very welcome.



[PHP] Machine name???

2001-07-25 Thread Dominic

I think this only can get the machine name of vistors ISP...
It's there anyway to get visters OWN machine name?
Thanks!!!

Dominic

http://php.net/manual/en/language.variables.predefined.php
$REMOTE_HOST = gethostbyaddr($REMOTE_ADDR);


 It's there anyway to find out the client machine name by using php?
 Thanks!

 Dominic



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Getting mail() to work in PHP for Windows

2001-07-25 Thread Boget, Chris

I couldn't find anything in the docs about this...
What do you need to have installed to be able to
use the mail() function (and have mail get sent
out) in PHP for Windows?
If you could point me to the proper place in the
documentation so I can read up on it, I'd be ever
so grateful!

Chris



[PHP] Re: Supressing warnings on max file size exceeded

2001-07-25 Thread Henrik Hansen

[EMAIL PROTECTED] (Bing) wrote:

  How do I suppress the following message when posting a file to a
  .php-script?
  
  Warning: Max file size exceeded - file [uploadedfile] not saved in
  /home/html/org.begravningar/intradev_html/forum.php on line 0
  
  It's a warning on line 0, and even if I put error_reporting(0) on line
  1 it doesn't help. Since the warning is always present all cookies (or
  other headers) fail too.
  
  Putting a limit in the input-tag for the file only triggers the
  warning earlier..
  
  Any suggestions?
  

is the file very large?

then you might have to set:

; Maximum allowed size for uploaded files.
upload_max_filesize = 2M

to some more (in your php.ini).

-- 
Henrik Hansen

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] ...No PNG support in this PHP build ....

2001-07-25 Thread Brian C. Doyle

Hello all,

I have some code that I have in 2 different directories on my server in the 
one directory it runs and draws the Image.  In another directory it will not?

I have both directorys chmod the same the 2 directories are with different 
owners.

What am I doing wrong?

The error I am getting is Warning: ImagePng: No PNG support in this PHP 
build in /home/user1/www/map/map_graphic.php on line 77

My config comand for PHP was
./configure' '--with-swf=../dist' '--with-pgsql=/usr/local/pgsql' 
'--with-apache=../apache_1.3.17' '--with-gd=../gd-1.8.4' 
'--with-mcrypt=../libmcrypt-2.2.6' '--with-imap=../imap-4.7c' 
'--with-pspell=../pspell-.11.0.1--enable-track-vars' 
'--disable-posix-threads' '--with-xml' '--enable-ftp'

and as I said in one case it works fine and another it errors.

Thanks for all the help.



RE: [PHP] Getting mail() to work in PHP for Windows

2001-07-25 Thread Kraa de Simon

In your php.ini file enter the IP of the SMTP server you want to use.

Something like:

[mail function]
SMTP = 255.255.255.255
sendmail_from = [EMAIL PROTECTED]

Search the web for a SMTP server for win32.

HTH,

Simon.

 -Original Message-
 From: Boget, Chris [mailto:[EMAIL PROTECTED]]
 Sent: woensdag 25 juli 2001 16:14
 To: [EMAIL PROTECTED]
 Subject: [PHP] Getting mail() to work in PHP for Windows
 
 
 I couldn't find anything in the docs about this...
 What do you need to have installed to be able to
 use the mail() function (and have mail get sent
 out) in PHP for Windows?
 If you could point me to the proper place in the
 documentation so I can read up on it, I'd be ever
 so grateful!
 
 Chris
 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Zip Code Locator?

2001-07-25 Thread Brian Dunworth



 Hey, let me know if you figure out what the extra numbers are
 for... I might have a use for this at some point.

  The last two numbers are latitude and longitude of the registered zip code
center for the given zip code.


 ---
  Brian S. Dunworth
  Sr. Software Development Engineer
  Oracle Database Administrator
  The Printing House, Ltd.
  (850) 875-1500 x225
 ---



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] new problem

2001-07-25 Thread Jon Haworth

On which OS? For example, on a Linux box, I imagine you could do something
like

exec(mv old.directory.name new.directory.name);


Cheers
Jon



-Original Message-
From: Eduardo Kokubo [mailto:[EMAIL PROTECTED]]
Sent: 25 July 2001 15:07
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: [PHP] new problem


Hello,
I have to transfer a directory and all it's files and subdirectories
from one server to another or from one acount to another, but I guess
ftp_put or copy can not do it ( This directory must not be compressed). ANY
help woud be very very welcome.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] can't get gd working at all

2001-07-25 Thread Warren Vail

If the gd extension is not loaded each time php is loaded you will need to
cause it to be loaded from your script.

http://www.php.net/manual/en/function.dl.php

I keep my extensions in a separate directory, off the php root directory, so
to load my gd I use the following;

dl(extensions/php_gd.dll);

good luck.

Warren Vail

-Original Message-
From:   Matt Greer [mailto:[EMAIL PROTECTED]]
Sent:   Wednesday, July 25, 2001 6:55 AM
To: php-gen
Subject:[PHP] can't get gd working at all

I'm trying to get a simple piece of code involving gd functions to work just
to ensure gd is working properly on my server. I took this straight from my
book. All that comes up is a broken image. I talked with my host and they
assured me gd is installed and working properly on the server. Any ideas?

Here's what I'm trying to do:

?php
//draw1.php
Header(Content-type: image/jpeg);
$image = ImageCreate(200,150);
$gray = ImageColorAllocate($image,204,204,204);
$blue = ImageColorAllocate($image,0,0,255);
ImageLine($image,10,10,150,30,$blue);
ImageJPEG($image);
ImageDestroy($image);
?

This is from chapter 16 of Beginning PHP4 from Wrox press.

Thanks,
Matt


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Re: Supressing warnings on max file size exceeded

2001-07-25 Thread Bing

Thanks for your input Henrik,

The problem isn't allowing for file-size really, I'd like to limit it to say some 
500kb, but it's the inability to stop anyone from violating this rule beforehand that 
triggers the warning. I can't stop anyone from uploading a 600kb file until it's 
uploaded - and then the error (warning) is there.

Sure I can skip the size-limit in the input-tag, but however high I set the 
upload_max_filesize-limit (and I really don't want to adjust that), there's the risk 
of someone tossing away a larger file. 

I simply want to be able to suppress the warning and handle whatever error I get 
internally.

  How do I suppress the following message when posting a file to a .php-script?
  
  Warning: Max file size exceeded - file [uploadedfile] not saved in...
  
  It's a warning on line 0, and even if I put error_reporting(0) on line
  1 it doesn't help. Since the warning is always present all cookies (or
  other headers) fail too. 

is the file very large?


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Opening another page in code

2001-07-25 Thread Gunther E. Biernat

I just want to open another page, sending some parameters, at a point
in a script - without the user clicking on anything (I can do this in
a form - I want to do it WITHOUT the form).

Like:if($test) {
   GO_TO_PAGE (http://www.site.dom/page.php?id=838383);
  }

Except with code that actually works, of course.

I tried header (Location:...) but got an error message that I can't
add to the headers.

If you HAVE to output other stuff first, you can't send a header because as the name 
implies, a header should be at the top :-)


You can either include something like the following in the HTML page
META HTTP-EQUIV=Refresh CONTENT=10; 
URL=http://www.htmlhelp.com/reference/html40/head/meta.html;

or do
some weird javascript stuff with an OnLoad event

or simply send
header(Location: http://www.php.net/manual/en/function.header.php;);
as the FIRST output of that page.


mit freundlichen Gruessen / yours sincerely


Gunther E. Biernat
Web Application Engineer
__

RealNetworks GmbH   Tel.: +49-40-415204-24
Weidestraße 128 Fax.: +49-40-415204-11
22083 Hamburg   Mail: [EMAIL PROTECTED]
Germany URL : http://de.real.com
__



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Troubles with while(!feof($socket_id)) and compiling php-4.0.6 ... help please :(

2001-07-25 Thread Arnauld Dravet - smurfie

Hello,

i was using php-4.0.3pl1 until now and never had any problem, except yesterday i had 
to develop a page on which i have to read on a socket ...

problem is that:
while(!feof($socket_id)) {
echo fgets($socket_id, $len);
}

does not work: seems that FEOF is never detected so the PHP enter an infinite loop.

I found many people complaining about that problem on different PHP mailing-list, but 
no real issue ...

So i decided to upgrade PHP, and also apache, and also mysql.

downlaoded php-4.0.6 sources (ieve always used sources)
and when i compile it:

gcc  -I. -I/root/php-4.0.6/ext/standard -I/root/php-4.0.6/main -I/root/php-4.0.6 
-I/root/apache_1.3.20/src/include -I/root/apache_1.3.20/src/os/unix 
-I/root/php-4.0.6/Zend -I/usr/local/mysql/include/mysql 
-I/root/php-4.0.6/ext/xml/expat/xmltok -I/root/php-4.0.6/ext/xml/expat/xmlparse 
-I/root/php-4.0.6/TSRM  -DSUPPORT_UTF8 -DXML_BYTE_ORDER=12 -g -O2  -c microtime.c  
touch microtime.lo
microtime.c: In function `php_if_getrusage':
microtime.c:99: storage size of `usg' isn't known
microtime.c:102: `RUSAGE_SELF' undeclared (first use in this function)
microtime.c:102: (Each undeclared identifier is reported only once
microtime.c:102: for each function it appears in.)
microtime.c:108: `RUSAGE_CHILDREN' undeclared (first use in this function)
make[3]: *** [microtime.lo] Error 1
make[3]: Leaving directory `/root/php-4.0.6/ext/standard'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/root/php-4.0.6/ext/standard'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/root/php-4.0.6/ext'
make: *** [all-recursive] Error 1
mushroom:~/php-4.0.6#

any help would be really appreciated ... :)

thanks 
Arnauld Dravet
[EMAIL PROTECTED]





RE: [PHP] include (foo.php) not working

2001-07-25 Thread Rudolf Visagie

I've found that when I forget to start and end the include file's code with
? and ? it sometimes does exactly what you're getting.

Regards

Rudolf

-Original Message-
From: Jon Hubbard [mailto:[EMAIL PROTECTED]]
Sent: 25 July 2001 01:42
To: [EMAIL PROTECTED]
Subject: [PHP] include (foo.php) not working


I have a strange problem which I cannot seem to resolve.

I am running PHP 4.0.6 on my Mac OSX using apache and MySQL.

Everything works fine except for one problem.  Like many developers I make
extensive use of the include funtion but it does not seem to work correctly
on this installation.

when I include the statement ? include (foo.php); ? then rather than
parsing the file and displaying the results the whole file is just dumped to
screen as a text file.  Interesting the same problem occurs whatever the
file extension so the same thing happens for foo.htm, foo.html and foo.txt!

I do not get this problem with my SUSE Linux 7.1 box which is also running
PHP, Apache and MySQL.

I did compile and make the PHP from the source.

Your help and advice would be much appreciated.

TIA

Jon



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] ereg_replace

2001-07-25 Thread Clayton Dukes



Can someone tell me why this doesn't work?

$home_street = ereg_replace (  , + , $home_street);

The input is 123 happy trail
I need the output to be 123+happy+trail

Thanks,
Clayton




[PHP] Re:php modules

2001-07-25 Thread Miguel Loureiro




Sorry for taking your time, but I solve my problem,
T.Y.

Best RegardsMiguel Joaquim R. Loureiro

[EMAIL PROTECTED]

 
NEXTVISION - 
DEVTEAM www.nextvision.pt 



 


Re: [PHP] Syntax Eyes

2001-07-25 Thread Clayton Dukes

I have a row in sql that is binary data (a jpeg)
I need to echo that data to a table on the web page in the form of the
original jepg, when I echo it now, I just get the actual data stream.

How can I fix this?



- Original Message -
From: Mark Roedel [EMAIL PROTECTED]
To: Clayton Dukes [EMAIL PROTECTED]; Php-General
[EMAIL PROTECTED]
Sent: Wednesday, July 25, 2001 9:58 AM
Subject: RE: [PHP] Syntax Eyes


  -Original Message-
  From: Clayton Dukes [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, July 24, 2001 10:53 PM
  To: Matthew Loff; 'Php-General'
  Subject: Re: [PHP] Syntax Eyes
 
 
  Okay, I figured out the @header will actually reset the
  headers, but it still just prints the raw data to the
  screen instead of the actual image.  How can I fix this?

 Errr...actually, no it won't.

 @header(), as opposed to header(), simply says If you run into any
 errors, don't bother telling me about them.  The fact that, as you say,
 the raw data gets printed instead of an image, should tell you that the
 header isn't having any effect.

 The general rule is that you can't send headers once you've started
 sending output to the browser.  In this case, I'm wondering why you want
 image data and html tags in the same file anyway...is that really what
 you intended?  (Remember, a web browser is basically going to be
 expecting a single file in response to a single request...)


 ---
 Mark Roedel ([EMAIL PROTECTED])  ||  There cannot be a crisis next week.
 Systems Programmer / WebMaster  ||   My schedule is already full.
  LeTourneau University  ||-- Henry Kissinger



  echo /TDTD NOWRAP ALIGN=\LEFT\ BGCOLOR=\#C8CCC8\;
if($db-f(bin_data))
{
  /*
  This doesn't help...
  @header (Content-disposition: filename=.$filename);
  @header( Content-type: image/jpeg );
  */
   $db-p(bin_data);
 
 
} else {
   echo No Picture Available;
 
 
  -Clayton
 
 
 
  - Original Message -
  From: Matthew Loff [EMAIL PROTECTED]
  To: 'Clayton Dukes' [EMAIL PROTECTED]; 'Php-General'
  [EMAIL PROTECTED]
  Sent: Tuesday, July 24, 2001 11:20 PM
  Subject: RE: [PHP] Syntax Eyes
 
 
  
   Output control functions will let you buffer the output, and you can
   decide to send a header instead of flushing the buffer to
  the client:
  
   http://www.php.net/manual/en/ref.outcontrol.php
  
   ob_start()  flush()  should accomplish this all for you.
  
  
   -Original Message-
   From: Clayton Dukes [mailto:[EMAIL PROTECTED]]
   Sent: Tuesday, July 24, 2001 11:14 PM
   To: Php-General
   Subject: Re: [PHP] Syntax Eyes
  
  
   Nevermind, I got it...
  
   Now, how do you reset header information if you need to redclare the
   header(); 
  
   ie:
   Warning: Cannot add header information - headers already
  sent by (output
   started at ...


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] ereg_replace

2001-07-25 Thread Matt Greer

on 7/25/01 10:38 AM, Clayton Dukes at [EMAIL PROTECTED] wrote:

 
 
 Can someone tell me why this doesn't work?
 
 $home_street = ereg_replace (  , + , $home_street);
 
 The input is 123 happy trail
 I need the output to be 123+happy+trail

Not exactly what you wanted, but you could do

implode(+, explode( , $home_street));

Matt


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] ereg_replace

2001-07-25 Thread Jason Stechschulte

On Wed, Jul 25, 2001 at 11:38:41AM -0400, Clayton Dukes wrote:
 Can someone tell me why this doesn't work?

Not really.  You should tell us why it isn't working, and we can help
you to get it working.  What is happening?  What is all of the relevant
code?

 $home_street = ereg_replace (  , + , $home_street);
 
 The input is 123 happy trail
 I need the output to be 123+happy+trail

-- 
Jason Stechschulte
[EMAIL PROTECTED]
--

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] #!interpreterDirective and Setting cookies

2001-07-25 Thread Kenneth R. Martinek

Hello all,

I'm having a problem setting cookies, when running code using the 
explicit interpreter directive (#!\php\php.exe). The problem is that PHP 
cant set cookies because bytes are sent back to the client before the 
setcookie() (presumably \n or \r 's), but only when the interpreter 
directive is used.

The question simply is, is the webserver reponsible for stripping that 
line after it passes the code to the interperter, or is PHP supposed to 
do it?

Thanks,

Ken


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Syntax Eyes

2001-07-25 Thread Mark Roedel

 -Original Message-
 From: Clayton Dukes [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, July 25, 2001 10:42 AM
 To: Mark Roedel; Php-General
 Subject: Re: [PHP] Syntax Eyes
 
 
 I have a row in sql that is binary data (a jpeg)
 I need to echo that data to a table on the web page in the form of the
 original jepg, when I echo it now, I just get the actual data stream.

 How can I fix this?

?php
   echo tdimg src=\/path/to/script/that/outputs.jpeg\/td;
?


---
Mark Roedel ([EMAIL PROTECTED])  ||  There cannot be a crisis next week.
Systems Programmer / WebMaster  ||   My schedule is already full.
 LeTourneau University  ||-- Henry Kissinger


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: Machine name???

2001-07-25 Thread Arcadius A.

Hi !
Have a look at  : http://php.net/manual/browse-errata.php?let=g
There's  a code that gives you the right host name ..

?php
 if (getenv(HTTP_X_FORWARDED_FOR)){
 $ip=getenv(HTTP_X_FORWARDED_FOR);
}
else {
$ip=getenv(REMOTE_ADDR);
 }
$host = gethostbyaddr($ip);
?

Arcad.



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] ereg_replace

2001-07-25 Thread Rasmus Lerdorf

Use the urlencode() function.

Or at the very least use str_replace.

And by the way, the ereg_replace() you have works fine.  You must be doing
something silly.

-Rasmus

On Wed, 25 Jul 2001, Clayton Dukes wrote:



 Can someone tell me why this doesn't work?

 $home_street = ereg_replace (  , + , $home_street);

 The input is 123 happy trail
 I need the output to be 123+happy+trail

 Thanks,
 Clayton




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] remote image uploads.

2001-07-25 Thread Tyler Longren

Hello everyone,

I've hunted on google, read the list archives.  Here's what I've been
fooling with to upload the file:
$data = addslashes(fread(fopen($picture, r), filesize($picture)));
$len = strlen($data);
if ($fp = fopen($image_path/$picture_name,
wb)) {
if ($size = fwrite($fp, $data, $len)) {
print font face=Arial
size=2Thanks, the image has been added to our database./font;
fclose ($fp);
}
else {
print font face=Arial
size=2$picture_name couldn't be written to, perhaps some permissions are
wrong?;
}
}
else {
print font face=Arial
size=2$picture_name couldn't be opened (or created), please try
again./font;
}

Here's the relavent form field:
input type=file name=picture

And here's the errors:
Warning: fopen(C:\\WINDOWS\\Desktop\\whiterain.jpg,r) - No such file or
directory in /home2/aanr.com/www/cyber_bulletin/admin/add.php on line 84

Warning: Supplied argument is not a valid File-Handle resource in
/home2/aanr.com/www/cyber_bulletin/admin/add.php on line 84

Warning: fopen(/home2/aanr.com/www/images//,wb) - Is a directory in
/home2/aanr.com/www/cyber_bulletin/admin/add.php on line 86
couldn't be opened (or created), please try again.

Anyone know how to fix this?  I'm uploading an image from a windows hd to a
linux server.

Tyler Longren
Captain Jack Communications
[EMAIL PROTECTED]
www.captainjack.com




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] newbie seeks template info

2001-07-25 Thread mike cullerton

devshed has an article using fast template

http://devshed.com/Server_Side/PHP/PHPFastTemplate/

on 7/25/01 2:06 AM, Daniel Goldin (E-mail) at [EMAIL PROTECTED] wrote:

 Could somebody point me to a good primer--and I mean PRIMER--that explains
 how templates work in php. I'm thinking--not too clearly, I admit--about
 apps like Smarty and PhpLib and Pear, which I've heard so much about.

 -- mike cullerton



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] can't get gd working at all

2001-07-25 Thread Matt Greer

on 7/25/01 9:35 AM, Warren Vail at [EMAIL PROTECTED] wrote:

 If the gd extension is not loaded each time php is loaded you will need to
 cause it to be loaded from your script.

Ok, 

I tried this and got gd is not loaded

?php
if (extension_loaded(php_gd.so))
echo gd is loaded;
else
echo gd is not loaded;
?

I don't know if that's the name of gd on my server though. A search through
phpinfo() turns up nothing on gd, which makes me think its not installed
after all.

Is it possible to upload the extension to my directory and call it from
there?


Matt


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] remote image uploads.

2001-07-25 Thread Tyler Longren

I found the problems:
1. I shouldn't have been using stripslashes() when putting the picture on
the filesystem.  This would have been necessary for adding the image to a
database.
2. Put ENCTYPE=multipart/form-data in form.  My bad, I didn't include the
form part of my code in the email.

Tyler Longren
Captain Jack Communications
[EMAIL PROTECTED]
www.captainjack.com


- Original Message -
From: Tyler Longren [EMAIL PROTECTED]
To: php-general [EMAIL PROTECTED]
Sent: Wednesday, July 25, 2001 11:24 AM
Subject: [PHP] remote image uploads.


 Hello everyone,

 I've hunted on google, read the list archives.  Here's what I've been
 fooling with to upload the file:
 $data = addslashes(fread(fopen($picture, r), filesize($picture)));
 $len = strlen($data);
 if ($fp = fopen($image_path/$picture_name,
 wb)) {
 if ($size = fwrite($fp, $data, $len))
{
 print font face=Arial
 size=2Thanks, the image has been added to our database./font;
 fclose ($fp);
 }
 else {
 print font face=Arial
 size=2$picture_name couldn't be written to, perhaps some permissions are
 wrong?;
 }
 }
 else {
 print font face=Arial
 size=2$picture_name couldn't be opened (or created), please try
 again./font;
 }

 Here's the relavent form field:
 input type=file name=picture

 And here's the errors:
 Warning: fopen(C:\\WINDOWS\\Desktop\\whiterain.jpg,r) - No such file
or
 directory in /home2/aanr.com/www/cyber_bulletin/admin/add.php on line 84

 Warning: Supplied argument is not a valid File-Handle resource in
 /home2/aanr.com/www/cyber_bulletin/admin/add.php on line 84

 Warning: fopen(/home2/aanr.com/www/images//,wb) - Is a directory in
 /home2/aanr.com/www/cyber_bulletin/admin/add.php on line 86
 couldn't be opened (or created), please try again.

 Anyone know how to fix this?  I'm uploading an image from a windows hd to
a
 linux server.

 Tyler Longren
 Captain Jack Communications
 [EMAIL PROTECTED]
 www.captainjack.com




 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP]Formatting problem...

2001-07-25 Thread Chris Cocuzzo

hey-

this is a little bit off topic, but it relates. I'm pulling a field called
info from my db. When I entered the info into the db in the first place, I
added the '\n' character so that the HTML result wouldn't be all on one
line. The problem is that when the page displays...the text in that
particular part of the table doesn't look right...there's a significant
space in between the bottom of the cell where there is some text, and all of
the other text. I have a feeling it's because of the way the text is written
in between the tags..

here's the example:
Here's the code that results in the odd formatting...
td width=292 bgcolor=#a9a9a9 valign=top
   font face=verdana,arial size=1 color=#ff?php echo
stripcslashes($gdata[info]);?/font
/td

here's html from when i did this same page without any php elements(nearly
the same)...
td width=292 valign=top
   font face=verdana size=1We're playing once again at the Corner area
of the Middle East.
   Show starts at 10pm, free admission. This one is apparently 18+, but if
you're a risky person
   you can try to get in to eat/drink before we play and then stay for the
show.
   /font
  /td

notice that the text in the second one is spaced out on a few lines, but
there isn't a line break anywhere...that text in the second example looks
correct in the browser...

here's the page with the problem: www.fplg.net/gigs.php

anyone else have this problem??

chris



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Learning PHP

2001-07-25 Thread Kyle Smith

Can someone please make a list of the best places to learn PHP as I have 6 weeks of 
school holidays and I want to put the m to good use (i have the PHP reference guide 
from www.oreilly.com and i have the big ass document files from www.php.net)


-legokiller666-
http://www.StupeedStudios.f2s.com
New address new site

ICQ: 115852509
MSN: [EMAIL PROTECTED]
AIM: legokiller666





[PHP] is_file() and is_dir() info

2001-07-25 Thread Gonyou, Austin

I've read a lot about the is_file and is_dir functions, but something is
still missing. If I call is_file to tell me if something is a file or not,
and it must traverse a large path, e.g. ./dir1/dir2/file.txt, it will almost
always fail. Can anyone tell me why, and what a possible work around is? I
guess I could CHDIR() first or something. 

-- 
Austin Gonyou
Systems Architect, CCNA
Coremetrics, Inc.
Phone: 512-796-9023
email: [EMAIL PROTECTED] 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Learning PHP

2001-07-25 Thread Matthew Loff


O'Reilly book and PHP manual?  That's the best you're going to get.
(Others will recommend other books, but the O'Reilly one is great to
start with)

Good luck!


-Original Message-
From: Kyle Smith [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, July 25, 2001 9:06 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Learning PHP


Can someone please make a list of the best places to learn PHP as I have
6 weeks of school holidays and I want to put the m to good use (i have
the PHP reference guide from www.oreilly.com and i have the big ass
document files from www.php.net)


-legokiller666-
http://www.StupeedStudios.f2s.com
New address new site

ICQ: 115852509
MSN: [EMAIL PROTECTED]
AIM: legokiller666




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: Formatting problem...

2001-07-25 Thread Philip Hallstrom

I'm not sure I understand your problem... this is what it looks like on my
machine (your url that is)

http://www.adhesivemedia.com/~philip/gigs.gif

IE 5.5 on w2k

On Wed, 25 Jul 2001, Chris Cocuzzo wrote:

 hey-

 this is a little bit off topic, but it relates. I'm pulling a field called
 info from my db. When I entered the info into the db in the first place, I
 added the '\n' character so that the HTML result wouldn't be all on one
 line. The problem is that when the page displays...the text in that
 particular part of the table doesn't look right...there's a significant
 space in between the bottom of the cell where there is some text, and all of
 the other text. I have a feeling it's because of the way the text is written
 in between the tags..

 here's the example:
 Here's the code that results in the odd formatting...
 td width=292 bgcolor=#a9a9a9 valign=top
font face=verdana,arial size=1 color=#ff?php echo
 stripcslashes($gdata[info]);?/font
 /td

 here's html from when i did this same page without any php elements(nearly
 the same)...
 td width=292 valign=top
font face=verdana size=1We're playing once again at the Corner area
 of the Middle East.
Show starts at 10pm, free admission. This one is apparently 18+, but if
 you're a risky person
you can try to get in to eat/drink before we play and then stay for the
 show.
/font
   /td

 notice that the text in the second one is spaced out on a few lines, but
 there isn't a line break anywhere...that text in the second example looks
 correct in the browser...

 here's the page with the problem: www.fplg.net/gigs.php

 anyone else have this problem??

 chris



 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: Learning PHP

2001-07-25 Thread Philip Hallstrom

I learned from various sites and the manual and just by doing it which
usually meant it would fail cause I'd used Perl's syntax so I'd go find
the PHP equivalent :)

However, I bought Professional PHP Programming for some of our
developers who like books.  I skimmed it and it's pretty good.

I would also recommend a book on databases (mysql or postresql -- please
no wars) since most sites use php to talk to a database -- not all, but it
happens :)

Sites:

http://www.php.net
http://www.phpbuilder.com
http://www.devshed.com/Server_Side/PHP/


The best way though is to find a project that you want to do and hack your
way through it.  Then go back and clean it up, improve it, etc...

have fun!

On Wed, 25 Jul 2001, Kyle Smith wrote:

 Can someone please make a list of the best places to learn PHP as I
 have 6 weeks of school holidays and I want to put the m to good use (i
 have the PHP reference guide from www.oreilly.com and i have the big
 ass document files from www.php.net)


 -legokiller666-
 http://www.StupeedStudios.f2s.com
 New address new site

 ICQ: 115852509
 MSN: [EMAIL PROTECTED]
 AIM: legokiller666





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] javascript ?

2001-07-25 Thread Angel Behar


Thanks for the answer but I must admitt that my knowldege of javascript it
is almost none, and I really don't know how to use the hide(), show() etc,
functions, so if somebody can point me to some site or can give an example
of how it works I'm sure I can work around the problem.

Thanks in advance.


- Original Message -
From: Morten Winkler Jørgensen [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, July 23, 2001 11:06 PM
Subject: Re: [PHP] javascript ?


 Only use hide(), show(), block(), etc. if you want an ordinary
 htmlpage to be shown. If you on the other hand want the values of form
 elements to change you should do something like this:


 SCRIPT LANGUAGE=javascript
 function fillForm(){
 document.form_name.txt.value =
document.form_name.a_selection.value;
 }
 /SCRIPT

 FORM NAME=form_name METHOD... ACTION
 SELECT NAME=a_selection onChange=fillForm();
   OPTION VALUE=pickupPick up
   OPTION VALUE=GotoGo to
 /SELECT
 BR
 INPUT TYPE=text NAME=txt VALUE=
 FORM

 AB I want to create a form which once you select a radio button or a drop
down
 AB menu display the proper fields according to the selection.

 AB Let say that we have two options : To go and Pick Up. If the user
select to
 AB go then automatically display the address field, zip field etc, if the
user
 AB select pick up display the time field etc.






 Kind regards,
 Morten Winkler



 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Learning PHP

2001-07-25 Thread Jeff Oien

http://www.webdesigns1.com/php
Jeff Oien
 
 Can someone please make a list of the best places to learn PHP as I have 6 
 weeks of school holidays and I want to put the m to good use (i have the 
 PHP reference guide from www.oreilly.com and i have the big ass document 
 files from www.php.net)
 
 
 -legokiller666-
 http://www.StupeedStudios.f2s.com
 New address new site
 
 ICQ: 115852509
 MSN: [EMAIL PROTECTED]
 AIM: legokiller666
 
 
 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] PHP/Cold Fusion questions:

2001-07-25 Thread SalvatoreJD

Hello... Let me say thank you in advance to those who respond...

How well does PHP and Cold Fusion code play together? Can PHP code in CF pages be 
parsed by PHP server or vise versa- Can CF code in PHP pages be parsed by the CF 
server? Or will this cause major headaches?

The reason I ask is because I will be building a concept site for my client in PHP 
using a MySQL database.  As the concept moves on to production however, I am fairly 
certain that the developers will use Cold Fusion to implement further dynamic features 
and site architecture.  Also, they will probably want to use Access in conjunction 
with the CF code. If it were completely up to me, I'd have the whole site done in PHP, 
but unfortunately, I am not the final decision maker here. 

So to recap... Will the CF developers be able to use any of my code or will they have 
to redo the site completely in cold fusion??

Thanks again for your inputSD



RE: [PHP] can't get gd working at all

2001-07-25 Thread Don Read


On 25-Jul-2001 Matt Greer wrote:
 I'm trying to get a simple piece of code involving gd functions to work just
 to ensure gd is working properly on my server. I took this straight from my
 book. All that comes up is a broken image. I talked with my host and they
 assured me gd is installed and working properly on the server. Any ideas?
 
 Here's what I'm trying to do:
 
 ?php
 //draw1.php
 Header(Content-type: image/jpeg);
 $image = ImageCreate(200,150);
 $gray = ImageColorAllocate($image,204,204,204);
 $blue = ImageColorAllocate($image,0,0,255);
 ImageLine($image,10,10,150,30,$blue);
 ImageJPEG($image);
 ImageDestroy($image);
 ?
 
 This is from chapter 16 of Beginning PHP4 from Wrox press.
 

Works fine for me. at the top, try something like:

if (! function_exists('ImageCreate')) {
   Header(Content-type: text/html);
   echo Graphics not supported !;
}

Regards,
-- 
Don Read   [EMAIL PROTECTED]
-- It's always darkest before the dawn. So if you are going to 
   steal the neighbor's newspaper, that's the time to do it.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] mysql_pconnect

2001-07-25 Thread Dan Goodliffe

Just a question out of pure curiosity...

If an SQL link is opened using, mysql_pconnect when does it actually close?

Thanks in advance

Dan



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Installing PHP in WinNT and Apache 1.3

2001-07-25 Thread El Gerva

Hi everyone...

I'm really a newbie in PHP. I've got Perl running in Apache, and i want to install PHP 
4 (binary) too.

These are the lines i added to httpd.conf

ScriptAlias /php/ C:/servers/server1/php/
AddType application/x-httpd-php .php
LoadModule php4_module c:/php/sapi/php4apache.dll

And configured c:\winnt\php.ini as install help file explains...

It seems to run... (doesn't have any problem starting the service), but when I run a 
script, it gives an 500 error... in the log, appears that the file hasn't, in the 
first line, #!. that it's used with perl...

people, i would appretiate a lot any help

Really thanX
aLmAgEdOn




RE: [PHP] is_file() and is_dir() info

2001-07-25 Thread Gonyou, Austin

Will somone on this list please help me in this? All the examples I've come
across researching this are WAY too complex for getting around this if
someone can confirm my suspicions. 

-- 
Austin Gonyou
Systems Architect, CCNA
Coremetrics, Inc.
Phone: 512-796-9023
email: [EMAIL PROTECTED] 

 -Original Message-
 From: Gonyou, Austin [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, July 25, 2001 12:08 PM
 To: 'Chris Cocuzzo'; [EMAIL PROTECTED]
 Subject: [PHP] is_file() and is_dir() info
 
 
 I've read a lot about the is_file and is_dir functions, but 
 something is
 still missing. If I call is_file to tell me if something is a 
 file or not,
 and it must traverse a large path, e.g. ./dir1/dir2/file.txt, 
 it will almost
 always fail. Can anyone tell me why, and what a possible work 
 around is? I
 guess I could CHDIR() first or something. 
 
 -- 
 Austin Gonyou
 Systems Architect, CCNA
 Coremetrics, Inc.
 Phone: 512-796-9023
 email: [EMAIL PROTECTED] 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: 
 [EMAIL PROTECTED]
 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Perl Splice Equivalent

2001-07-25 Thread Steven Michaels

Hello,
I've been wanting to open a file, read its contents,
and if one line matches my text, have the program
remove that line.  The file is in this format (a common
text file.):
User1
User2
User3
What I want the program to do is to go through each
line, and if that line matches User2, then have it
delete it, so the finished text file would be
User1
User3
The problem is that I can't find an equivalent of
splice in perl, and that was what I used before
to do this.  Could someone help me out?
Thanks!
Steven Michaels
http://hollow.myip.org/



RE: [PHP] mysql_pconnect

2001-07-25 Thread Don Read


On 25-Jul-2001 Dan Goodliffe wrote:
 Just a question out of pure curiosity...
 
 If an SQL link is opened using, mysql_pconnect when does it actually close?
 

When its 'sleep' time exceeds 'wait_timeout' defined in the server
  (or possibly never on a working site).

$ mysqladmin var | grep timeout


Regards,
-- 
Don Read   [EMAIL PROTECTED]
-- It's always darkest before the dawn. So if you are going to 
   steal the neighbor's newspaper, that's the time to do it.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Perl Splice Equivalent

2001-07-25 Thread Don Read


On 25-Jul-2001 Steven Michaels wrote:
 Hello,
 I've been wanting to open a file, read its contents,
 and if one line matches my text, have the program
 remove that line.  The file is in this format (a common
 text file.):
 User1
 User2
 User3
 What I want the program to do is to go through each
 line, and if that line matches User2, then have it
 delete it, so the finished text file would be
 User1
 User3
 The problem is that I can't find an equivalent of
 splice in perl, and that was what I used before
 to do this.  Could someone help me out?
 Thanks!

PHP4: 
  array_splice()

PHP3: untested stab:
  unset($user[1]);
  unset($user['User2']);
 

Regards,
-- 
Don Read   [EMAIL PROTECTED]
-- It's always darkest before the dawn. So if you are going to 
   steal the neighbor's newspaper, that's the time to do it.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] scp via `` or exec() or passthru()

2001-07-25 Thread Dennis Gearon

Anyone had any luck using scp to access files on a different box than a script
is running? In particular, using a private key that has a pass phrase?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] uploading files to another server from PHP using SSL

2001-07-25 Thread Dennis Gearon

Is it possible to open a 'https://'  connection via any functions in PHP? For
example, if I have script that I want to use to edit files on another box which
has SSL enabled, I download the file using the SSL, and upload it through a
script as well?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] uploading files to another server from PHP using SSL

2001-07-25 Thread Vincent Stoessel

Take a look at the curl functionality in the ph manual

Dennis Gearon wrote:
 Is it possible to open a 'https://'  connection via any functions in PHP? For
 example, if I have script that I want to use to edit files on another box which
 has SSL enabled, I download the file using the SSL, and upload it through a
 script as well?
 
 




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] can't get gd working at all

2001-07-25 Thread Matt Greer

Ah ha, my host was wrong. gd is not installed on the server I'm on, but
they're moving me over to one that has it.

Sorry everyone, but I didn't know enough about any of this to be able to
verify what they told me.

Thanks for all the help.

Matt


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Test, please ignore

2001-07-25 Thread Owen Rudge

Sorry about this, but the last time I tried to post (via the newsgroup) I
failed.

--
Owen Rudge
http://www.owenrudge.co.uk/
http://www.gamearchive.uk.tt/



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] ISO: Employment Listings at schaffner.net

2001-07-25 Thread Vincent Stoessel

Anyone know what is going on with schaffner.net 's employment listing?
I have a resume stored that really need right now as I just got laid
from my position as an Internet/LAMP  Applications engineer in the 
Wash,DC area (truly shameless plug). I can not edit or retrieve
the resume from his site and am getting no response from brian's
email.
Brian? are you seeing this?
Thanks in advance.

Vincent Stoessel
LAMP engineer
[EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Programming by PHP

2001-07-25 Thread Sitkei Pál

Here is my salution with session handling:

?php
session_start();
function add_row(){
  echo   tr bgcolor=\#CC\;
  echo td width=\6%\input type=\text\ name=\textfield\
size=\5\/td;
  echo td width=\20%\input type=\text\ name=\textfield2\
size=\20\/td;
  echo td width=\12%\input type=\text\ name=\textfield3\
size=\20\/td;
  echo td colspan=\4\input type=\text\ name=\textfield33\
size=\32\/td;
  echo td width=\23%\input type=\text\ name=\textfield42\
size=\20\/td;
  echo   /tr ;
}
if (!isset($counter)){
  $counter=1;
  session_register(counter);
  }
else
  ++$counter;
?

HTMLHEAD
META content=text/html; charset=windows-1252 http-equiv=Content-Type
META content=Microsoft FrontPage 4.0 name=GENERATOR
title/title
/HEAD
BODY bgColor=#FF leftMargin=0 topMargin=20
FORM action=?=$PHP_SELF? method=post
  p align=centerbfont face=.VnTimeHNHEuml;P THcurren;NG TIN
THIOtilde;T
BTHORN;/font/b/p

nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbs
p;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;
  nbsp;nbsp;nbsp;
  table width=75% border=0 cellspacing=2 align=center
cellpadding=1
tr bgcolor=#FF9933
  td height=23 width=6%STT/td
  td height=23 width=20%font face=.VnTimeTordf;n thiOtilde;t
bTHORN;/font/td
  td height=23 width=12%font face=.VnTimeSegrave;
Seri/font/td
  td height=23 colspan=4font face=.VnTimeTtimes;nh trsup1;ng
biOtilde;n
reg;eacute;ng/font/td
  td height=23 width=23%font face=.VnTimeGhi
choacute;/font/td
/tr
?php
  for ($i = 1; $i = $counter; $i++) {
add_row();
  }
?
tr bgcolor=#CC
  td colspan=8bi
input type=submit name=S1 value=Add More
/i/b /td
/tr
  /table
  INPUT name=id type=hidden
  DL
DTBInbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;
nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;
  /I/B
DTIBnbsp;nbsp;nbsp;nbsp;nbsp;nbsp;/B/I
  /DL
  DIV align=center /DIV
BLOCKQUOTE
  BLOCKQUOTE

Pnbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;
nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp
;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nb
sp;nbsp;nbsp;nbsp;nbsp;
nbsp;nbsp;nbsp;nbsp; nbsp;nbsp;nbsp;nbsp;nbsp;nbsp; font
face=.VnTime size=4

/fontnbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nb
sp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;
nbsp;nbsp;
  /P
/BLOCKQUOTE/BLOCKQUOTE
Pnbsp;/P/FORM
/BODY/HTML

/

-Original Message-
From: Duy B [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 25, 2001 3:32 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Programming by PHP


Dear all,
I have a file HTML as following:
...
Thanks you very much
BaDu



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Why doesn't this simple query work?

2001-07-25 Thread Seb Frost

Driving me mad.  Works if I put a string in quote marks instead of the
variable $location.


$result = mysql_query(SELECT shootID FROM shoots WHERE
(location=$location));


This should work shouldn't it?  If it's a problem with the variable being
embedded in the query what's the easiest way to overcome this?

cheers,

seb

-Original Message-
From: Sheridan Saint-Michel [mailto:[EMAIL PROTECTED]]
Sent: 19 July 2001 14:50
To: php-general
Subject: Re: [PHP] REGEXP


I am not sure if I am understanding you... but if you just want to return
the boundary try

preg_match(|boundary=\([^\].+)\|Uis, $text, $regs );
$boundary = $regs[1];

I am guessing that you want the boundary from the lines
 to avoid regexp (too lazy) but now I want to use it.  The final result I
 would need is: B42DA66C4EC07C9B572A58FC so that I can search

If you are looking for something else let me know
Sheridan

 -Original Message-
 From: Adrian D'Costa [mailto:[EMAIL PROTECTED]]
 Sent: Saturday, July 14, 2001 2:54 AM
 To: php general list
 Subject: [PHP] REGEXP

 Hi,

 I am trying to capture the Header from a mail for my webmail using php
 and
 pop3.  The header is something like this:
 Content-Type: multipart/mixed;
  boundary=B42DA66C4EC07C9B572A58FC

 When I use preg_split(/[\d;]*/, $buffer), I get
 Content-Type: multipart/mixed;

 What I want is to return the whole line split by the ;.  I usually try
 to avoid regexp (too lazy) but now I want to use it.  The final result I
 would need is: B42DA66C4EC07C9B572A58FC so that I can search
 in the body of the message for the rest of the parts.

 Any pointers would be helpful.

 Adrian


 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Why doesn't this simple query work?

2001-07-25 Thread Boget, Chris

 Driving me mad.  Works if I put a string in quote marks instead of the
 variable $location.
 $result = mysql_query(SELECT shootID FROM shoots WHERE
 (location=$location));
 This should work shouldn't it?  If it's a problem with the variable being
 embedded in the query what's the easiest way to overcome this?

$location is a string variable, yes?  If so, then your statement
needs to look like this:

$result = mysql_query(SELECT shootID FROM shoots WHERE
(location=\$location\));

Note the escaped quotes around $location.

Chris



[PHP] strlen

2001-07-25 Thread David OBrien

I'm having a heck of a time getting something to work like it should

I have a script which reads a list of words one per line
I want it to display the length of the word a tab then the word. No matter
how I code it it still only shows the word alone on strlen. Any ideas?

?
$handle = fopen (./ospd3.txt, r);
while (!feof($handle)) {
$wordlist[]=fread($handle,4096);
}
fclose($handle);
uasort($wordlist, sortbylength);
foreach ($wordlist as $word) {
$lent = strlen($word);
print $lent.\t.$word.\n;
}
exit;


function sortbylength($arr,$brr) {
$alen = strlen($arr);
$blen = strlen($brr);
if ($alen == $blen) {
return 0;
}
return ($alen  $blen) ?  -1 : 1;
}
?

sample of the ospd3.txt

megacities
memorising
nitpickier
outpowered
outslicked
pinwheeled
prebooking
ratcheting
rebreeding
redialling
reexposing
repatching
romanising
showbizzes
sparkliest
suctioning
sunporches
vitreouses
whatnesses
windsurfed
zombifying
backdropped
backfitting
beglamoring
chainsawing
coanchoring
deadlifting

Thanks





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Why doesn't this simple query work?

2001-07-25 Thread Jon Yaggie

hmmm i think you need to always have quotes around string regardless of if
they are variables . .  .
$result = mysql_query(SELECT shootID FROM shoots WHERE
(location='$location'));

- Original Message -
From: Seb Frost [EMAIL PROTECTED]
To: php-general [EMAIL PROTECTED]
Sent: Thursday, July 26, 2001 3:10 AM
Subject: [PHP] Why doesn't this simple query work?


 Driving me mad.  Works if I put a string in quote marks instead of the
 variable $location.


 $result = mysql_query(SELECT shootID FROM shoots WHERE
 (location=$location));


 This should work shouldn't it?  If it's a problem with the variable being
 embedded in the query what's the easiest way to overcome this?

 cheers,

 seb

 -Original Message-
 From: Sheridan Saint-Michel [mailto:[EMAIL PROTECTED]]
 Sent: 19 July 2001 14:50
 To: php-general
 Subject: Re: [PHP] REGEXP


 I am not sure if I am understanding you... but if you just want to return
 the boundary try

 preg_match(|boundary=\([^\].+)\|Uis, $text, $regs );
 $boundary = $regs[1];

 I am guessing that you want the boundary from the lines
  to avoid regexp (too lazy) but now I want to use it.  The final result I
  would need is: B42DA66C4EC07C9B572A58FC so that I can search

 If you are looking for something else let me know
 Sheridan

  -Original Message-
  From: Adrian D'Costa [mailto:[EMAIL PROTECTED]]
  Sent: Saturday, July 14, 2001 2:54 AM
  To: php general list
  Subject: [PHP] REGEXP
 
  Hi,
 
  I am trying to capture the Header from a mail for my webmail using php
  and
  pop3.  The header is something like this:
  Content-Type: multipart/mixed;
   boundary=B42DA66C4EC07C9B572A58FC
 
  When I use preg_split(/[\d;]*/, $buffer), I get
  Content-Type: multipart/mixed;
 
  What I want is to return the whole line split by the ;.  I usually try
  to avoid regexp (too lazy) but now I want to use it.  The final result I
  would need is: B42DA66C4EC07C9B572A58FC so that I can search
  in the body of the message for the rest of the parts.
 
  Any pointers would be helpful.
 
  Adrian
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]



 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]


 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




  1   2   >