php-general Digest 23 Feb 2001 03:00:44 -0000 Issue 528

Topics (messages 41147 through 41251):

PHP and PAM
        41147 by: Robert Marzon

Re: No GIF support in this PHP build???
        41148 by: Jeremy Gillies

java servlets
        41149 by: Adrian Murphy
        41177 by: Michael Stearne

Re: crontab help
        41150 by: Joe Stump
        41151 by: Joe Stump
        41159 by: Arnold Gamboa
        41162 by: Boget, Chris
        41163 by: Joe Stump
        41165 by: Dale Frohman

Re: Terrible Hosting Experience
        41152 by: Jeremy Gillies

security?
        41153 by: Conover, Ryan

File Upload Mime Headers Garbled
        41154 by: Joseph Koenig

Re: size of directory
        41155 by: Robert V. Zwink
        41158 by: Christian Reiniger

Re: Print in html <?
        41156 by: Christian Reiniger

Re: Generating percentages of numbers
        41157 by: Christian Reiniger
        41160 by: PHPBeginner.com

Re: PDF Problems
        41161 by: Mike Tuller
        41240 by: php3.developersdesk.com

phpPgAdmin ?
        41164 by: Oguz Demirkapi
        41212 by: Martin A. Marques

-----s--- bit
        41166 by: Serkan AKÇIN
        41251 by: Opec Kemp \( Ozemail \)

Re: Uploading/Timing scripts
        41167 by: Chris Lee

nntp imap_open causes crash
        41168 by: Bo O. Erichsen

SEARCH ?
        41169 by: Abe Asghar

Re: CGI BIN PHP
        41170 by: bill

Re: How to get information from <input type=image ...>
        41171 by: Tim Ward

Re: PHP vs. FreeTDS
        41172 by: Michael Kimsal

String manipulation with ereg_replace
        41173 by: Ian LeBlanc
        41176 by: Ian LeBlanc
        41226 by: Simon Garner
        41233 by: Christian Reiniger

Re: isset()
        41174 by: Steve Edberg
        41186 by: Joe Stump
        41187 by: Ernest E Vogelsinger

Alternate 2 schedules...
        41175 by: J-Frs Dubé

cached fasttemplates permissions prob
        41178 by: Peter Van Dijck

Retrieving echoed data
        41179 by: Todd Cary

Re: image orientation?
        41180 by: Matt McClanahan

sessions and objects
        41181 by: Kevin Beckford
        41183 by: jeremy brand
        41184 by: Cal Evans

Writing to an ftp...
        41182 by: Brandon Orther

I have a great problem with sessions, can anybody help me!!!
        41185 by: Securez

International support
        41188 by: Soma Interesting

variable sent using pots is cat!
        41189 by: kaab kaoutar
        41201 by: Jason Stechschulte
        41202 by: Jason Stechschulte

Obtaining a value from dynamic list box
        41190 by: Claudia

How do I request a new feature?
        41191 by: Ide, Jim
        41238 by: php3.developersdesk.com

Sessions and naming a file with SID
        41192 by: Brandon Orther
        41195 by: Ernest E Vogelsinger
        41216 by: Martin A. Marques

i18n
        41193 by: Peter Van Dijck

security and php
        41194 by: Gustavo Vieira Goncalves Coelho Rios

Templates & PHP
        41196 by: Maamiin

Passing values containing a ? and a &
        41197 by: Tom Harris
        41198 by: Javier Muniz
        41199 by: Ernest E Vogelsinger

Troubleshooting Strange Problem
        41200 by: Ben Ocean
        41206 by: Philip Olson

books
        41203 by: Gustavo Vieira Goncalves Coelho Rios
        41208 by: Philip Olson
        41215 by: Boaz Yahav
        41229 by: Phillip Bow
        41241 by: Navid Yar

File command
        41204 by: Liam Gibbs

Solaris with 100 VHosts -- death
        41205 by: Dan Debertin

concatenate vars?
        41207 by: W.D.
        41210 by: Philip Olson
        41213 by: W.D.

security
        41209 by: Gustavo Vieira Goncalves Coelho Rios
        41211 by: Javier Muniz
        41219 by: Gustavo Vieira Goncalves Coelho Rios
        41223 by: Javier Muniz

Annoucement: Smarty template engine 1.3.0 released
        41214 by: Monte Ohrt

filenames on file download
        41217 by: indrek siitan
        41221 by: Chris Lee

best slashdot?
        41218 by: Jaxon

Arrays -- How do I insert a pair of data into an array
        41220 by: Scott Walter
        41224 by: Javier Muniz
        41236 by: Christian Reiniger

Adding new data at beginning.
        41222 by: Jan Grafström

Re: Asking Sth about PHP
        41225 by: Toby Butzon

Re: MySQL execution order?
        41227 by: ..s.c.o.t.t.. [gts]
        41230 by: Mark Maggelet

Problem using META tag refresh for page re-directs
        41228 by: Johnson, Kirk
        41231 by: Chris Lee
        41244 by: Johnson, Kirk
        41246 by: Chris Lee

Regex problems.....
        41232 by: Ian LeBlanc
        41234 by: Phillip Bow

Ok, this might make more sense
        41235 by: YoBro
        41237 by: Phillip Bow
        41239 by: Chris Lee

Problems sending mail to aol with the mail() function
        41242 by: Steve Kenshalo

Counter Help
        41243 by: Navid Yar
        41247 by: Chris Lee

Best Way To Control Forms
        41245 by: Jonathan Sharp

file uploads problem?
        41248 by: Ed Lazor
        41250 by: Ed Lazor

Location
        41249 by: Brandon Feldhahn

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]


----------------------------------------------------------------------


Hello

I tried to used PHP with autentification....
I wrote script, but I had got error :
Fatal error: Call to undefined function: pam_auth() in
/usr/home/httpd/html/farm/dev/test/user.php on line 2
I read some FAQ and I found the answer:
....
For some reason, newer version of php4 do not always seem to properly update
the autoconf stuff when your run the buildconf script. If you get this
error, configure php again and then look through the autoconf output and
look for a line that says "Checking for Pam Auth support: yes". If you don't
see it, it isn't getting built in. To fix this, run the command 'autoconf'
in the top level php source directory, this should update the configure
script to recognize the pam auth stuff.
....

I was trying to configure PHP with "Pam Auth support", but I can't find this
opitions.
I looked all option from ./configure and there is nothing...
Server use FreeBSD 4.1.1


--
R.






Try using the PNGs instead. They can get very small with good results.


> -----Original Message-----
> From: jason cox [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, February 21, 2001 4:39 PM
> To: Ana Carolina Blanco Abascal
> Cc: [EMAIL PROTECTED]
> Subject: Re: [PHP] No GIF support in this PHP build???
> 
> 
> Are you trying to create images or just display
> images?  If you're trying to create images using GD,
> you'll need to check the version of GD you have
> installed.  If you have a newer version or don't have
> it installed at all, you won't be able to use that
> functionality.  If you're trying to display and image,
> you should even be calling a function.  If you'd like,
> post you code and let me have a look.
> 
> Jason
> 
> --- Ana Carolina Blanco Abascal <[EMAIL PROTECTED]>
> wrote:
> > I have several images all over my site  but when I
> > call an image by a
> > php3 file I get this error:
> >     ImageCreateFromGif: No GIF support in this PHP
> > build in
> > 
> > Any ideas...
> > Thanks
> > 
> > > -- 
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail:
> > [EMAIL PROTECTED]
> > For additional commands, e-mail:
> > [EMAIL PROTECTED]
> > To contact the list administrators, e-mail:
> [EMAIL PROTECTED]
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Auctions - Buy the things you want at great prices! 
http://auctions.yahoo.com/




Is there anything java servlets can do that php can't.
is there any pressing need for me to learn servlet 
technology,other than to expand the old skillset.
the difference between jsp and servlets is that 
with the former the code is embedded in the html.correct?





Adrian Murphy wrote:

> Is there anything java servlets can do that php can't.

Well I had to use a servlet because of it's threading ability once. Java
servlets are actual programs that can continue to run on the server.  That
is useful when you need a threaded process for instance.

Michael


>
> is there any pressing need for me to learn servlet
> technology,other than to expand the old skillset.
> the difference between jsp and servlets is that
> with the former the code is embedded in the html.correct?
>

That's right.

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





I send roughly 1M of these and put a sleep() (not usleep - that's microseconds)
into the while loop - I've come up with a decent balance that sends out a good
number (like 5000) and then sleeps just long enough to get them out of qmail's
queue, then it sends another 5000 (and so on).

Usually takes about 24 hours to send out 1M messages.

--Joe

On Fri, Feb 22, 2002 at 03:36:33PM +0800, Arnold Gamboa wrote:
> thanks for the comment
> 
> let's just say i have 100k emails to send... don't you think that will drain
> the system resources if i send it all at once even if you have usleep(300)
> on each while?
> 
> your comment please.
> 
> > put a sleep(300); at the end of your while() loop - I did this on my mass
> > mailer and it worked like a charm.
> >
> > --Joe
> >
> > On Fri, Feb 22, 2002 at 02:53:10PM +0800, Arnold Gamboa wrote:
> > > hi there.
> > >
> > > is there a way to tell crontab to do:
> > >
> > > "run script every 5 mins for 1 hour"..
> > >
> > > i have this mass email script that is so huge that i need it to chunk
> into
> > > records and make sure that it will run every 5 mins for 1 hour.
> > >
> > > Thanks for any help.
> > >
> >
> > --
> >
> > --------------------------------------------------------------------------
> -----
> > Joe Stump, PHP Hacker,
>                      -o)
> > http://www.miester.org http://www.care2.com
> /\\
> > "It's not enough to succeed. Everyone else must fail" -- Larry Ellison
> _\_V
> > --------------------------------------------------------------------------
> -----
> >
> >
> >
> 

-- 

-------------------------------------------------------------------------------
Joe Stump, PHP Hacker, [EMAIL PROTECTED]                                 -o)
http://www.miester.org http://www.care2.com                                 /\\
"It's not enough to succeed. Everyone else must fail" -- Larry Ellison     _\_V
-------------------------------------------------------------------------------





BTW when it sleeps PHP takes up no noticable resources. Also I'm running the
php binary to send out these messages (that way I can use screen and make sure
that my browser doesn't crash, os freeze, etc.)

--Joe

On Fri, Feb 22, 2002 at 03:36:33PM +0800, Arnold Gamboa wrote:
> thanks for the comment
> 
> let's just say i have 100k emails to send... don't you think that will drain
> the system resources if i send it all at once even if you have usleep(300)
> on each while?
> 
> your comment please.
> 
> > put a sleep(300); at the end of your while() loop - I did this on my mass
> > mailer and it worked like a charm.
> >
> > --Joe
> >
> > On Fri, Feb 22, 2002 at 02:53:10PM +0800, Arnold Gamboa wrote:
> > > hi there.
> > >
> > > is there a way to tell crontab to do:
> > >
> > > "run script every 5 mins for 1 hour"..
> > >
> > > i have this mass email script that is so huge that i need it to chunk
> into
> > > records and make sure that it will run every 5 mins for 1 hour.
> > >
> > > Thanks for any help.
> > >
> >
> > --
> >
> > --------------------------------------------------------------------------
> -----
> > Joe Stump, PHP Hacker,
>                      -o)
> > http://www.miester.org http://www.care2.com
> /\\
> > "It's not enough to succeed. Everyone else must fail" -- Larry Ellison
> _\_V
> > --------------------------------------------------------------------------
> -----
> >
> >
> >
> 

-- 

-------------------------------------------------------------------------------
Joe Stump, PHP Hacker, [EMAIL PROTECTED]                                 -o)
http://www.miester.org http://www.care2.com                                 /\\
"It's not enough to succeed. Everyone else must fail" -- Larry Ellison     _\_V
-------------------------------------------------------------------------------





hi,

thanks again. questions:

1. sleep(300) would mean pause by 300 mins, right?  That's why i thought you
mean usleep(300) - 300 microseconds. please comment
2. what you mean is i will send 5000 emails, then pause and send again?

Thanks for your help.

> I send roughly 1M of these and put a sleep() (not usleep - that's
microseconds)
> into the while loop - I've come up with a decent balance that sends out a
good
> number (like 5000) and then sleeps just long enough to get them out of
qmail's
> queue, then it sends another 5000 (and so on).
>
> Usually takes about 24 hours to send out 1M messages.
>
> --Joe
>
> On Fri, Feb 22, 2002 at 03:36:33PM +0800, Arnold Gamboa wrote:
> > thanks for the comment
> >
> > let's just say i have 100k emails to send... don't you think that will
drain
> > the system resources if i send it all at once even if you have
usleep(300)
> > on each while?
> >
> > your comment please.
> >
> > > put a sleep(300); at the end of your while() loop - I did this on my
mass
> > > mailer and it worked like a charm.
> > >
> > > --Joe
> > >
> > > On Fri, Feb 22, 2002 at 02:53:10PM +0800, Arnold Gamboa wrote:
> > > > hi there.
> > > >
> > > > is there a way to tell crontab to do:
> > > >
> > > > "run script every 5 mins for 1 hour"..
> > > >
> > > > i have this mass email script that is so huge that i need it to
chunk
> > into
> > > > records and make sure that it will run every 5 mins for 1 hour.
> > > >
> > > > Thanks for any help.
> > > >
> > >
> > > --
> > >
> >
> --------------------------------------------------------------------------
> > -----
> > > Joe Stump, PHP Hacker,
> >                      -o)
> > > http://www.miester.org http://www.care2.com
> > /\\
> > > "It's not enough to succeed. Everyone else must fail" -- Larry Ellison
> > _\_V
> >
> --------------------------------------------------------------------------
> > -----
> > >
> > >
> > >
> >
>
> --
>
> --------------------------------------------------------------------------
-----
> Joe Stump, PHP Hacker,
                     -o)
