php-general Digest 7 Nov 2002 13:11:47 -0000 Issue 1690

Topics (messages 123090 through 123142):

Re: Trouble with php-4.2.3, apache-1.3.27, sablotron 0.96
        123090 by: Tom Rogers
        123099 by: Evan Nemerson
        123108 by: Tom Rogers
        123121 by: Evan Nemerson
        123131 by: Tom Rogers

PHP wrapper around binary CGI app
        123091 by: gap

Code help
        123092 by: William Holroyd
        123093 by: Martin Towell

Re: Getting Newest
        123094 by: Stephen
        123095 by: John W. Holmes
        123096 by: John W. Holmes
        123097 by: Stephen
        123098 by: John W. Holmes

Re: Running functions as other than nobody
        123100 by: Charles Wiltgen

File locking problem
        123101 by: Charles Wiltgen
        123104 by: Marco Tabini
        123106 by: Charles Wiltgen

Re: Foreach ...... Help
        123102 by: Remon Redika
        123103 by: Rasmus Lerdorf
        123107 by: Remon Redika

Help Needed for Project
        123105 by: Karl James
        123133 by: Justin French

Re: session vs. header
        123109 by: Chris Shiflett

Delete a file via FTP (without PHP FTP support)
        123110 by: Charles Wiltgen
        123118 by: Ernest E Vogelsinger

Regular Expression
        123111 by: Salman
        123119 by: Ernest E Vogelsinger

Convince teh boss
        123112 by: Evan Nemerson
        123113 by: nicos.php.net
        123115 by: Khalid El-Kary
        123116 by: John Nichel
        123122 by: Brendon G
        123128 by: Ernest E Vogelsinger

Re: Help me learn! with an explanation of these two functions.
        123114 by: Steve Jackson
        123117 by: Jason Wong
        123120 by: Steve Jackson
        123129 by: Jason Wong

Convert GIF to JPG with or without GD
        123123 by: BAROILLER Pierre-Emmanuel
        123125 by: Krzysztof Dziekiewicz
        123126 by: BAROILLER Pierre-Emmanuel
        123132 by: Rasmus Lerdorf

Configuration of IIS 5 with PHP4_2_3 : problems!
        123124 by: day

File Upload
        123127 by: NeerajGD

print_r output to a file
        123130 by: Kerry Kobashi
        123134 by: Ernest E Vogelsinger
        123135 by: Jason Wong
        123137 by: Kerry Kobashi

Output buffering problem
        123136 by: Willem Vooys

Re: filemtime() error
        123138 by: Marek Kilimajer

Re: installing PHP with netscape on Sun Solaris
        123139 by: Marek Kilimajer

Parsing Menu in Text File
        123140 by: Rishabh Gupta
        123141 by: Marek Kilimajer

Re: publishing php > mysql website on cd-rom
        123142 by: Mike Mannakee

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,

Thursday, November 7, 2002, 5:35:10 AM, you wrote:
EN> -----BEGIN PGP SIGNED MESSAGE-----
EN> Hash: SHA1

EN> Nope... same error. Patch worked perfectly, LDFLAGS=-lstdc++ did too. End 
EN> result: same error. Any other ideas???


