php-general Digest 22 Jun 2002 11:19:39 -0000 Issue 1420

Topics (messages 103345 through 103390):

Very slow pg access
        103345 by: Uros Gruber

addslashes
        103346 by: OMAR IGNACIO CAMPOS GALAN
        103350 by: Nick Wilson
        103354 by: Chris Shiflett
        103390 by: Jason Wong

header("Location  with & in URL
        103347 by: Tom Beidler
        103348 by: Nick Wilson
        103349 by: Richard Baskett
        103352 by: Chris Shiflett
        103355 by: Tom Beidler

Re: recommend any good learning books
        103351 by: Chris Shiflett
        103357 by: César Aracena
        103364 by: Manuel Lemos

Re: imap support breaking...
        103353 by: Danny Shepherd

Emulating HTTP File Uploads
        103356 by: Georgie Casey
        103389 by: Morten Winther

Upgraded and now apache just dies
        103358 by: Patrick Aland
        103359 by: Rasmus Lerdorf
        103360 by: Patrick Aland
        103361 by: Rasmus Lerdorf
        103362 by: Billy S Halsey
        103365 by: Patrick Aland
        103366 by: Billy S Halsey
        103367 by: Patrick Aland
        103368 by: Billy S Halsey

mass sql update array
        103363 by: Daniel Hoffman
        103369 by: John Holmes

Re: Architecture problem? Google want index files exept the main page.
        103370 by: olinux

PHP 4.2.1 reading PAM/Shadowed password
        103371 by: Matthew Nock

Re: some one PLEASE help me!
        103372 by: Tom Rogers
        103373 by: Julie Meloni
        103374 by: Tom Rogers

Re: OSX + Apache + PHP + MySQL
        103375 by: Joshua Alexander
        103379 by: Michael Zornek

Weird error!!
        103376 by: Pag

Re: Resoltuion
        103377 by: Justin French

Re: Accessing a form variable before the form is posted
        103378 by: Ma Siva Kumar

emailing html file
        103380 by: M.E. Suliman

Re: Cc / Bcc don't work on win2k but on linux???
        103381 by: Christoph Grottolo
        103387 by: Lance

Re: any reason why mail() returns a false value?
        103382 by: Paul Roberts

mailing list program?
        103383 by: savaidis
        103388 by: M.E. Suliman

Replacing by soundex?
        103384 by: Leif K-Brooks

Check colorspace of image: cmyk vs rgb
        103385 by: Morten Winther

Kill me please(PHP)
        103386 by: r.no7.biz

Administrivia:

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

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

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


----------------------------------------------------------------------
--- Begin Message ---
Hi!

i made some benchmarks because my script is somehow very
slow. In this script i execute 3 queries to PostgreSQL server
and one connect string. I connect to socket.

I check this queries in pg with explain analyze and i have
result 1.18ms so i add a little and let say that for those 3
queries need 2ms. (1 simple select, 1 delete, 1 insert)


When i check from PHP i use microtime() to check times.

Here is results

0.0443  for connect
0.0343  1 query    delete
0.0034  2 query    select
0.0049  3 query    THIS ONE is INSERT OR UPDATE

0.087 TOTAL

so complete time is about 0.090 s this is 90ms against 2ms. I
thik that this is not normal. or is PHP so slow or there is
something wrong with libraries

I use PHP 4.1.2 and pg 7.2.1

Any thoughts.

-- 
tia,
 Uros                          mailto:[EMAIL PROTECTED]

--- End Message ---
--- Begin Message ---
When I use addslashes to add a back slash to a single quote, it returns 3
back slashes (example: 'it\\\'s'. Is that correct? Am I doing something
wrong?

Thank you

Omar Campos Galán
Desarrollo de Formas Electrónicas
CompuSoluciones
Tel. (0133) 3818-1554  Fax (0133) 3818-1599
www.compusoluciones.com

--- End Message ---
--- Begin Message ---
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


* and then OMAR IGNACIO CAMPOS GALAN declared....
> When I use addslashes to add a back slash to a single quote, it returns 3
> back slashes (example: 'it\\\'s'. Is that correct? Am I doing something
> wrong?

You're doing something wrong ;-)
I'll bet that what's happening is that you are not using stripslashes()
when you re-use the var and that is causing the multiple slashes.

If you don't get what what I just said, post your code.... and i'll have
a bash at it..

- -- 
Nick Wilson     //  www.explodingnet.com



-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)

iD8DBQE9E7j9HpvrrTa6L5oRAls4AKCUHWuBR4Mc/1AOeTrK78u7hprmIACgmkp4
4nGyjyvNNU4ygKueRz9rF8U=
=A5+j
-----END PGP SIGNATURE-----
--- End Message ---
--- Begin Message ---
PHP is probably escaping the single quotes for you:

it's -> it\'s

When addslashes() is applied to this, both the backslash character and 
the single quote are escaped:

\ -> \\
' -> \'

The result is what you see:

it\'s -> it\\\'s

If you strip slashes twice, you'll be back to normal.

Chris


>>When I use addslashes to add a back slash to a single quote, it returns 3
>>back slashes (example: 'it\\\'s'. Is that correct? Am I doing something
>>wrong?
>>    
>>

--- End Message ---
--- Begin Message ---
On Saturday 22 June 2002 07:42, Chris Shiflett wrote:
> PHP is probably escaping the single quotes for you:
>
> it's -> it\'s
>
> When addslashes() is applied to this, both the backslash character and
> the single quote are escaped:
>
> \ -> \\
> ' -> \'
>
> The result is what you see:
>
> it\'s -> it\\\'s
>
> If you strip slashes twice, you'll be back to normal.
>
> Chris
>
> >>When I use addslashes to add a back slash to a single quote, it returns 3
> >>back slashes (example: 'it\\\'s'. Is that correct? Am I doing something
> >>wrong?

PHP is probably configured to automatically add the slashes. Look in php.ini 
for 'magic_quotes' and set accordingly.

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *

/*
It isn't easy being the parent of a six-year-old.  However, it's a pretty 
small
price to pay for having somebody around the house who understands computers.
*/

--- End Message ---
--- Begin Message ---
I'm trying to use header("Location to redirect to a URL that has variables
in it, ie.

http://www.blah.com/phones.php?phn_indvId=1&phn_indvType=client

When it redirects I get the url minus everything after the first ampersand.
I tried using htmlentities with no joy like so...

$retUrl = htmlspecialchars ($retUrl);

if ($retUrl != "") {
    header("Location: " . $retUrl);

Any ideas?

--- End Message ---
--- Begin Message ---
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


* and then Tom Beidler declared....
> I'm trying to use header("Location to redirect to a URL that has variables
> in it, ie.
> 
> http://www.blah.com/phones.php?phn_indvId=1&phn_indvType=client
> 
> When it redirects I get the url minus everything after the first ampersand.
> I tried using htmlentities with no joy like so...


Hmmm... I use this all the time on a site I'm working on (part time
personal site) and I have no trouble.

header("Location: $PHP_SELF?id=$id&auth=34");


- -- 
Nick Wilson     //  www.explodingnet.com



-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)

iD8DBQE9E7h9HpvrrTa6L5oRArZUAJ9zjpmnM4yHziKzrOIYstNCar+HMgCgoFyV
aKiQ2qZDr5AIEbcQQYEtmCw=
=ubon
-----END PGP SIGNATURE-----
--- End Message ---
--- Begin Message ---
I do this all the time and I just use this syntax:

header("Location: 
http://www.blah.com/phones.php?phn_indvId=1&phn_indvType=client";);
exit;

And it works for me...

Rick

"The greater danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it." - Michelangelo

> From: Tom Beidler <[EMAIL PROTECTED]>
> Date: Fri, 21 Jun 2002 16:22:20 -0700
> To: php list <[EMAIL PROTECTED]>
> Subject: [PHP] header("Location  with & in URL
> 
> I'm trying to use header("Location to redirect to a URL that has variables
> in it, ie.
> 
> http://www.blah.com/phones.php?phn_indvId=1&phn_indvType=client
> 
> When it redirects I get the url minus everything after the first ampersand.
> I tried using htmlentities with no joy like so...
> 
> $retUrl = htmlspecialchars ($retUrl);
> 
> if ($retUrl != "") {
>   header("Location: " . $retUrl);
> 
> Any ideas?
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 

--- End Message ---
--- Begin Message ---
Tom,

Include the $returl variable within the quotes, like this:

header("Location: $returl");

If that doesn't work, add these two lines just before the header() function:

echo "<h1>[$returl]</h1>";
exit;

Maybe that will uncover something.

Chris

Tom Beidler wrote:

>I'm trying to use header("Location to redirect to a URL that has variables
>in it, ie.
>
>http://www.blah.com/phones.php?phn_indvId=1&phn_indvType=client
>
>When it redirects I get the url minus everything after the first ampersand.
>I tried using htmlentities with no joy like so...
>
>$retUrl = htmlspecialchars ($retUrl);
>
>if ($retUrl != "") {
>    header("Location: " . $retUrl);
>  
>

--- End Message ---
--- Begin Message ---
Nope, doesn't work.

Maybe it's something with the server/PHP setup?

> From: Richard Baskett <[EMAIL PROTECTED]>
> Date: Fri, 21 Jun 2002 16:35:11 -0700
> To: Tom Beidler <[EMAIL PROTECTED]>, PHP General
> <[EMAIL PROTECTED]>
> Subject: Re: [PHP] header("Location  with & in URL
> 
> I do this all the time and I just use this syntax:
> 
> header("Location:
> http://www.blah.com/phones.php?phn_indvId=1&phn_indvType=client";);
> exit;
> 
> And it works for me...
> 
> Rick
> 
> "The greater danger for most of us is not that our aim is too high and we
> miss it, but that it is too low and we reach it." - Michelangelo
> 
>> From: Tom Beidler <[EMAIL PROTECTED]>
>> Date: Fri, 21 Jun 2002 16:22:20 -0700
>> To: php list <[EMAIL PROTECTED]>
>> Subject: [PHP] header("Location  with & in URL
>> 
>> I'm trying to use header("Location to redirect to a URL that has variables
>> in it, ie.
>> 
>> http://www.blah.com/phones.php?phn_indvId=1&phn_indvType=client
>> 
>> When it redirects I get the url minus everything after the first ampersand.
>> I tried using htmlentities with no joy like so...
>> 
>> $retUrl = htmlspecialchars ($retUrl);
>> 
>> if ($retUrl != "") {
>> header("Location: " . $retUrl);
>> 
>> Any ideas?
>> 
>> 
>> -- 
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>> 
> 
> 

--- End Message ---
--- Begin Message ---
I think Ramus's recent book, _Programming_PHP_ (O'Reilly), is quite a 
good introduction to the language and teaches some good fundamentals 
about the way PHP works as well.

Chris

[EMAIL PROTECTED] wrote:

>I am coming over from Perl life.  Does anyone recommend any good beginners
>books on learning PHP?  I am looking for something similar too learning
>perl from Oreily.
>Thanks
>
>
>
>
>  
>


--- End Message ---
--- Begin Message ---
Hi. I started with PHP and MySQL from scratch (not knowing serious
programming before) a couple of months ago with the books "PHP4 A
beginner's Guide" written by Bill McCarty (Osborne) and "PHP and MySQL
Web Development" written by Luke Welling and Laura Thomson (SAMS).

The first one, covers I think all there is to get you started with PHP
from zip (like me), but since you've been programming before, I would
suggest you to jump right into the second one, which contains a very2
well step-by-step guidance trough PHP (once again, specially if you are
a programmer), a well done explanation on RDBMs, making emphasis in
MySQL but what's great about this book, is that it makes explanations of
everything from easy to complex coding by using real life examples like
shopping carts, user authentication systems and a web-based e-mail
service among others.

One more thing... the second book comes with a CD containing all the
coding included in the book, but also a "soft" copy of the entire book
made in PDF, so you can fast search for any quick need.

Hope this helps you. I found them in www.amazon.com and got them in
Argentina in no time at all. Go there to see other books and choices
people have taken.

C.

> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Friday, June 21, 2002 6:00 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] recommend any good learning books
> 
> I am coming over from Perl life.  Does anyone recommend any good
beginners
> books on learning PHP?  I am looking for something similar too
learning
> perl from Oreily.
> Thanks
> 
> 
> 
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php

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

On 06/21/2002 05:59 PM, [EMAIL PROTECTED] wrote:
> I am coming over from Perl life.  Does anyone recommend any good beginners
> books on learning PHP?  I am looking for something similar too learning
> perl from Oreily.

Here you may find some PHP books already reviewed. Not every one is 
quite for beginners but they are still recommendable:

http://www.phpclasses.org/products.html/latest/latest.html

-- 

Regards,
Manuel Lemos

--- End Message ---
--- Begin Message ---
I got that error once - turned out that I'd forgotten to compile the IMAP
lib with SSL support. Try recompiling your IMAP libs and then recompiling
everything else.

Danny.
FreeBSD 4.5/Apache 1.3.26/PHP4.2.1

----- Original Message -----
From: "Rick Kukiela" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, June 19, 2002 7:58 PM
Subject: [PHP] imap support breaking...


> I couldn't get sessions working on my old broke install so i formatted and
> im redoing everything... this time i want to incorporate IMAP support so i
> can run IMP on my server. I'm compiling PHP 4.2.1 with Apache 1.3.26 with
> mod_ssl and mod_perl and when mod_perl is building apache I get this
error:
>
> modules/php4/libphp4.a(php_imap.o): In function `zm_startup_imap':
> /usr/local/src/php-4.2.1/ext/imap/php_imap.c(.text+0x353): undefined
> reference
> o `ssl_onceonlyinit'
> *** Error code 1
>
> Stop in /usr/local/src/apache_1.3.26/src.
> *** Error code 1
>
> Stop in /usr/local/src/apache_1.3.26.
> *** Error code 1
>
> Stop in /usr/local/src/apache_1.3.26.
> *** Error code 1
>
> Stop in /usr/local/src/mod_perl-1.27.
>
> anyone know? i searched google groups and only found people asking about
> this problem but no one responding to it...
>
> Thanks,
> Rick
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

--- End Message ---
--- Begin Message ---
Does anyone know how to upload a file through PHP through the HTT interface.
I use fopen() to open remote php scripts using the GET method for non-file
uploads but it doesnt work with HTTP POST or file uploads.

Does anyone have any ideas?

--
Regards,
Georgie Casey
[EMAIL PROTECTED]

***************************
http://www.filmfind.tv
Online Film Production Directory
***************************


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

"Georgie Casey" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Does anyone know how to upload a file through PHP through the HTT
interface.
> I use fopen() to open remote php scripts using the GET method for non-file
> uploads but it doesnt work with HTTP POST or file uploads.
>
> Does anyone have any ideas?

http://www.php.net/manual/en/ref.curl.php

/ morten


--- End Message ---
--- Begin Message ---
Hey all,
  I just upgraded to 4.2.1 on apache 1.3.26 and now apache won't start.
If I comment out the LoadModule in the httpd.conf apache starts fine,
otherwise it just starts and exits almost like it can't fork. I don't
get any error messages.

Running on Solaris 7 with gcc 3.1
I use postgres but have tried compiling without it also to see if that
was it.

Any help would be appreciated.

Thanks.


-- 
------------------------------------------------------------
 Patrick Aland                          [EMAIL PROTECTED]
 Network Administrator                  Voice: 386.822.7217
 Stetson University                     Fax: 386.822.7367
------------------------------------------------------------
--- End Message ---
--- Begin Message ---
Without the actual error message, there is nothing we can do.

On Fri, 21 Jun 2002, Patrick Aland wrote:

> Hey all,
>   I just upgraded to 4.2.1 on apache 1.3.26 and now apache won't start.
> If I comment out the LoadModule in the httpd.conf apache starts fine,
> otherwise it just starts and exits almost like it can't fork. I don't
> get any error messages.
>
> Running on Solaris 7 with gcc 3.1
> I use postgres but have tried compiling without it also to see if that
> was it.
>
> Any help would be appreciated.
>
> Thanks.
>
>
> --
> ------------------------------------------------------------
>  Patrick Aland                          [EMAIL PROTECTED]
>  Network Administrator                  Voice: 386.822.7217
>  Stetson University                     Fax: 386.822.7367
> ------------------------------------------------------------
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

--- End Message ---
--- Begin Message ---
Thats the thing. There is no error message. apachectl start says that
apache started. However when you look there are not httpd processes
running. I comment out the load module and it works. 

Theres nothing in the apache error logs either. Is there some way to
increase the debugging?


On Fri, Jun 21, 2002 at 06:14:21PM -0700, Rasmus Lerdorf wrote:
> Without the actual error message, there is nothing we can do.
> 
> On Fri, 21 Jun 2002, Patrick Aland wrote:
> 
> > Hey all,
> >   I just upgraded to 4.2.1 on apache 1.3.26 and now apache won't start.
> > If I comment out the LoadModule in the httpd.conf apache starts fine,
> > otherwise it just starts and exits almost like it can't fork. I don't
> > get any error messages.
> >
> > Running on Solaris 7 with gcc 3.1
> > I use postgres but have tried compiling without it also to see if that
> > was it.
> >
> > Any help would be appreciated.
> >
> > Thanks.
> >
> >
> > --
> > ------------------------------------------------------------
> >  Patrick Aland                          [EMAIL PROTECTED]
> >  Network Administrator                  Voice: 386.822.7217
> >  Stetson University                     Fax: 386.822.7367
> > ------------------------------------------------------------
> >
> > --
> > 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

-- 
------------------------------------------------------------
 Patrick Aland                          [EMAIL PROTECTED]
 Network Administrator                  Voice: 386.822.7217
 Stetson University                     Fax: 386.822.7367
------------------------------------------------------------
--- End Message ---
--- Begin Message ---
Not really, no. You can run httpd directly from within gdb and see what it
says.  Otherwise I would suggest recompiling both Apache and PHP from
scratch.

The combination of Apache 1.3.26 and PHP 4.2.1 works fine.

-Rasmus


On Fri, 21 Jun 2002, Patrick Aland wrote:

> Thats the thing. There is no error message. apachectl start says that
> apache started. However when you look there are not httpd processes
> running. I comment out the load module and it works.
>
> Theres nothing in the apache error logs either. Is there some way to
> increase the debugging?
>
>
> On Fri, Jun 21, 2002 at 06:14:21PM -0700, Rasmus Lerdorf wrote:
> > Without the actual error message, there is nothing we can do.
> >
> > On Fri, 21 Jun 2002, Patrick Aland wrote:
> >
> > > Hey all,
> > >   I just upgraded to 4.2.1 on apache 1.3.26 and now apache won't start.
> > > If I comment out the LoadModule in the httpd.conf apache starts fine,
> > > otherwise it just starts and exits almost like it can't fork. I don't
> > > get any error messages.
> > >
> > > Running on Solaris 7 with gcc 3.1
> > > I use postgres but have tried compiling without it also to see if that
> > > was it.
> > >
> > > Any help would be appreciated.
> > >
> > > Thanks.
> > >
> > >
> > > --
> > > ------------------------------------------------------------
> > >  Patrick Aland                          [EMAIL PROTECTED]
> > >  Network Administrator                  Voice: 386.822.7217
> > >  Stetson University                     Fax: 386.822.7367
> > > ------------------------------------------------------------
> > >
> > > --
> > > 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
>
> --
> ------------------------------------------------------------
>  Patrick Aland                          [EMAIL PROTECTED]
>  Network Administrator                  Voice: 386.822.7217
>  Stetson University                     Fax: 386.822.7367
> ------------------------------------------------------------
>

--- End Message ---
--- Begin Message ---
Patrick,

Try running it thus:

truss -f apachectl start

That should tell you where it's dying.

[billy]

-- 


/---------------------------------------------=[ BILLY S HALSEY ]=--\
| Member of Technical Staff, Sun Microsystems, Inc. ESP Solaris SW  |
| "All opinions and technical advice offered in this message are my |
| own and not necessarily endorsed by my employer."                 |
\--=[ [EMAIL PROTECTED] ]=--------------------------------------------/

--- End Message ---
--- Begin Message ---
Thanks. 

I was running it without the -f and not getting much.

Running a truss -f httpd I get the normal first process that forks and
then on the second process I get:

29958:  fcntl(8, F_SETFD, 0x00000001)                   = 0
29958:  door_info(8, 0xFF23A460)                        Err#9 EBADF
29958:  close(8)                                        = 0
29958:      Incurred fault #6, FLTBOUNDS  %pc = 0xFF0CF8F4
29958:        siginfo: SIGSEGV SEGV_MAPERR addr=0xFF0CF8F4
29958:      Received signal #11, SIGSEGV [caught]
29958:        siginfo: SIGSEGV SEGV_MAPERR addr=0xFF0CF8F4
29958:  sysconfig(_CONFIG_SIGRT_MIN)                    = 38
29958:  sigprocmask(SIG_SETMASK, 0xFF16BEF0, 0x00000000) = 0
29958:  sigaction(SIGSEGV, 0xFFBECCD8, 0x00000000)      = 0
29958:  sysconfig(_CONFIG_SIGRT_MIN)                    = 38
29958:  setcontext(0xFFBECE20)
29958:      Incurred fault #6, FLTBOUNDS  %pc = 0xFF0CF8F4
29958:        siginfo: SIGSEGV SEGV_MAPERR addr=0xFF0CF8F4
29958:      Received signal #11, SIGSEGV [default]
29958:        siginfo: SIGSEGV SEGV_MAPERR addr=0xFF0CF8F4
29958:          *** process killed ***

Any ideas?


On Fri, Jun 21, 2002 at 06:21:14PM -0700, Billy S Halsey wrote:
> Patrick,
> 
> Try running it thus:
> 
> truss -f apachectl start
> 
> That should tell you where it's dying.
> 
> [billy]
> 
> -- 
> 
> 
> /---------------------------------------------=[ BILLY S HALSEY ]=--\
> | Member of Technical Staff, Sun Microsystems, Inc. ESP Solaris SW  |
> | "All opinions and technical advice offered in this message are my |
> | own and not necessarily endorsed by my employer."                 |
> \--=[ [EMAIL PROTECTED] ]=--------------------------------------------/

-- 
------------------------------------------------------------
 Patrick Aland                          [EMAIL PROTECTED]
 Network Administrator                  Voice: 386.822.7217
 Stetson University                     Fax: 386.822.7367
------------------------------------------------------------
--- End Message ---
--- Begin Message ---
You need to paste a little more of the output. Looks like it's got a 
problem trying to close file descriptor 8. If you scroll up a bit more, 
you'll see a call to open() with a return value of 8. That will show the 
file it is trying to open and then close. For some reason it appears 
that it is able to open the file, but not close it.

Without seeing more, that's all I can really say.

[billy]

-- 


/---------------------------------------------=[ BILLY S HALSEY ]=--\
| Member of Technical Staff, Sun Microsystems, Inc. ESP Solaris SW  |
| "All opinions and technical advice offered in this message are my |
| own and not necessarily endorsed by my employer."                 |
\--=[ [EMAIL PROTECTED] ]=--------------------------------------------/

--- End Message ---
--- Begin Message ---
Sorry bout that;

http://www.stetson.edu/~paland/phptruss.txt


On Fri, Jun 21, 2002 at 06:44:28PM -0700, Billy S Halsey wrote:
> You need to paste a little more of the output. Looks like it's got a 
> problem trying to close file descriptor 8. If you scroll up a bit more, 
> you'll see a call to open() with a return value of 8. That will show the 
> file it is trying to open and then close. For some reason it appears 
> that it is able to open the file, but not close it.
> 
> Without seeing more, that's all I can really say.
> 
> [billy]
> 
> -- 
> 
> 
> /---------------------------------------------=[ BILLY S HALSEY ]=--\
> | Member of Technical Staff, Sun Microsystems, Inc. ESP Solaris SW  |
> | "All opinions and technical advice offered in this message are my |
> | own and not necessarily endorsed by my employer."                 |
> \--=[ [EMAIL PROTECTED] ]=--------------------------------------------/
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php

-- 
------------------------------------------------------------
 Patrick Aland                          [EMAIL PROTECTED]
 Network Administrator                  Voice: 386.822.7217
 Stetson University                     Fax: 386.822.7367
------------------------------------------------------------
--- End Message ---
--- Begin Message ---
Oops, I spoke too quickly. The problem isn't with the close, it's with 
the door_info() syscall. Perhaps file descriptor 8 isn't a door ...

[billy]

-- 


/---------------------------------------------=[ BILLY S HALSEY ]=--\
| Member of Technical Staff, Sun Microsystems, Inc. ESP Solaris SW  |
| "All opinions and technical advice offered in this message are my |
| own and not necessarily endorsed by my employer."                 |
\--=[ [EMAIL PROTECTED] ]=--------------------------------------------/

--- End Message ---
--- Begin Message ---
I am playing with php and mysql.

I need to do a mass select from a database that will return in excess of 250
records each with 3 fields. Only one field will be available for update.
They are currently held within standard http forms ready for a submit.

I then need to do an update of each record that has changed.

I really need some help on how to do this.

Help off list would be appreciated.


- Daniel

--- End Message ---
--- Begin Message ---
Can you add a checkbox to say "update this row", then just check for
checked checkboxes....??

---John Holmes...

> -----Original Message-----
> From: Daniel Hoffman [mailto:[EMAIL PROTECTED]]
> Sent: Friday, June 21, 2002 9:28 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] mass sql update array
> 
> I am playing with php and mysql.
> 
> I need to do a mass select from a database that will return in excess
of
> 250
> records each with 3 fields. Only one field will be available for
update.
> They are currently held within standard http forms ready for a submit.
> 
> I then need to do an update of each record that has changed.
> 
> I really need some help on how to do this.
> 
> Help off list would be appreciated.
> 
> 
> - Daniel
> 
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php


--- End Message ---
--- Begin Message ---
Not sure what you are doing, but google is not going
to index pages that require authentication. You should
send the 200 header before any script output - i'm not
sure what this will do to your authentication
scheme...

I do the same with the false directory structure - in
my case i have a script 'news' (with no extension) and
use the apache's ForceType to force this file to be
parsed. url is something like this
website.com/news/category/year/month/day/article_id.htm
- check out Tim Perdue's article on www.phpbuilder.com

olinux

--- Andy <[EMAIL PROTECTED]> wrote:
> Hi,
> 
> I am not using a 404 in this case. What I do is to
> name a file like a
> directory name and then parse this file with php.
> The parameters look like
> the filename.
> 
> e.g. server.com/file/parameter.html
> 
> In an other case I do use a 401 error. What is
> changing if I send this ok
> header? And when should I send it?
> 
> Andy
> 
> 
> --
> ----------------------------------------------------
> http://www.globosapiens.net
> Global Travellers Network!
> 
> 
> 
> "Olinux" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
>
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > Are you using a 404 error to generate those deeper
> > pages?
> >
> > If so you will want to send an OK header:
> >
> > header('HTTP/1.1 200 OK');
> >
> > olinux
> >
> >
> > --- Andy <[EMAIL PROTECTED]> wrote:
> > > Hi guys,
> > >
> > > I did recently launch my first web site and I am
> > > asking myself why google is
> > > only indexing the first page.
> > > To get a better index on other search engines I
> am
> > > passing parameters a bit
> > > strange and the dynamic pages
> > > look more like static ones. So I hope this was
> not a
> > > shoot in a hole :-(
> > >
> > > I am getting the parameters from the url and
> decode
> > > them after a certain
> > > key. The file looks to the visitor like
> > > it is a directory while I am forcing apache to
> parse
> > > it with php.
> > >
> > > So this is the first day google is indexing it,
> but
> > > as I said I tryed to
> > > search the site with google site search and it
> > > does only find the first page.
> > >
> > > A site like:
> > >
> >
>
http://www.globosapiens.net/profiles/A0000002021.html
> > >
> > > is not indexed at all!!
> > >
> > > Did I go the wrong path, or what else is going
> on?
> > > Thank you for any help,
> > >
> > > Andy
> > >
> > > --
> > >
> ----------------------------------------------------
> > > http://www.globosapiens.net
> > > Global Travellers Network!
> > >
> > >
> > >
> > >
> > >
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, visit:
> http://www.php.net/unsub.php
> > >
> >
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Yahoo! - Official partner of 2002 FIFA World Cup
> > http://fifaworldcup.yahoo.com
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


__________________________________________________
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com
--- End Message ---
--- Begin Message ---
Hi All,

I am trying to build a "client interface" for each of my web-hosting
customers, and would like to have them log into the system using the same
username/password combinations that are used for FTP, email etc.

ie: those stored in the Unix system's passwd and shadow passwd files.

I have seen a number of different methods for doing this, all of which seem
a little messy.

Obviously, the system allows you to do it - i have seen apache work with
this file for example.  Any tips on where to look for info/help etc?

--- End Message ---
--- Begin Message ---
At 01:09 PM 21/06/2002 -0500, Rick Kukiela wrote:
>Ok, I have never, in my entire life, have such a persistant little freakin
>problem with a programming language... It started out while i was running
>4.1.2 where sessions would not write to the disk properly. I researched and
>found a bug. I couldnt get php properly upgraded... dont know why so i had
>to whip out the whole system and start from scratch. After doing this I am
>now running Apache 1.3.26, php 4.2.1 and the os is Freebsd 4.6-Release,
>platform i386.
>
>I just want to do some simple authentication with sessions so this is the
>session code in the script:
>
>   $start_time = mktime();
>   error_reporting(2047);
>   session_start();
>   session_register("encrypted");
>   session_register("user");
>   session_register("start_time");
>   session_register("cdomain");
>   session_write_close();
>   header("Location: blalbalballafdskljf");
>
>i even tried that same code but instead of using session_register i assigned
>the vars manually by doing like $_SESSION['encrypted'] = $encrypted; but
>that produced the same errors as using session_register.
>
>I tried with reg_globals on and off. no difference.
>
>Its set to write in the /tmp directory which has the following permissions.
>
>drwxrwxrwt   3 root     wheel         512 Jun 21 13:00 tmp
>
>I also tried changing it to /usr/local/apache/sessions which has the
>permissions:
>
>drwxrwxrwx   3 nobody  nobody         512 Jun 21 12:36 sessions
>
>Nothing works NOTHING AT ALL, i cant get this shit to work for the life of
>me and its really irritating. apache error_logs report NOTHING at all and if
>php has its own log i have no idea where it is.....
>
>Even if you cant directly tell me what the problem is, if there is a way to
>even find out what could be causeing it please let me know, this is killing
>me.
>
>Oh and here is the output i get when i run the script.
>
>--------
>Warning: Failed to write session data (files). Please verify that the
>current setting of session.save_path is correct (/tmp) in
>/usr/local/apache/htdocs/cp/login.php on line 43


This below is your problem, you must be outputting white space so it can't 
set the session cookie.
Tom

>Warning: Cannot add header information - headers already sent by (output
>started at /usr/local/apache/htdocs/cp/login.php:43) in
>/usr/local/apache/htdocs/cp/login.php on line 45
>
>---------
>Thanks
>Rick
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php

--- End Message ---
--- Begin Message ---
>>Oh and here is the output i get when i run the script.
>>
>>--------
>>Warning: Failed to write session data (files). Please verify that the
>>current setting of session.save_path is correct (/tmp) in
>>/usr/local/apache/htdocs/cp/login.php on line 43


TR> This below is your problem, you must be outputting white space so it can't 
TR> set the session cookie.
TR> Tom

>>Warning: Cannot add header information - headers already sent by (output
>>started at /usr/local/apache/htdocs/cp/login.php:43) in
>>/usr/local/apache/htdocs/cp/login.php on line 45

Actually, it's not (but good helping!).  Because there's an error
before -- his system's failure to write the session -- the warning is
the output that is referenced afterwards.  First error is the actual
problem.


- Julie

--> Julie Meloni
--> [EMAIL PROTECTED]
--> www.thickbook.com

Find "Sams Teach Yourself MySQL in 24 Hours" at
http://www.amazon.com/exec/obidos/ASIN/0672323494/thickbookcom-20

--- End Message ---
--- Begin Message ---
Ignore me ..I just got up :)

Tom

At 01:09 PM 22/06/2002 +1000, Tom Rogers wrote:
>At 01:09 PM 21/06/2002 -0500, Rick Kukiela wrote:
>>Ok, I have never, in my entire life, have such a persistant little freakin
>>problem with a programming language... It started out while i was running
>>4.1.2 where sessions would not write to the disk properly. I researched and
>>found a bug. I couldnt get php properly upgraded... dont know why so i had
>>to whip out the whole system and start from scratch. After doing this I am
>>now running Apache 1.3.26, php 4.2.1 and the os is Freebsd 4.6-Release,
>>platform i386.
>>
>>I just want to do some simple authentication with sessions so this is the
>>session code in the script:
>>
>>   $start_time = mktime();
>>   error_reporting(2047);
>>   session_start();
>>   session_register("encrypted");
>>   session_register("user");
>>   session_register("start_time");
>>   session_register("cdomain");
>>   session_write_close();
>>   header("Location: blalbalballafdskljf");
>>
>>i even tried that same code but instead of using session_register i assigned
>>the vars manually by doing like $_SESSION['encrypted'] = $encrypted; but
>>that produced the same errors as using session_register.
>>
>>I tried with reg_globals on and off. no difference.
>>
>>Its set to write in the /tmp directory which has the following permissions.
>>
>>drwxrwxrwt   3 root     wheel         512 Jun 21 13:00 tmp
>>
>>I also tried changing it to /usr/local/apache/sessions which has the
>>permissions:
>>
>>drwxrwxrwx   3 nobody  nobody         512 Jun 21 12:36 sessions
>>
>>Nothing works NOTHING AT ALL, i cant get this shit to work for the life of
>>me and its really irritating. apache error_logs report NOTHING at all and if
>>php has its own log i have no idea where it is.....
>>
>>Even if you cant directly tell me what the problem is, if there is a way to
>>even find out what could be causeing it please let me know, this is killing
>>me.
>>
>>Oh and here is the output i get when i run the script.
>>
>>--------
>>Warning: Failed to write session data (files). Please verify that the
>>current setting of session.save_path is correct (/tmp) in
>>/usr/local/apache/htdocs/cp/login.php on line 43
>
>
>This below is your problem, you must be outputting white space so it can't 
>set the session cookie.
>Tom
>
>>Warning: Cannot add header information - headers already sent by (output
>>started at /usr/local/apache/htdocs/cp/login.php:43) in
>>/usr/local/apache/htdocs/cp/login.php on line 45
>>
>>---------
>>Thanks
>>Rick
>>
>>
>>--
>>PHP General Mailing List (http://www.php.net/)
>>To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php
>

--- End Message ---
--- Begin Message ---
You don't need OS X server. OS X includes Apache and Perl.. you can 
get MySQL and PHP4 from http://www.entropy.ch

-Josh

At 6:06 PM +1000 6/21/02, Justin French wrote:
>Do I need OSX SERVER to run everything I'd need for a development
>environment, or will the base version of OSX have the capabilities I need
>(running a test server of Apache/PHP4/MySQL/Perl/etc?
--- End Message ---
--- Begin Message ---
check out Oreilly's articles too.. very helpful ..

http://www.macdevcenter.com/pub/ct/49

> You don't need OS X server. OS X includes Apache and Perl.. you can
> get MySQL and PHP4 from http://www.entropy.ch

>> Do I need OSX SERVER to run everything I'd need for a development
>> environment, or will the base version of OSX have the capabilities I need
>> (running a test server of Apache/PHP4/MySQL/Perl/etc?

~ Mike
-- 
Mike Zornek | Project Leader
Apple Student Developers
The Insanely Great Site with the Insanely Long URL
http://www.applestudentdevelopers.org

Personal Site: 
http://www.mikezornek.com

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

         Hi, i have this script that simply reads lines from a txt files 
and displays them on my site, itlists the first 4 entries of a txt file 
with the files that exist on a download page:

         <?
$linha=file('downs.txt');
$t=count($linha);
$l = $t - 1;
$fim = $l - 3;

if ($l > 3)
{
$fim=$l - 3;
}
else {
$fim = 0;
}
for ($i = $l; $i >= $fim ; $i--) {
     $array=explode("|",$linha[$i]);
         print("<div align=\"left\">");
         print("<span class=\"data\">$array[0]</span>");
         print("<br>$array[1]<br>");
         print("</div><img src=\"spacer.gif\" height=\"3\">");
         }
?>


         But from time to time, and with absolutely no visible reason, i 
get this error:

         Warning: php_network_getaddresses: getaddrinfo failed: No address 
associated with hostname in /usr/home/pagon/www/index.php on line 497

Warning: file("downs.txt") - Bad file descriptor in 
/usr/home/pagon/www/index.php on line 497


         I tried everything, but i cant figure out why i get this error, 
the paths are ok (otherwise it wouldnt work in the first place) what could 
possibly cause it? The script is so small and simple, is there something 
wrong in it? But if it is, why does the error only appears randomly?
         I get this error on a different script on my site, also of the 
same type, reading a few lines from a txt file and displaying them.
         Thanks.

         Pag


--- End Message ---
--- Begin Message ---
Later version of Javascript.

Justin French



on 21/06/02 9:34 AM, Edgar ([EMAIL PROTECTED]) wrote:

> Hi,
> 
> Are there any way to know what screen resolution use a user in your monitor?
> 
> Thank you in advance.
> 
> 

--- End Message ---
--- Begin Message ---
Thanks for the help

Duncan Hill wrote:

> Use different variable names.  Or make your function return a value, and
> use assignment to handle it.

Finally I made the function to take the select name as an optional variable 
and used different names for the two. This helped me in other situations 
also. Thanks a lot.

"johannes reichardt" wrote:

> If not you´d have big trouble ;)

Huge !!! I would have to add 7 more lines in my file :-). 

>
> <form action=aösldkfj method=post onsubmit="return checkmystuf();">
>
> // this goes in the header
>
> <script>
> function checkmystuff() {
> document.forms.city_id.value.toUppercase(); //just a stupid example
> return true;
> }
>

I am just beginning to test the waters of web application development and not 
using JavaScript much so far. Thanks any way.


Best regards,

Siva




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

I've created a form and a bit of code that processes the form and directs to
a confirmation page asking the user to confirm if the details they entered
are correct.  Once they hit the confirm button how would I send that
confirmation page as an html file attached to their email.  I know its got
something to do with MIME email but not too sure.

Thanks in advance

Mohamed


--- End Message ---
--- Begin Message ---
You should download php4.3.0 dev. The mail enhancements have not been merged
into the 4.2 branch. Sorry for not having been exact in my last posting.

Christoph

Lance wrote:
> i downloaded php4.2.2dev and tried my codes on it. still giving me the
> same problem.
>> Try a recent dev-snapshot from snaps.php.net/win32. The mail
>> function has been reworked.
>>
>> Christoph

--- End Message ---
--- Begin Message ---
cool! 4.3.0dev work like a charm! but is it safe for deployment server?

--lance

Christoph Grottolo wrote:
> You should download php4.3.0 dev. The mail enhancements have not been merged
> into the 4.2 branch. Sorry for not having been exact in my last posting.
> 
> Christoph
> 
> Lance wrote:
> 
>>i downloaded php4.2.2dev and tried my codes on it. still giving me the
>>same problem.
>>
>>>Try a recent dev-snapshot from snaps.php.net/win32. The mail
>>>function has been reworked.
>>>
>>>Christoph
>>
> 

--- End Message ---
--- Begin Message ---
Worked fine for me, what it your sendmail setting.

I'm on win2k php 4.2.1 and i send via my isp's smtp server.

If I'm offline i get an error
Warning: Failed to Connect in c:\my documents\\temp\php\hs~temp.php on line 9

Now, hopefully your message has been sent.The return value of mail() is 0.


when online i get

Now, hopefully your message has been sent.The return value of mail() is 1.


Paul Roberts
[EMAIL PROTECTED]
++++++++++++++++++++++++

----- Original Message ----- 
From: "Erik Price" <[EMAIL PROTECTED]>
To: "Lazor, Ed" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Friday, June 21, 2002 6:30 PM
Subject: Re: [PHP] any reason why mail() returns a false value?


Ed, thanks for taking a look at this:

[eprice@media eprice]$ less public_html/testmail.php
<html>
<head>
         <title>a mail Test</title>

</head>
<body>

<?php
         $return = mail('[EMAIL PROTECTED]', 'subject', 'message');

         print "<p>Now, hopefully your message has been sent.";
         print "The return value of mail() is " . (int)$return . 
".</p>\n";


?>


</body>
</html>



The results I get are:

Now, hopefully your message has been sent.The return value of mail() is 
0.

My path_to_sendmail is confirmed to be correct, and again, I have tested 
sendmail -- it works fine from the command line.  It's executable by all 
users, so my Apache user shouldn't have a hard time executing it.  
There's just no explanation!  I've even pointed my path_to_sendmail to 
an executable shell script that prints a confirmation message if it is 
executed, and the mail() function has the exact same effect if I do this.


Gratefully,


Erik




On Friday, June 21, 2002, at 12:56  PM, Lazor, Ed wrote:

> Please send code generating the problem.
>
>> -----Original Message-----
>> my sendmail problem is still present -- every time I try to call the
>> "mail()" function, even with the simplest of arguments (the
>> first three
>> required arguments, all three of them simple string literals:
>> mail('[EMAIL PROTECTED]', 'SubjectString', 'BodyText')), it fails.
>>
>> No email is sent, the return value of the function, when cast to
>> integer, is zero, and I have thoroughly tested that sendmail
>> works just
>> fine.  It is a RedHat 7.2 server, if that matters (though I
>> don't think
>> it does).  I have done all of my compiling as root, and
>> /usr/sbin/sendmail was definitely in my PATH.
>
> *************************************************************************
> ***
> This message is intended for the sole use of the individual and entity 
> to
> whom it is addressed, and may contain information that is privileged,
> confidential and exempt from disclosure under applicable law.  If you 
> are
> not the intended addressee, nor authorized to receive for the intended
> addressee, you are hereby notified that you may not use, copy, disclose 
> or
> distribute to anyone the message or any information contained in the
> message.  If you have received this message in error, please immediately
> advise the sender by reply email and delete the message.  Thank you very
> much.
>
>





----

Erik Price
Web Developer Temp
Media Lab, H.H. Brown
[EMAIL PROTECTED]


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




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

Is there any mailing list prorgam for Linux server? I want to have text
import possibility of addresses.


Thanks

Makis

--- End Message ---
--- Begin Message ---
 Hi Makis
 
 > Is there any mailing list prorgam for Linux server? I want to have text
 > import possibility of addresses.

Try this
 
 http://www.triangle-solutions.com/triangle.html?page=newsletter
 
 Mohamed


--- End Message ---
--- Begin Message ---
Is it possible to replace any part of a string that has a certain 
soundex with something else?  It would also be helpful if I could 
reference the original in replacing.  Thanks for any tips.

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

Anyone know how I can check if an image is in cmyk or rgb?


Best regards


Morten



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

Hi Everyone,
Just came back from a short holiday and see that I have over 2200 messages in my box!
Yes, you read right, thats over 2k of messages.

The problem is that the admin has blocked my old address ([EMAIL PROTECTED]) from posting 
but I am still getting mail there!

I am asking anybody managing this list to kindly kill the old address from the list, 
since this account is not blocked I think I can unsubscribe normally with this account.

PLEASE UNSUBSCRIBE MY [EMAIL PROTECTED] ADDRESS.

Thanking you,
You all have a nice day,
-Ryan.
--- End Message ---

Reply via email to