Re: [PHP] quotes in php.ini

2003-10-29 Thread Curt Zirzow
* Thus wrote Evan Nemerson ([EMAIL PROTECTED]):
> On Tuesday 28 October 2003 11:29 pm, Rolf Brusletto wrote:
> > Evan Nemerson wrote:
> > >Is anyone aware of a way to get double quotes in the php.ini file? For
> > >instance, I'd like to be able to set error_prepend_string to " > >color=\"#ff\">" (which doesn't work).
> > >
> > >The only work-around I can think of is doing ini_set()'s in an
> > >auto_prepend_file, and that's not acceptable for my purposes.
> >
> > Why not use single quotes around the actual setting.. i.e.
> 
> Because I get a parse error. Does it work for you? If so, what version of PHP 
> are you using???

Try reversing the quotes:
 error_prepend_string = "";


Curt
-- 
"My PHP key is worn out"

  PHP List stats since 1997: 
http://zirzow.dyndns.org/html/mlists/

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



Re: [PHP] Generate Thumbnail gif's

2003-10-29 Thread Mike Migurski
>Is there any pre-written code available on the net to generate thumbnail
>images for a picture. I mean I send the path of the image and my PHP
>Script should be able to generate a gif file of size 100x71 or something
>like that.

If your server has Imagemagick installed (it seems pretty common), try:

`convert -size 100x71 old.gif new.gif`;

That will scale your image into 100x71 pixels, and will maintain the
aspect ratio.

-
michal migurski- contact info and pgp key:
sf/cahttp://mike.teczno.com/contact.html

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



Re: [PHP] quotes in php.ini

2003-10-29 Thread Leif K-Brooks
Curt Zirzow wrote:

Try reversing the quotes:
error_prepend_string = "";
 

Not valid XHTML (not sure if it's even valid HTML).

--
The above message is encrypted with double rot13 encoding.  Any unauthorized attempt 
to decrypt it will be prosecuted to the full extent of the law.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] quotes in php.ini

2003-10-29 Thread Evan Nemerson
On Tuesday 28 October 2003 11:10 pm, Leif K-Brooks wrote:
> Curt Zirzow wrote:
> >Try reversing the quotes:
> > error_prepend_string = "";
>
> Not valid XHTML (not sure if it's even valid HTML).

Yup. I've got the highlight_file thing from earlier working with ini entries, 
and I'm wondering how people are going to specify colour. I've even checked 
on HTML entities...

Just trying to cover my bases before I send to internals@

Any other ideas?

-- 
Evan Nemerson
[EMAIL PROTECTED]

--
"A popular government, without popular information, or the means of acquiring 
it, is but a Prologue to a Farce or a Tragedy - or perhaps both. Knowledge 
will forever govern ignorance, and a people who mean to be their own 
Governors must arm themselves with the power which knowledge gives."

-James Madison

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



Re: [PHP] quotes in php.ini

2003-10-29 Thread Evan Nemerson
On Tuesday 28 October 2003 10:46 pm, [EMAIL PROTECTED] wrote:
> Evan Nemerson wrote:
> >Is anyone aware of a way to get double quotes in the php.ini file? For
> >instance, I'd like to be able to set error_prepend_string to " >color=\"#ff\">" (which doesn't work).
> >
> >The only work-around I can think of is doing ini_set()'s in an
> >auto_prepend_file, and that's not acceptable for my purposes.
>
> Try using  "  to replace double quote

Not valid (X)HTML, but it gets past the lexer.

-- 
Evan Nemerson
[EMAIL PROTECTED]

--
"A popular government, without popular information, or the means of acquiring 
it, is but a Prologue to a Farce or a Tragedy - or perhaps both. Knowledge 
will forever govern ignorance, and a people who mean to be their own 
Governors must arm themselves with the power which knowledge gives."

-James Madison

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



Re: [PHP] quotes in php.ini

2003-10-29 Thread - Edwin -
Hi,

On Wed, 29 Oct 2003 02:10:49 -0500
Leif K-Brooks <[EMAIL PROTECTED]> wrote:

> Curt Zirzow wrote:
> 
> >Try reversing the quotes:
> > error_prepend_string = "";
> >  
> >
> Not valid XHTML (not sure if it's even valid HTML).

Why not?

- E -
__
Do You Yahoo!?
Yahoo! BB is Broadband by Yahoo!
http://bb.yahoo.co.jp/

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



[PHP] Calendar Script

2003-10-29 Thread Vijay Killu
Dear PHP,

Where can I find the Calendar script that has been used on the PHP.net site.
I believe I can use it on my website since it is open source :-)

Thanks & Regards, 
___ 
PHPLover
 
*  : [EMAIL PROTECTED] 

"Göd döësn't pläy dícë." 
- Älbërt Ëínstëín



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

Re: [PHP] Calendar Script

2003-10-29 Thread Leif K-Brooks
Vijay Killu wrote:

Where can I find the Calendar script that has been used on the PHP.net site.
I believe I can use it on my website since it is open source :-)
I don't seeany calendar, but you should be able to use the "show source" 
link whereever it is.

--
The above message is encrypted with double rot13 encoding.  Any unauthorized attempt 
to decrypt it will be prosecuted to the full extent of the law.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Calendar Script

2003-10-29 Thread Evan Nemerson
On Wednesday 29 October 2003 12:01 am, Vijay Killu wrote:
> Dear PHP,
>
> Where can I find the Calendar script that has been used on the PHP.net
> site. I believe I can use it on my website since it is open source :-)

>From php.net. There is a "show source" link on the bottom of every page, plus 
the entire web site is in the CVS repository. Look at php.net/anoncvs.php and 
cvs.php.net and you should be able to figure it out. If you're not familiar 
with CVS, you can always use that "show source" link.
>
> Thanks & Regards,
> ___
> PHPLover
>
> *  : [EMAIL PROTECTED]
>
> "Göd döësn't pläy dícë."
> - Älbërt Ëínstëín

-- 
Evan Nemerson
[EMAIL PROTECTED]

--
"The people are the only sure reliance for preservation of our liberty."

-Thomas Jefferson

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



Re: [PHP] quotes in php.ini