> http://www.miester.org http://www.care2.com
/\\
> "It's not enough to succeed. Everyone else must fail" -- Larry Ellison
_\_V
> --------------------------------------------------------------------------
-----
>
>
>





> 1. sleep(300) would mean pause by 300 mins, right?  That's 
> why i thought you mean usleep(300) - 300 microseconds. 

No, 300 seconds - 5 minutes.

Chris




1.) sleep() is in seconds - plain old seconds - so sleep(300) == 5 minutes.

2.) yes - send, sleep, send, ...

--Joe


On Thu, Feb 22, 2001 at 11:09:05PM +0800, Arnold Gamboa wrote:
> hi,
> 
> thanks again. questions:
> 
> 1. sleep(300) would mean pause by 300 mins, right?  That's why i thought you
> mean usleep(300) - 300 microseconds. please comment
> 2. what you mean is i will send 5000 emails, then pause and send again?
> 
> Thanks for your help.
> 
> > I send roughly 1M of these and put a sleep() (not usleep - that's
> microseconds)
> > into the while loop - I've come up with a decent balance that sends out a
> good
> > number (like 5000) and then sleeps just long enough to get them out of
> qmail's
> > queue, then it sends another 5000 (and so on).
> >
> > Usually takes about 24 hours to send out 1M messages.
> >
> > --Joe
> >
> > On Fri, Feb 22, 2002 at 03:36:33PM +0800, Arnold Gamboa wrote:
> > > thanks for the comment
> > >
> > > let's just say i have 100k emails to send... don't you think that will
> drain
> > > the system resources if i send it all at once even if you have
> usleep(300)
> > > on each while?
> > >
> > > your comment please.
> > >
> > > > put a sleep(300); at the end of your while() loop - I did this on my
> mass
> > > > mailer and it worked like a charm.
> > > >
> > > > --Joe
> > > >
> > > > On Fri, Feb 22, 2002 at 02:53:10PM +0800, Arnold Gamboa wrote:
> > > > > hi there.
> > > > >
> > > > > is there a way to tell crontab to do:
> > > > >
> > > > > "run script every 5 mins for 1 hour"..
> > > > >
> > > > > i have this mass email script that is so huge that i need it to
> chunk
> > > into
> > > > > records and make sure that it will run every 5 mins for 1 hour.
> > > > >
> > > > > Thanks for any help.
> > > > >
> > > >
> > > > --
> > > >
> > >
> > --------------------------------------------------------------------------
> > > -----
> > > > Joe Stump, PHP Hacker,
> > >                      -o)
> > > > http://www.miester.org http://www.care2.com
> > > /\\
> > > > "It's not enough to succeed. Everyone else must fail" -- Larry Ellison
> > > _\_V
> > >
> > --------------------------------------------------------------------------
> > > -----
> > > >
> > > >
> > > >
> > >
> >
> > --
> >
> > --------------------------------------------------------------------------
> -----
> > Joe Stump, PHP Hacker,
>                      -o)
> > http://www.miester.org http://www.care2.com
> /\\
> > "It's not enough to succeed. Everyone else must fail" -- Larry Ellison
> _\_V
> > --------------------------------------------------------------------------
> -----
> >
> >
> >
> 

-- 

-------------------------------------------------------------------------------
Joe Stump, PHP Hacker, [EMAIL PROTECTED]                                 -o)
http://www.miester.org http://www.care2.com                                 /\\
"It's not enough to succeed. Everyone else must fail" -- Larry Ellison     _\_V
-------------------------------------------------------------------------------





sleep is in seconds.  so that would be 5 minutes.

On Thu, 22 Feb 2001, Arnold Gamboa wrote:

> hi,
> 
> thanks again. questions:
> 
> 1. sleep(300) would mean pause by 300 mins, right?  That's why i thought you
> mean usleep(300) - 300 microseconds. please comment
> 2. what you mean is i will send 5000 emails, then pause and send again?
> 
> Thanks for your help.
> 
> > I send roughly 1M of these and put a sleep() (not usleep - that's
> microseconds)
> > into the while loop - I've come up with a decent balance that sends out a
> good
> > number (like 5000) and then sleeps just long enough to get them out of
> qmail's
> > queue, then it sends another 5000 (and so on).
> >
> > Usually takes about 24 hours to send out 1M messages.
> >
> > --Joe
> >
> > On Fri, Feb 22, 2002 at 03:36:33PM +0800, Arnold Gamboa wrote:
> > > thanks for the comment
> > >
> > > let's just say i have 100k emails to send... don't you think that will
> drain
> > > the system resources if i send it all at once even if you have
> usleep(300)
> > > on each while?
> > >
> > > your comment please.
> > >
> > > > put a sleep(300); at the end of your while() loop - I did this on my
> mass
> > > > mailer and it worked like a charm.
> > > >
> > > > --Joe
> > > >
> > > > On Fri, Feb 22, 2002 at 02:53:10PM +0800, Arnold Gamboa wrote:
> > > > > hi there.
> > > > >
> > > > > is there a way to tell crontab to do:
> > > > >
> > > > > "run script every 5 mins for 1 hour"..
> > > > >
> > > > > i have this mass email script that is so huge that i need it to
> chunk
> > > into
> > > > > records and make sure that it will run every 5 mins for 1 hour.
> > > > >
> > > > > Thanks for any help.
> > > > >
> > > >
> > > > --
> > > >
> > >
> > --------------------------------------------------------------------------
> > > -----
> > > > Joe Stump, PHP Hacker,
> > >                      -o)
> > > > http://www.miester.org http://www.care2.com
> > > /\\
> > > > "It's not enough to succeed. Everyone else must fail" -- Larry Ellison
> > > _\_V
> > >
> > --------------------------------------------------------------------------
> > > -----
> > > >
> > > >
> > > >
> > >
> >
> > --
> >
> > --------------------------------------------------------------------------
> -----
> > Joe Stump, PHP Hacker,
>                      -o)
> > http://www.miester.org http://www.care2.com
> /\\
> > "It's not enough to succeed. Everyone else must fail" -- Larry Ellison
> _\_V
> > --------------------------------------------------------------------------
> -----
> >
> >
> >
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 
> 





For Canadian web developers, you might want to check out Magma in Ottawa.

They have great packages, fantastic connections, and offer great service
help.

Also, if you sign up more that 2 accounts, you can bill through YOURSELF and
make money... that is, if you develop for others, they pay you and then you
pay Magma a percentage.

IF you just need redirecting name servers, they can do that for $50 a
year... for $US, multiply by about .65 to .69...

I have also used Verio.com - formerly Tabnet.com (VERY fast connections) --
located in California... the packages are better now than when i started
using the service about 4 years ago.

take care,
jer