EN> On Wednesday 06 November 2002 09:09 am, you wrote:
>> Hi,
>>
>> Wednesday, November 6, 2002, 2:50:42 PM, you wrote:
>> EN> -----BEGIN PGP SIGNED MESSAGE-----
>> EN> Hash: SHA1
>>
>> EN> I'm trying to get XSLT working with PHP, and after slowly working my
>> way EN> through several other problems, I've found one that I can't figure
>> out.
>>
>> EN> Software:
>> EN> PHP 4.2.3
>> EN> Apache 1.3.27
>> EN> Sablotron 0.96
>> EN> GCC 3.2
>> EN> Linux 2.4.19-lsm1
>>
>> EN> ./configure \
>> EN> - --enable-xml \
>> EN> - --enable-xslt \
>> EN> - --enable-ftp \
>> EN> - --enable-sockets \
>> EN> - --enable-pcntl \
>> EN> - --with-apxs=/usr/local/apache/bin/apxs \
>> EN> - --with-xslt-sablot && \
>> EN> make && \
>> EN> sudo make install
>>
>> EN> Everything seems to work fine (except for a lot of
>> EN> "cc1: warning: changing search order for system directory
>> "/usr/local/include" EN> cc1: warning:   as it has already been specified
>> as a non-system directory" EN> 's that appear when using gcc-3.2), but when
>> I try to
>> EN> /usr/local/apache/bin/apachectl restart, I get this:
>>
>> EN> Syntax error on line 205 of /usr/local/apache/conf/httpd.conf:
>> EN> Cannot load /usr/local/apache/libexec/libphp4.so into server:
>> EN> /usr/local/lib/libsablot.so.0: undefined symbol: __gxx_personality_v0
>> EN> /usr/local/apache/bin/apachectl start: httpd could not be started
>>
>> EN> Any ideas???
>> EN> -----BEGIN PGP SIGNATURE-----
>> EN> Version: GnuPG v1.0.7 (GNU/Linux)
>>
>> EN> iD8DBQE9yJ/J/rncFku1MdIRAkhnAKClykcWMUwiWbslAYklx3xm1qsjSQCdFAXh
>> EN> roJ+kMyayqdY1UXxL6S5xuQ=
>> EN> =1Zaw
>> EN> -----END PGP SIGNATURE-----
>>
>>
>> You probably need this patch
>> http://download-2.gingerall.cz/download/sablot/Sablot-0.96.1.patch
>>
>> You can also use LDFLAGS=-lstdc++ before configuring PHP
>> more info at http://php.benscom.com/manual/en/ref.xslt.php

EN> - -- 
EN> Jesus Christ: Imaginary Playmate to Millions of Adults!

EN> - -Unknown
EN> -----BEGIN PGP SIGNATURE-----
EN> Version: GnuPG v1.0.7 (GNU/Linux)

EN> iD8DBQE9yW8T/rncFku1MdIRAhMXAKCFp4MyUAp2/oLVIwcXS4L0utNOVgCglIPf
EN> 5qP6pDQ/mrNX+CT5pV7X6oc=
EN> =wdaO
EN> -----END PGP SIGNATURE-----


Make sure you rm config.cache in the PHP source directory then do
LDFLAGS=-lstdc++;./configure ...options
then make install ect
and in apache do ./configure again as well before making

-- 
regards,
Tom

--- End Message ---
--- Begin Message ---
Same error.


On Wednesday 06 November 2002 05:40 pm, you wrote:
> Hi,
>
> Thursday, November 7, 2002, 5:35:10 AM, you wrote:
> EN> -----BEGIN PGP SIGNED MESSAGE-----
> EN> Hash: SHA1
>
> EN> Nope... same error. Patch worked perfectly, LDFLAGS=-lstdc++ did too.
> End EN> result: same error. Any other ideas???
>
> EN> On Wednesday 06 November 2002 09:09 am, you wrote:
> >> Hi,
> >>
> >> Wednesday, November 6, 2002, 2:50:42 PM, you wrote:
> >> EN> -----BEGIN PGP SIGNED MESSAGE-----
> >> EN> Hash: SHA1
> >>
> >> EN> I'm trying to get XSLT working with PHP, and after slowly working my
> >> way EN> through several other problems, I've found one that I can't
> >> figure out.
> >>
> >> EN> Software:
> >> EN> PHP 4.2.3
> >> EN> Apache 1.3.27
> >> EN> Sablotron 0.96
> >> EN> GCC 3.2
> >> EN> Linux 2.4.19-lsm1
> >>
> >> EN> ./configure \
> >> EN> - --enable-xml \
> >> EN> - --enable-xslt \
> >> EN> - --enable-ftp \
> >> EN> - --enable-sockets \
> >> EN> - --enable-pcntl \
> >> EN> - --with-apxs=/usr/local/apache/bin/apxs \
> >> EN> - --with-xslt-sablot && \
> >> EN> make && \
> >> EN> sudo make install
> >>
> >> EN> Everything seems to work fine (except for a lot of
> >> EN> "cc1: warning: changing search order for system directory
> >> "/usr/local/include" EN> cc1: warning:   as it has already been
> >> specified as a non-system directory" EN> 's that appear when using
> >> gcc-3.2), but when I try to
> >> EN> /usr/local/apache/bin/apachectl restart, I get this:
> >>
> >> EN> Syntax error on line 205 of /usr/local/apache/conf/httpd.conf:
> >> EN> Cannot load /usr/local/apache/libexec/libphp4.so into server:
> >> EN> /usr/local/lib/libsablot.so.0: undefined symbol:
> >> __gxx_personality_v0 EN> /usr/local/apache/bin/apachectl start: httpd
> >> could not be started
> >>
> >> EN> Any ideas???
> >> EN> -----BEGIN PGP SIGNATURE-----
> >> EN> Version: GnuPG v1.0.7 (GNU/Linux)
> >>
> >> EN> iD8DBQE9yJ/J/rncFku1MdIRAkhnAKClykcWMUwiWbslAYklx3xm1qsjSQCdFAXh
> >> EN> roJ+kMyayqdY1UXxL6S5xuQ=
> >> EN> =1Zaw
> >> EN> -----END PGP SIGNATURE-----
> >>
> >>
> >> You probably need this patch
> >> http://download-2.gingerall.cz/download/sablot/Sablot-0.96.1.patch
> >>
> >> You can also use LDFLAGS=-lstdc++ before configuring PHP
> >> more info at http://php.benscom.com/manual/en/ref.xslt.php
>
> EN> - --
> EN> Jesus Christ: Imaginary Playmate to Millions of Adults!
>
> EN> - -Unknown
> EN> -----BEGIN PGP SIGNATURE-----
> EN> Version: GnuPG v1.0.7 (GNU/Linux)
>
> EN> iD8DBQE9yW8T/rncFku1MdIRAhMXAKCFp4MyUAp2/oLVIwcXS4L0utNOVgCglIPf
> EN> 5qP6pDQ/mrNX+CT5pV7X6oc=
> EN> =wdaO
> EN> -----END PGP SIGNATURE-----
>
>
> Make sure you rm config.cache in the PHP source directory then do
> LDFLAGS=-lstdc++;./configure ...options
> then make install ect
> and in apache do ./configure again as well before making

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

Thursday, November 7, 2002, 1:11:43 PM, you wrote:
EN> Same error.

>>

As a test try compiling statically into apache...    That is the way I
have php at the moment.
-- 
regards,
Tom

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

Apache fails sanity check. Same with and without the LDFLAGS thing.


======== Error Output for sanity check ========
cd ..; gcc  -DLINUX=22 -I/usr/src/php-4.2.3 -I/usr/src/php-4.2.3/main 
- -I/usr/src/php-4.2.3/main -I/usr/src/php-4.2.3/Zend -I/usr/src/php-4.2.3/Zend 
- -I/usr/src/php-4.2.3/TSRM -I/usr/src/php-4.2.3/TSRM -I/usr/src/php-4.2.3 
- -DNO_DL_NEEDED `./apaci`     -o helpers/dummy helpers/dummy.c   
- -Wl,-rpath,/usr/local/lib  -rdynamic -L/usr/local/lib -Lmodules/php4 
- -L../modules/php4 -L../../modules/php4 -lmodphp4   -lsablot -lexpat -lcrypt 
- -lresolv -lm -ldl -lnsl  -lresolv -lcrypt   -lm -lcrypt -lexpat
/usr/local/lib/libsablot.so: undefined reference to `operator new[](unsigned)'
/usr/local/lib/libsablot.so: undefined reference to `vtable for 
__cxxabiv1::__si_class_type_info'
/usr/local/lib/libsablot.so: undefined reference to `operator delete(void*)'
/usr/local/lib/libsablot.so: undefined reference to `__gxx_personality_v0'
/usr/local/lib/libsablot.so: undefined reference to `__cxa_pure_virtual'
/usr/local/lib/libsablot.so: undefined reference to `vtable for 
__cxxabiv1::__class_type_info'
/usr/local/lib/libsablot.so: undefined reference to `operator delete[](void*)'
/usr/local/lib/libsablot.so: undefined reference to `vtable for 
__cxxabiv1::__vmi_class_type_info'
/usr/local/lib/libsablot.so: undefined reference to `operator new(unsigned)'
collect2: ld returned 1 exit status
make: *** [dummy] Error 1
============= End of Error Report =============



On Wednesday 06 November 2002 09:49 pm, Tom Rogers wrote:
> Hi,
>
> Thursday, November 7, 2002, 1:11:43 PM, you wrote:
> EN> Same error.
>
>
>
> As a test try compiling statically into apache...    That is the way I
> have php at the moment.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE9yiSn/rncFku1MdIRAgzAAJ98rCLh9jWATOF96Liv3Lwo8SUq2gCbBci3
CngocpcfDF0Oo6+UP5B1Wcc=
=qcnu
-----END PGP SIGNATURE-----

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

Thursday, November 7, 2002, 6:30:17 PM, you wrote:
EN> -----BEGIN PGP SIGNED MESSAGE-----
EN> Hash: SHA1

EN> Apache fails sanity check. Same with and without the LDFLAGS thing.


EN> ======== Error Output for sanity check ========
EN> cd ..; gcc  -DLINUX=22 -I/usr/src/php-4.2.3 -I/usr/src/php-4.2.3/main 
EN> - -I/usr/src/php-4.2.3/main -I/usr/src/php-4.2.3/Zend -I/usr/src/php-4.2.3/Zend 
EN> - -I/usr/src/php-4.2.3/TSRM -I/usr/src/php-4.2.3/TSRM -I/usr/src/php-4.2.3 
EN> - -DNO_DL_NEEDED `./apaci`     -o helpers/dummy helpers/dummy.c   
EN> - -Wl,-rpath,/usr/local/lib  -rdynamic -L/usr/local/lib -Lmodules/php4 
EN> - -L../modules/php4 -L../../modules/php4 -lmodphp4   -lsablot -lexpat -lcrypt 
EN> - -lresolv -lm -ldl -lnsl  -lresolv -lcrypt   -lm -lcrypt -lexpat
EN> /usr/local/lib/libsablot.so: undefined reference to `operator new[](unsigned)'
EN> /usr/local/lib/libsablot.so: undefined reference to `vtable for 
EN> __cxxabiv1::__si_class_type_info'
EN> /usr/local/lib/libsablot.so: undefined reference to `operator delete(void*)'
EN> /usr/local/lib/libsablot.so: undefined reference to `__gxx_personality_v0'
EN> /usr/local/lib/libsablot.so: undefined reference to `__cxa_pure_virtual'
EN> /usr/local/lib/libsablot.so: undefined reference to `vtable for 
EN> __cxxabiv1::__class_type_info'
EN> /usr/local/lib/libsablot.so: undefined reference to `operator delete[](void*)'
EN> /usr/local/lib/libsablot.so: undefined reference to `vtable for 
EN> __cxxabiv1::__vmi_class_type_info'
EN> /usr/local/lib/libsablot.so: undefined reference to `operator new(unsigned)'
EN> collect2: ld returned 1 exit status
EN> make: *** [dummy] Error 1
EN> ============= End of Error Report =============



EN> On Wednesday 06 November 2002 09:49 pm, Tom Rogers wrote:
>> Hi,
>>
>> Thursday, November 7, 2002, 1:11:43 PM, you wrote:
>> EN> Same error.
>>
>>
>>
>> As a test try compiling statically into apache...    That is the way I
>> have php at the moment.
EN> -----BEGIN PGP SIGNATURE-----
EN> Version: GnuPG v1.0.7 (GNU/Linux)

EN> iD8DBQE9yiSn/rncFku1MdIRAgzAAJ98rCLh9jWATOF96Liv3Lwo8SUq2gCbBci3
EN> CngocpcfDF0Oo6+UP5B1Wcc=
EN> =qcnu
EN> -----END PGP SIGNATURE-----

looks like you also have to do:

LDFLAGS=' -lstdc++' ./configure

for apache as well (although I did not have to do any of this stuff
except for the patch)

-- 
regards,
Tom

--- End Message ---
--- Begin Message ---
I have a binary (non-modifiable) CGI program that does form processing. It
gets form data by HTTP POST and outputs the results to Apache.

Is there any way to make a PHP wrapper around the program, so that the form
data will be submitted to my script, which in turn will send the data to the
program and get back the results?

In other words, how can I POST to the program without opening an HTTP
connection and how do I read the program's output in my script?


--- End Message ---
--- Begin Message ---
I am fairly new to the PHP language and have built a website with it before,
but nothing very complicated. Is there anyway of grabbing information from
the browser as to where a user may have come from (referring page, search
engine, etc.)? And if so, how would I go about getting it?

William


--- End Message ---
--- Begin Message ---
CAUTION: It's not reliable

you can use $HTTP_REFERER
(or, I think's it's under $_SERVER, $_SERVER["HTTP_REFERER"])

-----Original Message-----
From: William Holroyd [mailto:w.holroyd@;versity-cobalt.com]
Sent: Thursday, November 07, 2002 12:42 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Code help


I am fairly new to the PHP language and have built a website with it before,
but nothing very complicated. Is there anyway of grabbing information from
the browser as to where a user may have come from (referring page, search
engine, etc.)? And if so, how would I go about getting it?

William



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
So for my SQL statement I put this?

$sql = "select id, date, name, text from table1 union";
$sql2 = "select id, date, name, text from table2 union";
$sql3 = "select id, date, name, text from table3 order by date desc";


----- Original Message -----
From: "Nick Eby" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, November 06, 2002 7:57 PM
Subject: Re: [PHP] Getting Newest


> you could make a union of all the records, and order by newest date first:
>
> (select id, date, name, text from table1) union
> (select id, date, name, text from table2) union
> (select id, date, name, text from table3) order by date desc
>
> then select the first record
> /nick
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

--- End Message ---
--- Begin Message ---
> $sql = "select id, date, name, text from table1 union";
> $sql2 = "select id, date, name, text from table2 union";
> $sql3 = "select id, date, name, text from table3 order by date desc";>


No, it's all one query. 

$sql = "select id, date, name, text from table1 union "
      ."select id, date, name, text from table2 union "
      ."select id, date, name, text from table3 order by date desc";

---John Holmes...


--- End Message ---
--- Begin Message ---
UNION is implemented in MySQL 4.0.0, btw.

> -----Original Message-----
> From: Stephen [mailto:webmaster@;melchior.us]
> Sent: Wednesday, November 06, 2002 9:33 PM
> To: PHP List
> Subject: Re: [PHP] Getting Newest
> 
> So for my SQL statement I put this?
> 
> $sql = "select id, date, name, text from table1 union";
> $sql2 = "select id, date, name, text from table2 union";
> $sql3 = "select id, date, name, text from table3 order by date desc";
> 
> 
> ----- Original Message -----
> From: "Nick Eby" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, November 06, 2002 7:57 PM
> Subject: Re: [PHP] Getting Newest
> 
> 
> > you could make a union of all the records, and order by newest date
> first:
> >
> > (select id, date, name, text from table1) union
> > (select id, date, name, text from table2) union
> > (select id, date, name, text from table3) order by date desc
> >
> > then select the first record
> > /nick
> >
> >
> >
> > --
> > 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 ---
Oh, well, now I'm getting this error:

You have an error in your SQL syntax near 'union select * from church union
select * from misc order by date desc limit 1' at line 1

Here's what I did for the SQL

$sql = "select * from school union ";
$sql .= "select * from church union ";
$sql .= "select * from misc order by date desc limit 1";


----- Original Message -----
From: "John W. Holmes" <[EMAIL PROTECTED]>
To: "'Stephen'" <[EMAIL PROTECTED]>; "'PHP List'"
<[EMAIL PROTECTED]>
Sent: Wednesday, November 06, 2002 9:43 PM
Subject: RE: [PHP] Getting Newest


> UNION is implemented in MySQL 4.0.0, btw.
>
> > -----Original Message-----
> > From: Stephen [mailto:webmaster@;melchior.us]
> > Sent: Wednesday, November 06, 2002 9:33 PM
> > To: PHP List
> > Subject: Re: [PHP] Getting Newest
> >
> > So for my SQL statement I put this?
> >
> > $sql = "select id, date, name, text from table1 union";
> > $sql2 = "select id, date, name, text from table2 union";
> > $sql3 = "select id, date, name, text from table3 order by date desc";
> >
> >
> > ----- Original Message -----
> > From: "Nick Eby" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Wednesday, November 06, 2002 7:57 PM
> > Subject: Re: [PHP] Getting Newest
> >
> >
> > > you could make a union of all the records, and order by newest date
> > first:
> > >
> > > (select id, date, name, text from table1) union
> > > (select id, date, name, text from table2) union
> > > (select id, date, name, text from table3) order by date desc
> > >
> > > then select the first record
> > > /nick
> > >
> > >
> > >
> > > --
> > > 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
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

--- End Message ---
--- Begin Message ---
Read my last post and then run SELECT VERSION() in MySQL. I really doubt
you're running 4.0. 

---John Holmes...

> -----Original Message-----
> From: Stephen [mailto:webmaster@;melchior.us]
> Sent: Wednesday, November 06, 2002 9:57 PM
> To: PHP List
> Subject: Re: [PHP] Getting Newest
> 
> Oh, well, now I'm getting this error:
> 
> You have an error in your SQL syntax near 'union select * from church
> union
> select * from misc order by date desc limit 1' at line 1
> 
> Here's what I did for the SQL
> 
> $sql = "select * from school union ";
> $sql .= "select * from church union ";
> $sql .= "select * from misc order by date desc limit 1";
> 
> 
> ----- Original Message -----
> From: "John W. Holmes" <[EMAIL PROTECTED]>
> To: "'Stephen'" <[EMAIL PROTECTED]>; "'PHP List'"
> <[EMAIL PROTECTED]>
> Sent: Wednesday, November 06, 2002 9:43 PM
> Subject: RE: [PHP] Getting Newest
> 
> 
> > UNION is implemented in MySQL 4.0.0, btw.
> >
> > > -----Original Message-----
> > > From: Stephen [mailto:webmaster@;melchior.us]
> > > Sent: Wednesday, November 06, 2002 9:33 PM
> > > To: PHP List
> > > Subject: Re: [PHP] Getting Newest
> > >
> > > So for my SQL statement I put this?
> > >
> > > $sql = "select id, date, name, text from table1 union";
> > > $sql2 = "select id, date, name, text from table2 union";
> > > $sql3 = "select id, date, name, text from table3 order by date
desc";
> > >
> > >
> > > ----- Original Message -----
> > > From: "Nick Eby" <[EMAIL PROTECTED]>
> > > To: <[EMAIL PROTECTED]>
> > > Sent: Wednesday, November 06, 2002 7:57 PM
> > > Subject: Re: [PHP] Getting Newest
> > >
> > >
> > > > you could make a union of all the records, and order by newest
date
> > > first:
> > > >
> > > > (select id, date, name, text from table1) union
> > > > (select id, date, name, text from table2) union
> > > > (select id, date, name, text from table3) order by date desc
> > > >
> > > > then select the first record
> > > > /nick
> > > >
> > > >
> > > >
> > > > --
> > > > 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
> >
> >
> >
> >
> > --
> > 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 ---
Marco Tabini wrote...

>> I need to chmod files which are owned by a nother user than nobody with a
>> php script runing from a browser.
>> 
>> lets say i have a file called image.gif and I want to chmod(imgage.gif,
>> 0777); and I want to run it as user: myuser with passwd: passwd.
>> 
>> Can I do this?
>
> There was actually a brief thread about this last night. If you're using
> Apache, you could look into suexec--this may or may not be a possibility
> depending on the degree of control that you have on your server.

The short answer is "no".

My provider uses suexec, but that just means that Apache and its processes
run as (in my case) "dhapache" instead of "nobody", putting you in the same
boat with the same paddle.

I'm not sure why PHP doesn't let you fopen() with a user name and password.
It seems obvious, so I assume there are technical issues that prevent this
from happening.

My solution (for now) was to use FTP, since I will have the user's FTP
username/password.  Worse, I can't depend on the FTP commands (my provider's
PHP doesn't have them), so I'm using fsockopen() to "speak FTP" to do things
like delete files I've created with fopen().  This is far slower and more
error-prone, and I'm very, VERY interested in other portable solutions.

Please post whatever you find about this to the list, and I'll do the same.

-- 
Charles Wiltgen

   "Well, once again my friend, we find that science is a two-headed beast.
    One head is nice, it gives us aspirin and other modern conveniences...
    but the other head of science is bad!  Oh beware the other head of
    science...it bites!" -- The Tick




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

I'm having file locking problems.

I'm using fopen() to write a file via FTP.  At the end, I'm doing...

    fflush($fp);
    fclose($fp);

...and then I include it immediately after.  But many times I only get part
of what I wrote to the file, which suggests that it wasn't really flushed
and closed properly.

What else can I do?

Thanks,

-- 
Charles Wiltgen

   "Well, once again my friend, we find that science is a two-headed beast.
    One head is nice, it gives us aspirin and other modern conveniences...
    but the other head of science is bad!  Oh beware the other head of
    science...it bites!" -- The Tick




--- End Message ---
--- Begin Message ---
Just a (possibly stupid) suggestion--is it possible that the file is
being overwritten by another instance of your script that's run in the
meantime?

-------------
php|architect -- The Magazine for PHP Professionals
Check us out on the web at http://www.phparch.com

On Wed, 2002-11-06 at 23:06, Charles Wiltgen wrote:
> Hello,
> 
> I'm having file locking problems.
> 
> I'm using fopen() to write a file via FTP.  At the end, I'm doing...
> 
>     fflush($fp);
>     fclose($fp);
> 
> ...and then I include it immediately after.  But many times I only get part
> of what I wrote to the file, which suggests that it wasn't really flushed
> and closed properly.
> 
> What else can I do?
> 
> Thanks,
> 
> -- 
> Charles Wiltgen
> 
>    "Well, once again my friend, we find that science is a two-headed beast.
>     One head is nice, it gives us aspirin and other modern conveniences...
>     but the other head of science is bad!  Oh beware the other head of
>     science...it bites!" -- The Tick
> 
> 
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


--- End Message ---
--- Begin Message ---
Marco Tabini wrote...

> Just a (possibly stupid) suggestion--is it possible that the file is being
> overwritten by another instance of your script that's run in the meantime?

This may also be a problem at some point, but currently I'm just trying to
get it working in an test environment where only one instance is running.

I know I can just use another empty file as a semaphore, but my performance
is already killed by having to use FTP to create and delete files with PHP,
and I need to do whatever I can do avoid it.

Basically, it appears that using fflush() and fclose() is no guarantee that
a file is completely written, and I'm wondering what I can do besides insert
sleep() statements.

-- 
Charles Wiltgen

  "Love is a snowmobile racing across the tundra and
   then suddenly it flips over, pinning you underneath.
   At night, the ice weasels come." - Nietzsche (Groening)
 


--- End Message ---
--- Begin Message --- Parse error: parse error, unexpected '=' in /home/intra/Inventroot/software/savedata.php on line 35
<?php
$vary(100);
$i = 0;
foreach($InputY as $y){
$vary($i) = $y; <---------line 35
$i++;
}
foreach($Nama_Software as $x){
$insertq = "Insert into NSoftware (X, Y) values ('$InputX','$vary($i)')";
echo $insertq."<br>";
mysql_query($insertq);
$i++;
}
?>
Thank's

Jon Haworth writes:
Hi Remon,
I try this script with php, but i found an Error.
It would be helpful if you could show us this error message.
$vary(100);
At the very least, you should change this line to
$vary = array();
Cheers
Jon
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

--- End Message ---
--- Begin Message ---
Your code is bogus.  You probably want:

  $vary[$i] = $y;

And $vary(100) also makes no sense.

Also, why are you looping through the $InputY array and putting all the
values into $vary?  Why not just do $vary = $InputY;  ?

If it is because you need to renumber the indices, have a look at the
array_values() function.

-Rasmus

On Thu, 7 Nov 2002, Remon Redika wrote:

> Parse error: parse error, unexpected '=' in
> /home/intra/Inventroot/software/savedata.php on line 35
>
> <?php
>
> $vary(100);
> $i = 0;
>
> foreach($InputY as $y){
>        $vary($i) = $y;   <---------line 35
>        $i++;
> }
>
> foreach($Nama_Software as $x){
>        $insertq = "Insert into NSoftware (X, Y) values
> ('$InputX','$vary($i)')";
>        echo $insertq."<br>";
>        mysql_query($insertq);
>        $i++;
> }
>
> ?>
> Thank's
>
>
> Jon Haworth writes:
>
> > Hi Remon,
> >
> >> I try this script with php, but i found an Error.
> >
> > It would be helpful if you could show us this error message.
> >
> >> $vary(100);
> >
> > At the very least, you should change this line to
> >
> > $vary = array();
> >
> > Cheers
> > Jon
> >
> > --
> > 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 --- Sorry before.
I Just to try to Explain my Problem
may be this my reason ..
I have Two Text Fields
The First Text Field i call it "InputX" <input type='text' name='InputX' size='50'>
and The Second Text Field I Call it "InputY", Generatable Field (using javascripts), if User Click the Button ("AddRow's Button") for Generated / produce the InputY, may be like the sample..
Blabla.innerHTML = "<input type='text' name='InputY' size='50'>" ;
I need to insert data from Fields to the server, the Code will Post the value of Fields ("InputX" and "InputY(s)") by once submit to the server, and amount of value of data saved depent on how many "InputY" I have, or how many times User click my "AddRow" Button and fill Text Fields.
This The sample result data will send to server in once post data, if user click 5 Times "AddRow's Button". and fill it's with these value
INPUTXVALUE INPUTYVALUE
INDEX SUB1
INDEX SUB2
INDEX SUB3
INDEX SUB4
INDEX SUBX
i have done before with my asp code. and it's Worked.
<%
i = 0
Inputx = request("Inputx")
dim vary(100)
for each y in request("InputY")
vary(i) = y
i = i + 1
next
for each x in request("inputY")
insertq = "Insert into Nsoftware(X, Y) values ('" & Inputx & "','" & vary(i) & "')"
set save = conn.execute(insertq)
i = i + 1
next
%>
I just to translate from asp code to php code
I try this code with php, but i still found an Error.
<?php
//$vary(100);
$i = 0;
foreach($InputY as $y){
$vary[$i] = $y;
$i++;
}
foreach($InputX as $x){
$insertq = "Insert into NSoftware (X, Y) values ('$InputX','$vary[$i]')";
echo $insertq."<br>";
mysql_query($insertq);
$i++;
}
?> <--- 55
Parse error: parse error, unexpected $ in /home/intra/Inventroot/software/savedata.php on line 55
i got error out of range of my code..,
or may be these not a good idea to translate my asp code to php??
sorry about my english
Rasmus Lerdorf writes:
Your code is bogus. You probably want:
$vary[$i] = $y;
And $vary(100) also makes no sense.
Also, why are you looping through the $InputY array and putting all the
values into $vary? Why not just do $vary = $InputY; ?
If it is because you need to renumber the indices, have a look at the
array_values() function.
-Rasmus
On Thu, 7 Nov 2002, Remon Redika wrote:
Parse error: parse error, unexpected '=' in
/home/intra/Inventroot/software/savedata.php on line 35
<?php
$vary(100);
$i = 0;
foreach($InputY as $y){
$vary($i) = $y; <---------line 35
$i++;
}
foreach($Nama_Software as $x){
$insertq = "Insert into NSoftware (X, Y) values
('$InputX','$vary($i)')";
echo $insertq."<br>";
mysql_query($insertq);
$i++;
}
?>
Thank's

Jon Haworth writes:
> Hi Remon,
>
>> I try this script with php, but i found an Error.
>
> It would be helpful if you could show us this error message.
>
>> $vary(100);
>
> At the very least, you should change this line to
>
> $vary = array();
>
> Cheers
> Jon
>
> --
> 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 ---
Is There anyone that I can chat with in reatlime 
About the project I need help with for my fantasy football 
League.
 
Karl
--- End Message ---
--- Begin Message ---
Karl, This list usually works best if:

a) you do some looking around at google, the manual, and other PHP/script
resources before asking questions