2003-10-29 Thread Evan Nemerson
On Tuesday 28 October 2003 11:59 pm, - Edwin - wrote:
> Hi,
>
> On Wed, 29 Oct 2003 02:10:49 -0500
>
> Leif K-Brooks <[EMAIL PROTECTED]> wrote:
> > Curt Zirzow wrote:
> > >Try reversing the quotes:
> > > error_prepend_string = "";
> >
> > Not valid XHTML (not sure if it's even valid HTML).
>
> Why not?

Because W3C says so. The closest thing I found to an answer is 
http://www.w3.org/TR/xhtml1/#h-4.4 although I really didn't dig deeply. 
validator.w3.org doesn't like it, tidy doesn't like it. Opera doesn't like 
it. I don't have IE, and am too lazy to boot up a gecko-powered browser. Even 
if it _is_ valid (which I really don't think is the case), it's not usable. I 
sincerely doubt any parsers will figure it out.
>
> - E -
> __
> Do You Yahoo!?
> Yahoo! BB is Broadband by Yahoo!
> http://bb.yahoo.co.jp/

-- 
Evan Nemerson
[EMAIL PROTECTED]

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



Re: [PHP] quotes in php.ini

2003-10-29 Thread Leif K-Brooks
- Edwin - wrote:

Why not?
 

Because that's what the standard says.

--
The above message is encrypted with double rot13 encoding.  Any unauthorized attempt 
to decrypt it will be prosecuted to the full extent of the law.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] quotes in php.ini

2003-10-29 Thread - Edwin -
On Wed, 29 Oct 2003 03:22:54 -0500
Leif K-Brooks <[EMAIL PROTECTED]> wrote:

> - Edwin - wrote:
> 
> >Why not?
> >  
> >
> Because that's what the standard says.

Interesting. Where?

- E -
__
Do You Yahoo!?
Yahoo! BB is Broadband by Yahoo!
http://bb.yahoo.co.jp/

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



Re: [PHP] quotes in php.ini

2003-10-29 Thread - Edwin -
On Tue, 28 Oct 2003 22:05:56 -0800
Evan Nemerson <[EMAIL PROTECTED]> wrote:

> On Tuesday 28 October 2003 11:59 pm, - Edwin - wrote:
> > Hi,
> >
> > On Wed, 29 Oct 2003 02:10:49 -0500
> >
> > Leif K-Brooks <[EMAIL PROTECTED]> wrote:
> > > Curt Zirzow wrote:
> > > >Try reversing the quotes:
> > > > error_prepend_string = "";
> > >
> > > Not valid XHTML (not sure if it's even valid HTML).
> >
> > Why not?
> 
> Because W3C says so. The closest thing I found to an answer
> is http://www.w3.org/TR/xhtml1/#h-4.4 although I really
> didn't dig deeply. validator.w3.org doesn't like it, tidy
> doesn't like it. Opera doesn't like it.

What "it"?

- E -

...[snip]...
__
Do You Yahoo!?
Yahoo! BB is Broadband by Yahoo!
http://bb.yahoo.co.jp/

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



Re: [PHP] quotes in php.ini

2003-10-29 Thread Leif K-Brooks
- Edwin - wrote:

Interesting. Where?
 

www.w3.org

--
The above message is encrypted with double rot13 encoding.  Any unauthorized attempt 
to decrypt it will be prosecuted to the full extent of the law.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] quotes in php.ini

2003-10-29 Thread Evan Nemerson
On Wednesday 29 October 2003 12:30 am, - Edwin - wrote:
> On Tue, 28 Oct 2003 22:05:56 -0800
>
> Evan Nemerson <[EMAIL PROTECTED]> wrote:
> > On Tuesday 28 October 2003 11:59 pm, - Edwin - wrote:
> > > Hi,
> > >
> > > On Wed, 29 Oct 2003 02:10:49 -0500
> > >
> > > Leif K-Brooks <[EMAIL PROTECTED]> wrote:
> > > > Curt Zirzow wrote:
> > > > >Try reversing the quotes:
> > > > > error_prepend_string = "";
> > > >
> > > > Not valid XHTML (not sure if it's even valid HTML).
> > >
> > > Why not?
> >
> > Because W3C says so. The closest thing I found to an answer
> > is http://www.w3.org/TR/xhtml1/#h-4.4 although I really
> > didn't dig deeply. validator.w3.org doesn't like it, tidy
> > doesn't like it. Opera doesn't like it.
>
> What "it"?

The it we're talking about- an HTML entity masquerading as a quote around an 
attribute.
>
> - E -
>
> ...[snip]...
> __
> Do You Yahoo!?
> Yahoo! BB is Broadband by Yahoo!
> http://bb.yahoo.co.jp/

-- 
Evan Nemerson
[EMAIL PROTECTED]

--
"There is a certain right by which we may deprive a man of life, but none by 
which we may deprive him of death."

-Nietzsche

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



Re: [PHP] Session Timeout

2003-10-29 Thread Marek Kilimajer
Better solution would be to display your login form together with all 
get and post variables in hidden fields. If the user logs in 
sucessfully, your script can continue with processing the form data.

[EMAIL PROTECTED] wrote:
right of course, 1440 is only 24 minutes.


On Tuesday, October 28, 2003 6:46 PM wrote:


Hi there, i am experiencing a session timeout problem with one of my
projects. One of the users had left their machine for less than 15
mins,

maybe a bit more and it logged them out when posting data. This isnt
good

as they lost their data. I was wondering how i can dynamically set the
session timeout to try and prevent this.
Use ini_set() to alter the max lifetime of a session.

ini_set('session.gc_maxlifetime',n);

where n is the number of seconds you want to pass before the session is
expired.   Default is 1440.
Cheers,
Pablo


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


Re: [PHP] installing php onto xitami, HELP!

2003-10-29 Thread Phil Driscoll
On Tuesday 28 October 2003 17:59, Paul Vinten wrote:
> when trying to access a php file, I just get a 'cannot find server' message
> from my browser.

I don't have Windows or Xitami so I'm far from being an expert, but it sounds 
like Xitami is not actually running or you have a DNS lookup failure.

If you are requesting the web page in the form http://127.0.0.1/myphpfile.php 
then I guess it must be the former. Can you access a plain html non-php file 
on the server?
-- 
Phil Driscoll

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



Re: [PHP] Echo issue

2003-10-29 Thread David Otton
On Wed, 29 Oct 2003 11:56:11 +1100, you wrote:

>I have spent about an hour looking at this and have found I can't echo
>anything with 16 characters or less! It can be over a single line or
>multiple lines eg.
>
>echo("12345678");
>echo("12345678");
>?>
>->""
>
>but 
>
>echo("12345678");
>echo("123456789");
>?>
>->12345678123456789
>
>Am I missing something really obvious here?

In the old C days, buffering while writing to a file could give this effect.

I have /no/ idea how that applies to your situation, though. Is it a CGI
install? Are there any options for buffering data between spawned programs
on your OS? What happens if you explicitly flush() after the echo?

Sorry I can't offer anything more concrete.

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



[PHP] Re: Calendar Script

2003-10-29 Thread pete M
here's the calendar I use
http://dynarch.com/mishoo/calendar/index.html
pete

Vijay Killu wrote:
Dear PHP,

Where can I find the Calendar script that has been used on the PHP.net site.
I believe I can use it on my website since it is open source :-)
Thanks & Regards, 
___ 
PHPLover
 
*  : [EMAIL PROTECTED] 

"Göd döësn't pläy dícë." 
- Älbërt Ëínstëín


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


Re: [PHP] Echo issue

2003-10-29 Thread Payne
Payne Wrtote:

\n is what you  are needing. \n means new line. So you want a new line 
you have to do this

echo ("abc\n");
echo ("Elm Street\n");
echo ("Anytown, NY 0 \n");
to get

abc
Elm Street
Anytown, NY 0
you can also use a printf then you can use html code to get the same .

You might want to grab you one for beginner C or PHP books, they usually 
all \ and example what are for. Or do a search on Google.

Payne

David Otton wrote:

On Wed, 29 Oct 2003 11:56:11 +1100, you wrote:

 

I have spent about an hour looking at this and have found I can't echo
anything with 16 characters or less! It can be over a single line or
multiple lines eg.

->""
but 


->12345678123456789
Am I missing something really obvious here?
   

In the old C days, buffering while writing to a file could give this effect.

I have /no/ idea how that applies to your situation, though. Is it a CGI
install? Are there any options for buffering data between spawned programs
on your OS? What happens if you explicitly flush() after the echo?
Sorry I can't offer anything more concrete.

 

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


[PHP] Color / Colour on the command line

2003-10-29 Thread Steve Vernon
Hiya,

I have quite a few maitenence php scripts I run on the command line in
windows. I realise there are ways to alter the look of the DOS command
prompt in windows. But if I reinstall windows, or use the script on another
machine they will be lost.

I'm thinking of letting users download it as well.

So basically, I can't find anything about how to change colours using a
command line script.

Just getting very boored of white text on a black background- very booring!

THANKS!

Steve

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



Re: [PHP] Echo issue

2003-10-29 Thread John Nichel
Payne wrote:
Payne Wrtote:

\n is what you  are needing. \n means new line. So you want a new line 
you have to do this

echo ("abc\n");
echo ("Elm Street\n");
echo ("Anytown, NY 0 \n");
to get

abc
Elm Street
Anytown, NY 0
you can also use a printf then you can use html code to get the same .

You might want to grab you one for beginner C or PHP books, they usually 
all \ and example what are for. Or do a search on Google.

Payne
*just shakes head*

I have spent about an hour looking at this and have found I can't echo
anything with 16 characters or less! It can be over a single line or
multiple lines eg.

->""
but

->12345678123456789
Am I missing something really obvious here?

Is this on Windoze or *nix?  Sounds like some sort of buffering issue... 
what is 'output_buffering' set too in your ini?

--
By-Tor.com
It's all about the Rush
http://www.by-tor.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Calendar Script

2003-10-29 Thread David T-G
Vijay --

...and then Vijay Killu said...
% 
% Where can I find the Calendar script that has been used on the PHP.net site.
% I believe I can use it on my website since it is open source :-)

I don't know about (or where to find) that one, but I've been fairly
happy with WebCalender [sic] from http://webcalendar.sourceforge.net.
It's not my dream calendar, but it works and it was a quick and easy
install.


% 
% Thanks & Regards, 
% ___ 
% PHPLover
%  
% *  : [EMAIL PROTECTED] 


HTH & HAND

:-D
-- 
David T-G  * There is too much animal courage in 
(play) [EMAIL PROTECTED] * society and not sufficient moral courage.
(work) [EMAIL PROTECTED]  -- Mary Baker Eddy, "Science and Health"
http://justpickone.org/davidtg/  Shpx gur Pbzzhavpngvbaf Qrprapl Npg!



pgp0.pgp
Description: PGP signature


[PHP] Re: SESSIONMANAGEMENT -- gute php mailing list / gute leute

2003-10-29 Thread Alexander Mueller
Christoph Lockingen wrote:
> 
> Hallo !
> 
> Ich bin auf der Suche nach einer guten PHP Mailing-Liste, am besten in
> Deutsch...Falls ich hier falsch bin, bitte ich um Entschuldigung.

Ist grundsätzlich eine internationale Mailinglist (daher Englisch) :).