> -----Original Message-----
> From: Brian V Bonini [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, February 21, 2001 8:45 AM
> To: Boaz Yahav; [EMAIL PROTECTED]; Krznaric Michael; 'Thomas
> Deliduka'; PHP List
> Subject: RE: [PHP] Terrible Hosting Experience
> 
> 
> Hmmmm, I have to tell you, and perhaps your not aware,
> but I've gone to your site many times and had it not
> come up. Then have the traceroutes reveal that the site
> was unreachable at it's final destination.
> 
> -Brian
> ***********
> 
> > -----Original Message-----
> > From: Boaz Yahav [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, February 21, 2001 2:16 AM
> > To: '[EMAIL PROTECTED]'; Krznaric Michael; 'Thomas Deliduka'; PHP
> > List
> > Subject: RE: [PHP] Terrible Hosting Experience
> >
> >
> > Guys,
> >
> > When you decide you want to pay for hosting and get the best
> > service possible check out :
> >
> > http://www.weberdev.com/index.php3?GoTo=phenominet/prices.htm
> >
> > This is your one stop shop for hosting. WeberDev.com is hosted there
> > and I can tell you that their service is amazing. They are 
> fast, reliable
> > and more than anything, very professional (specially in PHP 
> / MySQL).
> >
> > Sincerely
> >
> >       berber
> >
> > Visit http://www.weberdev.com Today!!!
> > To see where PHP might take you tomorrow.
> >
> >
> > -----Original Message-----
> > From: Brian V Bonini [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, February 21, 2001 1:20 AM
> > To: Krznaric Michael; 'Thomas Deliduka'; PHP List
> > Subject: RE: [PHP] Terrible Hosting Experience
> >
> >
> > Hmmm, last I heard they were using an OC-3 circuit,
> > that's not too impressive..... lots of those floating
> > around..... We've been running on an OC-48 for some
> > time now....
> >
> > > -----Original Message-----
> > > From: Krznaric Michael [mailto:[EMAIL PROTECTED]]
> > > Sent: Tuesday, February 20, 2001 5:56 PM
> > > To: 'Thomas Deliduka'; PHP List
> > > Subject: RE: [PHP] Terrible Hosting Experience
> > >
> > >
> > > I was about to buy a server from Alabanza.  Am I ever glad I
> > didn't.  The
> > > only thing impressive about them is their connection.  And for
> > all I know
> > > they could be lying about that, as well.
> > >
> > > Mike
> > >
> > > -----Original Message-----
> > > From: Thomas Deliduka [mailto:[EMAIL PROTECTED]]
> > > Sent: Tuesday, February 20, 2001 3:18 PM
> > > To: PHP List
> > > Subject: Re: [PHP] Terrible Hosting Experience
> > >
> > >
> > > On 2/20/01 3:17 PM this was written:
> > >
> > > > We host and provide servers to a good number
> > > > of clients that have come over from Alabanza.
> > > > All of them complaining of similar experiences....
> > > > I think that company has been plagued for a
> > > > long time....
> > >
> > > I agree. I have dealt with them on one level or another 
> since 1997. They
> > > used to have great customer service and skillful people. Well,
> > > those people
> > > left out of frustration and better opportunities and they were
> > > replaced with
> > > idiots.  These idiots that man their help desks and other
> > > services now have
> > > very little to know about how to even work a computer.
> > >
> > > I know that they have their help their help-desk in a 
> college town and
> > > employ people from the university. Some of the CS reps are
> > philosophy and
> > > other liberal arts students.
> > >
> > > I called one day to give my updated credit card information to a
> > > billing rep
> > > but they weren't in so I got a CS rep. They said, "You 
> can update it
> > > online", I said, "Your control panel isn't behind a secure
> > server. I will
> > > not update my Credit card information online." I asked her
> > write it down,
> > > put it in an envelope and deliver it to the billing rep by hand.
> > > The CS rep
> > > said, "No problem."
> > >
> > > About a week later I received an e-mail. I was forwarded from the
> > > CS rep the
> > > conversation that took place 0VER E-MAIL with my CC information
> > > included in
> > > the e-mail from the very first sending. I was so mad. I told
> > her that she
> > > just compromised my CC number! She said, "But I sent it right to
> > > her in the
> > > office." I said, "You office is in a whole-nother state 
> from where the
> > > server is. It traveled unsecurely from your location to the
> > > server and back
> > > again several times in the last few days." she was clueless.
> > >
> > > Okay, I'm shutting up now.
> > > --
> > >
> > > Thomas Deliduka
> > > IT Manager
> > >      -------------------------
> > > New Eve Media
> > > The Solution To Your Internet Angst
> > > http://www.neweve.com/
> > >
> > >
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > To contact the list administrators, e-mail: 
> [EMAIL PROTECTED]
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > To contact the list administrators, e-mail: 
> [EMAIL PROTECTED]
> > >
> > >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: 
> [EMAIL PROTECTED]
> >
> 
> 




The company 
I am interning with is thinking of moving some operations of its intranet to
an extranet.  I researching different security to use for the connection any
recommendations? SSL? Not sure what else to use.

Ryan Conover




I've seen this question asked, but I have yet to find the answer. What
do I need to do to make IE on Mac stop giving me a warning that the File
Upload Mime Headers are Garbled when a user uploads a file? Thanks,

Joe




If you are running linux try

du -shc /path/to/directory

If you are running some other unix flavor, omit the -h and try -k

Robert Zwink
http://zwink.levitate.org

-----Original Message-----
From: Andris Jancevskis [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 22, 2001 6:29 AM
To: [EMAIL PROTECTED]
Subject: [PHP] size of directory


Hi,

  how can I determine size of directory with subdirectories? if I see
  at "ls -l" it returns directory size 4096. I want to know how large
  is directory (with files into) without looping all files ...

thanx,
-- 
Andris
mailto:[EMAIL PROTECTED]



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





On Thursday 22 February 2001 12:28, Andris Jancevskis wrote:
>   how can I determine size of directory with subdirectories? if I see
>   at "ls -l" it returns directory size 4096. I want to know how large
>   is directory (with files into) without looping all files ...

man du

-- 
Christian Reiniger
LGDC Webmaster (http://sunsite.dk/lgdc/)

Drink wet cement. Get stoned.




On Thursday 22 February 2001 12:14, PHPBeginner.com wrote:
> if it is in html then do this:
>
> &lt;?
>
> but if you are using PHP then echo '<?' will work perfectly.

No.
echo '<?' will ensure that the stuff is not parsed, but the browser will 
not evaluate it (unknown tags are ignored). So &lt; or echo '&lt;' is 
needed.

-- 
Christian Reiniger
LGDC Webmaster (http://sunsite.dk/lgdc/)

Drink wet cement. Get stoned.




On Thursday 22 February 2001 12:14, PHPBeginner.com wrote:
> I have once requested a feature like this at PHP-DEV..
>
> here's the code:
> http://bugs.php.net/?id=7429

Well, I agree with the last comment on that page - Why should that be 
added to the language if it's implemented in PHP with only 4 lines?

-- 
Christian Reiniger
LGDC Webmaster (http://sunsite.dk/lgdc/)

Drink wet cement. Get stoned.




However ctype were taken!

http://bugs.php.net/?id=7360
Once implemented, many developers will have a whole bunch of fun.
:-))


Sincerely,

 Maxim Maletsky
 Founder, Chief Developer

 PHPBeginner.com (Where PHP Begins)
 [EMAIL PROTECTED]
 www.phpbeginner.com





-----Original Message-----
From: Christian Reiniger [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 22, 2001 11:55 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Generating percentages of numbers


On Thursday 22 February 2001 12:14, PHPBeginner.com wrote:
> I have once requested a feature like this at PHP-DEV..
>
> here's the code:
> http://bugs.php.net/?id=7429

Well, I agree with the last comment on that page - Why should that be 
added to the language if it's implemented in PHP with only 4 lines?

-- 
Christian Reiniger
LGDC Webmaster (http://sunsite.dk/lgdc/)

Drink wet cement. Get stoned.

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






Do you have any idea when 4.0.5 will be out?

> From: "Mathias Meyer" <[EMAIL PROTECTED]>
> Date: Thu, 22 Feb 2001 10:57:31 +0100
> To: <[EMAIL PROTECTED]>
> Cc: <[EMAIL PROTECTED]>
> Subject: RE: [PHP] PDF Problems
> 
>> -----Original Message-----
>> From: Mike Tuller [mailto:[EMAIL PROTECTED]]
>> Sent: Thursday, February 22, 2001 12:01 AM
>> To: Michael Stearne; Sam Goin
>> Cc: php mailing list
>> Subject: Re: [PHP] PDF Problems
>> 
>> If anyone knows how to fix this please let me know.
>> 
> In fact the Maintainers of the PDFlib-Extension in PHP change from PHP
> 4.0.5. That means, that those functions, already mentioned in the manual
> will work from then on I guess. I also wondered why those functions are
> mentioned, although they do not work yet.
> 
> The fix you mentioned, was not really correct, because the
> comment-parser at php.net replaces the <?php with &lt;?php to avoid
> trouble with html-tags I guess. The fix describes there was just how to
> do an example pdf with for example php4.0.4pl1 and pdflib 3.0.3, because
> there is no pdf_new() in this versions. it worked fine for me and I hate
> the thought of changing my just finished pdf-project to the new
> functions.
> 
> you'll find a short text about pdflib and php 4.0.5 at
> 
> http://www.php.net/manual/en/ref.pdf.php
> 
> There is a small text with the heading "Confusion with old PDFlib
> Versions".
> 
> best regards from germany.





Addressed to: Mike Tuller <[EMAIL PROTECTED]>
              php mailing list <[EMAIL PROTECTED]>

** Reply to note from Mike Tuller <[EMAIL PROTECTED]> Thu, 22 Feb 2001 09:05:34 
-0600
>
> Do you have any idea when 4.0.5 will be out?


If nothing goes wrong, they hope to do it around the first of the month.




Rick Widmer
Internet Marketing Specialists
http://www.developersdesk.com





Hi,

We have a PostgreSQL and Php 4.02 preinstalled Cobalt RaQ4r server and I
want to manage PostgreSQL via pgPgAdmin. But when I try to login I got
error such as :

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Fatal error: Call to undefined function: pg_connect() in
/home/sites/home/web/manage/phpPgAdmin/lib.inc.php on line 130
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

At "Documentation.html" of phpPgAdmin there is an explanation such as :

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
phpPgAdmin can't connect to PostgreSQL. What's wrong?
Either there is an error with your PHP setup or your username/password
is wrong. Try to make a small script which uses pg_connect and see if it
works. If it doesn't, it may be you haven't even compiled PostgreSQL
support into PHP.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

So how can I login into phpPgAdmin ? Do I need to install any extra
support for PHP ?

Thnx !





Mensaje citado por: Oguz Demirkapi <[EMAIL PROTECTED]>:

> 
> Hi,
> 
> We have a PostgreSQL and Php 4.02 preinstalled Cobalt RaQ4r server and
> I
> want to manage PostgreSQL via pgPgAdmin. But when I try to login I got
> error such as :
> 
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Fatal error: Call to undefined function: pg_connect() in
> /home/sites/home/web/manage/phpPgAdmin/lib.inc.php on line 130
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Do you have PHP compiled to work with Postgres? Because thats what the error
message says. It says that pg_connect is not defined, which means you don't have
a postgres php.
recompile!!!!!

Saludos... :-)




System Administration: It's a dirty job,
but someone told I had to do it.
-----------------------------------------------------------------
Martín Marqués                  email:  [EMAIL PROTECTED]
Santa Fe - Argentina            http://math.unl.edu.ar/~martin/
Administrador de sistemas en math.unl.edu.ar
-----------------------------------------------------------------





Hi,

I am running apache server as user/group=apache/httpd
And want to access the shadow file to authenticate my users from the system.

shadow file is owned by root and chmod to 400.

server-root:/5:28pm>ls -al /etc/shadow
-r--------   1 root     sys         27695 Feb 22 10:06 /etc/shadow

I can access the shadow from cgi-bin / c code by giving the chmod +s bit .

How can I access from my php codes.
Giving +s bit to the php source don't solve my problem.

Can you give me a solution or documentation about it.

Thanks for your advice.






Hi,

Why do you want to access /etc/shadow from your PHP?. As a general
rules of thumb that's a pretty bad idea. The reason for this is that
/etc/shadow is owned by Root and it's *should* only be readable by
Root
and noone else.

Now in answer to your question "Why your PHP" script can't read
/etc/shadow is that if you're PHP script is running as Apache module
(or even a stand alone CGI). Your User ID would most likely *not* be
Root.
Thus you are not allowed to read the /etc/shadow.

You are able to fix this by running the Apache process as Root!
THIS IS A VERY VERY bad idea but possible nonetheless as it is
a huge security hazard.

To configure Apache to run as Root, check out Apache doc

HTH.

> Hi,
>
> I am running apache server as user/group=apache/httpd
> And want to access the shadow file to authenticate my users
> from the system.
>
> shadow file is owned by root and chmod to 400.
>
> server-root:/5:28pm>ls -al /etc/shadow
> -r--------   1 root     sys         27695 Feb 22 10:06 /etc/shadow
>
> I can access the shadow from cgi-bin / c code by giving the
> chmod +s bit .





I use the same to see if a file was uploaded, may not be the best, but it
works.

a simple class that I include works just as well as yours but it gives 4
decimal places on the seconds. one simple line.

$debug->time();
$debug->time('finnishing while statement');


<?php

 function mtime()
 {
  $mtime = microtime();
  $mtime = str_replace('.', '', $mtime);
  $mtime = explode(' ', $mtime);
  $mtime = $mtime[1] . $mtime[0];

  return($mtime);
 }

  class debug
  {

  function debug()
  {
   $this->start = mtime();
  }

  function reset()
  {
   $all_vars = get_object_vars($this);
   foreach($all_vars as $pos => $val)
    if ($pos != 'error')
     unset($this->$pos);
  }

  function time($text = '')
  {
   $this->break = mtime();
   $time = ($this->break - $this->start) / 1000000000;
   echo number_format($time, 4) .' '. $text ."<br>\n";
   $this->start = $this->break;
  }
  }

  $debug = new debug;
?>

--


Chris Lee
Mediawaveonline.com

em. [EMAIL PROTECTED]

ph. 250.377.1095
ph. 250.376.2690
fx. 250.554.1120


""Matt"" <[EMAIL PROTECTED]> wrote in message
003f01c09cbc$274b39c0$64019998@mattt">news:003f01c09cbc$274b39c0$64019998@mattt...
Hi,

I wondered if anyone knew what would be the better method to use to see if a
file has been sent/uploaded?

method 1:
if ($HTTP_POST_FILES['file']['name'] != "none" && $HTTP_POST_FILES['file']
!= "") {

method 2:
if (@$fp = fopen($HTTP_POST_FILES['file']['tmp_name'],"r")) {

method 2 seems to work better, and seeing as I have to open the file on the
next line testing to see if its there seemed the better way to do it?

How can I find out how long my scripts take to execute?

I'm currently using..
$stimer = timer();
// code ......
$etimer = timer();
echo "\n\nPage processed in: ". ($etimer-$stimer);

Function timer() {
 $milli = explode(" ", microtime());
 return $milli[0];
}

Which works but is their a better way to do it?

Thanks,
Matt







I have a problem with imap_open:

I can do imap_open on nntp server that has no authentication. But when i try on
a nntpserver that requires a password.. php dumps core (signal 11 gdb backtrace
is #0 0x0 in ?? ()) ( i executed the cgi version of php to be sure that apache
has nothing to do with it.)

i tested c-client with the mtest program and it worked perfectly.

I've tried to compile php4 with -enable-debug but i'm not so experienced with
gdb so when i load the core-file i still get no symbols or references to the
instruction that causes the problem.

it should be simple to test: 
try to connect to a nntp server without username and password
try to connect to a nntp server that requires username and password


i have looked through the c-client code and the php4 extension and i could
imagine the problem might be in mm_login but i'm 

the server is running:
php4.0.5-dev latest cvs
linux 2.2.12-20smp
imap (imap-2001.BETA.SNAP-0102201858) also tried (imap-4.7c)

All help is appreciated an if anybody wants more information or maybe a test
nntp account i can provide that (just send me a mail).

regards

Bo O. Erichsen

check out http://www.jay.net

-------------------------------------------------
This mail sent through Jay.net: http://www.jay.net




Hi there,

I am implementing a search function on a site that we are working on.  We
have created a script that will search through the contents of a page and
looks for matches etc.  It works well but will get slow on a large site.

Does anybody know a tutorial or info on how to create an indexing system so
the search can just search the indexing page rather than all files on a
site.


Thanks





Cool, Hrishi.

Can you make it work if you use a different url?  For example, for SSL
connections like:

https://www.secure-website.net/~mydomain

I'm thinking of using something like this:

$spos=strpos($SCRIPT_FILENAME, "/public_html");  // or whatever the name of the
public root dir
$firstpath = substr($SCRIPT_FILENAME,0,$spos);
$fullpath = $firstpath . SCRIPT_NAME;

Not sure, but I think it's close.

kind regards,

bill

Hrishi wrote:

> hey,
>
> don't go bald yet :)
>
> my web host (communitech.net) has the same setup... is that where you're
> hosted ?
>
> i have a script  called 'php4.cgi' in my /cgi-bin which contains:
>
>         #!/bin/sh
>         #echo -e "Content-type: text/plain\n\n";
>         #set
>         SCRIPT_NAME=$REDIRECT_URL;export SCRIPT_NAME;
>         SCRIPT_FILENAME=$PATH_TRANSLATED;export SCRIPT_FILENAME;
>         /bin/php4;
>         #set
> the #ed out commands are for debugging you may not need them.
> my .htaccess in the documentroot contains :
>
>         Action application/x-php4-script "/cgi-bin/php4.cgi"
>         AddHandler application/x-php4-script php
>
> i hope you can use this.
> if you have any other problems, reply to the list because i'm sure more
> people can use this 'technique'. its still under testing, (i made it 2 days
> ago) so if there are any changes i need to make, i'll post it here.
>
> cheers,
> hrishi
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]





I've just done some testing and the "Image" type input doesn't seem to pass
its anem across as a variable at all when the form is submitted in the way a
submit button does. This is contrary to the w3c html specs. I've tested this
in nutscrape and micros**t ie5.

this is the code that doesn't work:

<?php
if (isset($fred2)) echo "fred2 set"; // only shows if submit button clicked
?>

<form action="#" method="post">

<input type=image name=fred2 src = "done.bmp" value="done0bmp">
<input type=image name=fred2 src = "tetra.bmp" value="minebmp">
<input type=submit name=fred2 value="submit">

</form>

        Tim Ward
        Senior Systems Engineer

Please refer to the following disclaimer in respect of this message:
http://www.stivesdirect.com/e-mail-disclaimer.html


> -----Original Message-----
> From: Tim Ward 
> Sent: 22 February 2001 09:07
> To: 'Zenith'; [EMAIL PROTECTED]
> Subject: RE: How to get information from <input type=image ...>
> 
> 
> use isset($action1) and isset($action2) to test each.
> 
> the nice way to do it would be for them to have the same name 
> but different
> values as you would do with alternative submit buttons, but I 
> haven't ever
> needed to find out how to do that and doesn't seem to be 
> quite that simple.
> 
>       Tim Ward
>       Senior Systems Engineer
> 
> Please refer to the following disclaimer in respect of this message:
> http://www.stivesdirect.com/e-mail-disclaimer.html
> 
> 
> > -----Original Message-----
> > From: Zenith [mailto:[EMAIL PROTECTED]]
> > Sent: 21 February 2001 17:51
> > To: [EMAIL PROTECTED]
> > Subject: How to get information from <input type=image ...>
> > 
> > 
> > Hello everbody, if a have HTML document lik this:
> > <form action = "submit_to.php">
> >     <input type="image" src="xxx" name="action1">
> >     <input type="image" src="xxx" name="action2">
> > </form>
> > 
> > How can know whether the user is pressed on the "action1" or 
> > "action2" image
> > button??
> > 
> > 
> > 
> 




FreeTDS is used to provide Sybase and MSSQL-specific TDS protocol
 instructions to the databases.  ODBC is a different protocol (from my
understanding).

If you're trying to use ODBC stuff, you need an ODBC driver.  I think FreeTDS
might have this/allow this, but I don't think it's intended to do that.


Scott Fletcher wrote:

> I can't user mssql_connect, I'm using odbc_connect!  Most of the websites
> for my company use odbc_connect.  Because we sometime move the website from
> unix to windows and back.  So, it is more reliable that way.
>
> Scott
>
> "Michael Kimsal" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> >
> >
> > Scott Fletcher wrote:
> >
> > >    Hi!  I am installing the FreeTDS so that unix machine can use PHP to
> > > connect to MS-SQL Server using odbc_connect.
> >
> > I assume you mean mssql_connect, not odbc_connect.
> >
> >
> > > However, the direction is
> > > pretty tricky and it isn't much of a help in clarification.  I have been
> > > wonder if I am suppose to use the sybase environment variable and
> library
> > > path.  From what I understand is that I don't need to use those because
> it
> > > is for SYBASE only.  All I can do is to compile FreeTDS with the
> > > "./config --with-sybase=../freetds-0.51" and it would take care of that
> for
> > > PHP use.
> > >
> >
> > You might have to set the sybase variable, but I don't think I did.
> > It wasn't too much harder than ./configure ./make ./make install,
> > then compiling PHP with --with-sybase=/usr/local/freetds
> >
> > Did this not work?
> >
> >
> > >
> > >   Am I wrong?  Please help me out!
> > >
> > > Thanks,
> > >  Scott
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]







I am working on a site that has over 1000 pages and all the images need to 
be made lower case in the HTML.
Here is what I have so far. Please someone tell me what I am doing wrong.


$contents="<img src=ThisOneReallyNeedsToBeAllLowercase.gif 
alt=ThisOneReallyNeedsToBeAllLowercase.gif>";

$contents = EREG_REPLACE("([-_a-zA-Z0-9]+).gif",strtolower("\\0"),$contents);


Output of $contents needs to equal
<img src=thisonereallyneedstobealllowercase.gif 
alt=thisonereallyneedstobealllowercase.gif>


I have the top part of my script reading the whole DIR and only editing the 
HTML files so that part is taken care of
All I need it help with making the images tag all lower case.
Regards,

Ian LeBlanc
Web Development
Rask, Inc. - www.rask.com
Phone: (727) 517-2000
Fax:   (727) 517-2001









I am working on a site that has over 1000 pages and all the images need to 
be made lower case in the HTML.
Here is what I have so far. Please someone tell me what I am doing wrong.


$contents="<img src=ThisOneReallyNeedsToBeAllLowercase.gif 
alt=ThisOneReallyNeedsToBeAllLowercase.gif>";

$contents = EREG_REPLACE("([-_a-zA-Z0-9]+).gif",strtolower("\\0"),$contents);


Output of $contents needs to equal
<img src=thisonereallyneedstobealllowercase.gif 
alt=thisonereallyneedstobealllowercase.gif>


I have the top part of my script reading the whole DIR and only editing the 
HTML files so that part is taken care of
All I need it help with making the images tag all lower case.
Regards,

Ian LeBlanc
Web Development
Rask, Inc. - www.rask.com
Phone: (727) 517-2000
Fax:   (727) 517-2001







From: "Ian LeBlanc" <[EMAIL PROTECTED]>

>
> I am working on a site that has over 1000 pages and all the images need to
> be made lower case in the HTML.
> Here is what I have so far. Please someone tell me what I am doing wrong.
>
>
> $contents="<img src=ThisOneReallyNeedsToBeAllLowercase.gif
> alt=ThisOneReallyNeedsToBeAllLowercase.gif>";
>
> $contents =
EREG_REPLACE("([-_a-zA-Z0-9]+).gif",strtolower("\\0"),$contents);
>
>
> Output of $contents needs to equal
> <img src=thisonereallyneedstobealllowercase.gif
> alt=thisonereallyneedstobealllowercase.gif>
>
>



You need to use preg_replace which supports evaluating PHP code for the
replacement. To use preg functions you need to have compiled PHP with PCRE
(Perl Compatible Regular Expression) support.

http://www.php.net/manual/function.preg-replace.php3

This should do the trick (untested!):

<?
    $contents = "<img src=ThisOneReallyNeedsToBeAllLowercase.gif
alt=ThisOneReallyNeedsToBeAllLowercase.gif>";

    $contents = preg_replace("/([-_a-zA-Z0-9]+)\.gif/e", "strtolower('\\1')
. '.gif'", $contents);
?>


Cheers

Simon Garner





On Thursday 22 February 2001 23:42, Simon Garner wrote:

> This should do the trick (untested!):
>
> <?
>     $contents = "<img src=ThisOneReallyNeedsToBeAllLowercase.gif
> alt=ThisOneReallyNeedsToBeAllLowercase.gif>";
>
>     $contents = preg_replace("/([-_a-zA-Z0-9]+)\.gif/e",
> "strtolower('\\1') . '.gif'", $contents);
> ?>

simpler that
"/([-_a-zA-Z0-9]+)\.gif/e"
is
"/([-\w]+)\.gif/e"

-- 
Christian Reiniger
LGDC Webmaster (http://sunsite.dk/lgdc/)

Google results 1-10 of about 142,000,000 for e. Search took 0.18 seconds.

- http://www.google.com/search?q=e




I would do this:

if (!$AgeChild) $AgeChild = 'NA';

More compact, easier to read (to me, anyway). This presumes that a 
value of '' (empty string, interpreted by PHP as false) is NOT a 
valid value here.

As far as your sniplet goes, it is possible that there may be some 
PHP type-casting issues here, depending on: whether $AgeChild is 
numeric or string; the fact that the STRING "false" isn't equivalent 
to the CONSTANT false, the use of == vs. ===.

Time to check out the docs - specifically the types and variables 
sections (also the functions->variables section)...

        - steve



At 5:07 PM -0600 2/22/01, Jacky@lilst wrote:
>People
>I tried to check if teh field has set a vaule in it before submit 
>using isset with the sniplet below
>
>if ((isset($AgeChild))=="false") {
>$AgeChild = "NA";
>}
>
>The resule is that it always displays NA whether or not it has vaule 
>in the field, what is the correct way of using isset for this 
>purpose? Or should I use empty() ?
>Jack
>[EMAIL PROTECTED]
>"There is nothing more rewarding than reaching the goal you set for yourself"


-- 
+--- "They've got a cherry pie there, that'll kill ya" ------------------+
| Steve Edberg                           University of California, Davis |
| [EMAIL PROTECTED]                               Computer Consultant |
| http://aesric.ucdavis.edu/                  http://pgfsun.ucdavis.edu/ |
+-------------------------------------- FBI Special Agent Dale Cooper ---+




I stand firm on strlen() for the following reasons ...

if(!$var) will sometimes act strangely (has for me in the past) when variables
are set to something other than what you are expecting.

if(isset($var)) will return true if your text field is declared but not filled
in.

if(empty($var)) will return true if $var is set to 0 (for obvious reason) so is
only good for certain instances.

strlen() on the other hand converts the variable to a string and returns a count
of characters. It's never failed or acted funky. For this reason I use it 
religiously. 

Others might say "well it's extra overhead" to which I reply "I'll take an extra
bazillionth of a second to know for sure I have what I need"

--Joe

On Thu, Feb 22, 2001 at 08:18:22AM -0800, Steve Edberg wrote:
> I would do this:
> 
> if (!$AgeChild) $AgeChild = 'NA';
> 
> More compact, easier to read (to me, anyway). This presumes that a 
> value of '' (empty string, interpreted by PHP as false) is NOT a 
> valid value here.
> 
> As far as your sniplet goes, it is possible that there may be some 
> PHP type-casting issues here, depending on: whether $AgeChild is 
> numeric or string; the fact that the STRING "false" isn't equivalent 
> to the CONSTANT false, the use of == vs. ===.
> 
> Time to check out the docs - specifically the types and variables 
> sections (also the functions->variables section)...
> 
>       - steve
> 
> 
> 
> At 5:07 PM -0600 2/22/01, Jacky@lilst wrote:
> >People
> >I tried to check if teh field has set a vaule in it before submit 
> >using isset with the sniplet below
> >
> >if ((isset($AgeChild))=="false") {
> >$AgeChild = "NA";
> >}
> >
> >The resule is that it always displays NA whether or not it has vaule 
> >in the field, what is the correct way of using isset for this 
> >purpose? Or should I use empty() ?
> >Jack
> >[EMAIL PROTECTED]
> >"There is nothing more rewarding than reaching the goal you set for yourself"
> 
> 
> -- 
> +--- "They've got a cherry pie there, that'll kill ya" ------------------+
> | Steve Edberg                           University of California, Davis |
> | [EMAIL PROTECTED]                               Computer Consultant |
> | http://aesric.ucdavis.edu/                  http://pgfsun.ucdavis.edu/ |
> +-------------------------------------- FBI Special Agent Dale Cooper ---+
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 

-------------------------------------------------------------------------------
Joe Stump, PHP Hacker, [EMAIL PROTECTED]                                 -o)
http://www.miester.org http://www.care2.com                                 /\\
"It's not enough to succeed. Everyone else must fail" -- Larry Ellison     _\_V
-------------------------------------------------------------------------------





At 19:07 22.02.2001, Joe Stump said:
--------------------[snip]--------------------
>I'll take an extra bazillionth of a second to know for sure
>I have what I need
--------------------[snip]-------------------- 

Do you really know _how_ right you are?
<g>

     ...ebird

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





          I' m searching a way to programmatically alternate  2 schedules each sunday 
at 00:00. Schedule1 start on first sunday and seven days later, schedule2 replace 
schedule1,and seven days later, schedule1 replace schedule2 etc...
          Waiting...
                John




I'm trying to get cachedfasttemplates to work.
I chmodded the entire directory and everything in it 775 (using -R), I 
still get
Warning: fopen("./menu.cache","w") - Permission denied in 
../includes/classes/fasttemplate/cachedfasttemplate.class.php on line 73

Any ideas at all? I've been stuck on this for the entire afternoon...
thanks
Peter

~~~~~~~~~~~~~~~~~~~~~
http://liga1.com  ,a weblog on:
- Localisation
- Internationalisation
- Globalisation
- Accessibility





I am sending data to a credit card authorization firm by opening a
socket and sending the data with the POST method.  They in turn "echo"
the status back to my page.  I am not clear on how to put this data into
a variable (it is a comma delimited string) so that I can decode it.

Will the data be in $fp as shown in the code below?

Many thanks.........

Todd

      $http = new http;

      $fp = $http->http_fpost($server, $path . "sendauth.php",
                 "SID=". $sid .
            "&pu_courseno=" . urlencode($pu_courseno) .
            "&pu_amount=" . urlencode($pu_amount) .
            "&pu_ccno=" . $pu_ccno .
            "&pu_exp=" . $pu_expiremo . $pu_expireyr .
            "&pu_ssn=" . $pu_ssn);
      if($fp) {
        print '<BASE HREF="' . $url . 'sendauth.php"><p>';
        fpassthru($fp);
        exit;
      }; //if $fp


--
Todd Cary
Ariste Software
[EMAIL PROTECTED]






On Wed, Feb 21, 2001 at 05:48:50PM -0500, Jaxon wrote:

> Is there any way to take an image from the filesystem, say a .jpg or .png,
> and display it in a different orientation?  e.g. 20 degrees to the right?

Yes, php_imlib can do image rotations.

http://mmcc.cx/php_imlib/
http://mmcc.cx/php_imlib/documentation.php#imlib_create_rotated_image

Matt




Hello all,
    I've been away from php for a while, ( and I'm glad to be back) Last
time I checked in, sessioning was kinda working - especially the sessioning
of objecs. Is this feature robust enough for production now? I want to do
basic sessioning, and I don't have a lot of development time. What I want to
do is simply :
- Log in
-instantsiate an object that will contain the user information
-save the data in session
-allow me to recreate that object from page to page
How would I do/find out how to do this?






Don't store your object in the session, that is just bad design.
Store a lookup value, then grab your object from your DB only when you
need it.

Jeremy Brand :: Sr. Software Engineer :: 408-245-9058 :: [EMAIL PROTECTED]
http://www.JeremyBrand.com/Jeremy/Brand/Jeremy_Brand.html for more 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    "LINUX is obsolete"  -- Andy Tanenbaum, January 29th, 1992
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
       http://www.JEEP-FOR-SALE.com/ -- I need a buyer
  Get your own Free, Private email at http://www.smackdown.com/

On Thu, 22 Feb 2001, Kevin Beckford wrote:

> Date: Thu, 22 Feb 2001 12:36:29 -0500
> From: Kevin Beckford <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: [PHP] sessions and objects
> 
> Hello all,
>     I've been away from php for a while, ( and I'm glad to be back) Last
> time I checked in, sessioning was kinda working - especially the sessioning
> of objecs. Is this feature robust enough for production now? I want to do
> basic sessioning, and I don't have a lot of development time. What I want to
> do is simply :
> - Log in
> -instantsiate an object that will contain the user information
> -save the data in session
> -allow me to recreate that object from page to page
> How would I do/find out how to do this?
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 
> 





Why is this good design?

If I create a user object, populate it, kill the connection to the database
(or return it to the pool) and cache the object then I can retrieve it any
time I want without having to hit the database.

Not arguing, just curious as to your perspective.

Cal
http://www.calevans.com


-----Original Message-----
From: jeremy brand [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 22, 2001 11:46 AM
To: Kevin Beckford
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] sessions and objects


Don't store your object in the session, that is just bad design.
Store a lookup value, then grab your object from your DB only when you
need it.

Jeremy Brand :: Sr. Software Engineer :: 408-245-9058 :: [EMAIL PROTECTED]
http://www.JeremyBrand.com/Jeremy/Brand/Jeremy_Brand.html for more
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    "LINUX is obsolete"  -- Andy Tanenbaum, January 29th, 1992
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
       http://www.JEEP-FOR-SALE.com/ -- I need a buyer
  Get your own Free, Private email at http://www.smackdown.com/

On Thu, 22 Feb 2001, Kevin Beckford wrote:

> Date: Thu, 22 Feb 2001 12:36:29 -0500
> From: Kevin Beckford <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: [PHP] sessions and objects
>
> Hello all,
>     I've been away from php for a while, ( and I'm glad to be back) Last
> time I checked in, sessioning was kinda working - especially the
sessioning
> of objecs. Is this feature robust enough for production now? I want to do
> basic sessioning, and I don't have a lot of development time. What I want
to
> do is simply :
> - Log in
> -instantsiate an object that will contain the user information
> -save the data in session
> -allow me to recreate that object from page to page
> How would I do/find out how to do this?
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>


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






Hello,

I need to write a file and upload it to a ftp.  Is there a way to upload
without making a temp file?  Like making a text file on the server and
writing to it?

Thank you,

--------------------------------------------
Brandon Orther
WebIntellects Design/Development Manager
[EMAIL PROTECTED]
800-994-6364
www.webintellects.com
--------------------------------------------





I install a new system RH6.2 width some updates the kernel is a 2.2.17-14
I use Apache 3.1.14 whit PHP 4.0.4pl1 compiles as a module.

I use a test page that is very simple to check sessions:

<?php
session_start();

if( !isset( $c)) {
    session_register("c");
    $c = 1;
}

echo $c . "<br>";

?>
<a href="index.php">reload</A>

In the new machine this code every show 1, don't save session data.
I see in /tmp and all the sess_* files are empty.
I check configuration, etc, and don't found anything.

I check the same code in other machine with the same configuration, and
works fine.

Can anybody help me??






Hello everyone,

I'm currently working a project that is intended to handle Japanese 
character sets - and now I'm told ideally iMode too. :) The iMode isn't 
such an issue at the moment - but the article below has spooked me a 
little. At an early point in the project we tested if putting some input 
into a web form, which ultimately was handled by php then stored in 
postgres would return fully intact - and it did. This left me comfortable 
that PHP and Postgres don't seem to care what language they're storing in 
fields or variables. I'm 'guessing' that this is because the data, whether 
its English or Japanese is being stored in binary (or something else?). Of 
course I wouldn't be able to sort the data or do anything else that would 
require PHP/Postgres to be able to interpret the data. However if I compile 
Postgres with locals support for the character set/language in question - 
then postgres will be able to sort Japanese. Is this right?

Have I got this all right so far? I have attempted to do my research on 
this - but finding a real beginners guide to international web development 
has been a trick. And the best sources I have found on this topic generally 
are specific to Oracle. Any links would be appreciated.

Ok the next part of this message is an article I thought would be generally 
interesting so I'm not hesitating to post it entirely. It was forwarded to 
me so I'm not sure of the source.

For the postgres folks, these developers went with MySQL - I've chosen 
Postgres. Is there anything MySQL does that Postgres doesn't in terms of 
language support that I should be aware of?

>Back to case study
>r-newbold.com
>
>George Baptista is riding the wave of the latest technology with his 
>company's newest venture: 
><http://www.r-newbold.com>r-newbold.<http://www.r-newbold.com>com, a 
>wireless i-Mode site created with PHP.
>
>Based in Tokyo, George is a Web developer and co-partner with Izumi 
>Hiroshima at <http://www.omame.com>Studio <http://www.omame.com>Omame. He 
>was part of the creative team behind the Japanese-language site, and he is 
>finding that i-Mode is not only fashionable, but also the face of the future.
>
>r-newbold.com was developed for British fashion designer, Paul Smith. NTT 
>DoCoMo's i-Mode Web-browsing cellular phones, which already have over 10 
>million users, offers a fast wireless data service with Internet access. 
>In Japan, it's been a hit with the younger generation. And since 
>r-newbold.com's target population is young, hip and fashionable, the 
>decision to create an i-Mode site rather than a regular Web site made 
>perfect sense.
>
>PHP and i-Mode: The perfect match
>"i-Mode is exploding in Japan," George adds. "It offers new and 
>interesting challenges to the developer. The i18n J version of PHP is an 
>increasingly popular choice for developers [in Japan] because of its 
>overall performance, speed of development, and character set capability 
>features."
>
>George and his team at Studio Omame have already been using PHP for about 
>a year prior to developing the r-newbold site, and were very pleased with 
>its performance. He cites several reasons for his company's choice of PHP 
>including:
>* PHP's overall performance and reliability
>* ease with which to prototype in
>* PHP's large and growing developer base
>"There are a growing number of developers in Tokyo using it. We also knew 
>there was ample support on both main and Japanese PHP mailing lists for 
>any problems that might come up," George says.
>"PHP became especially useful to us when Shigeru Kanemoto, Hironori Neal 
>Sato and a few other developers worked to release a version of PHP 
>3.0.15-i18n. We are looking forward to this same core of people to also 
>soon release an i18n J version of PHP 4. We expect it will provide us with 
>even greater speed and performance than PHP 3."
>Studio Omame's decision to use PHP was welcomed by Paul Smith's company. 
>The open-source nature of the product was simply not an issue. "We 
>suggested PHP, and there was no problem. They were happy about the 
>cost-savings involved," George recalls.
>
>PHP's Japanese challenge
>Since r-newbold.com is in Japanese only, Studio Omame made sure to utilize 
>PHP's Japanese character set conversion functions. However, this proved to 
>be a challenge.

Is this available for v4 of PHP yet?

>"Dealing with character sets when developing for the Japanese market is a 
>headache," George says. "There's not one, but 3 character sets in wide 
>use: SJIS, EUC and JIS.
>
>"We used all of them for this project. All output for the i-Mode platform 
>needs to be SJIS, while input to MySQL is in EUC, and data for mailing was 
>encoded in JIS. Ensuring the integrity of data via character set 
>conversion was a very important factor. Ultimately, PHP made this project 
>much smoother and very enjoyable. Not having to worry about character set 
>mangling is a godsend."
>
>There was also the task of adapting PHP from computers to telephones. "The 
>unique nature of celluar phone interfaces affected our application 
>development. For example, people browsing the Web using i-Mode phones tend 
>to use the back button a lot, rather than 'back' or 'return' links. 
>Figuring out how to deal with this in preserving session data integrity 
>took a little thinking."
>
>George and his team did figure it out, although George points out that 
>"Daryl Jones of TEA, a communications firm based in Silicon Valley, helped 
>out tremendously with the network and server consulting and set-up, so 
>that we could focus totally on PHP development."
>It took Studio Omame almost two months to write the PHP scripts for all of 
>the site's functions, including mail and accessing MySQL. "As much as 
>possible, we try to stick with *nix, Apache, PHP," George says.
>
>The current shop database holds approximately 60 records, and the 
>membership section is designed to easily handle an initial 20,000 records. 
>In addition, other miscellaneous tables are used for administrative purposes.
>
>PHP's functions
>PHP serves a variety of functions on the r-newbold site, including:
>* authentication and sessions via PHPLIB for a member-only section
>* PHP scripts + cron accessing MySQL database to send out daily e-mails
>* heavy use of mail functions for viral-marketing features
>* detecting specific browser/celluar handset and serving the appropriate 
>interface
>* Japanese character set functions specific to i18n version, ensuring SJIS 
>output, internal processing in EUC
>* mail operations in JIS
>
>As far as security purposes are concerned, Studio Omame decided to use 
>PHPLIB for authentication. "At first we tried using the standard HTTP 
>authentication method, but it turned out that certain i-Mode handsets had 
>somewhat sketchy browser implementations, and they would need to log-in 
>for each password-protected page! So we turned to PHPLIB, which worked 
>very nicely."
>
>The site currently receives more than 3,000 page views per day, with most 
>visitors spending about 5 minutes at a time on the site. "In Japan, people 
>generally use i-Mode sites in mini-bursts, for example, while waiting for 
>the train, riding the bus or walking about the street," George says.
>
>r-newbold.com hopes to receive approximately 200,000 visitors a day 
>initially. "We tried to reduce the amount of calls to MySQL as much as 
>possible, and instead created static pages that are updated from an 
>administration screen."
>
>Data is collected on visitors in the members' section only. It's an 
>entirely opt-in, voluntary feature, George notes.
>Studio Omame also used Adobe's GoLive 5 for the information design and 
>page-template creation for this project. The WebDav and i-Mode eMoji 
>features were particularly useful.
>
>As i-Mode becomes more and more popular, George says he hopes PHP will 
>eventually provide more i18n compatibility.
>In the meantime, Studio Omame has launched omake.com in an experimental 
>i-Mode site using PHP. Several other i-Mode projects are also in the 
>pipeline. "We plan to use PHP extensively for all of them," George predicts.





Hi!
i have a problem!
i send a variable from one page to another page using post method!
but when a variable is like composed of two words , the other page receives 
only the first word !
can u please help?!
Thanks
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.





On Thu, Feb 22, 2001 at 06:36:06PM -0000, kaab kaoutar wrote:
> i have a problem!
> i send a variable from one page to another page using post method!
> but when a variable is like composed of two words , the other page receives 
> only the first word !
> can u please help?!

Look at the form that you are posting from.  Then put quotes around the
form variables.

-- 
Jason Stechschulte
[EMAIL PROTECTED]
--
If you remove stricture from a large Perl program currently, you're just
installing delayed bugs, whereas with this feature, you're installing an
instant bug that's easily fixed.  Whoopee.
             -- Larry Wall in <[EMAIL PROTECTED]>




On Thu, Feb 22, 2001 at 06:36:06PM -0000, kaab kaoutar wrote:
> i have a problem!
> i send a variable from one page to another page using post method!
> but when a variable is like composed of two words , the other page receives 
> only the first word !
> can u please help?!

Look at the form that you are posting from.  Then put quotes around the
form variables.

-- 
Jason Stechschulte
[EMAIL PROTECTED]
--
If you remove stricture from a large Perl program currently, you're just
installing delayed bugs, whereas with this feature, you're installing an
instant bug that's easily fixed.  Whoopee.
             -- Larry Wall in <[EMAIL PROTECTED]>




When selecting a value from a dynamically generated list box, the subsequent
value passed to the table truncates when
there is a blank in the string

Here is the table structures (Mysql database)

First table has variable course_name (varchar -- length 50)
This database will be used to generate the dynamic list box for the
course_name field.
Second table has variable issue_course_name (varchar -- length50) and is the
variable that stores the result of the selected
course name in the dynamic list box.

Here is the code that is currently truncating all characters after the
space:

td height="41" bgcolor="#FFFFFF">&nbsp;&nbsp;';

     $result = mysql_query("select course_name from coursebuild
      where course_status = \"in_test\"
      order by course_name asc");

     echo "<select name='issue_course_name' size=1>";
     echo "<option value=''> ----Select Course---- \n";

     if ($myrow = mysql_fetch_array($result))
      {
     do
     {
     echo "<option
value=$myrow[course_name]>$myrow[course_name]</option>\n";
     }
     while ($myrow = mysql_fetch_array($result));
     echo "</select>";

Insert statement

$query = "insert into testissues ( issue_course_name)
values ( '$issue_course_name') ";
  $mysql_result = mysql_query($query, $mysql_link);







Hi -

How can/should I contact the developers of PHP
to request that they add a new feature to PHP?

Thanks -
Jim






Addressed to: "Ide, Jim" <[EMAIL PROTECTED]>
              [EMAIL PROTECTED]

** Reply to note from "Ide, Jim" <[EMAIL PROTECTED]> Thu, 22 Feb 2001 13:48:34 -0500
>
>
> Hi -
>
> How can/should I contact the developers of PHP
> to request that they add a new feature to PHP?


Submit a bug report at:

   http://bugs.php.net/


Make sure the Type of Bug is set to Feature/Change Request




Rick Widmer
Internet Marketing Specialists
http://www.developersdesk.com




Hello,

Is there a way to start a session and then save a temp file with the name of
the Session ID?

Thank you,

--------------------------------------------
Brandon Orther
WebIntellects Design/Development Manager
[EMAIL PROTECTED]
800-994-6364
www.webintellects.com
--------------------------------------------





At 19:55 22.02.2001, Brandon Orther said:
--------------------[snip]--------------------
>Is there a way to start a session and then save a temp file with the name of
>the Session ID?
--------------------[snip]-------------------- 

RTFM:
    session_start();
    session_register();

Controlled by the INI file section [Session].

Given that you use the builtin session.serialize_handler (either php, or
wddx), and the default session.save_handler (files), files will be named
after the session ID, and be stored in the directory pointed to by the
session.save_path setting.


     ...ebird

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





Mensaje citado por: Brandon Orther <[EMAIL PROTECTED]>:

> Hello,
> 
> Is there a way to start a session and then save a temp file with the
> name of
> the Session ID?

I thought that was what it did. :-)
Read the session manual, the papers published in phpbuilder and check the
session options in php.ini.

Saludos... :-)



System Administration: It's a dirty job,
but someone told I had to do it.
-----------------------------------------------------------------
Martín Marqués                  email:  [EMAIL PROTECTED]
Santa Fe - Argentina            http://math.unl.edu.ar/~martin/
Administrador de sistemas en math.unl.edu.ar
-----------------------------------------------------------------




I read this: "The i18n J version of PHP is an increasingly popular choice 
for developers [in Japan] because of its overall performance, speed of 
development, and character set capability features."" (tru an email, don't 
have the source)
Is there a i18n version of PHP?
Also any resources on how mysql deals with i18n
thanks
Peter
~~~~~~~~~~~~~~~~~~~~~
http://liga1.com  ,a weblog on:
- Localisation
- Internationalisation
- Globalisation
- Accessibility





Dear gentlemen/madams,

I am a system administrator and currently we are playing to migrate all
our CGI (written in C) to php! But playing a little with php i got
worried about how services that need to keep username/password are
handled by php, for instance:

All our CGI programs execute sql queries to a mysql server, they
contains the user name and password in order to login into the database.
Since these programs need only to be executed its read flags are turned
off. I need such a funcionality with php, but how can this be done?

PHP scripts not owned by the user that runs the web server are required
to have the read flag for all tuned on, ok? this makes its contents
readable by all my system users, right ? So how to put user
name/password information into such script in order to get it accessing
mysql, but without allowing any other user to get into its contents and
reading login/password information ?

Thanks a lot for your time and cooperation.




Where can I find some help, how to make & use page templates on my
webpages??? Needs this some add-ons to my PHP3(Linux-main)/PHP4(win98+pws)?

THNX





I want to assign a value using the url however the value contains both a ?
and an & so PHP (or the browser) seems to get confused.

Here's an example:

http://www.mysite.com/index.php?id=23&url=http://www.anothersite.com/file.ph
p?qid=234&forum=4

Everything after url= should be the value of $url but this is not the case.
Is there a way to solve this?

Thanks






URLs must be encoded if they contain special characters (and should be
encoded always).  See urlencode().

-jm

-----Original Message-----
From: Tom Harris [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 22, 2001 11:12 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Passing values containing a ? and a &


I want to assign a value using the url however the value contains both a ?
and an & so PHP (or the browser) seems to get confused.

Here's an example:

http://www.mysite.com/index.php?id=23&url=http://www.anothersite.com/file.ph
p?qid=234&forum=4

Everything after url= should be the value of $url but this is not the case.
Is there a way to solve this?

Thanks



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




At 20:11 22.02.2001, Tom Harris said:
--------------------[snip]--------------------
>I want to assign a value using the url however the value contains both a ?
>and an & so PHP (or the browser) seems to get confused.
>
>Here's an example:
>
>http://www.mysite.com/index.php?id=23&url=http://www.anothersite.com/file.ph
>p?qid=234&forum=4
>
>Everything after url= should be the value of $url but this is not the case.
>Is there a way to solve this?
--------------------[snip]-------------------- 

Have a look at the rawurlencode() and rawurldecode() functions.

Generally spoken, any variable data passed as GET or POST argument should
_always_ be passed in URLEncoded format. MSIE handles this quite nicely by
auto-encoding unencoded data, but other browsers miss this.

When constructing your GET command line, simply use the rawurlencode()
function for any value.

Example:

<html><body>
<?php

$time = date ("l dS of F Y h:i:s A");
echo "<a href=\"$PHP_SELF?gettime=";

// this line will work everywhere
echo rawurlencode($time);

// this line will work with MSIE only
// echo $time;

echo "\">";
echo $time;
echo "</a><br>gettime = $gettime";

?>
</body></html>

     ...ebird

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





Hi,
I moved my server, changed the IP addresses, etc., and now I'm having 
strange problems with PHP. Not on all scripts, just some. Scripts that 
worked just fine before I moved it. Most notably, I'm working with Phorm < 
http://holotech.net > and I can no longer pass certain variables. Again: 
this worked *just fine* before I moved the server. Makes me think it's got 
nothing to do with the script, so what could have gone wrong with the 
server? Again, certain scripts, such as FishCart < http://fishcart.org > 
continue to work fine after the move. Has anybody run into anything like 
this before? Your help would be appreciated.
TIA,
BenO





It could have to do with the register_globals setting (within php.ini) 
as the following :

  <?php
  // foo.php?fruit=apple

      echo $fruit;

  ?>

Will print nothing if register_globals is off.  The following will
print it correctly, whether on or off (assuming track_vars is on) :

  <?php
  // foo.php?fruit=apple

      echo $HTTP_GET_VARS['fruit'];

  ?>

Perhaps one script takes register_globals and track_vars into account
while another does not.  See :

    http://www.php.net/manual/en/configuration.php#ini.register-globals

This setting can be seen through phpinfo().  

Regards,


Philip Olson
http://www.cornado.com/

On Thu, 22 Feb 2001, Ben Ocean wrote:

> Hi,
> I moved my server, changed the IP addresses, etc., and now I'm having 
> strange problems with PHP. Not on all scripts, just some. Scripts that 
> worked just fine before I moved it. Most notably, I'm working with Phorm < 
> http://holotech.net > and I can no longer pass certain variables. Again: 
> this worked *just fine* before I moved the server. Makes me think it's got 
> nothing to do with the script, so what could have gone wrong with the 
> server? Again, certain scripts, such as FishCart < http://fishcart.org > 
> continue to work fine after the move. Has anybody run into anything like 
> this before? Your help would be appreciated.
> TIA,
> BenO
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 






May some suggest a kick ass book on php?

Thanks a lot for your time and cooperation.

best regards,
Gustavo Rios


PS: Any one here from Brazil/South America ?





"PHP Developers Cookbook" is my favorite, it and many others are listed 
here :

    http://www.php.net/books.php

The WROX books are popular.  Also, check out the archives for previous
discussions :

    http://marc.theaimsgroup.com/?l=php-general&r=1&w=2&q=b&s=book


Regards,

Philip Olson
http://www.cornado.com/


On Thu, 22 Feb 2001, Gustavo Vieira Goncalves Coelho Rios wrote:

> May some suggest a kick ass book on php?
> 
> Thanks a lot for your time and cooperation.
> 
> best regards,
> Gustavo Rios
> 
> 
> PS: Any one here from Brazil/South America ?
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 





Check out : 

http://www.weberdev.com/index.php3?GoTo=ShowShoppingItems.php3%3FMasterCateg
ory%3D156%26SubCategory%3D106%26SubCategoryName%3DPHP%26MainCategoryName%3DB
ooks

Sincerely

      berber

Visit http://www.weberdev.com Today!!! 
To see where PHP might take you tomorrow.
 
-----Original Message-----
From: Gustavo Vieira Goncalves Coelho Rios [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 22, 2001 6:47 AM
To: [EMAIL PROTECTED]
Subject: [PHP] books


May some suggest a kick ass book on php?

Thanks a lot for your time and cooperation.

best regards,
Gustavo Rios


PS: Any one here from Brazil/South America ?

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




Personally I started with the Wrox Professional PHP Programming guide and
still use it today(its sittin in front of me).  I see they have one out now
for php4 which is around $60 which I am probably going to order just to keep
up to date.  They cover the basics and then go into some more specific
sections(broken into chapters) on useful technologies you can integrate with
such as XML, LDAP, and MySQL all the while providing good reference sections
in each chapter and sample code.  If you haven't figured it out already I'd
recommend the wrox book.
--
phill

>
> The WROX books are popular.  Also, check out the archives for previous
> discussions :
>
>     http://marc.theaimsgroup.com/?l=php-general&r=1&w=2&q=b&s=book
>
>
> Regards,
>
> Philip Olson
> http://www.cornado.com/






I think Wrox is a very good reference for any language. I have an XSLT
reference from Wrox and it has helped me tremendously because it is so
comprehensive (includes online reference material). I'm sure the PHP book
from Wrox is just as good. Another great book for PHP, especially for
beginners, is The PHP Bible.

Navid

-----Original Message-----
From: Phillip Bow [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 22, 2001 4:52 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] books


Personally I started with the Wrox Professional PHP Programming guide and
still use it today(its sittin in front of me).  I see they have one out now
for php4 which is around $60 which I am probably going to order just to keep
up to date.  They cover the basics and then go into some more specific
sections(broken into chapters) on useful technologies you can integrate with
such as XML, LDAP, and MySQL all the while providing good reference sections
in each chapter and sample code.  If you haven't figured it out already I'd
recommend the wrox book.
--
phill

>
> The WROX books are popular.  Also, check out the archives for previous
> discussions :
>
>     http://marc.theaimsgroup.com/?l=php-general&r=1&w=2&q=b&s=book
>
>
> Regards,
>
> Philip Olson
> http://www.cornado.com/



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





I'm using the file command, which reads an entire file and sticks it into an
array. I'm trying to read a file from mp3.com, and what I get back is
basically that the connection is refused. Doesn't it just load it up like
any browser would load it? Is there an equivalent command that wouldn't try
to make a connection, but would just request the file like any browser would
and then load it that way? I've also tried the fopen command, and I get the
same results.





I'm seeing various posts to mailing lists in the past on this subject, but
there doesn't appear to be a fix. I'd love it if one of you can help out.
We're running PHP 4.0.0 and Apache 1.3.12 on Solaris 7. PHP runs fine with
99 VirtualHosts, but when we add our 100th, every site on the server spits
out the following error:

Warning: Failed opening
'/usr/local/apache/htdocs/t/www.the-url.com/htdocs/index.php' for
inclusion (include_path='') in Unknown on line 0

This is regardless of whether the site uses PHP or not.

Thanks,

Dan Debertin
--
++ Unix is the worst operating system, except for all others.

++ Dan Debertin
++ Senior Systems Administrator
++ Bitstream Underground, LLC
++ [EMAIL PROTECTED]
++ (612)321-9290 x108
++ GPG Fingerprint: 0BC5 F4D6 649F D0C8 D1A7  CAE4 BEF4 0A5C 300D 2387







I need to combine two variables which are set to two form field values and
will be put into $from of mail().   Should it be $from = "$varOne . $varTwo"
?


also a way to make
if(.....something....)
(eregi("blah", $one)("blah2", $two)("blah3", $three));    <----will this
work?


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com





> I need to combine two variables which are set to two form field values and
> will be put into $from of mail().   Should it be $from = "$varOne . $varTwo"
> ?

Check out :

    Using Strings                                           :
    ---------------------------------------------------------
    http://www.zend.com/zend/tut/using-strings.php

    PHP Manual : Strings                                    :
    ---------------------------------------------------------
    http://www.php.net/manual/en/language.types.string.php
    
The above will explain everything.  The following will work :

    $var_a = 'the';
    $var_b = 'dog';

    $from = $var_a . $var_b;           // thedog

    $from = $var_a . ' big ' . $var_b; // the big dog


Regards,

Philip Olson
http://www.cornado.com/





Thanks, 

do you know if making multiple statements to eregi in line 3  is possible?

1. if(...something...)
2.{
3. (eregi("stuff1", $one)("stuff2", $two)("stuff3", $three)) ?
4. do something : do something else;





_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com





How may i prevent my users from reading others php scripts?




Encode them, or set filesystem permissions in such a way (suggest using
groups) to allow apache to read files but not other users.

For instance, if your users are all members of the users group, and apache
runs as nobody, then set your files to be owned by the user with the nobody
group (chown user:nobody <file>) then set it to be readable by group, but
not others (chmod 640 <file>).

-jm

-----Original Message-----
From: Gustavo Vieira Goncalves Coelho Rios [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 21, 2001 9:15 PM
To: [EMAIL PROTECTED]
Subject: [PHP] security


How may i prevent my users from reading others php scripts?

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




Javier Muniz wrote:
> 
> Encode them, or set filesystem permissions in such a way (suggest using
> groups) to allow apache to read files but not other users.
> 
> For instance, if your users are all members of the users group, and apache
> runs as nobody, then set your files to be owned by the user with the nobody
> group (chown user:nobody <file>) then set it to be readable by group, but
> not others (chmod 640 <file>).
> 
> -jm
> 
> -----Original Message-----
> From: Gustavo Vieira Goncalves Coelho Rios [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, February 21, 2001 9:15 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] security
> 

Thanks, but i am considering such an approach! Isn't there any other way
out?
May i consider using php in a shell server environment a stupid thing to
do ? Since security is very critical in such environments!




Those are the only two methods I'm aware of... Zend does offer it's Encoder
Unlimited on a subscription basis though that would allow you to encode all
of your users scripts (they actually list that as problem for which the
encoder is a good solution).

-jm

-----Original Message-----
From: Gustavo Vieira Goncalves Coelho Rios [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 21, 2001 10:55 PM
To: Javier Muniz
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] security


Javier Muniz wrote:
> 
> Encode them, or set filesystem permissions in such a way (suggest using
> groups) to allow apache to read files but not other users.
> 
> For instance, if your users are all members of the users group, and apache
> runs as nobody, then set your files to be owned by the user with the
nobody
> group (chown user:nobody <file>) then set it to be readable by group, but
> not others (chmod 640 <file>).
> 
> -jm
> 
> -----Original Message-----
> From: Gustavo Vieira Goncalves Coelho Rios [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, February 21, 2001 9:15 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] security
> 

Thanks, but i am considering such an approach! Isn't there any other way
out?
May i consider using php in a shell server environment a stupid thing to
do ? Since security is very critical in such environments!




Smarty homepage:
http://www.phpinsider.com/php/code/Smarty/

Changes:

    - built-in caching support (Monte, Andrei)
    - moved license from GPL to LGPL (Monte)
    - implemented workaround for PHP "feature" that eats carriage
returns
      if the PHP tag is at the end of the line. (Andrei)
    - removed $allow_php, added $php_handling logic,
      fixing issues with <?xml ?> tags and the like (Monte)
    - added file locking to prevent reader/writer problem. (Andrei)
    - made Smarty catch unimplemented modifiers and custom functions and
output
      error messages during compilation instead of failing during run
time.
      (Andrei)
    - removed short-tags at the top of the smarty scripts (Monte)
    - added register_function() and register_modifier() API calls to
make
      registering stuff easier. (Andrei)
    - added optional 'options' attribute to html_options custom function
      that allows passing associative arrays for values/output. (Andrei)
    - modifier arguments can now contain '|' and ':' characters inside
quoted
      strings. (Andrei)

--
Monte Ohrt <[EMAIL PROTECTED]>
http://www.ispi.net/




Hi,

I'm storing files in DB. basically (what's important in this case),
I have two columns:

  file_name  -  contains the original filename
  file_src   -  blob which contains the actual file


now the user clicks on a link something like download.php?file_id=123
and the php script will spit out the file. is there any way (some
header magic) to make the user browser to offer the file to be
saved as "file_name" ?


Rgds,
  Tfr

  --==< [EMAIL PROTECTED] >==< http://tfr.cafe.ee/ >==< +372-50-17621 >==-- 




no problem :)

    Header("Content-Type: {$prod_r["file_type"]} ");
    Header("Content-Disposition: filename='{$prod_r["file_name"]}' ");
    echo $prod_r["file"];

this code works perfect for me, just modify the variables to meet yours.


--
Chris Lee


""indrek siitan"" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi,
>
> I'm storing files in DB. basically (what's important in this case),
> I have two columns:
>
>   file_name  -  contains the original filename
>   file_src   -  blob which contains the actual file
>
>
> now the user clicks on a link something like download.php?file_id=123
> and the php script will spit out the file. is there any way (some
> header magic) to make the user browser to offer the file to be
> saved as "file_name" ?
>
>
> Rgds,
>   Tfr
>
>   --==< [EMAIL PROTECTED] >==< http://tfr.cafe.ee/ >==< +372-50-17621 >==--
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>






I hate to post flamebait, but I genuinely want to know -
what have people liked as far as a slasdot style PHP apps? 

I would love one that has integrated user management and mailing lists :)

TIA, and sorry for the YAWIB (yet another which-is-best) post.

regards,
jaxon




I am attempting to insert a set of data (actually a pair) into an array, 
without much success.  I would like to insert the data set ("course 
number", "course title") into a numerically indexed array so that when I 
want to output the array I can reference it like so:

        echo("$array[$i]["course_num"] $array[$i]["course_title"]");            
        
        // where $i is just the index value that increments

I tried building the array like so (where $tuple[....] is a valid result 
set from pg_fetch_row():

        $array[] = array("course_num" => $tuple[crn],
                        "course_title" => $tuple[course_name]);

But all I gets outputted is:

        Array["course_num"] Array["course_title"]

Any help with this would be greatly appreciated.  Thanks.





Try: 

echo $array[$i][course_num] . ' ' . $array[$i][course_title];

-jm

-----Original Message-----
From: Scott Walter [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 22, 2001 1:59 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Arrays -- How do I insert a pair of data into an array


I am attempting to insert a set of data (actually a pair) into an array, 
without much success.  I would like to insert the data set ("course 
number", "course title") into a numerically indexed array so that when I 
want to output the array I can reference it like so:

        echo("$array[$i]["course_num"] $array[$i]["course_title"]");

        
        // where $i is just the index value that increments

I tried building the array like so (where $tuple[....] is a valid result 
set from pg_fetch_row():

        $array[] = array("course_num" => $tuple[crn],
                        "course_title" => $tuple[course_name]);

But all I gets outputted is:

        Array["course_num"] Array["course_title"]

Any help with this would be greatly appreciated.  Thanks.


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




On Thursday 22 February 2001 22:58, Scott Walter wrote:
> I am attempting to insert a set of data (actually a pair) into an
> array, without much success.  I would like to insert the data set
> ("course number", "course title") into a numerically indexed array so
> that when I want to output the array I can reference it like so:
>
>       echo("$array[$i]["course_num"] $array[$i]["course_title"]");

Change this to

echo ("{$array[$i]['course_num']} {$array[$i]['course_title']}");

-- 
Christian Reiniger
LGDC Webmaster (http://sunsite.dk/lgdc/)

Google results 1-10 of about 142,000,000 for e. Search took 0.18 seconds.

- http://www.google.com/search?q=e




Hi!
I am trying to put in a new data at the beginning of a file.
I have started like this;

--------

$yourfile = "test.xml";  (<a><b><c><d><e><f></c> this is the file.)
$fp = fopen ($yourfile, r);
$message  = array(1 => '<a>', '<b>', '<c>', '<d>', '<e>', '<f>',
'</c>');
Here I need some code to get the output look like
this"<a><b><new><c><d><e><f></c>"

print_r($message);
fwrite ($fp, $message);
fclose ($fp);

I am thankful for any help.

Regards
Jan





You can also use PHP for shell scripting - just add #!/path/to/php -q as
the first line of your script.

Note: You will still need to enclose all PHP scripting in <?php ... ?>
tags.

Here's an example:

file: phpinfo.phpshell
<? phpinfo() ?>


The preceding information was returned by PHP info.


[EOF]

Then run the following on your command line:
machine$ cd /path/to/phpinfo.phpshell
machine$ ./phpinfo

--Toby

Michael Stearne wrote:
> 
> You can run php from the command line as a standalone app.
> 
> Compole PHP as a stand-alone CGI program (read the INSTALL file) and then
> run it like:
> 
> localhost$ /path/to/php -f myFile.php
> 
> Or you can also run it withing a shell or perl script the same way (maybe
> through a system() call in perl)
> 
> Michael
> 
> Ng Chun Chi wrote:
> 
> > Dear Sir,
> > I have two problems in using PHP. Could you help me?
> > I am using Red-Hat to build up my System.
> > Could I use Perl to control some PHP program?
> > Also, could I run my PHP program in Linux Console?
> >
> > Sorry to disturb you
> > THx!
> > Mr Ng
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]




mysql executes the queries in the order it recieves
them, (so if your program's logic executes a select
before an update, you'll never see results from the
update in your select... at least not normally :)

Are you able to access the MySQL monitor program?

if so, verify that the data really does exist
before running your script (maybe the SELECT
is failing beucase the actual data is incorrect,
not the code...)

go into the monitor and execute your SELECT
statement, then run your PHP script... if
the results still disagree, post some more
information...

----- Original Message ----- 
From: "Don Johnson" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, February 21, 2001 5:19 PM
Subject: [PHP] MySQL execution order?


> Since I've always found my answers in the archive, this is my first post, so
> please excuse any blunders...
> 
> I'm trying to download info from a table as a tab-delimted text file. This
> part works fine. (By disabling the UPDATE statement in the code sample
> below, I can get the same data file sent time after time.)
> 
> I need to keep the data in the table for future reference, and only want to
> download each new record once, so I added a DateTime field that gets updated
> after downloading. Then searching on that field gives me just the records
> that haven't been downloaded yet.
> 
> The weird part is that it seems like the LAST MySQL command (UPDATE) gets
> executed before the FIRST one (SELECT), because the SELECT statement comes
> up with 0 rows.
> 
> 
> Here's some selected (modified) parts of the PHP code:
> 
> ------------------------
> First, I perform the SQL:
> SELECT * from db_table WHERE (DownloadedDateTime = '0000-00-00 00:00:00')
> 
> Then, it parses and sends the info:
> while ($row = mysql_fetch_row($result)) {
>     while (list($key, $val) = each($row)) {
>        $val = ereg_replace("[\n\r\t]"," ",$val);
>        $val = ereg_replace(" {2,}"," ",$val);
>        echo $val . "\t";
>     }
>     //end of line
>     echo "\r";
> }   
> 
> Then I perform the SQL:
> UPDATE LOW_PRIORITY db_table SET DownloadedDateTime=CURRENT_TIMESTAMP WHERE
> (DownloadedDateTime = '0000-00-00 00:00:00')
> --------------------------
> 
> Any ideas why the rows are getting the DownloadedDateTime field updated
> before they get SELECTed?
> 
> 
> Thanks,
> 
> Don Johnson
> [EMAIL PROTECTED]
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 





On Thu, 22 Feb 2001 17:41:43 -0500, ..s.c.o.t.t.. [gts]
([EMAIL PROTECTED]) wrote:
>mysql executes the queries in the order it recieves
>them, (so if your program's logic executes a select
>before an update, you'll never see results from the
>update in your select... at least not normally :)

well, except for insert delayed and update low_priority this might be
true, but there's exceptions.







I have been using the code below to do my page redirects for a year and a
half with good results. Recently, some users have reported to me that the
actual code is being partially displayed to the screen, and the re-direct is
not occurring. It is as if the server stops serving the page before it is
complete. Sometimes the problem can be corrected by the user just doing a
manual refresh in their browser. Is anyone else that uses META tag
re-directs having this problem? Anyone know what the solution might be?

Thanks.

Kirk

echo("<HTML><HEAD><META HTTP-EQUIV=\"refresh\" CONTENT=\"$delay;url=$url\"><
/HEAD><BODY BGCOLOR=#ffffff>$message</BODY></HTML>");




if you have output buffering on in php.ini

output_bufffering = on

cobine this with

<?php
    header("Location: http://$SERVER_NAME/index.php");
    exit();
?>

and youve got a great cobination, zero html will be sent to the browser,
just the header, the browser will refresh for you. try it, works better then
meta tags.


--

 Chris Lee
 Mediawaveonline.com

 ph. 250.377.1095
 ph. 250.376.2690
 fx. 250.554.1120

 [EMAIL PROTECTED]



""Johnson, Kirk"" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I have been using the code below to do my page redirects for a year and a
> half with good results. Recently, some users have reported to me that the
> actual code is being partially displayed to the screen, and the re-direct
is
> not occurring. It is as if the server stops serving the page before it is
> complete. Sometimes the problem can be corrected by the user just doing a
> manual refresh in their browser. Is anyone else that uses META tag
> re-directs having this problem? Anyone know what the solution might be?
>
> Thanks.
>
> Kirk
>
> echo("<HTML><HEAD><META HTTP-EQUIV=\"refresh\"
CONTENT=\"$delay;url=$url\"><
> /HEAD><BODY BGCOLOR=#ffffff>$message</BODY></HTML>");
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>






Thanks, Chris. This touches on another problem. Have you tried this with
session cookies disabled in your browser? Can you pass the session ID using
the header function? I can't seem to, but I *can* pass it using SID appended
to the URL in the META tag. This is one reason I wanted to stay with the
META refresh method, if possible, so the site still works for people with
cookies disabled.

Thanks, again, I will play with this.

Kirk

-----------------
Chris Lee replied:

if you have output buffering on in php.ini

output_bufffering = on

cobine this with

<?php
    header("Location: http://$SERVER_NAME/index.php");
    exit();
?>

and youve got a great cobination, zero html will be sent to the browser,
just the header, the browser will refresh for you. try it, works better then
meta tags.


""Johnson, Kirk"" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I have been using the code below to do my page redirects for a year and a
> half with good results. Recently, some users have reported to me that the
> actual code is being partially displayed to the screen, and the re-direct
is
> not occurring. It is as if the server stops serving the page before it is
> complete. Sometimes the problem can be corrected by the user just doing a
> manual refresh in their browser. Is anyone else that uses META tag
> re-directs having this problem? Anyone know what the solution might be?
>
>
> echo("<HTML><HEAD><META HTTP-EQUIV=\"refresh\"
CONTENT=\"$delay;url=$url\"><
> /HEAD><BODY BGCOLOR=#ffffff>$message</BODY></HTML>");




yes I know what your saying.

trans-sid will not work when the url is absolute ie.

<form method=post action='http://$SERVER_NAME/index.php'>

or

<a href='http://$SERVER_NAME/index.php'>index</a>

or

header("Location: http://$SERVER_NAME/index.php");

header redirects *require* absolute url's so your going to have to add the
phpsessid yourself, ie.

<?php
    $SID = "PHPSESSID=$PHPSESSID";
    header("Location: http://$SERVER_NAME/index.php?$SID");
?>

rember "" not '' seems people get them mixed up alot. '' doesnt parse the
string.

I use this method to transer valid sessions accros multiple domain names on
the same box. sessions will not follow absolte urls and cookies are only
vaild on a per-domain name basis. use sessions and your can force a session
across multiple domain names. ie. our secure server is on a differnet domain
name then the regular sites. we do this to get a cheaper deal on our
certificate, all our sites use one domain name for secure info.

I would recomment agains php.net's sujestion os using SID ie.

echo "<a href='http://$SERVER_NAME/index.php?'". SID ."'>index</a>";

SID is only set if the a cookie is NOT set. oi. thank god $PHPSESSID is
allways set :)

another note too though is try and limit the amount of header re-redirects
you use, search engines will not index pages that follow header redirects.
spam thing or something.


--

 Chris Lee
 Mediawaveonline.com

 ph. 250.377.1095
 ph. 250.376.2690
 fx. 250.554.1120

 [EMAIL PROTECTED]



""Johnson, Kirk"" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Thanks, Chris. This touches on another problem. Have you tried this with
> session cookies disabled in your browser? Can you pass the session ID
using
> the header function? I can't seem to, but I *can* pass it using SID
appended
> to the URL in the META tag. This is one reason I wanted to stay with the
> META refresh method, if possible, so the site still works for people with
> cookies disabled.
>
> Thanks, again, I will play with this.
>
> Kirk
>
> -----------------
> Chris Lee replied:
>
> if you have output buffering on in php.ini
>
> output_bufffering = on
>
> cobine this with
>
> <?php
>     header("Location: http://$SERVER_NAME/index.php");
>     exit();
> ?>
>
> and youve got a great cobination, zero html will be sent to the browser,
> just the header, the browser will refresh for you. try it, works better
then
> meta tags.
>
>
> ""Johnson, Kirk"" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > I have been using the code below to do my page redirects for a year and
a
> > half with good results. Recently, some users have reported to me that
the
> > actual code is being partially displayed to the screen, and the
re-direct
> is
> > not occurring. It is as if the server stops serving the page before it
is
> > complete. Sometimes the problem can be corrected by the user just doing
a
> > manual refresh in their browser. Is anyone else that uses META tag
> > re-directs having this problem? Anyone know what the solution might be?
> >
> >
> > echo("<HTML><HEAD><META HTTP-EQUIV=\"refresh\"
> CONTENT=\"$delay;url=$url\"><
> > /HEAD><BODY BGCOLOR=#ffffff>$message</BODY></HTML>");
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>






Guys/Gals:

For some reason too long to explane .. i have this site that i need to make 
all the image names in an
image src all lowercase.. Here is what I have so far. Please someone tell 
me what I am doing wrong.

<?
$contents="<img src=ThisOneReallyNeedsToBeAllLowercase.gif 
alt=ThisOneReallyNeedsToBeAllLowercase.gif>";
$contents = EREG_REPLACE("([-_a-zA-Z0-9]+).gif",strtolower("\\0"),$contents);
?>

Output of $contents needs to equal

<img src=thisonereallyneedstobealllowercase.gif 
alt=thisonereallyneedstobealllowercase.gif>


I have the top part of my script reading the whole DIR and only editing the 
HTML files so
that part is taken care of All I need it help with making the images tag 
all lower case.
Ian LeBlanc
2tonecafe.com Admin
727-517-3866



You can have [EMAIL PROTECTED] free too. Apply today!





You should either do this with ereg, or strtolower and not a combination of
the two, and in all actuality strtolower is specifically desinged to do this
very easily so I would go with it.
<?
 $contents="<img src=ThisOneReallyNeedsToBeAllLowercase.gif
alt=ThisOneReallyNeedsToBeAllLowercase.gif>";
 $contents = strtolower($contents);
 ?>

Should do what you want.
--
phill

"Ian LeBlanc" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Guys/Gals:
>
> For some reason too long to explane .. i have this site that i need to
make
> all the image names in an
> image src all lowercase.. Here is what I have so far. Please someone tell
> me what I am doing wrong.
>
> <?
> $contents="<img src=ThisOneReallyNeedsToBeAllLowercase.gif
> alt=ThisOneReallyNeedsToBeAllLowercase.gif>";
> $contents =
EREG_REPLACE("([-_a-zA-Z0-9]+).gif",strtolower("\\0"),$contents);
> ?>
>
> Output of $contents needs to equal
>
> <img src=thisonereallyneedstobealllowercase.gif
> alt=thisonereallyneedstobealllowercase.gif>
>
>
> I have the top part of my script reading the whole DIR and only editing
the
> HTML files so
> that part is taken care of All I need it help with making the images tag
> all lower case.
> Ian LeBlanc
> 2tonecafe.com Admin
> 727-517-3866
>
>
>
> You can have [EMAIL PROTECTED] free too. Apply today!
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>





Hi,

My last message on this topic was a bit hard to translate. So here is the
thought out version.

1.    I have a page on a server called admin.php (protected by htaccess for
admin use only)
2.    This page holds variables that are changed by form elements.
(Checkboxes etc)
       And this in turn effects different parts of the site it is being used
in.
3.    I want to know how to keep the changes to the form.

Example: If i bring up the admin.php page in my browser and click a
checkbox, it permantly keeps it changed until i decide to change it again.

4.    Is there some sort of PHP save command, that saves the state of a
page.
5.    Any ideas?

Please help, I gotta have this worked out by Monday or I'm dead.

--
Regards,


YoBro
-------------------------------------------------------------
DO NOT REPLY TO THIS VIA EMAIL
PLEASE USE THE NEWSGROUP
All emails sent to this address are automatically deleted.
This is to avoid SPAM!
-------------------------------------------------------------






You could have the page output options to a formatted plain text file.
Sample Format
{
bold = 0;
italic = 1;
}
 and then when the page loads it reads in the options from that file and
alters the page accordingly.  For extra credit use a database rather than a
plain text file, but if you haven't done that before (and there is a
deadline) this is probably the easiest learning curve.
--
phill





Your asking a huge question and expecting a small answer ie.

php_save();

the anser your looking or is not small, im sorry. your asking a big
question, and with all big questions comes a big answer.

Do you know how to use db's ? mysql? postgres? I'll assume you do. save you
changes in a db, pull those variables rom the db and arange the client pages
around this data.

http://phpbuilder.com/columns/jesus19990308.php3

has an article on learning to use mysql.

if you dont have a db you can use, you could use xml, I would recommend
installing a db before you tackeled this, you said you have till monday,
this doesnt leave alot of time to learn xml and all that is assisiated with
it. your going to be pushing it to learn a db language by then.

when php is run all the variables are rememberd, untill... php stops
running, then all is lost, this is why you need a db, to remember all the
data. you could use sessions, but this is not what your looking for.
sessions are for remebering *one* persons info, not many people's, and not
for long term, short term.

--

 Chris Lee
 Mediawaveonline.com

 ph. 250.377.1095
 ph. 250.376.2690
 fx. 250.554.1120

 [EMAIL PROTECTED]


""YoBro"" <[EMAIL PROTECTED]> wrote in message
9746nm$gh3$[EMAIL PROTECTED]">news:9746nm$gh3$[EMAIL PROTECTED]...
> Hi,
>
> My last message on this topic was a bit hard to translate. So here is the
> thought out version.
>
> 1.    I have a page on a server called admin.php (protected by htaccess
for
> admin use only)
> 2.    This page holds variables that are changed by form elements.
> (Checkboxes etc)
>        And this in turn effects different parts of the site it is being
used
> in.
> 3.    I want to know how to keep the changes to the form.
>
> Example: If i bring up the admin.php page in my browser and click a
> checkbox, it permantly keeps it changed until i decide to change it again.
>
> 4.    Is there some sort of PHP save command, that saves the state of a
> page.
> 5.    Any ideas?
>
> Please help, I gotta have this worked out by Monday or I'm dead.
>
> --
> Regards,
>
>
> YoBro
> -------------------------------------------------------------
> DO NOT REPLY TO THIS VIA EMAIL
> PLEASE USE THE NEWSGROUP
> All emails sent to this address are automatically deleted.
> This is to avoid SPAM!
> -------------------------------------------------------------
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>






Hello,

I am working on a PHP script for an e-commerce site that mails out calling
card pin numbers after somebody purchases them online. Turing testing I not
noticed that aol users were not receiving the messages. AOL seems to be
filtering them out without sending a bounce or anything. We tried it with
multiple aol users, and nothing I tried when using the mail function got
through, but messages sent from the server with pine and the php mail
package SquirrelMail do get through. The messages are received on every
other mail system I have tried.

I know this is more of a mail question, but I was hoping somebody here and
encountered this before and knew of a workaround. I noticed that
SquirrelMail doesn't use the mail function, they chose to write their own
SMPT package. I wonder why?

Anyway, my test scripts look like this:
<?php


mail("[EMAIL PROTECTED]", "Test 1",
                "This is a test",
                "From: [EMAIL PROTECTED]\nReply-To: [EMAIL PROTECTED]\nX-Mailer: My
test mail program\nX-Sender: [EMAIL PROTECTED]\nContent-Type: text/plain;
charset=\"us-ascii\"");
                
echo "Mail sent!";
?>

I tried playing around with different headers and nothing made any
difference. I sent them to myself and they sure look like valid email
messages to me. Does anybody else have this problem? What did you do about it?

Thanks,

Steve





Can someone help me with this script? It is an example from weberdev.com. I
ran it and it gave me the following error...

-- Warning: Use of undefined constant count - assumed 'count' in
c:\windows\desktop\localhost\examples\counter\counter1.php on line 27
25

The number 25 is the correct number for the counter, but how do I get rid of
that error message that keeps coming up before the counter number (25)? I am
testing and learning PHP on Windows ME and am using PHP 4.0.4 with MySQL
3.23.33. Here is the script:

<HTML>
<HEAD>
<TITLE></TITLE>
</HEAD>

<BODY>

<!-- This example from
http://www.weberdev.com/index.php3?GoTo=ShowShoppingItems.php3%3FMasterCateg
 -->

<?php
$hostname = 'localhost';
$username = 'username';
$password = 'password';
$dbName = 'database';
MYSQL_CONNECT($hostname,$username,$password) OR DIE("Unable to connect to
database");
@mysql_select_db("$dbName") or die("Unable to select database");

$name = "$SCRIPT_NAME";

$result = MYSQL_QUERY("SELECT * FROM counter WHERE (name = '$name')") or die
("Bad query: ".mysql_error());
$row = mysql_fetch_array($result);

if($row){
MYSQL_QUERY("UPDATE counter SET count = count+1 WHERE (name = '$name')") or
die ("Bad query: ".mysql_error());
$count = $row[count];
}else{
MYSQL_QUERY("INSERT INTO counter VALUES ('', '$name', '2')") or die ("Bad
query: ".mysql_error());
$count = '1';
}
echo $count;
?>

</BODY>
</HTML>

-- Navid





change

$row[count]

to

$row['count']

it thinks the work [count] is some kind of conastant, it doesnt know you
mean (string) 'count'


--

 Chris Lee
 Mediawaveonline.com

 ph. 250.377.1095
 ph. 250.376.2690
 fx. 250.554.1120

 [EMAIL PROTECTED]



""Navid Yar"" <[EMAIL PROTECTED]> wrote in message
000101c09d2d$135683e0$[EMAIL PROTECTED]">news:000101c09d2d$135683e0$[EMAIL PROTECTED]...
> Can someone help me with this script? It is an example from weberdev.com.
I
> ran it and it gave me the following error...
>
> -- Warning: Use of undefined constant count - assumed 'count' in
> c:\windows\desktop\localhost\examples\counter\counter1.php on line 27
> 25
>
> The number 25 is the correct number for the counter, but how do I get rid
of
> that error message that keeps coming up before the counter number (25)? I
am
> testing and learning PHP on Windows ME and am using PHP 4.0.4 with MySQL
> 3.23.33. Here is the script:
>
> <HTML>
> <HEAD>
> <TITLE></TITLE>
> </HEAD>
>
> <BODY>
>
> <!-- This example from
>
http://www.weberdev.com/index.php3?GoTo=ShowShoppingItems.php3%3FMasterCateg
>  -->
>
> <?php
> $hostname = 'localhost';
> $username = 'username';
> $password = 'password';
> $dbName = 'database';
> MYSQL_CONNECT($hostname,$username,$password) OR DIE("Unable to connect to
> database");
> @mysql_select_db("$dbName") or die("Unable to select database");
>
> $name = "$SCRIPT_NAME";
>
> $result = MYSQL_QUERY("SELECT * FROM counter WHERE (name = '$name')") or
die
> ("Bad query: ".mysql_error());
> $row = mysql_fetch_array($result);
>
> if($row){
> MYSQL_QUERY("UPDATE counter SET count = count+1 WHERE (name = '$name')")
or
> die ("Bad query: ".mysql_error());
> $count = $row[count];
> }else{
> MYSQL_QUERY("INSERT INTO counter VALUES ('', '$name', '2')") or die ("Bad
> query: ".mysql_error());
> $count = '1';
> }
> echo $count;
> ?>
>
> </BODY>
> </HTML>
>
> -- Navid
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>






I have a few sites which contain forms that span multiple screens (all
contained in two scripts though...)

theforms.php
<?
        // Include file
class theForms
{
        function showScreen1()
        {
        global $error;
        ?>
        The html for the form.
        <? if($error){ echo $error; } ?>
        <?
        }//function showScreen1

        function saveScreen1()
        {
        global $HTTP_POST_VARS;
        // save the input into a database or file etc.
        if(success)
        {
                return true;
        }
        else
        {
                return false;
        }
        }//function saveScreen1

        function showScreen2()
        {
        global $error;
        ?>
        The html for the form.
        <? if($error){ echo $error; } ?>
        <?
        }//function showScreen1

        function saveScreen2()
        {
        global $HTTP_POST_VARS;
        // save the input into a database or file etc.
        if(success)
        {
                return true;
        }
        else
        {
                return false;
        }
        }//function saveScreen1
}
?>

forms.php
<?
include('theforms.php');
$theForms = new theForms;

if(!isset($screen)){ $screen = 'showScreen1'; }

switch($screen)
{
        case 'showScreen1':
                $theForms->showScreen1();
                break;
        case 'saveScreen1':
                if($theForms->saveScreen1() != true)
                {
                        $error = "it died!";
                        $theForms->showScreen1();
                        break;
                }
        case 'showScreen2':
                $theForms->showScreen2();
                break;
}//Switch

?>

so basically I put all the html into functions in a class, and control the
flow of the form with the switch statement, that way if my function that
saves the data comes across an error, it get's trapped and shows that screen
again...

Has anybody else found a more elegant way to accomplish this? It works quite
nice, but I was wondering how other people go about creating their forms.

Thanks,
-Jonathan





File uploads -was- working.  I reinstalled the server with the RedHat packages

        apache-1.3.14-3.rpm
        php-4.0.4pl1-3.rpm
        php-mysql-4.0.4pl1-3

I'm using the same scripts, but file uploads is not working 
now.  Correction... the file uploads to the server, but doesn't view 
properly when I try to load it in a browser.  If I grab it by ftp from the 
server and view it in Photoshop, it looks fine.

Any ideas?

-Ed





More info:

I transferred an image to the web server via ftp and was able to view it 
successfully from the web site.

Here's an example image that was transferred using a file upload form that 
won't display properly:

http://www.atfantasy.com/attachments/3224/samurai1.jpg

When you try to view it, it just displays a box with a small x, as if the 
image wasn't there.  I've verified the image is there.

What would be doing this?

-Ed


At 05:30 PM 2/22/2001 -0800, Ed Lazor wrote:
>File uploads -was- working.  I reinstalled the server with the RedHat packages
>
>         apache-1.3.14-3.rpm
>         php-4.0.4pl1-3.rpm
>         php-mysql-4.0.4pl1-3
>
>I'm using the same scripts, but file uploads is not working 
>now.  Correction... the file uploads to the server, but doesn't view 
>properly when I try to load it in a browser.  If I grab it by ftp from the 
>server and view it in Photoshop, it looks fine.
>
>Any ideas?
>
>-Ed
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]





Im making a website and i want the viewer to know were he of she is,
what do i need to do to make a location bar (home > serverices ect...)
with the $PHP_SELF command, i wasent able to figure it out so i am
asking assistance from another person.



Reply via email to