b) you have a specific problem that we can help with (eg "why is this
function not working?", not "who can build me a complete blah blah?")


Cheers,

Justin


--- End Message ---
--- Begin Message ---
huge junk mail wrote:

Can someone tell me why I can't have

$_SESSION['foo'] = 'content of foo';

following by

header('Location: http://www.mysite.com');

Someone from www.php.net told me that it can confuse
browser (http://bugs.php.net/19991). But, still I
can't the idea why it can happen. Does register
session means sending a 'header: location' too?

You can, and you should not get any errors from PHP. The reason someone suggested that this can confuse the browser is as follows:

1. When you initiate a session, PHP tells Apache to send a Set-Cookie header (assuming you are using the default session settings).
2. When you manually set a Location header, the HTTP response status code changes from 200 OK to 302 Moved Temporarily.

So, at least in the past, some Web browsers would ignore Set-Cookie headers that are sent in a response that basically says, "Hey, that thing you are looking for is over here now." Also, in some scripting languages (I believe in PHP as well, but I am not positive), the Set-Cookie headers would not even be included when you changed the status code like this, so it didn't matter what the browser thought.

I have found that this problem appears to be fading fast, and I have recently used this combination without any user complaints (yet). :-)

What problem are you experiencing?

Chris

--- End Message ---
--- Begin Message ---
// Delete a file via FTP
function deleteFileViaFTP($ftpServer, $user, $password, $ftpDir, $ftpFile) {
    
    $error = FALSE;
    
    // Open connection to FTP port
    $ftp = fsockopen($ftpServer,21);

    $foo = fgets($ftp);
    if (!ereg("^220*", $foo)) { $error = "*** Error! FTP service not ready
***\r\n"; }

    // Submit user name and password

    fputs($ftp,"USER $user\r\n");

    $foo = fgets($ftp);
    if (!ereg("^331*", $foo)) { $error = "*** Error! USER commend
unsuccessful ***\r\n"; }
    

    fputs($ftp,"PASS $password\r\n");

    $foo = fgets($ftp);
    if (!ereg("^230*", $foo)) { $error = "*** Error! PASS command
unsuccessful ***\r\n"; }

    // Change to the proper directory
    fputs($ftp,"CWD $ftpDir\r\n");
    $foo = fgets($ftp);
    if (!ereg("^250*", $foo)) { $error = "*** Error! CWD command
unsuccessful ***\r\n"; }

    // Delete the file
    fputs($ftp,"DELE $ftpFile\r\n");

    $foo = fgets($ftp);
    if (!ereg("^250*", $foo)) { $error = "*** Error! DELEte command
unsuccessful\r\n"; }

    // Wrap it up
    fputs($ftp,"QUIT\r\n");

    $foo = fgets($ftp);
    if (!ereg("^221*", $foo)) { $error = "*** Error! FTP service closed
abnormally *** \r\n"; }

    fclose($ftp);

    // Return TRUE if the file has been deleted
    $fileUri = "ftp://$user:$password@;$ftpServer/$ftpDir/$ftpFile";
    $fp = @fopen($fileUri, "r");
    if (!$fp) { return TRUE; } else { return FALSE; }
}

--- End Message ---
--- Begin Message ---
At 07:14 07.11.2002, Charles Wiltgen said:
--------------------[snip]--------------------
>// Delete a file via FTP
>function deleteFileViaFTP($ftpServer, $user, $password, $ftpDir, $ftpFile) {
--------------------[snip]-------------------- 

or, if you have FTP support built in:

$user = '**user**';
$pass = '**pass**';
$ftphost = 'ftp_host';
$ftpfile = '/www/sample.html';


$fp = ftp_connect("$ftphost");
if ($fp) {
        $login = ftp_login ($fp, $user, $pass); 
        ftp_delete ($fp, $ftpfile); 
        ftp_quit($fp);
}
else die('Cannot connect to FTP');



-- 
   >O     Ernest E. Vogelsinger
   (\)    ICQ #13394035
    ^     http://www.vogelsinger.at/


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

I have this ereg call

ereg("([-d])[rwxst-]{9}.* [0-9]* [a-zA-Z]+ [0-9: ]* (.+)",$dirline,$regs);

This regular expressions parses the following line:

drwxrwxrwx   1 owner    group               0 Nov  5 23:19 fantasy

to return: fantasy
(or in general any filename/directory name)

The above regular expression works fine in every except when the filename is
something like this:

drwxrwxrwx   1 owner    group               0 Nov  5 23:19 6 fantasy

Notice in this case the filename is "6 fantasy" however $regs[1] returns
only: "fantasy"

Can anyone help me to fix this problem.
Thanks a bunch


--- End Message ---
--- Begin Message ---
At 07:33 07.11.2002, Salman said:
--------------------[snip]--------------------
>ereg("([-d])[rwxst-]{9}.* [0-9]* [a-zA-Z]+ [0-9: ]* (.+)",$dirline,$regs);
>
>This regular expressions parses the following line:
>
>drwxrwxrwx   1 owner    group               0 Nov  5 23:19 fantasy
>
>to return: fantasy
>(or in general any filename/directory name)
>
>The above regular expression works fine in every except when the filename is
>something like this:
>
>drwxrwxrwx   1 owner    group               0 Nov  5 23:19 6 fantasy
--------------------[snip]-------------------- 

This will get you into trouble anyway if the file name contains
whitespaces... try to use a simple "ls" instead.

Anyway, assuming the filename doesn't have whitespaces, and since you're
ignoring the preceding fields anyway, just look for the last bunch of
nonäwhitespaces at the end of line:

ereg("([^\s]+)$", $dirline);

this should return "fantasy" for both cases you sent.


-- 
   >O     Ernest E. Vogelsinger
   (\)    ICQ #13394035
    ^     http://www.vogelsinger.at/


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

Okay, it took me a long (expletive deleted) time, so I figured I should share. 
Here is a list of popular web sites running Apache, PHP, MySQL, and Linux. If 
there are any errors, I apologize. This is not meant to be a definitive work. 
In fact, I wasn't even planning on posting it... until i looked at the clock 
;)

This list is designed to convice teh boss (no type-o). If your boss is a 
bandwagon kind of guy, afraid to take risks, this is for you- er- him. And 
you. Him in that he can read it, you in that if he accepts LAMP, you're life 
will be a much more joyous existance ;)



- --------------------------------
Apache:

By far the most popular web server, with 60.54% market share. Its
closest competitor, Microsoft's IIS, has 28.89%. If all variants of
each server are counted, Apache's install base increases to 62.17%,
while IIS manages 29.42%). Statistics are from
http://www.netcraft.net/survey

Apache users:
Yahoo!
Amazon.com
AltaVista
BBC
mp3.com
SlashDot
HP
W3C
IBM
Verizon
FEMA
Infoseek


PHP:

In April 2002, PHP overtook ASP as the #1 server-side scripting
language on the internet. In April, PHP was used by 24% of the
sites on the Internet. Over the past two years PHP has averaged
a 6.5% monthly growth rate. Source: zend.com/news/zendpr.php?id=49

PHP users:
Cisco
CMG
Vodafone
Motorola
Siemens
Ericsson
CBS
Unilever
Philips
BMC
NTT
Air Canada
Lufthansa
OnVista
Lycos Europe
Deutsche Bank
NASA
W3C


MySQL:

It isn't as easy to determine which database a site uses, but here
is a list of sites that do use MySQL, according to MySQL.com:

Yahoo! Finance
Texas Instruments
U.S. Census Bureau
NASA
Omaha Steaks
Slashdot
Cross Media Marketing Corp
Powell's Books
Department of Academic Information Systems
Avacom Net Services
Blue World Communications
CoreSense
Ericsson
handy.de
mobile.de
Nemo-Q
Silicon Storage Technology, Inc.
Virage


Linux:

I can't find a list for this... I figured these out by trying big
sites that came to mind. I didn't encounter a single Microsoft site,
but I did get a few *BSD sites, and several Solaris sites.

FBI
Google
Amazon
AltaVista
Slashdot
Verizon
FEMA
CNN


Security:

Here's a list of security companies/groups that run any LAMP component:
Security Focus          (LA)
Symantec                (L)
CERT                    (LA)
Packet Storm            (A)
FBI                     (L)
OSVDB                   (LA)
At Stake                (LA)
Netcraft                (LA)
TESO                    (L)
Phenoelit               (LA)
Doxpara                 (LAP)
NGS Software            (LAMP)
PivX                    (LAP)
Grey Magic              (LAMP)
Phrack                  (AP)
***
It should be noted that just because a component doesn't appear in the list
doesn't mean it's not running. The only way I could figure out MySQL was 
sending
a SYN to TCP/3306. If I got a SYN|ACK, I put an M. MySQL could be (should be)
firewalled off, and infosec people know this. Also, infosec people tend to 
play
with banners (hehe look @ TESO's - teso.scene.at), so it's entirely possible
they're hiding something...

Out of all the infosec sites I tried, I managed to find two Microsofts: NAI 
and
Verisign. I didn't bother with ntbugtraq, windowssecurity, etc- then again, I
didn't bother with linuxsecurity, root prompt, etc. Only went with groups who 
pay
attention to all OS's... Phrack and OSVDB are a little biased, but they are 
still
cross-platform.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE9ygtO/rncFku1MdIRAmQpAJ9d+KkYSLhMriuZtI9jsjp3CAmZrACfaWJK
Tf0R0hEMSICjAi6v9nz67GU=
=Jj3Q
-----END PGP SIGNATURE-----

--- End Message ---
--- Begin Message ---
Thats a very nice research.

Thanks you.

--

M.CHAILLAN Nicolas
[EMAIL PROTECTED]
www.WorldAKT.com Hébergement de sites internets.

"Evan Nemerson" <[EMAIL PROTECTED]> a écrit dans le message de news:
[EMAIL PROTECTED]
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Okay, it took me a long (expletive deleted) time, so I figured I should
share.
> Here is a list of popular web sites running Apache, PHP, MySQL, and Linux.
If
> there are any errors, I apologize. This is not meant to be a definitive
work.
> In fact, I wasn't even planning on posting it... until i looked at the
clock
> ;)
>
> This list is designed to convice teh boss (no type-o). If your boss is a
> bandwagon kind of guy, afraid to take risks, this is for you- er- him. And
> you. Him in that he can read it, you in that if he accepts LAMP, you're
life
> will be a much more joyous existance ;)
>
>
>
> - --------------------------------
> Apache:
>
> By far the most popular web server, with 60.54% market share. Its
> closest competitor, Microsoft's IIS, has 28.89%. If all variants of
> each server are counted, Apache's install base increases to 62.17%,
> while IIS manages 29.42%). Statistics are from
> http://www.netcraft.net/survey
>
> Apache users:
> Yahoo!
> Amazon.com
> AltaVista
> BBC
> mp3.com
> SlashDot
> HP
> W3C
> IBM
> Verizon
> FEMA
> Infoseek
>
>
> PHP:
>
> In April 2002, PHP overtook ASP as the #1 server-side scripting
> language on the internet. In April, PHP was used by 24% of the
> sites on the Internet. Over the past two years PHP has averaged
> a 6.5% monthly growth rate. Source: zend.com/news/zendpr.php?id=49
>
> PHP users:
> Cisco
> CMG
> Vodafone
> Motorola
> Siemens
> Ericsson
> CBS
> Unilever
> Philips
> BMC
> NTT
> Air Canada
> Lufthansa
> OnVista
> Lycos Europe
> Deutsche Bank
> NASA
> W3C
>
>
> MySQL:
>
> It isn't as easy to determine which database a site uses, but here
> is a list of sites that do use MySQL, according to MySQL.com:
>
> Yahoo! Finance
> Texas Instruments
> U.S. Census Bureau
> NASA
> Omaha Steaks
> Slashdot
> Cross Media Marketing Corp
> Powell's Books
> Department of Academic Information Systems
> Avacom Net Services
> Blue World Communications
> CoreSense
> Ericsson
> handy.de
> mobile.de
> Nemo-Q
> Silicon Storage Technology, Inc.
> Virage
>
>
> Linux:
>
> I can't find a list for this... I figured these out by trying big
> sites that came to mind. I didn't encounter a single Microsoft site,
> but I did get a few *BSD sites, and several Solaris sites.
>
> FBI
> Google
> Amazon
> AltaVista
> Slashdot
> Verizon
> FEMA
> CNN
>
>
> Security:
>
> Here's a list of security companies/groups that run any LAMP component:
> Security Focus (LA)
> Symantec (L)
> CERT (LA)
> Packet Storm (A)
> FBI (L)
> OSVDB (LA)
> At Stake (LA)
> Netcraft (LA)
> TESO (L)
> Phenoelit (LA)
> Doxpara (LAP)
> NGS Software (LAMP)
> PivX (LAP)
> Grey Magic (LAMP)
> Phrack (AP)
> ***
> It should be noted that just because a component doesn't appear in the
list
> doesn't mean it's not running. The only way I could figure out MySQL was
> sending
> a SYN to TCP/3306. If I got a SYN|ACK, I put an M. MySQL could be (should
be)
> firewalled off, and infosec people know this. Also, infosec people tend to
> play
> with banners (hehe look @ TESO's - teso.scene.at), so it's entirely
possible
> they're hiding something...
>
> Out of all the infosec sites I tried, I managed to find two Microsofts:
NAI
> and
> Verisign. I didn't bother with ntbugtraq, windowssecurity, etc- then
again, I
> didn't bother with linuxsecurity, root prompt, etc. Only went with groups
who
> pay
> attention to all OS's... Phrack and OSVDB are a little biased, but they
are
> still
> cross-platform.
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.0.7 (GNU/Linux)
>
> iD8DBQE9ygtO/rncFku1MdIRAmQpAJ9d+KkYSLhMriuZtI9jsjp3CAmZrACfaWJK
> Tf0R0hEMSICjAi6v9nz67GU=
> =Jj3Q
> -----END PGP SIGNATURE-----
>


--- End Message ---
--- Begin Message --- hi,
thanx for that list it's really convincing for these Microsofts :)
just something i wanted to ask about, is it a good thing or better for security to hide the script name from the address bar, through that list i found all the PHP pages hidden with HTML names, i don't know the technique exactly, but is it useful?

Note: I have found simens website using JSP ;)
don't worry i won't tell any one :)

khalid



_________________________________________________________________
Add photos to your e-mail with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail

--- End Message ---
--- Begin Message --- Nice list. I might be able to put it to work for me. BTW, if you want, you can add my site as a LAMP site (of course, as small as it is compared to the sites you have listed, you may not want too :)

http://www.by-tor.com

Evan Nemerson wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Okay, it took me a long (expletive deleted) time, so I figured I should share. Here is a list of popular web sites running Apache, PHP, MySQL, and Linux. If there are any errors, I apologize. This is not meant to be a definitive work. In fact, I wasn't even planning on posting it... until i looked at the clock ;)

This list is designed to convice teh boss (no type-o). If your boss is a bandwagon kind of guy, afraid to take risks, this is for you- er- him. And you. Him in that he can read it, you in that if he accepts LAMP, you're life will be a much more joyous existance ;)



- --------------------------------
Apache:

By far the most popular web server, with 60.54% market share. Its
closest competitor, Microsoft's IIS, has 28.89%. If all variants of
each server are counted, Apache's install base increases to 62.17%,
while IIS manages 29.42%). Statistics are from
http://www.netcraft.net/survey

Apache users:
Yahoo!
Amazon.com
AltaVista
BBC
mp3.com
SlashDot
HP
W3C
IBM
Verizon
FEMA
Infoseek


PHP:

In April 2002, PHP overtook ASP as the #1 server-side scripting
language on the internet. In April, PHP was used by 24% of the
sites on the Internet. Over the past two years PHP has averaged
a 6.5% monthly growth rate. Source: zend.com/news/zendpr.php?id=49

PHP users:
Cisco
CMG
Vodafone
Motorola
Siemens
Ericsson
CBS
Unilever
Philips
BMC
NTT
Air Canada
Lufthansa
OnVista
Lycos Europe
Deutsche Bank
NASA
W3C


MySQL:

It isn't as easy to determine which database a site uses, but here
is a list of sites that do use MySQL, according to MySQL.com:

Yahoo! Finance
Texas Instruments
U.S. Census Bureau
NASA
Omaha Steaks
Slashdot
Cross Media Marketing Corp
Powell's Books
Department of Academic Information Systems
Avacom Net Services
Blue World Communications
CoreSense
Ericsson
handy.de
mobile.de
Nemo-Q
Silicon Storage Technology, Inc.
Virage


Linux:

I can't find a list for this... I figured these out by trying big
sites that came to mind. I didn't encounter a single Microsoft site,
but I did get a few *BSD sites, and several Solaris sites.

FBI
Google
Amazon
AltaVista
Slashdot
Verizon
FEMA
CNN


Security:

Here's a list of security companies/groups that run any LAMP component:
Security Focus (LA)
Symantec (L)
CERT (LA)
Packet Storm (A)
FBI (L)
OSVDB (LA)
At Stake (LA)
Netcraft (LA)
TESO (L)
Phenoelit (LA)
Doxpara (LAP)
NGS Software (LAMP)
PivX (LAP)
Grey Magic (LAMP)
Phrack (AP)
***
It should be noted that just because a component doesn't appear in the list
doesn't mean it's not running. The only way I could figure out MySQL was sending
a SYN to TCP/3306. If I got a SYN|ACK, I put an M. MySQL could be (should be)
firewalled off, and infosec people know this. Also, infosec people tend to play
with banners (hehe look @ TESO's - teso.scene.at), so it's entirely possible
they're hiding something...

Out of all the infosec sites I tried, I managed to find two Microsofts: NAI and
Verisign. I didn't bother with ntbugtraq, windowssecurity, etc- then again, I
didn't bother with linuxsecurity, root prompt, etc. Only went with groups who pay
attention to all OS's... Phrack and OSVDB are a little biased, but they are still
cross-platform.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE9ygtO/rncFku1MdIRAmQpAJ9d+KkYSLhMriuZtI9jsjp3CAmZrACfaWJK
Tf0R0hEMSICjAi6v9nz67GU=
=Jj3Q
-----END PGP SIGNATURE-----



--- End Message ---
--- Begin Message ---
In the end it think comes down to use what you know best..

Php vs ASp vs JSp vs .Net

consider your budget, clients needs, bosses needs, future needs etc.
I came to Php as .Net came in.  I really like Php, i also really like ASP.

I learnt ASP first because my job required it, we had a IIS server already.

There all just tools to me, used to implement the best solutions for myself
or my clients in minimal time for minimal cost.

You mind find convincing your boss with $$$ easier.  Then again i know what
you mean about Bandwagon Bosses and there fellow MBM (management by
magazine)types.

Cheers

Brendon


-----Original Message-----
From: John Nichel [mailto:jnichel@;by-tor.com]
Sent: Thursday, November 07, 2002 5:59 PM
To: Evan Nemerson
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] Convince teh boss


Nice list.  I might be able to put it to work for me.  BTW, if you want,
you can add my site as a LAMP site (of course, as small as it is
compared to the sites you have listed, you may not want too :)

http://www.by-tor.com

Evan Nemerson wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Okay, it took me a long (expletive deleted) time, so I figured I should
share.
> Here is a list of popular web sites running Apache, PHP, MySQL, and Linux.
If
> there are any errors, I apologize. This is not meant to be a definitive
work.
> In fact, I wasn't even planning on posting it... until i looked at the
clock
> ;)
>
> This list is designed to convice teh boss (no type-o). If your boss is a
> bandwagon kind of guy, afraid to take risks, this is for you- er- him. And
> you. Him in that he can read it, you in that if he accepts LAMP, you're
life
> will be a much more joyous existance ;)
>
>
>
> - --------------------------------
> Apache:
>
> By far the most popular web server, with 60.54% market share. Its
> closest competitor, Microsoft's IIS, has 28.89%. If all variants of
> each server are counted, Apache's install base increases to 62.17%,
> while IIS manages 29.42%). Statistics are from
> http://www.netcraft.net/survey
>
> Apache users:
> Yahoo!
> Amazon.com
> AltaVista
> BBC
> mp3.com
> SlashDot
> HP
> W3C
> IBM
> Verizon
> FEMA
> Infoseek
>
>
> PHP:
>
> In April 2002, PHP overtook ASP as the #1 server-side scripting
> language on the internet. In April, PHP was used by 24% of the
> sites on the Internet. Over the past two years PHP has averaged
> a 6.5% monthly growth rate. Source: zend.com/news/zendpr.php?id=49
>
> PHP users:
> Cisco
> CMG
> Vodafone
> Motorola
> Siemens
> Ericsson
> CBS
> Unilever
> Philips
> BMC
> NTT
> Air Canada
> Lufthansa
> OnVista
> Lycos Europe
> Deutsche Bank
> NASA
> W3C
>
>
> MySQL:
>
> It isn't as easy to determine which database a site uses, but here
> is a list of sites that do use MySQL, according to MySQL.com:
>
> Yahoo! Finance
> Texas Instruments
> U.S. Census Bureau
> NASA
> Omaha Steaks
> Slashdot
> Cross Media Marketing Corp
> Powell's Books
> Department of Academic Information Systems
> Avacom Net Services
> Blue World Communications
> CoreSense
> Ericsson
> handy.de
> mobile.de
> Nemo-Q
> Silicon Storage Technology, Inc.
> Virage
>
>
> Linux:
>
> I can't find a list for this... I figured these out by trying big
> sites that came to mind. I didn't encounter a single Microsoft site,
> but I did get a few *BSD sites, and several Solaris sites.
>
> FBI
> Google
> Amazon
> AltaVista
> Slashdot
> Verizon
> FEMA
> CNN
>
>
> Security:
>
> Here's a list of security companies/groups that run any LAMP component:
> Security Focus                (LA)
> Symantec              (L)
> CERT                  (LA)
> Packet Storm          (A)
> FBI                   (L)
> OSVDB                 (LA)
> At Stake              (LA)
> Netcraft              (LA)
> TESO                  (L)
> Phenoelit             (LA)
> Doxpara                       (LAP)
> NGS Software          (LAMP)
> PivX                  (LAP)
> Grey Magic            (LAMP)
> Phrack                        (AP)
> ***
> It should be noted that just because a component doesn't appear in the
list
> doesn't mean it's not running. The only way I could figure out MySQL was
> sending
> a SYN to TCP/3306. If I got a SYN|ACK, I put an M. MySQL could be (should
be)
> firewalled off, and infosec people know this. Also, infosec people tend to
> play
> with banners (hehe look @ TESO's - teso.scene.at), so it's entirely
possible
> they're hiding something...
>
> Out of all the infosec sites I tried, I managed to find two Microsofts:
NAI
> and
> Verisign. I didn't bother with ntbugtraq, windowssecurity, etc- then
again, I
> didn't bother with linuxsecurity, root prompt, etc. Only went with groups
who
> pay
> attention to all OS's... Phrack and OSVDB are a little biased, but they
are
> still
> cross-platform.
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.0.7 (GNU/Linux)
>
> iD8DBQE9ygtO/rncFku1MdIRAmQpAJ9d+KkYSLhMriuZtI9jsjp3CAmZrACfaWJK
> Tf0R0hEMSICjAi6v9nz67GU=
> =Jj3Q
> -----END PGP SIGNATURE-----
>
>



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

--- End Message ---
--- Begin Message ---
Thank you for this very nice research effort!

BTW, is there any reason why PostgreSQL is not mentioned here? While it
seems there are far more MySQL installations, I personally value PostgreSQL
higher... it's OpenSource as well, it's an OO database (you may inherit,
have object identifiers, etc), and it doesn't suffer from MySQL's
self-admitted limitations, mainly the lack of stored procedures and triggers.


-- 
   >O     Ernest E. Vogelsinger
   (\)    ICQ #13394035
    ^     http://www.vogelsinger.at/


--- End Message ---
--- Begin Message ---
My second query still doesn't return anything? Even with $orderid = $row
removed as Jason suggested.
This is my current function.


function get_order_numbers()
{
$conn = db_connect();
$query = "select orders.orderid from orders, email where orders.orderid
= email.orderid and email.checked='no'";
$result = mysql_query($query) or die("Error: cannot select
orderid<BR>$query<BR>".mysql_error());
while( $row = mysql_fetch_array($result))
        {
        extract($row);
        //$orderid = $row;
        print_r($row);
        $query2 = "SELECT * FROM orders WHERE orderid=\"$orderid\"";
      $result2 = mysql_query($query2) or die("Error: cannot fetch
order<BR>$query2<BR>".mysql_error());
      extract(mysql_fetch_array($result2));
        }
}



> > What I want the function to do is say OK where the orderid's 
> > match pull out all the address details for each orderid and display 
> > what I want displayed accordingly. At the moment I get this array 
> > returned by using print_r($row). Array ( [0] => 100040 [orderid] => 
> > 100040 ) Array ( [0] => 100041 [orderid] => 100041 ) Array ( [0] => 
> > 100043 [orderid] => 100043 ) Array ( [0] => 100044 
> [orderid] => 100044 
> > ) Array ( [0] => 100046 [orderid] => 100046 ) Array ( [0] => 100050 
> > [orderid] => 100050 ) Array ( [0] => 100051 [orderid] => 100051 ) 
> > Array ( [0] => 100052 [orderid] => 100052 )
> >
> > Where do I go from here?
> 
> Well, like I said in my previous post if you remove the line:
> 
>   $orderid = $row;
> 
> then your second query *should* work.
> 
> -- 
> Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
> Open Source Software Systems Integrators
> * Web Design & Hosting * Internet & Intranet Applications 
> Development *



--- End Message ---
--- Begin Message ---
On Thursday 07 November 2002 15:15, Steve Jackson wrote:
> My second query still doesn't return anything? Even with $orderid = $row
> removed as Jason suggested.

What exactly do you mean by "doesn't return anything"?

a) Does the second query fail?
b) Do you get any errors?

If no to both (a) and (b) then your query succeeded.

Now, your code below as-is does not do anything with the 2nd query results. 
You've only used extract() on it, which by itself is not much use, unless you 
use the variables that has been extracted. Read my previous post about what 
extract() does (and read the manual for heaven's sake)

Also make liberal use of print_r() to see what values your variables contain 
at different stages of your program.

> This is my current function.
>
>
> function get_order_numbers()
> {
> $conn = db_connect();
> $query = "select orders.orderid from orders, email where orders.orderid
> = email.orderid and email.checked='no'";
> $result = mysql_query($query) or die("Error: cannot select
> orderid<BR>$query<BR>".mysql_error());
> while( $row = mysql_fetch_array($result))
>       {
>       extract($row);
>       //$orderid = $row;
>       print_r($row);
>       $query2 = "SELECT * FROM orders WHERE orderid=\"$orderid\"";
>       $result2 = mysql_query($query2) or die("Error: cannot fetch
> order<BR>$query2<BR>".mysql_error());
>       extract(mysql_fetch_array($result2));
>       }
> }

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

/*
One Bell System - it works.
*/

--- End Message ---
--- Begin Message ---
Finally I have it!
Cheers to all that helped. I was querying twice when I didn't need to
and as Jason said not doing anything with the extracted information.
This code works and displays data nicely.
function get_order_numbers()
{
$conn = db_connect();
$query = "select * from orders, email where orders.orderid =
email.orderid and email.checked='no'";
$result = mysql_query($query) or die("Error: cannot select
orderid<BR>$query<BR>".mysql_error());
while( $row = mysql_fetch_array($result))
  {
        extract($row);
        if (is_array($row))
        //print_r($row);
        {
        //echo "tests and "; 
        echo $row["orderid"];
        echo $row["ship_name"];
        }
        
  }
}

Steve Jackson
Web Developer
Viola Systems Ltd.
http://www.violasystems.com
[EMAIL PROTECTED]
Mobile +358 50 343 5159



> -----Original Message-----
> From: Jason Wong [mailto:php-general@;gremlins.com.hk] 
> Sent: 7. marraskuuta 2002 10:06
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP] Help me learn! with an explanation of 
> these two functions.
> 
> 
> On Thursday 07 November 2002 15:15, Steve Jackson wrote:
> > My second query still doesn't return anything? Even with $orderid = 
> > $row removed as Jason suggested.
> 
> What exactly do you mean by "doesn't return anything"?
> 
> a) Does the second query fail?
> b) Do you get any errors?
> 
> If no to both (a) and (b) then your query succeeded.
> 
> Now, your code below as-is does not do anything with the 2nd 
> query results. 
> You've only used extract() on it, which by itself is not much 
> use, unless you 
> use the variables that has been extracted. Read my previous 
> post about what 
> extract() does (and read the manual for heaven's sake)
> 
> Also make liberal use of print_r() to see what values your 
> variables contain 
> at different stages of your program.
> 
> > This is my current function.
> >
> >
> > function get_order_numbers()
> > {
> > $conn = db_connect();
> > $query = "select orders.orderid from orders, email where 
> > orders.orderid = email.orderid and email.checked='no'"; $result = 
> > mysql_query($query) or die("Error: cannot select 
> > orderid<BR>$query<BR>".mysql_error());
> > while( $row = mysql_fetch_array($result))
> >     {
> >     extract($row);
> >     //$orderid = $row;
> >     print_r($row);
> >     $query2 = "SELECT * FROM orders WHERE orderid=\"$orderid\"";
> >       $result2 = mysql_query($query2) or die("Error: cannot fetch 
> > order<BR>$query2<BR>".mysql_error());
> >       extract(mysql_fetch_array($result2));
> >     }
> > }
> 
> -- 
> Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
> Open Source Software Systems Integrators
> * Web Design & Hosting * Internet & Intranet Applications 
> Development *
> 
> /*
> One Bell System - it works.
> */
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 

--- End Message ---
--- Begin Message ---
On Thursday 07 November 2002 16:28, Steve Jackson wrote:
> Finally I have it!

<sigh> if this is your final code then you still don't "have it" !

> Cheers to all that helped. I was querying twice when I didn't need to
> and as Jason said not doing anything with the extracted information.

>       extract($row);
You're still not gaining anything by using extract() ...

>       if (is_array($row))
>       //print_r($row);
>       {
>       //echo "tests and ";
>       echo $row["orderid"];
>       echo $row["ship_name"];

... the whole point of using extract() is that instead of using 

  echo $row['orderid'];

you could simply use:

  echo $orderid;

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

/*
Don't feed the bats tonight.
*/

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

does anyone know a way to convert a gif file to jpg ?
I've made a photo album and, want to resize pictures to create thumbnails..
GD allow resizing jpeg files, but not gif files...
So... how can I create a jpeg file from the gif source ?
(may be with an external software...) ???


Cheers
P.E. Baroiller


--- End Message ---
--- Begin Message ---
> does anyone know a way to convert a gif file to jpg ?
> I've made a photo album and, want to resize pictures to create thumbnails..
> GD allow resizing jpeg files, but not gif files...
> So... how can I create a jpeg file from the gif source ?
> (may be with an external software...) ???

Command 'convert' from packet Image Magic (Linux)

It is problem with GD: "Since all GIF support was removed from the GD library in
version 1.6, this function is not available if you are using that version of the
GD library."




-- 
Krzysztof Dziekiewicz

--- End Message ---
--- Begin Message ---
thanks for all! :)

I'll take a look at this product.

P.E. Baroiller

"Krzysztof Dziekiewicz" <[EMAIL PROTECTED]> a écrit dans le message de news:
[EMAIL PROTECTED]
> > does anyone know a way to convert a gif file to jpg ?
> > I've made a photo album and, want to resize pictures to create
thumbnails..
> > GD allow resizing jpeg files, but not gif files...
> > So... how can I create a jpeg file from the gif source ?
> > (may be with an external software...) ???
>
> Command 'convert' from packet Image Magic (Linux)
>
> It is problem with GD: "Since all GIF support was removed from the GD
library in
> version 1.6, this function is not available if you are using that version
of the
> GD library."
>
>
>
>
> --
> Krzysztof Dziekiewicz
>


--- End Message ---
--- Begin Message ---
The GD library bundled with PHP 4.3 can read gif images (but not write
them)

-Rasmus

On Thu, 7 Nov 2002, BAROILLER Pierre-Emmanuel wrote:

> Hi all,
>
> does anyone know a way to convert a gif file to jpg ?
> I've made a photo album and, want to resize pictures to create thumbnails..
> GD allow resizing jpeg files, but not gif files...
> So... how can I create a jpeg file from the gif source ?
> (may be with an external software...) ???
>
>
> Cheers
> P.E. Baroiller
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

--- End Message ---
--- Begin Message ---
I've been trying to make php run on IIS for a while now and still having the following 
message:

"Security Alert! The PHP CGI cannot be accessed directly. Etc..."

I followed all instructions i could find: 
set cgi_force_redirect to 0
put my php.ini in winnt directory
maps the new xtension php with script engine on
set ISAPI too
IUSR_MyUser is the default user

I'm stuck in there.. could somebody help me?Don't know if it is the right place to ask 
?

Thanks

day
 


day
[EMAIL PROTECTED]
2002-11-07


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

I have 2 linux servers A and B. I am using a piece of code to upload file:

copy($resume,$fname);
unlink($resume);

or

move_uploaded_file($resume,$fname)

I am able to upload files to Server A, but not on Server B. I can see the
file name though, but has 0 file size.

I have give full permission for the folder.

can anyone please tell me why am i facing this problem.

thanks

ngd


--- End Message ---
--- Begin Message ---
Is there a way to send print_r output to a file?


--- End Message ---
--- Begin Message ---
At 11:12 07.11.2002, Kerry Kobashi said:
--------------------[snip]--------------------
>Is there a way to send print_r output to a file?
--------------------[snip]-------------------- 

rtfm :)
pardon me, but I couldn't resist...

ok, specifically:
http://www.php.net/manual/en/function.print-r.php

Tip: As with anything that outputs its result directly to the browser, you
can use the output-control functions to capture the output of this
function, and save it in a string (for example).

output-control functions: http://www.php.net/manual/en/ref.outcontrol.php

You could, for example:

ob_start();
print_r(your_array);
$result = ob_get_contents();
ob_end_clean();


-- 
   >O     Ernest E. Vogelsinger
   (\)    ICQ #13394035
    ^     http://www.vogelsinger.at/


--- End Message ---
--- Begin Message ---
On Thursday 07 November 2002 18:12, Kerry Kobashi wrote:
> Is there a way to send print_r output to a file?

Try something like this:

    ob_start();
    if ($title) {
      $title = '[' . date('Y-m-d H:i:s') . "] 
{$_SERVER['HTTP_HOST']}{$_SERVER['PHP_SELF']}::$title";
      echo "$title\n";
    }
    if ($message) {
      print_r($message);
      echo "\n";
    }
    $tmp = ob_get_contents();
    ob_end_clean();
    error_log($tmp, 3, "/some/path/or/another/php.log");

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

/*
He thinks by infection, catching an opinion like a cold.
*/

--- End Message ---
--- Begin Message ---
ahahahaha... i plead insanity



"Ernest E Vogelsinger" <[EMAIL PROTECTED]> wrote in message
news:5.1.1.6.2.20021107115742.02c2a228@;mail.vogelsinger.at...
> At 11:12 07.11.2002, Kerry Kobashi said:
> --------------------[snip]--------------------
> >Is there a way to send print_r output to a file?
> --------------------[snip]--------------------
>
> rtfm :)
> pardon me, but I couldn't resist...
>
> ok, specifically:
> http://www.php.net/manual/en/function.print-r.php
>
> Tip: As with anything that outputs its result directly to the browser, you
> can use the output-control functions to capture the output of this
> function, and save it in a string (for example).
>
> output-control functions: http://www.php.net/manual/en/ref.outcontrol.php
>
> You could, for example:
>
> ob_start();
> print_r(your_array);
> $result = ob_get_contents();
> ob_end_clean();
>
>
> --
>    >O     Ernest E. Vogelsinger
>    (\)    ICQ #13394035
>     ^     http://www.vogelsinger.at/
>
>


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

I'm having a buffering problem with following combination:
-Webserver: Apache 1.3.23
-CGI:       PHP 4.2.1
-Client:    IE 6.026 (but fails using others as well)

Description:
I want the output buffer of php being flushed to the client in a
time-consuming loop, using the flush() and/or ob_flush() functions of
php. The client recieves no output till the script is totally
finished.

Possible causes:

-is the php buffer function working properly?
  Yes it is. When i start buffering some text i check for the size of
  the buffer to grow, and it does. Then i flush it and i can see the
  buffer size is 0. So this means that php sends the buffer to the
  backend right?

-is the browser buffering?
  Yes it does, but sending 300 bytes prior to the 'real' data fixes
  that problem, as i could see on another server using the same
  client, but differing versions of php/apache. (php 4.0.2/
  apache 1.3.14). On this particular server it worked like a charm.

-is apache using gzip?
  Yes, gzip is enabled.It is known for buffering output till a script
  finishes, but i disabled gzip in httpd.conf for this particular
  file, as shown below:
  <IfModule mod_gzip.c>
    <Location /export/home/'hostname'/htdocs/debug.php>
       mod_gzip_on no
    </Location>
  </IfModule>
  I think that this should do the trick. If not, how could i verify
  gzip being disabled?


Question:
Does this (newer) version of apache/php has some defaults that enable it
to buffer output? If so how can i disable them for one particular
file/directory?

Thnx in advance,

Wildcard

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

Jule Slootbeek wrote:

Hi,
i'm writing a piece of code that allows me to upload the updated version of my website from the local tree, to the server.
I do this by comparing the linux timestamps on the local and remote files.
printing a table of the remote files works fine, but when i do it for my local files, i get an error for every file:

Warning: stat failed for bandhistory.html (errno=2 - No such file or directory) in /Users/jslootbe/Sites/upload.php on line 71

except for the index.php which just gives me a normal timestamp.
this is a dump of the dir:

total 232
drwxr-xr-x 25 jslootbe staff 850 Nov 6 11:20 .
drwxr-xr-x 11 jslootbe staff 374 Nov 6 13:59 ..
-rwxr-xr-x 1 jslootbe staff 15364 Nov 2 16:11 .DS_Store
-rwxr-xr-x 1 jslootbe staff 519 Oct 20 20:15 band.php
-rwxr-xr-x 1 jslootbe staff 2034 Oct 23 00:56 bandhistory.html
-rwxr-xr-x 1 jslootbe staff 1021 Nov 5 21:50 blindtheory.sql
-rwxr-xr-x 1 jslootbe staff 1016 Nov 5 21:32 blindthoery.sql
-rwxr-xr-x 1 jslootbe staff 322 Oct 8 19:08 colors.inc.php
-rwxr-xr-x 1 jslootbe staff 146 Oct 8 19:08 contact.php
-rwxr-xr-x 1 jslootbe staff 2266 Nov 5 00:13 dates.php
-rwxr-xr-x 1 jslootbe staff 188 Oct 8 19:08 globals.inc.php
-rwxr-xr-x 1 jslootbe staff 194 Oct 9 20:35 globals.inc.php-online
-rwxr-xr-x 1 jslootbe staff 4 Oct 9 20:32 home.php
-rwxr-xr-x 1 jslootbe staff 3376 Oct 30 21:21 index.php
-rwxr-xr-x 1 jslootbe staff 5851 Nov 6 11:20 interaction.php
-rwxr-xr-x 1 jslootbe staff 2958 Nov 5 00:16 layout.php
drwxr-xr-x 18 jslootbe staff 612 Oct 19 13:55 lyrics
-rwxr-xr-x 1 jslootbe staff 1457 Oct 25 20:42 lyrics.php
-rwxr-xr-x 1 jslootbe staff 2578 Oct 25 20:32 media.php
-rwxr-xr-x 1 jslootbe staff 815 Nov 5 00:18 misc.inc.php
-rwxr-xr-x 1 jslootbe staff 1370 Oct 20 19:39 news.php
-rwxr-xr-x 1 jslootbe staff 21 Oct 8 22:39 phpinfo.php
drwxr-xr-x 7 jslootbe staff 238 Oct 10 12:38 pics
-rwxr-xr-x 1 jslootbe staff 148 Oct 8 19:08 template.php
-rwxr-xr-x 1 jslootbe staff 1064 Nov 3 18:53 todo.list

and here's the code.

$localDir = "/Users/jslootbe/Sites/blindtheory";
if ($opendir = opendir($localDir)) {
while ($localList = readdir($opendir))
{
if ($localList != "." && $localList != "..") {
echo " <tr>
<td>".$localList."</td>
<td>modified</td>
<td>".filemtime($localList)."</td>
This should be   filemtime($localDir.'/'.$localList)


</tr>"; }
}
closedir($opendir);
}

does anyone have any idea why it won't show a stamp for every file?

TIA,
Jule
Jule Slootbeek
[EMAIL PROTECTED]

--- End Message ---
--- Begin Message ---
Look at configure.log (don't remember the name exactly), it is more verbose

Joydeep Ghosh wrote:

Hello,

installing PHP with netscape on Sun Solaris

Iplanet webserver 4.1
Sun Solaris 2.7

followed instruction as published at http://www.php.net/manual/sv/install.netscape-enterprise.php

Onstep 6 of Basic install during netscape server configuration it errors out. *Attached is the config.log.*
gcc3.2 which comes with libgcc-3.2 ia installed, even then the errors are displayed.

*Screen shot of error*
intranet{ghoshj}64: ./configure --with-nsapi=/export/webtools/netscape/server4 -
-enable-track-vars --enable-libgcc
loading cache ./config.cache
checking for Cygwin environment... no
checking for mingw32 environment... no
checking host system type... sparc-sun-solaris2.7
checking for a BSD compatible install... ./install-sh -c
checking whether build environment is sane... yes
checking whether make sets ${MAKE}... yes
checking for working aclocal... found
checking for working autoconf... found
checking for working automake... found
checking for working autoheader... found
checking for working makeinfo... missing
checking whether to enable maintainer-specific portions of Makefiles... no
checking for gcc... gcc
checking whether the C compiler (gcc ) works... no
configure: error: installation or configuration problem: C compiler cannot creat
e executables.

thanks in advance for your suggestion.

Joydeep


--- End Message ---
--- Begin Message ---
Hi all,
    I want to write a parser that would read a menu structure in a text
file, parse it and then turn that into an array structure. The menu
structure would use brackets to represent a new submenu and for each item in
the menu there would be some extra properties. EG:

Root
(
    Sub1
    (
        Sub1A
        Sub1B
    )
    Sub2
    (
        Sub2A
        (
            Sub2Aa
            Sub2Ab
        )
        Sub2B
    )
)


The parser needs to turn that menu structure into something like this:

"Root" => array
(
    "Sub1" => array
    (
        "Sub1A",
        "Sub1B",
    ),
    "Sub2" => array
    (
        "Sub2A" => array
        (
            "Sub2Aa",
            "Sub2Ab"
        ),
        "Sub2B"
    )
)


In addition to this, I need to have the additional feature of storing
addition information for each item in the menu. Thus

Root
(
    Sub1                                        name=sub1    title="the
title 1"
    (
        Sub1A
        Sub1B
    )
    Sub2
)

Would Become Something Like

"Root" => array
(
    "Sub1" => array
    (
        "info" => array("name"=>sub1, "title"=>"the title 1"),
        "" => array
        (
            "Sub1A",
            "Sub1B",
        )
    ),
    "Sub2" => array
)


Could somebody recommend to what is the best way to implement such a
function. There are essentially two parts to this. The first part reads and
parses the text file, and the second part puts the structure into an array.
Any help would be greatly appreciated.

Many Thanks

Rishabh


--- End Message ---
--- Begin Message --- Why cannot you store it in the file as array and just include it. Simpler and much faster


Rishabh Gupta wrote:

Hi all,
I want to write a parser that would read a menu structure in a text
file, parse it and then turn that into an array structure. The menu
structure would use brackets to represent a new submenu and for each item in
the menu there would be some extra properties. EG:

Root
(
Sub1
(
Sub1A
Sub1B
)
Sub2
(
Sub2A
(
Sub2Aa
Sub2Ab
)
Sub2B
)
)


The parser needs to turn that menu structure into something like this:

"Root" => array
(
"Sub1" => array
(
"Sub1A",
"Sub1B",
),
"Sub2" => array
(
"Sub2A" => array
(
"Sub2Aa",
"Sub2Ab"
),
"Sub2B"
)
)


In addition to this, I need to have the additional feature of storing
addition information for each item in the menu. Thus

Root
(
Sub1 name=sub1 title="the
title 1"
(
Sub1A
Sub1B
)
Sub2
)

Would Become Something Like

"Root" => array
(
"Sub1" => array
(
"info" => array("name"=>sub1, "title"=>"the title 1"),
"" => array
(
"Sub1A",
"Sub1B",
)
),
"Sub2" => array
)


Could somebody recommend to what is the best way to implement such a
function. There are essentially two parts to this. The first part reads and
parses the text file, and the second part puts the structure into an array.
Any help would be greatly appreciated.

Many Thanks

Rishabh





--- End Message ---
--- Begin Message ---
I have a suggestion that doesn't involve PHP or MySQL.  You could make it
look like dynamic pages (and, actually, it would be) by using Javascript.
Copy all the html your site generates from a browser, save the pages, and
then code those pages as html with Javascript to replace dates with current
dates.  All the other content will remain the same but you'd have it looking
like "today's" data.

Not sure if this would work for your content.  I figured this out for a site
I put together where everything is dynamic.  I had set up an elaborate
backend and this was the best solution to let a prospect see it without
actually giving them access to sensitive areas.  It's usefulness might
depend on your content, though.

Mike


"Robert McPeak" <[EMAIL PROTECTED]> wrote in message
news:sdc900a1.082@;ccp2.jhuccp.org...
My organization has a need to publish some of our web content on a CD-ROM.
I'm in search of suggestions on how to publish our dynamic content
(php/mysql templates) in some sort of "runtime" configuration that would let
users browse the site from cd.

What's involved with this?  Is there such a thing as runtime mySQL?  What
would it take to serve PHP from a CD?

Help!  I don't know where to begin and am looking for advice.

Thanks,

Bob



--- End Message ---

Reply via email to