> 
> 1. Wieso kann ich nicht per $_GET['lid'] auf
>$_POST['lid']=lf_session_id();
>zugreifen? (Danach ist ein Header("Location"... drin -> der
> überschreibt?)

Per $_GET auf $_POST? Was genau willst Du erreichen?

> 
> 2. Wie bekomme ich ein vernünftiges Sessionmanagement OHNE COOKIES hin?
> Eingesetzt wird PHP 4.2.2. Bei dieser PHP-Version funktioniert das nicht,
> wie beschrieben. Bug? (scheint so, schonmal nach gegoogled)
> session_start();
> liefert immer neue werte... es wird keine session übernommen.

PHP kann HTML Code automatisch so "umschreiben", daß die SID enthalten
ist. Bei PHP < 4.2 muß man das beim Kompilieren aber manuell angeben mit
--enable-trans-sid. Mehr Information dazu unter
http://at2.php.net/manual/de/ref.session.php#session.idpassing


Alexander
-- 
PINO - The free Chatsystem!
Available at http://www.pino.org

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



Re: [PHP] Color / Colour on the command line

2003-10-29 Thread Robert Cummings
Should be able to just output ANSI colour codes and the terminal window
will generally interpret them properly and voila!, colour in your
terminal.

Cheers,
Rob.

On Wed, 2003-10-29 at 07:39, Steve Vernon wrote:
> Hiya,
> 
> I have quite a few maitenence php scripts I run on the command line in
> windows. I realise there are ways to alter the look of the DOS command
> prompt in windows. But if I reinstall windows, or use the script on another
> machine they will be lost.
> 
> I'm thinking of letting users download it as well.
> 
> So basically, I can't find anything about how to change colours using a
> command line script.
> 
> Just getting very boored of white text on a black background- very booring!
> 
> THANKS!
> 
> Steve
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 
-- 
..
| InterJinn Application Framework - http://www.interjinn.com |
::
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for   |
| creating re-usable components quickly and easily.  |
`'

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



[PHP] upload_max_filesize not honored?

2003-10-29 Thread David T-G
Hi, all --

I am implementing a picture upload page which will accept single pictures
or zips of pictures, and I can't send anything bigger than 2M.

Because post_max_size must be set in php.ini or httpd.conf I have

  php_admin_value post_max_size 128M

set for my site, and in my code I have

  ini_set('upload_max_filesize',"128M") ;
  ini_set('memory_limit',"128M") ;
  ini_set('max_execution_time',"300") ;

(do I need memory_limit set, or does temp file storage not impact
memory?), and in my form I have

  

all to ensure that I can upload.  I can happily upload individual 800k
files to about 4.6M (I only have half a dozen on hand :-) but I cannot
upload even a single zip file larger than 2M (though smaller zip files
work fine).  phpinfo() reports 128M for my post_max and max_filesize and
everything seems good to me.

When I try a smaller zip file, $_FILES[uploads][type][$k] properly
contains "application/x-zip", but when I try a larger one it is empty
(in fact, the only thing with value, IIRC, is the name); the temp file
gets to a few bytes over 2M and then disappears.  If I put such a zip
file between two smaller files I see full entries for 0 and 2 while 1
(the zip file) is empty save for the name -- and so the script continues
on to get other files but never gets the big one.

Any ideas?


TIA & HAND

:-D
-- 
David T-G  * There is too much animal courage in 
(play) [EMAIL PROTECTED] * society and not sufficient moral courage.
(work) [EMAIL PROTECTED]  -- Mary Baker Eddy, "Science and Health"
http://justpickone.org/davidtg/  Shpx gur Pbzzhavpngvbaf Qrprapl Npg!



pgp0.pgp
Description: PGP signature


Re: [PHP] upload_max_filesize not honored?

2003-10-29 Thread Marek Kilimajer
upload_max_filesize is INI_SYSTEM, that means it is not honored in your 
code. Set it the same way you set post_max_size

David T-G wrote:
Hi, all --

I am implementing a picture upload page which will accept single pictures
or zips of pictures, and I can't send anything bigger than 2M.
Because post_max_size must be set in php.ini or httpd.conf I have

  php_admin_value post_max_size 128M

set for my site, and in my code I have

  ini_set('upload_max_filesize',"128M") ;
  ini_set('memory_limit',"128M") ;
  ini_set('max_execution_time',"300") ;
(do I need memory_limit set, or does temp file storage not impact
memory?), and in my form I have
  

all to ensure that I can upload.  I can happily upload individual 800k
files to about 4.6M (I only have half a dozen on hand :-) but I cannot
upload even a single zip file larger than 2M (though smaller zip files
work fine).  phpinfo() reports 128M for my post_max and max_filesize and
everything seems good to me.
When I try a smaller zip file, $_FILES[uploads][type][$k] properly
contains "application/x-zip", but when I try a larger one it is empty
(in fact, the only thing with value, IIRC, is the name); the temp file
gets to a few bytes over 2M and then disappears.  If I put such a zip
file between two smaller files I see full entries for 0 and 2 while 1
(the zip file) is empty save for the name -- and so the script continues
on to get other files but never gets the big one.
Any ideas?

TIA & HAND

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


Re: [PHP] quotes in php.ini

2003-10-29 Thread Curt Zirzow
* Thus wrote Leif K-Brooks ([EMAIL PROTECTED]):
> Curt Zirzow wrote:
> 
> >Try reversing the quotes:
> >error_prepend_string = "";
> > 
> >
> Not valid XHTML (not sure if it's even valid HTML).

Sure it is, the quote character can be either ' or " and will
validate perfectly fine at w3c. now the font tag, thats a whole
different issue.

http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>


validate this


perfectly fine




Curt
-- 
"My PHP key is worn out"

  PHP List stats since 1997: 
http://zirzow.dyndns.org/html/mlists/

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



Re: [PHP] Echo issue

2003-10-29 Thread Chris Shiflett
--- John Nichel <[EMAIL PROTECTED]> wrote:
> Is this on Windoze or *nix?  Sounds like some sort of buffering
> issue...

Yes, it does.

> what is 'output_buffering' set too in your ini?

This shouldn't matter either. I can't think of a reason why he would see the
behavior he describes. In fact, this reminds me of a debate on the dev list
about a year ago. One of the developers (Yasuo) wanted this behavior to be the
default behavior for the CLI. You can see a small part of that debate here:

http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&frame=right&th=ddf92ba5273191e9&seekm=3DB8EF91.5070800%40ohgaki.net#link1

Basically, everyone else strongly disagreed, and this question would make it
seem the other way around. :-)

Sorry I can't offer more help. That example works fine in my environment(s). It
might be worth searching and/or adding to the bug list.

Chris

=
My Blog
 http://shiflett.org/
HTTP Developer's Handbook
 http://httphandbook.org/
RAMP Training Courses
 http://www.nyphp.org/ramp

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



[PHP] Re: $HTTP_SERVER_VARS["HTTP_PC_REMOTE_ADDR"] returns no value

2003-10-29 Thread pete M
its $HTTP_SERVER_VARS['REMOTE_ADDR']
or in php4+
$_SERVER['REMOTE_ADDR']
Randall Perry wrote:
Want to grab the client IP after client agrees to a contract, but am getting
no value from the $HTTP_SERVER_VARS["HTTP_PC_REMOTE_ADDR"] var.
Anyone know why this might happen?

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


[PHP] session_regenerate_id()

2003-10-29 Thread Alexander Mueller

I am not entirely sure what the following paragraph at
http://at2.php.net/manual/en/function.session-regenerate-id.php shall
mean

> As of PHP 4.3.3, if session cookies are enabled, use of
> session_regenerate_id() will also submit a new session cookie with the
> new session id.

What did it in 4.3.2? Somehow it seems its not working prior to 4.3.3
and even now its not fully compatible with Opera.

Alexander
-- 
PINO - The free Chatsystem!
Available at http://www.pino.org

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



Re: [PHP] upload_max_filesize not honored?

2003-10-29 Thread David T-G
Marek, et al --

...and then Marek Kilimajer said...
% 
% upload_max_filesize is INI_SYSTEM, that means it is not honored in your 

*slaps forehead*  Why, so it is.  That certainly does explain things.

It's interesting to me, though, is that phpinfo() reported it as 128M
even when set from the code, though it obviously wasn't honored.  Why
would it say that when it doesn't mean it?


% code. Set it the same way you set post_max_size

Done, and amazingly enough it works just right now :-)


Thanks & HAND

:-D
-- 
David T-G  * There is too much animal courage in 
(play) [EMAIL PROTECTED] * society and not sufficient moral courage.
(work) [EMAIL PROTECTED]  -- Mary Baker Eddy, "Science and Health"
http://justpickone.org/davidtg/  Shpx gur Pbzzhavpngvbaf Qrprapl Npg!



pgp0.pgp
Description: PGP signature


[PHP] include problem

2003-10-29 Thread Pablo S. Torralba

Hi,

I have a weird problem which must be stupid for sure. I'm trying to do
an include in my code run as a cgi. The include works fine in the
form:

include ("directory/file");

even it works as:

include ("directory/../directory/file");

but it doesn't work as:

include ("./directory/file");

nor

include ("../current/directory/file").


Of course, the obvious thinking is I have a perms problem but they are
the same for '.' and for 'directory' so it makes no sense for me (755
if you wonder).

If I execute the script it works without problem but it doesn't upon
web request reporting:

Warning: main(./db/db.tables.php) [function.main]: failed to create stream: No 
such file or directory in /home/psanchez/tests/hola.php on line 8

Warning: main() [function.main]: Failed opening './db/db.tables.php' for 
inclusion (include_path='.') in /home/psanchez/tests/hola.php on line 8


I need to know what the problem is because I have a software that
should work but it doesn't.

Any ideas?

Thanks

Pablo S. Torralba

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



Re: [PHP] Echo issue

2003-10-29 Thread John Nichel
Chris Shiflett wrote:
--- John Nichel <[EMAIL PROTECTED]> wrote:

Is this on Windoze or *nix?  Sounds like some sort of buffering
issue...
Yes, it does.

what is 'output_buffering' set too in your ini?
This shouldn't matter either. I can't think of a reason why he would see the
behavior he describes.


Me either...but it was the only thing I could think of that /might/ 
effect this in some way.  I tried setting 'output_buffering' to 16 in my 
ini, and couldn't reproduce the issue.

Let's blame it on either Bush or Clinton.  :)

--
By-Tor.com
It's all about the Rush
http://www.by-tor.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP]eventKey

2003-10-29 Thread LINGUA
Hello,

One of my friends wants to create a page that
shows current time by pressing space key or enter key.
What is the best way to do this with PHP?

Thank you in advance.

David

- Original Message -
From: "John Nichel" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, October 29, 2003 9:42 AM
Subject: Re: [PHP] Echo issue


> Chris Shiflett wrote:
> > --- John Nichel <[EMAIL PROTECTED]> wrote:
> >
> >>Is this on Windoze or *nix?  Sounds like some sort of buffering
> >>issue...
> >
> > Yes, it does.
> >
> >>what is 'output_buffering' set too in your ini?
> >
> > This shouldn't matter either. I can't think of a reason why he would see
the
> > behavior he describes.
> 
>
> Me either...but it was the only thing I could think of that /might/
> effect this in some way.  I tried setting 'output_buffering' to 16 in my
> ini, and couldn't reproduce the issue.
>
> Let's blame it on either Bush or Clinton.  :)
>
> --
> By-Tor.com
> It's all about the Rush
> http://www.by-tor.com
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

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



RE: [PHP]eventKey

2003-10-29 Thread Pablo Gosse
On Wednesday, October 29, 2003 8:04 AM David wrote:

> One of my friends wants to create a page that shows current time by
> pressing space key or enter key.
> What is the best way to do this with PHP?

PHP is a server-side technology, and what you want to do is on the
client side.  Your friend will need to use Javascript to accomplish
this.

Try forums.devshed.com for a good javascript forum.

Cheers,
Pablo

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



[PHP] Query explanation

2003-10-29 Thread Robb Kerr
I am attempting to hack a tutorial from the Zend site. I have found the
tutorial/project to be excellent, but I don't completely understand what's
being done in the following Query statement.

//query database, assemble data for selectors 
$Query = "SELECT s.ID, s.Name, a.Code " . 
"FROM areacode a, state s " . 
"WHERE a.State = s.ID " . 
"ORDER BY s.Name, a.Code"; 
if(!($DatabaseResult = mysql_query($Query, $DatabaseLink))) 
{ 
print("The query failed!\n"); 
exit(); 
} 

Please explain what's going on in this SELECT statement. I'm assuming that
the "s" in "s.ID", the "s" in "s.Name" and the "a" in "a.Code" are
variables referring to the table name. "ID", "Name" and "Code" are field
names in two different tables. But, I can't find a place where these
variables are initiated in the preceding code.

I also don't understand what's going on in the FROM statement. "Areacode"
and "state" are table names. That I understand. What's with the "a" and "s"
following the table names? Is this where the variables are initiated?

Thanx for all your help. This newsgroup has been invaluable to my learning
process.
-- 
Robb Kerr
Digital IGUANA
Helping Digital Artists Achieve their Dreams
http://www.digitaliguana.com
http://www.cancerreallysucks.org

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



[PHP] imap_set_quota() function

2003-10-29 Thread dimon
Hello,

I asked that question a week ago but didn't get any response. So I'll try 
again :-)

I'm trying to use PHP's imap_set_quota() function to manage user's quotas. I 
can set user's quota to 0 with:
imap_set_quota($mbox, "user/afif", none); or
imap_set_quota($mbox, "user/afif", 0);
And for sure I can set user's quota to any other value > 0
But when I'm trying to delete quota (set unlimited quota) for the user with
imap_set_quota($mbox, "user/afif", -1);
imap_errors() gives me this error:
"IMAP protocol error: Invalid quota list in Setquota"
I have compiled PHP with c-client 2001 FINAL as suggested at php.net site.
But it still doesn't work :-)

My configuration is:
name   : Cyrus IMAPD
version: v2.2.1-BETA 2003/07/16 21:18:54
os : FreeBSD
os-version : 4.7-RELEASE
environment: Built w/Cyrus SASL 2.1.13
 Running w/Cyrus SASL 2.1.15
 Sleepycat Software: Berkeley DB 3.3.11: (July 12, 2001)
 Built w/OpenSSL 0.9.6h  5 Dec 2002
 Running w/OpenSSL 0.9.6h  5 Dec 2002
 CMU Sieve 2.2
PHP-4.3.3
Apache/1.3.27 
c-client 2001 FINAL 

Have anyone had any luck with removing quotas on Cyrus IMAP server using 
imap_set_quota() function?
May be I missed something?

Any help would be greatly appreciated!
Dmitry

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



[PHP] Posting variable in url

2003-10-29 Thread Frank Tudor
I have a redirect that if conditions are right it will pass the
user to a new page via $_POST.

so for instance the redirect looks like this:

header("Location:
more_registration.php?username=".$_POST["username"]."&email=".$_POST["email"]);

the url will look like this:

http://ftudor/test/more_registration.php?username=1234&[EMAIL PROTECTED]

the form componement on the new page looks like this:









I am posting variables in the url and on this next page more
form stuff awaits the user.  

If a user submits incorrect stuff in the form is posts to
itself.  The url holds the same variables that were pass through
the redirect.  

My concern is that if a variable got altered in the URL by
misstake or on purpose it would post to the refreshed page and
screw everything up.

Anyone run into something like this?

Frank

__
Do you Yahoo!?
Exclusive Video Premiere - Britney Spears
http://launch.yahoo.com/promos/britneyspears/

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



[PHP] Re: Query explanation

2003-10-29 Thread Alexander Mueller
Robb Kerr wrote:
> 
> I am attempting to hack a tutorial from the Zend site. I have found the
> tutorial/project to be excellent, but I don't completely understand what's
> being done in the following Query statement.
> 
> //query database, assemble data for selectors
> $Query = "SELECT s.ID, s.Name, a.Code " .
> "FROM areacode a, state s " .
> "WHERE a.State = s.ID " .
> "ORDER BY s.Name, a.Code";
> if(!($DatabaseResult = mysql_query($Query, $DatabaseLink)))
> {
> print("The query failed!\n");
> exit();
> }
> 
> Please explain what's going on in this SELECT statement. I'm assuming that
> the "s" in "s.ID", the "s" in "s.Name" and the "a" in "a.Code" are
> variables referring to the table name. "ID", "Name" and "Code" are field
> names in two different tables. But, I can't find a place where these
> variables are initiated in the preceding code.
> 
> I also don't understand what's going on in the FROM statement. "Areacode"
> and "state" are table names. That I understand. What's with the "a" and "s"
> following the table names? Is this where the variables are initiated?

Exactly. "a" and "s" are referring to the two tables and are assigned in
the FROM clause. You could write the query also without the
abbreviations.

SELECT state.ID, state.Name, areacode.Code FROM areacode, state
WHERE areacode.State = state.ID
ORDER BY state.Name, areacode.Code

Alexander
-- 
PINO - The free Chatsystem!
Available at http://www.pino.org

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



RE: [PHP] Query explanation

2003-10-29 Thread Pablo Gosse
On Wednesday, October 29, 2003 8:20 AM Robb Kerr wrote:

> I am attempting to hack a tutorial from the Zend site. I have found
the
> tutorial/project to be excellent, but I don't completely understand
what's
> being done in the following Query statement.
> 
> //query database, assemble data for selectors 
> $Query = "SELECT s.ID, s.Name, a.Code " . 
>  "FROM areacode a, state s " . 
>  "WHERE a.State = s.ID " . 
>  "ORDER BY s.Name, a.Code"; 

Hey Rob.  In plain english, what this query is doing is the following:

Selecting ID, Name and Code from the areacode and state tables, where
the State in the areacode table is equal to the ID in the state table.

You are correct in assuming that the "s" in "s.Name" and the "a" in
"a.Code" reference the table from which these fields are retrieved.

So from this, the "a" following the "areacode" table and the "s"
following the "state" table are basically shortcuts for referring to
these tables, as per your assumption.  You could leave it just as "FROM
areacode, state" and  reference the fields as "state.ID" and
"areacode.Code", but this is much more cumbersome.

Not sure I understand what you're asking when you refer to being unable
to find the ID, Name and Code variables initiated in the preceding code.
Can you elaborate on that a little?

Cheers,
Pablo

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



[PHP] Re: Posting variable in url

2003-10-29 Thread Alexander Mueller
Frank Tudor wrote:
> 
> I have a redirect that if conditions are right it will pass the
> user to a new page via $_POST.
> 
> I am posting variables in the url and on this next page more
> form stuff awaits the user.
> 
> If a user submits incorrect stuff in the form is posts to
> itself.  The url holds the same variables that were pass through
> the redirect.
> 
> My concern is that if a variable got altered in the URL by
> misstake or on purpose it would post to the refreshed page and
> screw everything up.
> 
> Anyone run into something like this?
> 
> Frank

Either validate the values on each page or create a session and store
them there.

Alexander
-- 
PINO - The free Chatsystem!
Available at http://www.pino.org

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



[PHP] Re: Query explanation

2003-10-29 Thread Robb Kerr
On Wed, 29 Oct 2003 17:31:26 +0100, Alexander Mueller wrote:

> 
> Exactly. "a" and "s" are referring to the two tables and are assigned in
> the FROM clause. You could write the query also without the
> abbreviations.
> 
> SELECT state.ID, state.Name, areacode.Code FROM areacode, state
> WHERE areacode.State = state.ID
> ORDER BY state.Name, areacode.Code
> 
> Alexander

Thanx. It looks like I'm actually learning this stuff. hehe
-- 
Robb Kerr
Digital IGUANA

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



Re: [PHP] data from database

2003-10-29 Thread alain dhaene
it works,

thanks,

Alain

"John Nichel" <[EMAIL PROTECTED]> schreef in bericht
news:[EMAIL PROTECTED]
> alain dhaene wrote:
> > Hi,
> >
> > I will write a function that returns the result of a recordset.
> > I tried this:
> >
> >   Function getPersonen()
> >   {
> >openDB();  //function that I implements in another file
> >
> >
> >  $query = "SELECT * FROM Cursisten";
> >  $result = mysql_query($query)
> >  or die("Fout bij uitvoeren query");
> >
> >  $resultrow = mysql_fetch_array( $result );
>
> Get rid of the above line, unless you plan on passing the array.  From
> the looks below, you want to pass the identifier though.  If you do want
> to pass the result array instead of the identifier, leave as is.
>
> >  closeDB();   //function that I implements in another file
> >mysql_free_result($result);
>
> If you are going to pass the identifier, you just killed it here.  If
> you are going to pass the data array, swap these two lines, ie free your
> result before you close your connections.
>
> > return $resultrow;
>
> Change this line to...
>
> return $result
>
> if you are not planning on passing the array.
>
> >   }
> >
> > I call this function:
> >
> > $resultaat =  getPersonen();
> >   // Printen resultaten in HTML
> >  print "\n";
> >  while ($line = mysql_fetch_array($resultaat, MYSQL_ASSOC)) {
>
> What you do with this, all depends on how you rewrite your function.  If
> you're passing the identifier, you can leave it as is, if you're passing
> the result data array, you need to get rid of the while loop.
>
> >  print "\t\n";
> >  foreach ($line as $col_value) {
> >  print "\t\t$col_value\n";
> >  }
> >  print "\t\n";
> >  }
> >  print "\n";
> >
> >  In runtime I have the following error
> >
> >   Warning: mysql_fetch_array(): supplied argument is not a valid MySQL
> > result resource in
> > /home/schoolre/public_html/Hitek/Online/Registratie/showPerson.php on
line 8
> >
> > What is wrong?
>
> Alot, I suggest you check out the MySQL functions
>
> http://us4.php.net/manual/en/ref.mysql.php
>
> --
> By-Tor.com
> It's all about the Rush
> http://www.by-tor.com

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



Re: [PHP] session_regenerate_id()

2003-10-29 Thread CPT John W. Holmes
From: "Alexander Mueller" <[EMAIL PROTECTED]>

> I am not entirely sure what the following paragraph at
> http://at2.php.net/manual/en/function.session-regenerate-id.php shall
> mean
>
> > As of PHP 4.3.3, if session cookies are enabled, use of
> > session_regenerate_id() will also submit a new session cookie with the
> > new session id.
>
> What did it in 4.3.2? Somehow it seems its not working prior to 4.3.3
> and even now its not fully compatible with Opera.

PHP 4.3.2 created a new session ID, but it didn't resend the cookie. So the
next request would include the old session ID again from the cookie.

What are you trying to do?

---John Holmes...

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



Re: [PHP] session_regenerate_id()

2003-10-29 Thread Curt Zirzow
* Thus wrote Alexander Mueller ([EMAIL PROTECTED]):
> 
> I am not entirely sure what the following paragraph at
> http://at2.php.net/manual/en/function.session-regenerate-id.php shall
> mean
> 
> > As of PHP 4.3.3, if session cookies are enabled, use of
> > session_regenerate_id() will also submit a new session cookie with the
> > new session id.
> 
> What did it in 4.3.2? Somehow it seems its not working prior to 4.3.3
> and even now its not fully compatible with Opera.

how is it not comatible with Opera?


Curt
-- 
"My PHP key is worn out"

  PHP List stats since 1997: 
http://zirzow.dyndns.org/html/mlists/

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



Re: [PHP] session_regenerate_id()

2003-10-29 Thread Alexander Mueller
"Cpt John W. Holmes" wrote:
> 
> PHP 4.3.2 created a new session ID, but it didn't resend the cookie. So the
> next request would include the old session ID again from the cookie.

I wonder what it is then good for. Changing the id internally without
notifying the client does not make much sense IMHO.

> 
> What are you trying to do?

Changing the session id upon a login to prevent referal attacks.

Alexander
-- 
PINO - The free Chatsystem!
Available at http://www.pino.org

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



Re: [PHP] session_regenerate_id()

2003-10-29 Thread Alexander Mueller
Curt Zirzow wrote:
> 
> how is it not comatible with Opera?

With 4.3.3 it works for IE and Mozilla, however Opera still has some
problems with recognising the new id under certain circumstances.

Alexander
-- 
PINO - The free Chatsystem!
Available at http://www.pino.org

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



[PHP] Beginner looking for survey script

2003-10-29 Thread josh hough
I'm looking for a simple bit of code to interrupt all visitors to a site so 
they can submit a brief survey and then automatically continue to their 
desired destination.  The server is Apache 2.0 on Solaris.  I have already 
set a global header to redirect all visitors to the survey page if they do 
not have a cookie.  The survey page needs to write their form data to a 
plain text file (NOT MySQL), set a cookie to prevent them from seeing the 
survey again, and finally show a "Thank you" page with a link to their 
original destination.  Has anyone run across such a thing, or know how to 
create it easily?  Thank you kindly.
-josh

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


[PHP] Performance of dynamically generated select boxes

2003-10-29 Thread Luis Lebron
I am rebuilding a php application to handle a higher load. The previous
programmer had created a series of dynamically generated select boxes using
a mysql table. Would it be faster or less resource intensive to create a
series of arrays to generate the select boxes and avoid the database
queries. I've done some informal testing using Pear Benchmark and it seems
the array based script usually takes less time.

thanks,

Luis R. Lebron
Project Manager
Sigmatech, Inc


[PHP] Copying an uploaded file...

2003-10-29 Thread René Fournier
I'm trying to get a little upload script working... But I can't seem to 
copy the tmp file to my local web directory (btw, do I really need to 
specify the path, or can I just use a filename, and the file will be 
written to the same directory as the PHP script??).  Anyway, here is 
the code:

$realname = $_FILES['userfile']['name'];
if(copy($_FILES['userfile']['tmp_name'],
'/Users/rene/Sites/renefournier/titan/res/'.$realname)) {
echo $realname.' uploaded';
} else {
echo $realname.' could not be uploaded';
}
echo '';
echo "name: ".$_FILES[$fld]['name'];
echo '';
echo "type: ".$_FILES[$fld]['type'];
echo '';
echo "size: ".$_FILES[$fld]['size'];
echo '';
echo "tmp: ".$_FILES[$fld]['tmp_name'];
echo '';
Here is the output:

could not be uploaded
name: web_share.gif
type: image/gif
size: 13370
tmp: /var/tmp/phpNqigbO


Thanks for any ideas.

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


[PHP] Re: strange issue

2003-10-29 Thread jacob bolton
Just for future users with this same problem, here's what I had to do to fix
it.

The version of Apache and PHP I was using was both the original RPM that
came with RH9.  I had to shut both of them down, and then reinstall Apache
and PHP from source with the latest versions.  After I did that, everything
worked no problem.



"Jacob Bolton" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
Hey all,

I've researched this to the greatest extent and I can't seem to find
anything written about this.  I have a new server (RH 9) with PHP4.2.2 and
Apache 2.  I can't seem to upload anything over 1 KB.  I can upload small
gifs and JPGs that are a few hundred bytes, but I can't seem to upload
anything over that.  I get no error messages, it simply doesn't upload it.
I can
upload no problem with a perl script.

My upload_max_filesize value is set at 10M.

You can view my php_info at http://mlm.vervecreations.com/php.php

Any insight would be appreciated.

Thanks!

Jacob Bolton

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



Re: [PHP] Copying an uploaded file...

2003-10-29 Thread John Nichel
René Fournier wrote:
I'm trying to get a little upload script working... But I can't seem to 
copy the tmp file to my local web directory (btw, do I really need to 
specify the path, or can I just use a filename, and the file will be 
written to the same directory as the PHP script??).  Anyway, here is the 
code:

$realname = $_FILES['userfile']['name'];
if(copy($_FILES['userfile']['tmp_name'],
'/Users/rene/Sites/renefournier/titan/res/'.$realname)) {
echo $realname.' uploaded';
} else {
echo $realname.' could not be uploaded';
}
PHP has built in functions to move the temp file for you

http://us3.php.net/manual/en/function.move-uploaded-file.php

echo '';
echo "name: ".$_FILES[$fld]['name'];
echo '';
echo "type: ".$_FILES[$fld]['type'];
echo '';
echo "size: ".$_FILES[$fld]['size'];
echo '';
echo "tmp: ".$_FILES[$fld]['tmp_name'];
echo '';
Do you know about print_r?




--
By-Tor.com
It's all about the Rush
http://www.by-tor.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Performance of dynamically generated select boxes

2003-10-29 Thread CPT John W. Holmes
From: "Luis Lebron" <[EMAIL PROTECTED]>


> I am rebuilding a php application to handle a higher load. The previous
> programmer had created a series of dynamically generated select boxes
using
> a mysql table. Would it be faster or less resource intensive to create a
> series of arrays to generate the select boxes and avoid the database
> queries. I've done some informal testing using Pear Benchmark and it seems
> the array based script usually takes less time.

Yeah, that would be quicker, provided the contents don't change to often.
You should build a cache system where the arrays are recreated every so
often so they stay current (or on demand).

Take a look at var_export(). It will return valid PHP code that you can
write to a file and then include() to recreate your arrays. If the file
doesn't exist, trigger the function to create the array file, etc...

---John Holmes...

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



Re: [PHP] session_regenerate_id()

2003-10-29 Thread CPT John W. Holmes
From: "Alexander Mueller" <[EMAIL PROTECTED]>

> "Cpt John W. Holmes" wrote:
> >
> > PHP 4.3.2 created a new session ID, but it didn't resend the cookie. So
the
> > next request would include the old session ID again from the cookie.
>
> I wonder what it is then good for. Changing the id internally without
> notifying the client does not make much sense IMHO.

If you're using sessions in the URL, then it works just fine.

> > What are you trying to do?
>
> Changing the session id upon a login to prevent referal attacks.

So, if PHP is less than 4.3.3, you need to use setcookie() to reset the
value of the session id yourself. If you're using 4.3.3, then you don't have
to worry about it.

---John Holmes...

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



Re: [PHP] Performance of dynamically generated select boxes

2003-10-29 Thread Chris Shiflett
--- Luis Lebron <[EMAIL PROTECTED]> wrote:
> I am rebuilding a php application to handle a higher load. The
> previous programmer had created a series of dynamically generated
> select boxes using a mysql table. Would it be faster or less
> resource intensive to create a series of arrays to generate the
> select boxes and avoid the database queries. I've done some informal
> testing using Pear Benchmark and it seems the array based script
> usually takes less time.

Basically, anything you can do to eliminate talking to the database will
usually improve performance by a fair margin. The downside is convenience; if
you have data hard-coded in your PHP scripts, it is less convenient to maintain
the data. You effectively eliminate the separation between the data and your
logic.

A similar idea is to eliminate PHP. Apache can serve a lot more static pages
than it can PHP pages at any given time. Of course, this has a similar
disadvantage as well. Now your pages are static rather than dynamic.

Developers have created many different types of systems to address these
thoughts. For eliminating database queries while still leaving the data in your
database, you simply need something to update your PHP scripts whenever data in
the database changes, or at regular intervals. For example, you mention an
array replacing the query. This array can be in a separate include file and act
as a sort of cache. This cache can be refreshed as often as appropriate using
another PHP script that you write.

The same idea can be applied to static pages. These can also be refreshed with
PHP scripts as often as necessary. In fact, you might want to just do something
like this and not even worry about limiting database interactions with your PHP
script, since it won't be executed but a fraction of the time.

So, your instincts serve you well. In general, anytime you query the database
many times to receive the exact same data, there is probably a better solution.
In the same sense, anytime the output of a PHP script is the same for many
users, there is probably a better solution.

Hope that helps.

Chris

=
My Blog
 http://shiflett.org/
HTTP Developer's Handbook
 http://httphandbook.org/
RAMP Training Courses
 http://www.nyphp.org/ramp

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



[PHP] Problems with remote include

2003-10-29 Thread Pablo Zorzoli
Hi all, 

I'm having trouble while i try to include a php file. the testing code
is something loke the sort.






 test:

http://blabla.com/script.php?var1=a');
?>



script.php should echo some text, but i don't get any output.

In my php.ini I have allow_url_fopen = On, is there any other thing to
configure. And both scripts are under the same domain & webserver.

Thanks,

Pablo Zorzoli

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



Re: [PHP] Problems with remote include

2003-10-29 Thread Chris Shiflett
--- Pablo Zorzoli <[EMAIL PROTECTED]> wrote:
> I'm having trouble while i try to include a php file.
[snip]
> include ('http://blabla.com/script.php?var1=a');
[snip]
> script.php should echo some text, but i don't get any output.

When you visit http://blabla.com/script.php?var1=a and view source, what do you
see? Is it valid PHP?

Chris

=
My Blog
 http://shiflett.org/
HTTP Developer's Handbook
 http://httphandbook.org/
RAMP Training Courses
 http://www.nyphp.org/ramp

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



Re: [PHP] Problems with remote include

2003-10-29 Thread Pablo Zorzoli
On Wed, 2003-10-29 at 16:00, Chris Shiflett wrote:
> When you visit http://blabla.com/script.php?var1=a and view source, what do you
> see? Is it valid PHP?

yap, exactly. if i paste th elink i my browser i see the results
expected..

pablo

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



[PHP] redirect

2003-10-29 Thread alain dhaene
Hi,

Is there in php something as a redirect to another page like in asp?

e.g

  if(choice==1) response.redirect("page.php");
 response.redirect("page2.php");

I have search in the manuel, but the only thing I find is something like
header("Location: registratie.html");

But I guess it's wrong because header information is already send.


Alain

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



Re: [PHP] String Array Creation and assigment

2003-10-29 Thread Dan
please help with the following:

I tried this first :
$b[] = 'Book Worzel, Richard (1989). From Employee to Entrepreneur:  how to
turn your experience into a fortune.  Toronto:  Key Porter books.';
$b[] = 'Book Ries, Al and Jack Trout (1994). The 22 Immutable Laws of
Marketing.  New York:  Harper Business';
...

then tried this :
$b[0] = 'Book Worzel, Richard (1989). From Employee to Entrepreneur:  how to
turn your experience into a fortune.  Toronto:  Key Porter books.';
$b[1] = 'Book Ries, Al and Jack Trout (1994). The 22 Immutable Laws of
Marketing.  New York:  Harper Business';
...

none of the above work, what's right?

help will be appreciated.

Dan

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



RE: [PHP] redirect

2003-10-29 Thread Gregory Kornblum
>header("Location: registratie.html");

That is exactly how you do the PHP version of a response.redirect().
Regards.

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



Re: [PHP] Problems with remote include

2003-10-29 Thread CPT John W. Holmes
From: "Pablo Zorzoli" <[EMAIL PROTECTED]>

>  include ('http://blabla.com/script.php?var1=a');
> ?>
[snip]
> script.php should echo some text, but i don't get any output.

You know you're going to get the OUTPUT of script.php, right? You'll get the
same exact result as if you typed the address into your browser.

Is that what you're trying to do?

---John Holmes...

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



Re: [PHP] redirect

2003-10-29 Thread alain dhaene
But I get the following warning:

Warning: Cannot modify header information - headers already sent by (output
started at
/home/schoolre/public_html/Hitek/Online/Registratie/registratieFuncties.php:
1) in
/home/schoolre/public_html/Hitek/Online/Registratie/registratieData.php on
line 30

In registratieData there is a include file to registratieFuncties.php. And
in the file registratieFuncties.php there is a include file to
Connecties.inc for the connectiestring to the database

Alain




"Gregory Kornblum" <[EMAIL PROTECTED]> schreef in bericht
news:[EMAIL PROTECTED]
ing.com...
> >header("Location: registratie.html");
>
> That is exactly how you do the PHP version of a response.redirect().
> Regards.

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



Re: [PHP] Problems with remote include

2003-10-29 Thread Pablo Zorzoli
On Wed, 2003-10-29 at 16:18, CPT John W. Holmes wrote:
> 
> You know you're going to get the OUTPUT of script.php, right? You'll get the
> same exact result as if you typed the address into your browser.
> 
> Is that what you're trying to do?

yes John, tht's exactly what i want to get.

pablo

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



Re: [PHP] redirect

2003-10-29 Thread Pablo Zorzoli
On Wed, 2003-10-29 at 16:17, alain dhaene wrote:
> But I get the following warning:
> 
> Warning: Cannot modify header information - headers already sent by (output
> started at
> /home/schoolre/public_html/Hitek/Online/Registratie/registratieFuncties.php:
> 1) in
> /home/schoolre/public_html/Hitek/Online/Registratie/registratieData.php on
> line 30
> 
> In registratieData there is a include file to registratieFuncties.php. And
> in the file registratieFuncties.php there is a include file to
> Connecties.inc for the connectiestring to the database

You cannot do any echo ""; before header("location:.."); maybe that's
the problem.

regards..

pablo

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



RE: [PHP] redirect

2003-10-29 Thread Chris W. Parker
Pablo Zorzoli 
on Wednesday, October 29, 2003 11:20 AM said:

> You cannot do any echo ""; before header("location:.."); maybe that's
> the problem.

The solution would be to turn on output buffering.

http://www.fullurl.com/notjust/a/page.html";); exit;


?>


hth,

Chris.

p.s. Output buffering I think can have some performance issues regarding
server memory but I'm not certain about this.


--
Don't like reformatting your Outlook replies? Now there's relief!
http://home.in.tum.de/~jain/software/outlook-quotefix/

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



[PHP] ORDER BY RAND()....

2003-10-29 Thread Payne
Hi,

I have been working on a simple PHP script that called to a mysql 
database, where I  do the following

SELECT url FROM sponsors ORDER BY RAND();

When I do a refresh I keep getting the same url, I have test this sql 
statement in mysql and it works great. I think my problem is this...

Here is my php script



   $db = mysql_connect("69.15.40.130","cepayne","death");

   mysql_select_db("links",$db);

   $result = mysql_query("SELECT url FROM sponsors order by 
rand() LIMIT 1", $db);

  if ($myrow = mysql_fetch_array($result)) {

   echo"";
  
  do {
 
  printf("%s\n",$myrow[url]);
  
  } while ($myrow = mysql_fetch_array($result));
  
  } else {
  
  echo "Sorry, no message of day today";
  }

 echo ""

?>

I  know that what I have got here must be the problem because this  code 
was use to get mutli line of results. Is there a way to retype this so 
that I only get the one statement I need?

Payne

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


Re: [PHP] redirect

2003-10-29 Thread alain dhaene
I have check my code.
I haven't use a echo in my code.
It's very strange. I will search more on the manule.
thx


"Pablo Zorzoli" <[EMAIL PROTECTED]> schreef in bericht
news:[EMAIL PROTECTED]
> On Wed, 2003-10-29 at 16:17, alain dhaene wrote:
> > But I get the following warning:
> >
> > Warning: Cannot modify header information - headers already sent by
(output
> > started at
> >
/home/schoolre/public_html/Hitek/Online/Registratie/registratieFuncties.php:
> > 1) in
> > /home/schoolre/public_html/Hitek/Online/Registratie/registratieData.php
on
> > line 30
> >
> > In registratieData there is a include file to registratieFuncties.php.
And
> > in the file registratieFuncties.php there is a include file to
> > Connecties.inc for the connectiestring to the database
>
> You cannot do any echo ""; before header("location:.."); maybe that's
> the problem.
>
> regards..
>
> pablo

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



[PHP] gzcompress/gzdeflate default compression level?

2003-10-29 Thread Gerard Samuel
The docs do not state what the defaults are, and from tests, 
it seems the values 4 - 9 return the same output as with no value, 
on the string I tested with.
Does anyone know what the default compression levels are?
Thanks

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



Re: [PHP] ORDER BY RAND()....

2003-10-29 Thread Gerard Samuel
On Wednesday 29 October 2003 02:24 pm, Payne wrote:
> Hi,
>
> I have been working on a simple PHP script that called to a mysql
> database, where I  do the following
>
> SELECT url FROM sponsors ORDER BY RAND();

Try ->
SELECT url FROM sponsors ORDER BY RAND() LIMIT 1;

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



Re: [PHP] redirect

2003-10-29 Thread Chris Shiflett
--- alain dhaene <[EMAIL PROTECTED]> wrote:
> Is there in php something as a redirect to another page like in asp?

Yes, and as with ASP, there are several methods.

Make an example script that has only this:

http://www.google.com/'); ?>

As for your error about headers already being sent, this is because you
generate output prior to the call to header(). You can't do this due to a
protocol restriction. The same applies to ASP, although it might buffer output
or something for you.

Hope that helps.

Chris

=
My Blog
 http://shiflett.org/
HTTP Developer's Handbook
 http://httphandbook.org/
RAMP Training Courses
 http://www.nyphp.org/ramp

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



Re: [PHP] redirect

2003-10-29 Thread Chris Shiflett
--- alain dhaene <[EMAIL PROTECTED]> wrote:
> I have check my code.
> I haven't use a echo in my code.
> It's very strange. I will search more on the manule.

I don't think the manual will help you here. You *do* have output in your
script prior to the call to header(). Trust me. :-)

One way to find out is to put this directly above the call to header():

exit;

Then, call the script with your browser, view source, and select all
(control-A). If *anything* is highlighted, even whitespace, then that's your
output. Get rid of it, or buffer it (as per another suggestion).

Hope that helps.

Chris

=
My Blog
 http://shiflett.org/
HTTP Developer's Handbook
 http://httphandbook.org/
RAMP Training Courses
 http://www.nyphp.org/ramp

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



RE: [PHP] redirect

2003-10-29 Thread Chris W. Parker
alain dhaene 
on Wednesday, October 29, 2003 11:29 AM said:

> I have check my code.
> I haven't use a echo in my code.
> It's very strange. I will search more on the manule.

PHP has so far been very good to me with reporting this error. I would
trust the error message and look carefully at the file and line it
reports as being the offender.

"/home/schoolre/public_html/Hitek/Online/Registratie/registratieData.php
on line 30"


Chris.
--
Don't like reformatting your Outlook replies? Now there's relief!
http://home.in.tum.de/~jain/software/outlook-quotefix/

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



Re: [PHP] ORDER BY RAND()....

2003-10-29 Thread Payne
Gerard Samuel wrote:

On Wednesday 29 October 2003 02:24 pm, Payne wrote:
 

Hi,

I have been working on a simple PHP script that called to a mysql
database, where I  do the following
SELECT url FROM sponsors ORDER BY RAND();
   

Try ->
SELECT url FROM sponsors ORDER BY RAND() LIMIT 1;
 

I did that same thing.

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


RE: [PHP] ORDER BY RAND()....

2003-10-29 Thread Chris W. Parker
Payne 
on Wednesday, October 29, 2003 11:54 AM said:

>> Try ->
>> SELECT url FROM sponsors ORDER BY RAND() LIMIT 1;
>> 
>> 
>> 
> I did that same thing.

SELECT url FROM sponsors ORDER BY column RAND() LIMIT 1;

How about that one?



Chris.
--
Don't like reformatting your Outlook replies? Now there's relief!
http://home.in.tum.de/~jain/software/outlook-quotefix/

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



Re: [PHP] Problems with remote include

2003-10-29 Thread Pablo Zorzoli
On Wed, 2003-10-29 at 16:36, Chris Shiflett wrote:
> The results you expect might not be right. This doesn't help me help you.
> 
> Is it valid PHP? Can you show us *exactly* what you see when you view source in
> your browser?

i see one line containing the expected html code.The scrip is a counter
that outputs the img tags to fecth the images:



that's all i get, and all i would like to get with the remote include.

pablo

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



Re: [PHP] Problems with remote include

2003-10-29 Thread Chris Shiflett
--- Pablo Zorzoli <[EMAIL PROTECTED]> wrote:
> i see one line containing the expected html code.The scrip is a
> counter that outputs the img tags to fecth the images:
> 
> 
> 
> that's all i get, and all i would like to get with the remote
> include.

That seems right, unless I'm missing something obvious. I think you already
mentioned that you have configured to allow URL opens. So, can you tell us what
something like this produces?

http://www.google.com/');
?>

That should basically take Google's HTML and make it your own. The image will
obviously not work, but it should otherwise look like Google's home page.

Chris

=
My Blog
 http://shiflett.org/
HTTP Developer's Handbook
 http://httphandbook.org/
RAMP Training Courses
 http://www.nyphp.org/ramp

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



Re: [PHP] Problems with remote include

2003-10-29 Thread Pablo Zorzoli
On Wed, 2003-10-29 at 17:17, Chris Shiflett wrote:
> That seems right, unless I'm missing something obvious. I think you already
> mentioned that you have configured to allow URL opens.

yes that parameter is 'On'

>  So, can you tell us what something like this produces?
> 
>  include('http://www.google.com/');
> ?>
> 
> That should basically take Google's HTML and make it your own. The image will
> obviously not work, but it should otherwise look like Google's home page.

yes i get Google's HTML.

pablo

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



Re: [PHP] gzcompress/gzdeflate default compression level?

2003-10-29 Thread David T-G
Gerard --

...and then Gerard Samuel said...
% 
% The docs do not state what the defaults are, and from tests, 
% it seems the values 4 - 9 return the same output as with no value, 
% on the string I tested with.

With what sort of data are you working?  How are you gzipping (PEAR
module, class, system call, ...)?


% Does anyone know what the default compression levels are?

My gzip man page says it's -6; I'd suspect it would be the same for any
library call.


% Thanks


HTH & HAND

:-D
-- 
David T-G  * There is too much animal courage in 
(play) [EMAIL PROTECTED] * society and not sufficient moral courage.
(work) [EMAIL PROTECTED]  -- Mary Baker Eddy, "Science and Health"
http://justpickone.org/davidtg/  Shpx gur Pbzzhavpngvbaf Qrprapl Npg!



pgp0.pgp
Description: PGP signature


Re: [PHP] redirect

2003-10-29 Thread Marek Kilimajer
alain dhaene wrote:
But I get the following warning:

Warning: Cannot modify header information - headers already sent by (output
started at
/home/schoolre/public_html/Hitek/Online/Registratie/registratieFuncties.php:
1) 
The warning states it clearly, output started on line 1 in 
registratieFuncties.php. Output means any output that is send to the 
browser, and there are many ways you can output something - echo, print, 
anything outside , error ...

in
/home/schoolre/public_html/Hitek/Online/Registratie/registratieData.php on
line 30
In registratieData there is a include file to registratieFuncties.php. And
in the file registratieFuncties.php there is a include file to
Connecties.inc for the connectiestring to the database
Alain



"Gregory Kornblum" <[EMAIL PROTECTED]> schreef in bericht
news:[EMAIL PROTECTED]
ing.com...
header("Location: registratie.html");
That is exactly how you do the PHP version of a response.redirect().
Regards.


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


Re: [PHP] ORDER BY RAND()....

2003-10-29 Thread Payne
Ok, this gives me an error. I guess what I was asking early is there 
away to print an echo without doing myrow? Why can I do echo $result 
without getting Resource id # My thinking is if you look at my first 
e-mail, my code is trying to fetch multi-rows from the database, I don't 
need multi row,  I thinking becaue fetch calls the database multi time 
that it defects the rand() function.

Payne

Chris W. Parker wrote:

Payne 
   on Wednesday, October 29, 2003 11:54 AM said:
 

Try ->
SELECT url FROM sponsors ORDER BY RAND() LIMIT 1;


 

I did that same thing.
   

SELECT url FROM sponsors ORDER BY column RAND() LIMIT 1;

How about that one?



Chris.
--
Don't like reformatting your Outlook replies? Now there's relief!
http://home.in.tum.de/~jain/software/outlook-quotefix/
 

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


Re: [PHP] gzcompress/gzdeflate default compression level?

2003-10-29 Thread Gerard Samuel
On Wednesday 29 October 2003 03:27 pm, David T-G wrote:
> Gerard --
>
> ...and then Gerard Samuel said...
> %
> % The docs do not state what the defaults are, and from tests,
> % it seems the values 4 - 9 return the same output as with no value,
> % on the string I tested with.
>
> With what sort of data are you working?  How are you gzipping (PEAR
> module, class, system call, ...)?

Right now, Im compressing large serialized strings using the php functions 
gzcompress/gzdeflate.

>
> % Does anyone know what the default compression levels are?
>
> My gzip man page says it's -6; I'd suspect it would be the same for any
> library call.

Didn't think to check man pages, but it says the same here, so I guess its 
a good assumption...

Thanks

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



Re: [PHP] gzcompress/gzdeflate default compression level?

2003-10-29 Thread David T-G
Gerard, et al --

...and then Gerard Samuel said...
% 
% On Wednesday 29 October 2003 03:27 pm, David T-G wrote:
% >
% > ...and then Gerard Samuel said...
% > %
% > % on the string I tested with.
% >
% > With what sort of data are you working?  How are you gzipping (PEAR
% > module, class, system call, ...)?
% 
% Right now, Im compressing large serialized strings using the php functions 

That sounds good; you probably have enough material there to get some
good compression, and ASCII is always easy.  So perhaps you may only get
better performance with higher numbers if you have a LOT of data.


% gzcompress/gzdeflate.

OK.


% 
% > % Does anyone know what the default compression levels are?
% >
% > My gzip man page says it's -6; I'd suspect it would be the same for any
% > library call.
% 
% Didn't think to check man pages, but it says the same here, so I guess its 
% a good assumption...

It's a good place to start :-)


% 
% Thanks

Sure thing!


HTH & HAND

:-D
-- 
David T-G  * There is too much animal courage in 
(play) [EMAIL PROTECTED] * society and not sufficient moral courage.
(work) [EMAIL PROTECTED]  -- Mary Baker Eddy, "Science and Health"
http://justpickone.org/davidtg/  Shpx gur Pbzzhavpngvbaf Qrprapl Npg!



pgp0.pgp
Description: PGP signature


[PHP] PDFlib not working with explorer based on PHP created file in memory

2003-10-29 Thread Larry Brown
If anyone can help, please...

I have a page that points to a PHP page that dynamically creates a pdf file
using PDFlib.  The page uses a link such as
site.com/page.php?variable=value.  That in turn executes the script that
uses the variable/value to pull info from the db and generate the page.  The
result is that when you click the link you are prompted to save or open the
document.  By openning the document you are presented with the pdf by
acrobat.  This is seemless with Mozilla.  However, on IE it hangs with the
message "Getting File information:".  If you try to save it you get another
error.  I have read some information indicating that the problem is with the
length parameter not being sent.  However, the page I'm using was off an
example someone provided and it already has what seems to be the fix for
page length.  The code that creates the file is as follows...


$p = PDF_new();
if(PDF_open_file($p, "") == 0) {
die("Error: ".PDF_get_errmsg($p));
}

...body goes here...

PDF_end_page($p);
PDF_close($p);

$buf = PDF_get_buffer($p);
$len = strlen($buf);

header("Content-type: application/pdf");
header("Content-Length: $len");
header("Content-Disposition: inline; filename=filename.pdf");
print $buf;

PDF_delete($p);

Again, this is only a problem with m$ IE.  I know this is one of the largest
toolkits (PDFlib) in use for creating well defined printable documents so I
can't believe that this is not a common problem or that I am doing something
really wrong.

Someone on PDFlib's mailing list once mentioned sending the document for
download via "chunks" instead of getting the length except he wrote
something in C/C++ to accomplish it in his app.  Is there some way to tell
the browser to accept via "chunks" in php?  Does the above header look right
for IE?

Any help would be greatly appreciated...

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



RE: [PHP] PDFlib not working with explorer based on PHP created file in memory

2003-10-29 Thread Larry Brown
My apologies for waisting anyone's time.  I found the posting in the
archives that had the correct code to use.

-Original Message-
From: Larry Brown [mailto:[EMAIL PROTECTED]
Sent: Wednesday, October 29, 2003 3:39 PM
To: PHP List
Subject: [PHP] PDFlib not working with explorer based on PHP created
file in memory


If anyone can help, please...

I have a page that points to a PHP page that dynamically creates a pdf file
using PDFlib.  The page uses a link such as
site.com/page.php?variable=value.  That in turn executes the script that
uses the variable/value to pull info from the db and generate the page.  The
result is that when you click the link you are prompted to save or open the
document.  By openning the document you are presented with the pdf by
acrobat.  This is seemless with Mozilla.  However, on IE it hangs with the
message "Getting File information:".  If you try to save it you get another
error.  I have read some information indicating that the problem is with the
length parameter not being sent.  However, the page I'm using was off an
example someone provided and it already has what seems to be the fix for
page length.  The code that creates the file is as follows...


$p = PDF_new();
if(PDF_open_file($p, "") == 0) {
die("Error: ".PDF_get_errmsg($p));
}

...body goes here...

PDF_end_page($p);
PDF_close($p);

$buf = PDF_get_buffer($p);
$len = strlen($buf);

header("Content-type: application/pdf");
header("Content-Length: $len");
header("Content-Disposition: inline; filename=filename.pdf");
print $buf;

PDF_delete($p);

Again, this is only a problem with m$ IE.  I know this is one of the largest
toolkits (PDFlib) in use for creating well defined printable documents so I
can't believe that this is not a common problem or that I am doing something
really wrong.

Someone on PDFlib's mailing list once mentioned sending the document for
download via "chunks" instead of getting the length except he wrote
something in C/C++ to accomplish it in his app.  Is there some way to tell
the browser to accept via "chunks" in php?  Does the above header look right
for IE?

Any help would be greatly appreciated...

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

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



Re: [PHP] Problems with remote include

2003-10-29 Thread Chris Shiflett
--- Pablo Zorzoli <[EMAIL PROTECTED]> wrote:
> >  > include('http://www.google.com/');
> > ?>
> > 
> > That should basically take Google's HTML and make it your own.
> > The image will obviously not work, but it should otherwise look
> > like Google's home page.
> 
> yes i get Google's HTML.

OK, so this proves that this method works in your environment. Given this, can
you identify the differences between this code and your own? Maybe if you try
to break it down into its simplest case, you will reveal some subtle error that
we all missed.

Hope that helps.

Chris

=
My Blog
 http://shiflett.org/
HTTP Developer's Handbook
 http://httphandbook.org/
RAMP Training Courses
 http://www.nyphp.org/ramp

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



Re: [PHP] gzcompress/gzdeflate default compression level?

2003-10-29 Thread Evan Nemerson
On Wednesday 29 October 2003 11:29 am, Gerard Samuel wrote:
> The docs do not state what the defaults are, and from tests,
> it seems the values 4 - 9 return the same output as with no value,
> on the string I tested with.
> Does anyone know what the default compression levels are?

IIRC the default value is -1, which zlib currently converts to 6.

> Thanks

-- 
Evan Nemerson
[EMAIL PROTECTED]

--
"To think is to differ."

-Clarence Darrow

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



Re: [PHP] gzcompress/gzdeflate default compression level?

2003-10-29 Thread Marek Kilimajer
I think the default is 6, but you will need a very long string to get 
any benefit from higher numbers.

Gerard Samuel wrote:
The docs do not state what the defaults are, and from tests, 
it seems the values 4 - 9 return the same output as with no value, 
on the string I tested with.
Does anyone know what the default compression levels are?
Thanks

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


[PHP] Re: How to deal with XML?

2003-10-29 Thread Alexandru COSTIN
Hello Simon,

I think I've missed something somewhere, but how do I use XML? 
Everywhere, there are big hypes about XML. I could proably google quite 
a bit on this, but could someone give me a hint on how to use it in, say 
datahandling? Or to parse a website (like the php docs).
XML has its role and is not a replacement for the rest of the languages 
or datasources. What we've seen XML usage was for either creating 
communication streams between heterogenous applications (replacing CORBA 
or RMI), or for keeping information in a structured way.

We (InterAKT) use XML in our Krysalis platform for describing a web 
application controller, and also to create a data structure between the 
application logic and the presentation layer.

http://www.interakt.ro/products/Krysalis/

Alexandru

--
Alexandru COSTIN
Chief Operating Officer
http://www.interakt.ro/
+4021 312 5312
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: Web Service in PHP/XML

2003-10-29 Thread Alexandru COSTIN
Hello,
everything was finished.  I have done very little with CURL, I'm not sure if
there are any tutorials or anything else that I could see to get some good
examples of both ends of the process anyone know of any?  Anyone know of a
better way?  I'm also looking into XML or Java on the authorization end but
If you want to use PHP with SOAP, you might also want to read about the 
Krysalis platform here : 
http://www.interakt.ro/products/documentation_10.html

Alexandru

--
Alexandru COSTIN
Chief Operating Officer
http://www.interakt.ro/
+4021 312 5312
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Parsing a tab delimited log file

2003-10-29 Thread John
(I'm reposting this as it didn't seem to take the first time. If it's a
dupe, I apologize.)

Hey all. I'm attempting to count the number of unique message IDs from a
Microsoft Exchange 2000 tracking log. While the code below works, it takes
forever to run. Running through a 16mb log file takes like 10 minutes.

If anyone could suggest a better way of doing this, that would be great.
Also, below the PHP code, is an example of an Exchange tracking log (Which
is tab delimited).

Thanks in advance for the help.

John

Here is the code I'm using:

";
?>

Here is an example of the Exchange tracking logs:

2003-10-26  0:0:35 GMT  10.0.0.1file-server -
Exchange-Server 10.0.0.50   [EMAIL PROTECTED] 1019
[EMAIL PROTECTED]0   0   799
1   2003-10-26 0:0:35 GMT   0   Version: 5.0.2195.5329  -   -
[EMAIL PROTECTED]-

2003-10-26  0:0:35 GMT  10.0.0.1file-server -
Exchange-Server 10.0.0.50   [EMAIL PROTECTED] 1025
[EMAIL PROTECTED]0   0   799
1   2003-10-26 0:0:35 GMT   0   Version: 5.0.2195.5329  -   -
[EMAIL PROTECTED]-

2003-10-26  10:13:43 GMT-   -   -   Exchange-Server -
[EMAIL PROTECTED] 1020
[EMAIL PROTECTED]  0
0   952 1   2003-10-26 10:13:42 GMT 0   -   -   -
[EMAIL PROTECTED]   -

2003-10-26  10:13:43 GMT-   -   SMTP-Server
Exchange-Server -   [EMAIL PROTECTED] 1031
[EMAIL PROTECTED]  0
0   952 1   2003-10-26 10:13:42 GMT 0   -   -   -
[EMAIL PROTECTED]   -

2003-10-26  0:45:59 GMT 192.168.1.2 SMTP-Server.domain.com  -
Exchange-Server 10.0.0.50   [EMAIL PROTECTED] 1019
[EMAIL PROTECTED]  0   015188
1   2003-10-26 0:45:59 GMT  0   Version:
95.5329  -   -   [EMAIL PROTECTED]   -

2003-10-26  0:45:59 GMT 192.168.1.2 SMTP-Server.domain.com  -
Exchange-Server 10.0.0.50   [EMAIL PROTECTED] 1025
[EMAIL PROTECTED]  0   015188
1   2003-10-26 0:45:59 GMT  0   Version:
95.5329  -   -   [EMAIL PROTECTED]   -

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



[PHP] Favorite Online Language Guide

2003-10-29 Thread Robb Kerr
What's your favorite online Php language guide? I'm a newbie and most
interested in a syntax guide.

Thanx,
-- 
Robb Kerr
Digital IGUANA
Helping Digital Artists Achieve their Dreams
http://www.digitaliguana.com
http://www.cancerreallysucks.org

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



Re: [PHP] Problems with remote include

2003-10-29 Thread Marek Kilimajer
Can you connect from your server to the other server?

Pablo Zorzoli wrote:
On Wed, 2003-10-29 at 17:17, Chris Shiflett wrote:

That seems right, unless I'm missing something obvious. I think you already
mentioned that you have configured to allow URL opens.


yes that parameter is 'On'


So, can you tell us what something like this produces?

http://www.google.com/');
?>
That should basically take Google's HTML and make it your own. The image will
obviously not work, but it should otherwise look like Google's home page.


yes i get Google's HTML.

pablo

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


Re: [PHP] Parsing a tab delimited log file

2003-10-29 Thread Evan Nemerson
You're using a lot of memory here... Try using fgets for each line instead of 
one big file(). That way, you're only working with one line at a time and can 
forget it when you're done.


On Wednesday 29 October 2003 01:12 pm, John wrote:
> (I'm reposting this as it didn't seem to take the first time. If it's a
> dupe, I apologize.)
>
> Hey all. I'm attempting to count the number of unique message IDs from a
> Microsoft Exchange 2000 tracking log. While the code below works, it takes
> forever to run. Running through a 16mb log file takes like 10 minutes.
>
> If anyone could suggest a better way of doing this, that would be great.
> Also, below the PHP code, is an example of an Exchange tracking log (Which
> is tab delimited).
>
> Thanks in advance for the help.
>
> John
>
> Here is the code I'm using:
>
>  ini_set("max_execution_time", 1200);
> $filename="20031025.log";
>
> $file=file($filename, "r");
>
> $count=count($file);
>
> $array=array();
>
> //first 6 lines of the log are header and empty lines
> $i=5;
> while ($i<=$count)
> {
>
> $line=explode("\t",$file[$i]);
>
> //the MSGID is always the ninth entry in the array
> $data=$line[9];
>
> //Exchange puts a blank line between each entry in the log file, this
> creates an empty entry in the array
> if (!empty($data))
> {
> if (!in_array ($data, $array))
> $array[]=$data;
> }
>
> $i++;
> }
>
> $arraycount=count($array);
> echo $arraycount,"";
> ?>
>
> Here is an example of the Exchange tracking logs:
>
> 2003-10-26  0:0:35 GMT  10.0.0.1file-server -
> Exchange-Server 10.0.0.50   [EMAIL PROTECTED] 1019
> [EMAIL PROTECTED]0   0   799
> 1   2003-10-26 0:0:35 GMT   0   Version: 5.0.2195.5329  -   -
> [EMAIL PROTECTED]-
>
> 2003-10-26  0:0:35 GMT  10.0.0.1file-server -
> Exchange-Server 10.0.0.50   [EMAIL PROTECTED] 1025
> [EMAIL PROTECTED]0   0   799
> 1   2003-10-26 0:0:35 GMT   0   Version: 5.0.2195.5329  -   -
> [EMAIL PROTECTED]-
>
> 2003-10-26  10:13:43 GMT-   -   -   Exchange-Server -
> [EMAIL PROTECTED] 1020
> [EMAIL PROTECTED]  0
> 0   952 1   2003-10-26 10:13:42 GMT 0   -   -   -
> [EMAIL PROTECTED]   -
>
> 2003-10-26  10:13:43 GMT-   -   SMTP-Server
> Exchange-Server -   [EMAIL PROTECTED] 1031
> [EMAIL PROTECTED]  0
> 0   952 1   2003-10-26 10:13:42 GMT 0   -   -   -
> [EMAIL PROTECTED]   -
>
> 2003-10-26  0:45:59 GMT 192.168.1.2 SMTP-Server.domain.com  -
> Exchange-Server 10.0.0.50   [EMAIL PROTECTED] 1019
> [EMAIL PROTECTED]  0   015188
> 1   2003-10-26 0:45:59 GMT  0   Version:
> 95.5329  -   -   [EMAIL PROTECTED]   -
>
> 2003-10-26  0:45:59 GMT 192.168.1.2 SMTP-Server.domain.com  -
> Exchange-Server 10.0.0.50   [EMAIL PROTECTED] 1025
> [EMAIL PROTECTED]  0   015188
> 1   2003-10-26 0:45:59 GMT  0   Version:
> 95.5329  -   -   [EMAIL PROTECTED]   -

-- 
Evan Nemerson
[EMAIL PROTECTED]

--
"Businesses may come and go, but religion will last forever, for in no other 
endeavor does the consumer blame himself for product failure."

-Harvard Lamphoon

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



Re: [PHP] Favorite Online Language Guide

2003-10-29 Thread Chris Shiflett
--- Robb Kerr <[EMAIL PROTECTED]> wrote:
> What's your favorite online Php language guide?

http://www.php.net/manual/

Chris

=
My Blog
 http://shiflett.org/
HTTP Developer's Handbook
 http://httphandbook.org/
RAMP Training Courses
 http://www.nyphp.org/ramp

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



Re: [PHP] Favorite Online Language Guide

2003-10-29 Thread Evan Nemerson
The php.net site is great. It has a manual in tons of languages which is very 
easy to get at. For instance, to look up the file function, you can just go 
to php.net/file. Your language should be automagically detected. The user 
comments fill in any blanks in the documentation.

php.net/language.basic-syntax has a syntax guide



On Wednesday 29 October 2003 01:40 pm, Robb Kerr wrote:
> What's your favorite online Php language guide? I'm a newbie and most
> interested in a syntax guide.
>
> Thanx,

-- 
Evan Nemerson
[EMAIL PROTECTED]

--
"If you would be a real seeker after truth, you must at least once in your 
life doubt, as far as possible, all things."

-Rene Descartes

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



Re: [PHP] Echo issue RESOLVED!

2003-10-29 Thread Kim Kohen
G'day Adam, David, John etc

>> I have spent about an hour looking at this and have found I can't echo
>> anything with 16 characters or less!

I'm glad to report this is not a PHP issue. It turns out to be a Safari
problem with Mac OSX (Safari was updated with OSX 10.3).

All my PHP stuff is working correctly in IE so it looks like development
will proceed there until Apple gets a fix.

Cheers and many thanks for the replies

kim

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



Re: [PHP] Echo issue RESOLVED!

2003-10-29 Thread Ryan A
If I have said it once I have said it a thousand times..MAC's are evil.
Step away from it and leave the darkness behind.come towards the light
and thePC

:-D

Cheers,
-Ryan
(P.S in case you hav'nt guesseda PC user)



G'day Adam, David, John etc

>> I have spent about an hour looking at this and have found I can't echo
>> anything with 16 characters or less!

I'm glad to report this is not a PHP issue. It turns out to be a Safari
problem with Mac OSX (Safari was updated with OSX 10.3).

All my PHP stuff is working correctly in IE so it looks like development
will proceed there until Apple gets a fix.

Cheers and many thanks for the replies

kim

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

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



Re: [PHP] include problem

2003-10-29 Thread Allex
Few days ago I asked the same question and got several excellent answers 
that helped me to solve the same problem - check the mailing list for 
'including files from different sub directories' on 24-10-2003.

Nevertheless all those suggestions helped me to solve the problem from a 
normal browser point of view, I still have some troubles with avoiding 
the same error messages while editing my php staff, that means the 
development environment which I use (Eclipse + some plugins) can't 
handle the include/require directives correctly.

Perhaps you may face the same issue .. ??

Allex

Pablo S. Torralba wrote:
Hi,

I have a weird problem which must be stupid for sure. I'm trying to do
an include in my code run as a cgi. The include works fine in the
form:
include ("directory/file");

even it works as:

include ("directory/../directory/file");

but it doesn't work as:

include ("./directory/file");

nor

include ("../current/directory/file").

Of course, the obvious thinking is I have a perms problem but they are
the same for '.' and for 'directory' so it makes no sense for me (755
if you wonder).
If I execute the script it works without problem but it doesn't upon
web request reporting:
Warning: main(./db/db.tables.php) [function.main]: failed to create stream: No 
such file or directory in /home/psanchez/tests/hola.php on line 8

Warning: main() [function.main]: Failed opening './db/db.tables.php' for 
inclusion (include_path='.') in /home/psanchez/tests/hola.php on line 8

I need to know what the problem is because I have a software that
should work but it doesn't.
Any ideas?

Thanks

Pablo S. Torralba

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


  1   2   >