|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
php-general-digest-help_at_lists.php.net
Date: Sat Jul 27 2002 - 21:12:45 CDT
php-general Digest 28 Jul 2002 02:12:45 -0000 Issue 1490
Topics (messages 109958 through 110018):
Re: need help with unusual php/mysql/array manipulation script
109958 by: spam
Re: ezmlm warning
109959 by: Matt \"TrollBoy\" Wiseman
Q:What is the easiest way to test my PHP+Html pages?
109960 by: Marcus Unlimited
109961 by: Tim Luoma
109962 by: Marcus Unlimited
109963 by: Andrew Brampton
109965 by: John Holmes
109966 by: Marcus Unlimited
109968 by: oscarfm.cantv.net
109970 by: Marcus Unlimited
109971 by: John Holmes
109976 by: J. Cox
109977 by: Tim Luoma
109981 by: Steve Buehler
Re: Date() Problem
109964 by: John Holmes
Re: removing html...
109967 by: John Holmes
109969 by: John Holmes
109979 by: John Holmes
110012 by: JJ Harrison
Re: Quotes getting screwed up in form fields
109972 by: Julio Nobrega
109975 by: John Holmes
Re: How to UPDATE two MySQL Tables
109973 by: John Holmes
Re: Is it possible...
109974 by: John Holmes
109993 by: apollo
Re: Password Generator Script
109978 by: Naintara Jain
Re: High Resolution Images
109980 by: oscarfm.cantv.net
Stopping Multiple Entries in mySQL DB
109982 by: Thomas Edison Jr.
109983 by: John Holmes
109995 by: Chris Earle
string comparison
109984 by: Bas Jobsen
109985 by: John Holmes
Re: uploading pictures
109986 by: Oliver Witt
portal / content management
109987 by: M.E. Suliman
Re: Table formatting
109988 by: Wouter | esctoday.com
what is http://127.0.0.1?
109989 by: Matthew K. Gold
109991 by: Duncan Hill
CURL & SSL
109990 by: Jonathan Rosenberg
109992 by: Oscar F
109999 by: Tech Support
failure notice (fwd)
109994 by: Miguel Cruz
109998 by: Tech Support
Combining Columns in MySQL for PHP
109996 by: Chris Earle
109997 by: John Holmes
110000 by: Chris Earle
110001 by: John Holmes
File Browser like Win Explorer in php
110002 by: Reuben D. Budiardja
110004 by: Bob Lockie
Dijkstra's Algorithm
110003 by: Ville Mattila
Pulling a data from array of checkboxes
110005 by: V Sharapov
110007 by: John Holmes
call to undefined function: mysql_connect
110006 by: lfindle.mindspring.com
110009 by: Richard Pijnenburg
Sending a File to User's Browser
110008 by: Oscar F
110015 by: Support
CMS systems using PHP and PostgreSQL?
110010 by: Glenn Sieb
RTRIM() - Won't accept 2nd Param
110011 by: Monty
110013 by: Mark Charette
110017 by: David Freeman
Extra spacing with <br> in HTML
110014 by: Kevin Breit
php 'mail()' security
110016 by: Dennis Gearon
Apache 2
110018 by: Kasper
Administrivia:
To subscribe to the digest, e-mail:
php-general-digest-subscribe
lists.php.net
To unsubscribe from the digest, e-mail:
php-general-digest-unsubscribe
lists.php.net
To post to the list, e-mail:
php-general
lists.php.net
----------------------------------------------------------------------
attached mail follows:
On Sat, 27 Jul 2002 01:08:12 -0400, chris
earleweb.com
(Chris Earle) wrote:
> Ahhh, good old UO. I remember GMing my taming,
crazy what they've done to
> the game since I've quit (120 skill, insane!).
>
> I'm not completely sure of a few things about your
question and I think that
> I could help if you supply the answers to my
questions.
>
> Does one tamer's taming of an animal increase ALL
animals by a generic
> amount (i.e., John tames "a cow" for the first time,
then Bill tames it,
> then John tames "a polar bear" for the first time
and, again, Bill retames
> it; do both examples raise the requirement 9.8
points or is it based on the
> animal)?
>
> If it is generic the answer is simple, if not, it
might get a little more
> complicated.
>
Exactly, it is a set amount. The 2nd time it is
tamed, 4.8 is always added to the minimum amount. The
3rd time it is tamed, 19.2 is always added to the
minimum amount. I'm only going up to the 3rd, because
anything past that is pretty much impractical.
thanks
sasha
attached mail follows:
I'd be upset if my virus filter got me unsubscribed..
Matt "TrollBoy" Wiseman
Webmaster: Shoggoth.net
Site Designer: phpslash.org
The oldest and strongest emotion of mankind is fear,
and the oldest and strongest kind of fear is fear of the unknown.
-H.P. Lovecraft
---------------------------------------------------------
Please do not resell my e-mail address
to anyone or send me unsolicited e-mail
---------------------------------------------------------
----- Original Message -----
From: <php-general-help
lists.php.net>
To: <trollboy
shoggoth.net>
Sent: Friday, July 26, 2002 11:24 PM
Subject: ezmlm warning
> Hi! This is the ezmlm program. I'm managing the
> php-general
lists.php.net mailing list.
>
> I'm working for my owner, who can be reached
> at php-general-owner
lists.php.net.
>
>
> Messages to you from the php-general mailing list seem to
> have been bouncing. I've attached a copy of the first bounce
> message I received.
>
> If this message bounces too, I will send you a probe. If the probe
bounces,
> I will remove your address from the php-general mailing list,
> without further notice.
>
>
> I've kept a list of which messages from the php-general mailing list have
> bounced from your address.
>
> Copies of these messages may be in the archive.
> To retrieve a set of messages 123-145 (a maximum of 100 per request),
> send an empty message to:
> <php-general-get.123_145
lists.php.net>
>
> To receive a subject and author list for the last 100 or so messages,
> send an empty message to:
> <php-general-index
lists.php.net>
>
> Here are the message numbers:
>
> 107683
> 107711
>
> --- Enclosed is a copy of the bounce message I received.
>
> Return-Path: <postmaster
mail-relay2.metalink.net>
> Received: (qmail 59642 invoked from network); 15 Jul 2002 10:12:37 -0000
> Received: from unknown (HELO mail-relay2.metalink.net) (207.19.167.130)
> by pb1.pair.com with SMTP; 15 Jul 2002 10:12:37 -0000
> Received: from mail-relay2.metalink.net (mail-relay2.metalink.net
[127.0.0.1])
> by mail-relay2.metalink.net (8.11.6/8.11.6) with SMTP id g6FACZJ26275;
> Mon, 15 Jul 2002 06:12:35 -0400
> From: postmaster
mail-relay2.metalink.net
> Message-Id: <200207151012.g6FACZJ26275
mail-relay2.metalink.net>
> References: <3D329B5C.50502
gala.net>
> To: php-general-return-107683-trollboy=shoggoth.net
lists.php.net
> Cc: trollboy
defnet.com
> Subject: MetaLINK Technologies E-mail AntiVirus scan results
> Date: Mon, 15 Jul 2002 06:12:35 -0400
> Importance: high
> X-Priority: 1
> X-Mailer: ravmd/8.3.2
> X-RAVMilter-Version: 8.3.1(snapshot 20020108) (mail-relay2.metalink.net)
>
>
> RAV AntiVirus for Linux i686 version: 8.3.2 (snapshot-20020108)
> Copyright (c) 1996-2001 GeCAD The Software Company. All rights reserved.
> Registered version for unlimited domains.
> Running on host: mail-relay2.metalink.net
>
> ------------------------------------------------
> MetaLINK Technologies E-mail Antivirus results
> ------------------------------------------------
>
> The file (part0001:)->(IFRAME0) attached to mail (with subject:[PHP] Tales
of brave Ulysses?) sent by
php-general-return-107683-trollboy=shoggoth.net
lists.php.net to
trollboy
defnet.com, is infected with virus: HTML/IFrame_Exploit*.
> Cannot clean this file.
> The file was successfully deleted by MetaLINK Technologies E-mail
AntiVirus.
> ------------------------
> this is a copy of the e-mail header:
>
> Received: (qmail 17991 invoked by uid 110); 15 Jul 2002 10:12:33 -0000
>
>
>
> Scan engine 8.7 () for i386.
> Last update: Sat Jul 13 08:21:14 2002
> Scanning for 69330 malwares (viruses, trojans and worms).
>
> To get a free 60-days evaluation version of RAV AntiVirus v8
> (yet fully functional) please visit:
>
> http://www.ravantivirus.com
>
attached mail follows:
Hello,
Okay,
Here's what I want to do.
Simply test my PHP stuff and practice with MySQL.
I don't want to learn to master Unix or anything at all like that but
these vague and arcane install instructions are leading me nowhere
except to frustrations.
So what is the absolute simplest and easiest path to open my .html pages
with some php mysql in em. and see them as they will work on the web???
Thank you,
-Marcus
-- ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||Marcus Unlimited http://marcusunlimited.com Multimedia Internet Design and Education ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
----------------------------------- Also visit: - http://www.chromaticus.com - http://ampcast.com/chromaticus
attached mail follows:
Marcus Unlimited wrote:
> So what is the absolute simplest and easiest path to open my .html pages > with some php mysql in em. and see them as they will work on the web???
To quote a friend of mine: "The only way to see how this will work is to see how this will work."
Get some server space with the software installed, and play with it.
There's free space available for this purpose at http://www.evolt.org and http://f2o.org/ and I'm sure others as well, but it's best if you can setup a little 'sandbox' to play in on the actual machine that you are using so that you are testing on the same versions, same config that you will be running on.
TjL
attached mail follows:
I guess I should reiterate;
"What is the easiest way to test locally (on my desktop) without having to upload?"
Thanks,-Marcus
Tim Luoma wrote:
> Marcus Unlimited wrote: > > > So what is the absolute simplest and easiest path to open my .html pages > > with some php mysql in em. and see them as they will work on the web??? > > To quote a friend of mine: "The only way to see how this will work is to > see how this will work." > > Get some server space with the software installed, and play with it. > > There's free space available for this purpose at http://www.evolt.org > and http://f2o.org/ and I'm sure others as well, but it's best if you > can setup a little 'sandbox' to play in on the actual machine that you > are using so that you are testing on the same versions, same config that > you will be running on. > > TjL
-- ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||Marcus Unlimited http://marcusunlimited.com Multimedia Internet Design and Education ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
----------------------------------- Also visit: - http://www.chromaticus.com - http://ampcast.com/chromaticus
attached mail follows:
Just install apache (for windows), MySQL (for windows), and PHP... voila a local webserver, and the only way to view your pages, no need to upload since you can point your webserver to where you are developing your php.
andrew
----- Original Message -----
From: "Marcus Unlimited" <marcus
marcusunlimited.com>
To: <php-general
lists.php.net>
Sent: Saturday, July 27, 2002 3:56 PM
Subject: [PHP] Re: Q:What is the easiest way to test my PHP+Html pages?
> I guess I should reiterate; > > "What is the easiest way to test locally (on my desktop) without having to > upload?" > > Thanks,-Marcus > > Tim Luoma wrote: > > > Marcus Unlimited wrote: > > > > > So what is the absolute simplest and easiest path to open my .html pages > > > with some php mysql in em. and see them as they will work on the web??? > > > > To quote a friend of mine: "The only way to see how this will work is to > > see how this will work." > > > > Get some server space with the software installed, and play with it. > > > > There's free space available for this purpose at http://www.evolt.org > > and http://f2o.org/ and I'm sure others as well, but it's best if you > > can setup a little 'sandbox' to play in on the actual machine that you > > are using so that you are testing on the same versions, same config that > > you will be running on. > > > > TjL > > -- > |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| |||||| > > Marcus Unlimited > http://marcusunlimited.com > Multimedia Internet Design and Education > |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| |||||| > > ----------------------------------- > Also visit: > - http://www.chromaticus.com > - http://ampcast.com/chromaticus > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >
attached mail follows:
Search on Google for PHPTriad or Firepages, or look on hotscripts.com or sourceforge. There are a couple packages out there that'll install Apache, PHP, and MySQL automatically for you on Windows. It's nice and painless.
Once it's installed, you run a little .bat program to start it all up, and then call up http://localhost/ to view your pages.
---John Holmes...
> -----Original Message-----
> From: Marcus Unlimited [mailto:marcus
marcusunlimited.com]
> Sent: Saturday, July 27, 2002 10:05 AM
> To: php-general
lists.php.net
> Subject: [PHP] Q:What is the easiest way to test my PHP+Html pages?
>
> Hello,
>
> Okay,
>
> Here's what I want to do.
>
> Simply test my PHP stuff and practice with MySQL.
>
> I don't want to learn to master Unix or anything at all like that but
> these vague and arcane install instructions are leading me nowhere
> except to frustrations.
>
> So what is the absolute simplest and easiest path to open my .html
pages
>
> with some php mysql in em. and see them as they will work on the
web???
>
> Thank you,
> -Marcus
>
>
>
> --
>
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
||
> ||||||||
>
> Marcus Unlimited
> http://marcusunlimited.com
> Multimedia Internet Design and Education
>
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
||
> ||||||||
>
> -----------------------------------
> Also visit:
> - http://www.chromaticus.com
> - http://ampcast.com/chromaticus
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
attached mail follows:
Hmm, .bat that is a new one for me, will I still be able to test my pages in regular windows browsers like IE and NN?
-Marcus
THANKS
John Holmes wrote:
> Search on Google for PHPTriad or Firepages, or look on hotscripts.com or
> sourceforge. There are a couple packages out there that'll install
> Apache, PHP, and MySQL automatically for you on Windows. It's nice and
> painless.
>
> Once it's installed, you run a little .bat program to start it all up,
> and then call up http://localhost/ to view your pages.
>
> ---John Holmes...
>
> > -----Original Message-----
> > From: Marcus Unlimited [mailto:marcus
marcusunlimited.com]
> > Sent: Saturday, July 27, 2002 10:05 AM
> > To: php-general
lists.php.net
> > Subject: [PHP] Q:What is the easiest way to test my PHP+Html pages?
> >
> > Hello,
> >
> > Okay,
> >
> > Here's what I want to do.
> >
> > Simply test my PHP stuff and practice with MySQL.
> >
> > I don't want to learn to master Unix or anything at all like that but
> > these vague and arcane install instructions are leading me nowhere
> > except to frustrations.
> >
> > So what is the absolute simplest and easiest path to open my .html
> pages
> >
> > with some php mysql in em. and see them as they will work on the
> web???
> >
> > Thank you,
> > -Marcus
> >
> >
> >
> > --
> >
> ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> ||
> > ||||||||
> >
> > Marcus Unlimited
> > http://marcusunlimited.com
> > Multimedia Internet Design and Education
> >
> ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> ||
> > ||||||||
> >
> > -----------------------------------
> > Also visit:
> > - http://www.chromaticus.com
> > - http://ampcast.com/chromaticus
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
-- ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||Marcus Unlimited http://marcusunlimited.com Multimedia Internet Design and Education ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
----------------------------------- Also visit: - http://www.chromaticus.com - http://ampcast.com/chromaticus
attached mail follows:
Marcus,
A quote from my eMail YESTERDAY:
"There is a nice bundle for windows, it's perfect to test basic php/mysql stuff. it includes Apache, MySQL and PHP. You can find it at http://www.firepages.com.au/dev4.htm" .......
Hope you read it now.
Oscar.-
----------- Mensaje Original --------------
De: John Holmes [holmes072000
charter.net]
Para: Marcus Unlimited [marcus
marcusunlimited.com],
php-general
lists.php.net [php-general
lists.php.net]
Cc:
Asunto: RE: [PHP] Q:What is the easiest way to test my PHP+Html pages?
Fecha: 27/07/2002 11:12:34
Mensaje:
Search on Google for PHPTriad or Firepages, or look on hotscripts.com or sourceforge. There are a couple packages out there that'll install Apache, PHP, and MySQL automatically for you on Windows. It's nice and painless.
Once it's installed, you run a little .bat program to start it all up, and then call up http://localhost/ to view your pages.
---John Holmes...
> -----Original Message-----
> From: Marcus Unlimited [mailto:marcus
marcusunlimited.com]
> Sent: Saturday, July 27, 2002 10:05 AM
> To: php-general
lists.php.net
> Subject: [PHP] Q:What is the easiest way to test my PHP+Html pages?
>
> Hello,
>
> Okay,
>
> Here's what I want to do.
>
> Simply test my PHP stuff and practice with MySQL.
>
> I don't want to learn to master Unix or anything at all like that but
> these vague and arcane install instructions are leading me nowhere
> except to frustrations.
>
> So what is the absolute simplest and easiest path to open my .html
pages
>
> with some php mysql in em. and see them as they will work on the
web???
>
> Thank you,
> -Marcus
>
>
>
> --
>
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
||
> ||||||||
>
> Marcus Unlimited
> http://marcusunlimited.com
> Multimedia Internet Design and Education
>
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
||
> ||||||||
>
> -----------------------------------
> Also visit:
> - http://www.chromaticus.com
> - http://ampcast.com/chromaticus
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
attached mail follows:
Wow hey sorry I missed that.
Thank you, _Marcus
"oscarfm
cantv.net" wrote:
> Marcus,
>
> A quote from my eMail YESTERDAY:
>
> "There is a nice bundle for windows, it's perfect to test basic php/mysql
> stuff. it includes Apache, MySQL and PHP. You can find it at
> http://www.firepages.com.au/dev4.htm" .......
>
> Hope you read it now.
>
> Oscar.-
>
> ----------- Mensaje Original --------------
>
> De: John Holmes [holmes072000
charter.net]
> Para: Marcus Unlimited [marcus
marcusunlimited.com],
> php-general
lists.php.net [php-general
lists.php.net]
> Cc:
> Asunto: RE: [PHP] Q:What is the easiest way to test my PHP+Html pages?
> Fecha: 27/07/2002 11:12:34
> Mensaje:
>
>
> Search on Google for PHPTriad or Firepages, or look on hotscripts.com
> or
> sourceforge. There are a couple packages out there that'll install
> Apache, PHP, and MySQL automatically for you on Windows. It's nice and
> painless.
>
> Once it's installed, you run a little .bat program to start it all up,
> and then call up http://localhost/ to view your pages.
>
> ---John Holmes...
>
> > -----Original Message-----
> > From: Marcus Unlimited [mailto:marcus
marcusunlimited.com]
> > Sent: Saturday, July 27, 2002 10:05 AM
> > To: php-general
lists.php.net
> > Subject: [PHP] Q:What is the easiest way to test my PHP+Html pages?
> >
> > Hello,
> >
> > Okay,
> >
> > Here's what I want to do.
> >
> > Simply test my PHP stuff and practice with MySQL.
> >
> > I don't want to learn to master Unix or anything at all like that but
> > these vague and arcane install instructions are leading me nowhere
> > except to frustrations.
> >
> > So what is the absolute simplest and easiest path to open my .html
> pages
> >
> > with some php mysql in em. and see them as they will work on the
> web???
> >
> > Thank you,
> > -Marcus
> >
> >
> >
> > --
> >
> ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> ||
> > ||||||||
> >
> > Marcus Unlimited
> > http://marcusunlimited.com
> > Multimedia Internet Design and Education
> >
> ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> ||
> > ||||||||
> >
> > -----------------------------------
> > Also visit:
> > - http://www.chromaticus.com
> > - http://ampcast.com/chromaticus
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
-- |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| Marcus Unlimited http://marcusunlimited.com Multimedia Internet Design and Education |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| ----------------------------------- Also visit: - http://www.chromaticus.com - http://ampcast.com/chromaticus
attached mail follows:
.bat is a Batch file. All it's going to do is go through and start up Apache and MySQL for you. Then you can call up your local pages in any browser you have installed. You can run a .bat file to stop Apache and MySQL when you are done, too.
It's all explained in the install instructions for the package you install.
---John Holmes...
> -----Original Message-----
> From: Marcus Unlimited [mailto:marcus
marcusunlimited.com]
> Sent: Saturday, July 27, 2002 11:17 AM
> To: holmes072000
charter.net
> Cc: php-general
lists.php.net
> Subject: Re: [PHP] Q:What is the easiest way to test my PHP+Html
pages?
>
> Hmm, .bat that is a new one for me, will I still be able to test my
pages
> in regular windows browsers like IE and NN?
>
> -Marcus
>
>
> THANKS
>
> John Holmes wrote:
>
> > Search on Google for PHPTriad or Firepages, or look on
hotscripts.com or
> > sourceforge. There are a couple packages out there that'll install
> > Apache, PHP, and MySQL automatically for you on Windows. It's nice
and
> > painless.
> >
> > Once it's installed, you run a little .bat program to start it all
up,
> > and then call up http://localhost/ to view your pages.
> >
> > ---John Holmes...
> >
> > > -----Original Message-----
> > > From: Marcus Unlimited [mailto:marcus
marcusunlimited.com]
> > > Sent: Saturday, July 27, 2002 10:05 AM
> > > To: php-general
lists.php.net
> > > Subject: [PHP] Q:What is the easiest way to test my PHP+Html
pages?
> > >
> > > Hello,
> > >
> > > Okay,
> > >
> > > Here's what I want to do.
> > >
> > > Simply test my PHP stuff and practice with MySQL.
> > >
> > > I don't want to learn to master Unix or anything at all like that
but
> > > these vague and arcane install instructions are leading me nowhere
> > > except to frustrations.
> > >
> > > So what is the absolute simplest and easiest path to open my .html
> > pages
> > >
> > > with some php mysql in em. and see them as they will work on the
> > web???
> > >
> > > Thank you,
> > > -Marcus
> > >
> > >
> > >
> > > --
> > >
> >
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > ||
> > > ||||||||
> > >
> > > Marcus Unlimited
> > > http://marcusunlimited.com
> > > Multimedia Internet Design and Education
> > >
> >
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > ||
> > > ||||||||
> > >
> > > -----------------------------------
> > > Also visit:
> > > - http://www.chromaticus.com
> > > - http://ampcast.com/chromaticus
> > >
> > >
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, visit: http://www.php.net/unsub.php
>
> --
>
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
||
> ||||||||
>
> Marcus Unlimited
> http://marcusunlimited.com
> Multimedia Internet Design and Education
>
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
||
> ||||||||
>
> -----------------------------------
> Also visit:
> - http://www.chromaticus.com
> - http://ampcast.com/chromaticus
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
attached mail follows:
"Andrew Brampton" <andrew
bramp.freeserve.co.uk> wrote in message
news:014a01c2357e$77a15b50$0100a8c0
andrew...
> Just install apache (for windows), MySQL (for windows), and PHP... voila a
> local webserver, and the only way to view your pages, no need to upload
> since you can point your webserver to where you are developing your php.
>
> andrew
Or you could use something like FoxServ:
http://foxserv.linuxmax.net/portal.php
J. Cox http://www.dinerminor.com http://www.postnuke.com
attached mail follows:
Marcus Unlimited wrote:
> "What is the easiest way to test locally (on my desktop) without having to > upload?"
If you follow the route that several folks suggest and go with one of the 'install everything' routes, be sure to install the same versions ... for example, some of them install older versions of PHP which may change some things (ala register_globals) so your scripts may work on your local development machine but not on the actual server.
TjL
attached mail follows:
Install PHP on your desktop. You will need a web server too. I use PHP/MySQL/Apache on my Laptop, Desktop, Servers and workstations.
Steve
At 07:56 AM 7/27/2002 -0700, you wrote: >I guess I should reiterate; > >"What is the easiest way to test locally (on my desktop) without having to >upload?" > >Thanks,-Marcus > >Tim Luoma wrote: > > > Marcus Unlimited wrote: > > > > > So what is the absolute simplest and easiest path to open my .html pages > > > with some php mysql in em. and see them as they will work on the web??? > > > > To quote a friend of mine: "The only way to see how this will work is to > > see how this will work." > > > > Get some server space with the software installed, and play with it. > > > > There's free space available for this purpose at http://www.evolt.org > > and http://f2o.org/ and I'm sure others as well, but it's best if you > > can setup a little 'sandbox' to play in on the actual machine that you > > are using so that you are testing on the same versions, same config that > > you will be running on. > > > > TjL > >-- >|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| > >Marcus Unlimited >http://marcusunlimited.com >Multimedia Internet Design and Education >|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| > >----------------------------------- >Also visit: >- http://www.chromaticus.com >- http://ampcast.com/chromaticus > > > >-- >PHP General Mailing List (http://www.php.net/) >To unsubscribe, visit: http://www.php.net/unsub.php > > >-- >This message has been scanned for viruses and >dangerous content by MailScanner, and is >believed to be clean. >ow3
-- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. ow3
attached mail follows:
> I store all dates in unix timestamp format. It's the easiest one to work > with, and it's easy to do things like "date + three days", because it's > just > a case of adding the right number of seconds to the current stamp. > > You don't have to split anything, or get substr()'s of anything... and > since > date() accepts unix timestamps AND is the easiest way to get date formats > (for me), I reckon it's the best way to go.
Well, I've got to butt in on this one and put in a big DISAGREE. Use whatever is easiest for you, but MySQL provides a very rich assortment of date and time manipulation functions that are a lot better than PHPs (without any added classes).
For example, to get everything from your database that was inserted three days ago, you'd use:
SELECT * FROM your_table WHERE your_date_column = CURDATE() - INTERVAL 3 DAY;
Now, much of this is MySQL specific, though. I only use MySQL right now, so it's not an issue, but it can be for some of you.
Bottom line is use whatever is easiest for you, but realize that there are a ton of Date and Time functions built into MySQL. Anything you can do with a PHP function you can do with a MySQL function. You are also not completely lost if you're storing things as Unixtimstamps. You can convert from and to unixtimestamps and still make use of all of the MySQL functions...
---John Holmes...
attached mail follows:
Use a regular expression. Something like this should work.
eregi("<body>(.*)</body>",$html_text,$matches);
$matches[1] should contain the text you are after.
---John Holmes...
> -----Original Message-----
> From: JJ Harrison [mailto:webmaster
tececo.com]
> Sent: Saturday, July 27, 2002 9:41 AM
> To: php-general
lists.php.net
> Subject: [PHP] removing html...
>
> Hi,
>
> I have search around on google/php.net to try and find a way to remove
> <body>, everything above ,</body> and everything below it in a html
page.
>
> eg.
>
> <html>
> <head>
> <title>test</test>
> </head>
> <body>
> Blah Blah Blah<br>
> </body>
> </html>
>
> would become: Blah Blah Blah<br>
>
> I know how to use php to convert html to pure text etc but I don't
know
> how
> to remove the unwanted header and footer HTML.
>
> I am pretty sure that someone must have done it(HTML file uploads for
> sites
> etc).
>
> Thanks in advance and good night.
>
>
> --
> JJ Harrison
> webmaster
tececo.com
> www.tececo.com
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
attached mail follows:
Or...
preg_match("/<body>(.*)<\/body>/i",$html_text,$matches);
---John Holmes...
> -----Original Message-----
> From: JJ Harrison [mailto:webmaster
tececo.com]
> Sent: Saturday, July 27, 2002 9:41 AM
> To: php-general
lists.php.net
> Subject: [PHP] removing html...
>
> Hi,
>
> I have search around on google/php.net to try and find a way to remove
> <body>, everything above ,</body> and everything below it in a html
page.
>
> eg.
>
> <html>
> <head>
> <title>test</test>
> </head>
> <body>
> Blah Blah Blah<br>
> </body>
> </html>
>
> would become: Blah Blah Blah<br>
>
> I know how to use php to convert html to pure text etc but I don't
know
> how
> to remove the unwanted header and footer HTML.
>
> I am pretty sure that someone must have done it(HTML file uploads for
> sites
> etc).
>
> Thanks in advance and good night.
>
>
> --
> JJ Harrison
> webmaster
tececo.com
> www.tececo.com
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
attached mail follows:
> I have search around on google/php.net to try and find a way to remove > <body>, everything above ,</body> and everything below it in a html page.
FYI on the two methods I suggested:
preg_match("/<body>(.*)<\/body>/i",$html_text,$matches); eregi("<body>(.*)</body>",$html_text,$matches);
Preg vs. Ereg name total time average iteration time 100% Preg Method 59ms 5.906E-005 339% Ereg Method 200ms 0.00020036
Each method was called 10,000 times.
---John Holmes...
attached mail follows:
Thanks,
I had never used regular expressions before and will look into them a bit more.
-- JJ Harrison webmastertececo.com www.tececo.com
"Jj Harrison" <webmaster
tececo.com> wrote in message news:20020727133846.20237.qmail
pb1.pair.com... > Hi, > > I have search around on google/php.net to try and find a way to remove > <body>, everything above ,</body> and everything below it in a html page. > > eg. > > <html> > <head> > <title>test</test> > </head> > <body> > Blah Blah Blah<br> > </body> > </html> > > would become: Blah Blah Blah<br> > > I know how to use php to convert html to pure text etc but I don't know how > to remove the unwanted header and footer HTML. > > I am pretty sure that someone must have done it(HTML file uploads for sites > etc). > > Thanks in advance and good night. > > > -- > JJ Harrison > webmaster
tececo.com > www.tececo.com > > >
attached mail follows:
I would guess your value doesn't have double quotes around.
<input type="text" value="<?php echo $var; ?>" size="20 "/>
Because what might happen is this:
<input type=text value="New York \"City\" size=20
Also, take a look at stripslashes() to remove the \ before the ".
-- Julio Nobrega Pode acessar: http://www.inerciasensorial.com.br"Monty" <monty3
hotmail.com> escreveu na mensagem news:B9679BD5.1242A%monty3
hotmail.com... > If someone enters this into a field... > > New York "City" > > and I need to re-display it in the field (if an error occurred, for > example), this is what's in the field... > > New York \ > > I have another multi-line text field that I used quotes in and this doesn't > happen with that field, even though they are both being treated in the same > manner. What am I missing? >
attached mail follows:
> If someone enters this into a field... > > New York "City" > > and I need to re-display it in the field (if an error occurred, for > example), this is what's in the field... > > New York \ > > I have another multi-line text field that I used quotes in and this > doesn't > happen with that field, even though they are both being treated in the > same > manner. What am I missing?
If you look at your source code, you'll see that the entire string is there. It will look like this:
Value="New York\"City\""
HTML doesn't know that \ is used to escape the " character. It just sees the string "New York\" and treats the rest as an unknown attribute.
So, to do it correctly, you should use this:
Value="<?=htmlentities(stripslashes($your_text))?>"
---John Holmes...
attached mail follows:
> You can use REPLACE instead of making two separate queries (UPDATE and > INSERT) because it checks if it is there, and if it's not, then it adds > it; > otherwise it updates it. I think that's right ... but the SQL server's > SQL > server is broken! (the irony!)
Just note that REPLACE is MySQL specific. A solution using it may not be portable to other databases. May or may not matter to you...
---John Holmes...
attached mail follows:
> Is it possible download php scripts from webpages ? for example i need > php.net scripts or others :-) If yes, how ?
Not unless they let you and give you a link to show the source or to download it. You can't get the source for just any PHP page b/c it's parsed on the server and only HTML is sent to you.
---John Holmes
attached mail follows:
thanks
attached mail follows:
The following code was created to generate a random password. But it can be used to generate a random string for any purpose.
The basic idea was to create an array that would contain all the letters of the English alphabet, and pick out random values from that array. I have outlined two methods below, please also read the explanation/comments provided below.
Method 1: $strrandom=””;
$ivalfrom =ord("a"); $ivalto =ord("z");
for($i=$ivalfrom; $i<=$ivalto; $i++) $arralpha[] = chr($i);
mt_srand ((double) microtime() * 1000000);
$rand_al = array_rand ($arralpha, 3); $strrandom = $arralpha[$rand_al[0]] . $arralpha[$rand_al[1]] . $arralpha[$rand_al[3]]; $numpart=mt_rand(10,99); $strrandom .= $numpart;
echo "random = $strrandom";
---------------------------------------------------------------------------- ---------------------
Method 2: $strrandom=””;
$ivalfrom =ord("a"); $ivalto =ord("z");
for($i=$ivalfrom; $i<=$ivalto; $i++) $arralpha[] = chr($i);
mt_srand ((double) microtime() * 1000000);
$strrandom = $arralpha[mt_rand(0,25)].$arralpha[mt_rand(0,25)].$arralpha[mt_rand(0,25)]; $numpart=mt_rand(10,99); $strrandom .= $numpart;
echo "random = $strrandom"; ---------------------------------------------------------------------------- ---------------------
Explanantion:
/* I used a “for” loop to populate the array with the alphabets in lowercase (to increase the number of values, you could probably insert uppercase alphabets too). */
//first populate array with alphabets $ivalfrom =ord("a"); $ivalto =ord("z");
//add the alphabets to the array for($i=$ivalfrom; $i<=$ivalto; $i++) $arralpha[] = chr($i);
/* $arralpha is an array variable which refers to the array of 26 alphabets. */
/* I seed the random generator */ mt_srand ((double) microtime() * 1000000);
/* I wanted my string to contain 3 random letters. I use the array_rand() function, which takes as input an array, and the number of random values desired (which is 3 here, but it could be 26 too, equal to or less than the size of the array). It returns an array, which contains indexes taken at random from the array passed as the argument.*/
$rand_al = array_rand ($arralpha, 3); /* Here, $rand_al is another array variable which contains random indexes */
$strrandom=””; $strrandom = $arralpha[$rand_al[0]] . $arralpha[$rand_al[1]] . $arralpha[$rand_al[3]]; /* In the above statement, the values in the $rand_al are really subscripts of the alphabet array, so I use them as subscripts to finally arrive at the random string. You could iterate through the generated $rand_al using a loop to get the subscripts */
/* Please note that array_rand() will work for PHP4 and above, it may not return random values if you do not seed the generator first, and it may still create a problem on some windows machines (a bug, which has been fixed on PHP 4.2.2 –dev version). In such a case, use Method 2. */
/* The two lines below add a 2-digit number to the random string. */ $numpart=mt_rand(10,99); $strrandom .= $numpart;
-Naintara
-----Original Message-----
From: php-general-return-109433-naintara=del6.vsnl.net.in
lists.php.net
[mailto:php-general-return-109433-naintara=del6.vsnl.net.in
lists.php.ne
t]On Behalf Of Liam MacKenzie
Sent: Thursday, July 25, 2002 1:04 PM
To: php-general
lists.php.net; Monty
Subject: Re: [PHP] Password Generator Script
<? $password = substr(ereg_replace("[^A-Za-z0-9]", "", crypt(time())) . ereg_replace("[^A-Za-z0-9]", "", crypt(time())) . ereg_replace("[^A-Za-z0-9]", "", crypt(time())), 9, 10); ?>
Random Password : <b><? echo "$password"; ?></b>
In action: http://scripts.operationenigma.net/passgen.php
Have fun :-)
----- Original Message -----
From: "Monty" <monty3
hotmail.com>
To: <php-general
lists.php.net>
Sent: Thursday, July 25, 2002 2:49 PM
Subject: [PHP] Password Generator Script
> Can anyone recommend where I could find a decent script that automatically > generates passwords? I don't care if they are readable or just random > letters, numbers. > > Thanks! > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > >
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
attached mail follows:
Justin,
I did what you said, just uploaded the file and downloaded it again, and the weirdest thing is happening. When I Form-Upload/FTP-Download it, I can see it on my local computer, it opens everywhere. Now, when I try to see it from the web site it is uploaded (http://wwwwebsite/file.jpg), it does not display. mmm Any suggestions?
----- Original Message -----
From: "Justin French" <justin
indent.com.au>
To: "Tech Support" <jgrill
web-1hosting.net>; <oscarfm
cantv.net>;
<php-general
lists.php.net>
Sent: Friday, July 26, 2002 9:22 PM
Subject: Re: [PHP] High Resolution Images
> Does the maximum uploaded file size directive in php.ini refuse upload, or > cut the file off at the maximum? > > If you're uploading via a browser, it *might* be chopping it off, resulting > in an invalid file. > > Try *JUST* uploading the file and saving it to disk, then try downloading & > saving that file to disk... compare file sizes, and try to open the file. > > > If all this works, then you can rule out a file size issue, and look at > other issues, like a potential bug with large files or large resolutions. > > > Justin French
> ----- Original Message -----
> From: <oscarfm
cantv.net>
> To: <php-general
lists.php.net>
> Sent: Friday, July 26, 2002 5:24 PM
> Subject: [PHP] High Resolution Images
>
>
>> Hello,
>>
>> I am creating a script that takes an uploaded image, creates a thumbnail
>> from it, and saves both files.
>>
>> The script works great, but the problem is, the files It will have to
>> handle, are high-resolution files (300dpi, 24 bit-depth).. it works fine
> on
>> regular files (72 dpi), but when I upload a 300dpi image, it says that
the
>> image is not a valid JPEG file.
>>
>> Warning: imagecreatefromjpeg:
>> '/home/sites/site1/web/uploadedHi-Res/mo_0001.jpg' is not a valid JPEG
> file
>> in /home/sites/site1/web/site/designers/doSubmit.php on line 6
>>
>> The image appears to be valid here, it opens on photoshop, and
everywhere,
>> however, once uploaded, the image seems to be corrupted somehow, bc if I
>> download it again, it won¨t open anywhere. Has this happened to anyone
> else
>> on this list?.. if so, please advise!.
>>
>> Here is the code for the script if it helps:
>>
>>
>> function createThumbnail($path, $filename) {
>> $src_img=ImageCreateFromJpeg($path); //HERE IT SAYS IMAGE NOT VALID
>> if (imagesx($src_img) > imagesy($src_img)) {
>> $new_w=69;
>> $new_h=40;
>> $t1 = imagesx($src_img);
>> $t2 = imagesy($src_img);
>> } else {
>> $new_w=40;
>> $new_h=69;
>> $t1 = imagesy($src_img);
>> $t2 = imagesx($src_img);
>> }
>> header("Content-type: image/jpeg");
>> $dst_img=imagecreate($new_w,$new_h);
>> imagecopyresized($dst_img,$src_img,0,0,0,0,$new_w,$new_h,$t1,$t2);
>> ImageJpeg($dst_img,
>> "/home/sites/site1/web/uploadedHi-Res/$filename-thumb.jpg", 50);
>> }
>>
>>
>> if (($filename_type != "image/jpeg") && ($filename_type != "image/jpg")
&&
>> ($filename_type != "image/pjpeg")) {
>> header("Location:submitError.php"); exit;
>> } else {
>> srand((double)microtime()*1000000);
>> $randomfile = substr(md5(rand(0,9999999)), 0, 6);
>> $upload = "/home/sites/site1/web/uploadedHi-Res";
>> $upload_path = "$upload/$filename_name";
>> if (is_uploaded_file($filename)) {
>> Exec("cp $filename $upload_path");
>> $link =
mysql_connect(localhost, 'xxxxx', 'xxxx')
>> or die("Unable to Connect to Database");
>> mysql_select_db(xxxx);
>> $sql = "INSERT INTO xxxx VALUES ('$designer_valid', '$filename_name',
>> NOW(), 'Pending')";
>> $result = mysql_query($sql) or die("Query Failed");
>> createThumbnail($upload_path, $filename_name);
>> header("Location:designSubmitted.php"); exit;
>> } else {
>> header("Location:submitError.php"); exit;
>> }
>> }
>>
>>
>>
attached mail follows:
Glory!
I just want my Adding Into Database script to check if the Name/Country already exists, and if it does, it shouldn't be allowed.
If some with Name : Jackson Country : USA exists in my DB, no one with same name/country should be able to add his name/country in the DB.
Can anyone hint?
T. Edison Jr.
__________________________________________________ Do You Yahoo!? Yahoo! Health - Feel better, live better http://health.yahoo.com
attached mail follows:
> I just want my Adding Into Database script to check if > the Name/Country already exists, and if it does, it > shouldn't be allowed. > > If some with > Name : Jackson > Country : USA > exists in my DB, no one with same name/country should > be able to add his name/country in the DB.
Have your database handle that, not PHP.
When you create your table, make the combo of Name and Country unique.
CREATE TABLE your_table { Name VARCHAR(15), Country VARCHAR(15), UNIQUE Name_Country (Name, Country) }
Then you can have "Jackson, USA", "Jackson, UK", "Someone Else, USA", etc...just not the same combination at all.
---John Holmes...
attached mail follows:
do that plus with your insert, just do "INSERT IGNORE ....".
"John Holmes" <holmes072000
charter.net> wrote in message
news:000001c2358a$bd729fc0$b402a8c0
mango...
> > I just want my Adding Into Database script to check if
> > the Name/Country already exists, and if it does, it
> > shouldn't be allowed.
> >
> > If some with
> > Name : Jackson
> > Country : USA
> > exists in my DB, no one with same name/country should
> > be able to add his name/country in the DB.
>
> Have your database handle that, not PHP.
>
> When you create your table, make the combo of Name and Country unique.
>
> CREATE TABLE your_table {
> Name VARCHAR(15),
> Country VARCHAR(15),
> UNIQUE Name_Country (Name, Country)
> }
>
> Then you can have "Jackson, USA", "Jackson, UK", "Someone Else, USA",
> etc...just not the same combination at all.
>
> ---John Holmes...
>
attached mail follows:
Hello,
When should i prefer strcmp() above == or !=? I have test it out (see code below). But a == comparison seems to be faster always. First i thought is was cause, if(strcmp($1,$2)!=0), needs two comparisons (strcmp and !=). But even if($1!=$2) is faster then if(strcmp($1,$2)).
Thanks,
Bas Jobsen
<?
function getmicrotime(){ list($usec, $sec) = explode(" ",microtime()); return ((float)$usec + (float)$sec); }
$t1='hello'; $t2='hello'; $t3='hallo';
?> 1000x:<? $start=getmicrotime(); for($a=0; $a<100000; $a++) if(strcmp($t1,$t3));//nonmatch echo getmicrotime()-$start; ?> <br> 1000x:<? $start=getmicrotime(); for($a=0; $a<100000; $a++) if($t1!=$t3);//nonmatch echo getmicrotime()-$start; ?>
<br> 1000x:<? $start=getmicrotime(); for($a=0; $a<100000; $a++) if(!strcmp($t1,$t3));//match echo getmicrotime()-$start; ?> <br> 1000x:<? $start=getmicrotime(); for($a=0; $a<100000; $a++) if($t1==$t3);//match echo getmicrotime()-$start; ?> <br>
1000x:<? $start=getmicrotime(); for($a=0; $a<100000; $a++) if(strcmp($t1,$t2));//nonmatch echo getmicrotime()-$start; ?> <br> 1000x:<? $start=getmicrotime(); for($a=0; $a<100000; $a++) if($t1!=$t2);//nonmatch echo getmicrotime()-$start; ?>
<br> 1000x:<? $start=getmicrotime(); for($a=0; $a<100000; $a++) if(!strcmp($t1,$t2));//match echo getmicrotime()-$start; ?> <br> 1000x:<? $start=getmicrotime(); for($a=0; $a<100000; $a++) if($t1==$t2);//match echo getmicrotime()-$start; ?> <br>
attached mail follows:
Strcmp() is case sensitive. So use it when you need a case sensitive comparison.
---John Holmes...
> -----Original Message-----
> From: Bas Jobsen [mailto:bas
startpunt.cc]
> Sent: Saturday, July 27, 2002 12:35 PM
> To: PHP General
> Subject: [PHP] string comparison
>
> Hello,
>
> When should i prefer strcmp() above == or !=?
> I have test it out (see code below).
> But a == comparison seems to be faster always.
> First i thought is was cause, if(strcmp($1,$2)!=0),
> needs two comparisons (strcmp and !=). But even
> if($1!=$2) is faster then if(strcmp($1,$2)).
>
> Thanks,
>
> Bas Jobsen
>
> <?
>
> function getmicrotime(){
> list($usec, $sec) = explode(" ",microtime());
> return ((float)$usec + (float)$sec);
> }
>
>
> $t1='hello';
> $t2='hello';
> $t3='hallo';
>
> ?>
> 1000x:<?
> $start=getmicrotime();
> for($a=0; $a<100000; $a++) if(strcmp($t1,$t3));//nonmatch
> echo getmicrotime()-$start;
> ?>
> <br>
> 1000x:<?
> $start=getmicrotime();
> for($a=0; $a<100000; $a++) if($t1!=$t3);//nonmatch
> echo getmicrotime()-$start;
> ?>
>
> <br>
> 1000x:<?
> $start=getmicrotime();
> for($a=0; $a<100000; $a++) if(!strcmp($t1,$t3));//match
> echo getmicrotime()-$start;
> ?>
> <br>
> 1000x:<?
> $start=getmicrotime();
> for($a=0; $a<100000; $a++) if($t1==$t3);//match
> echo getmicrotime()-$start;
> ?>
> <br>
>
> 1000x:<?
> $start=getmicrotime();
> for($a=0; $a<100000; $a++) if(strcmp($t1,$t2));//nonmatch
> echo getmicrotime()-$start;
> ?>
> <br>
> 1000x:<?
> $start=getmicrotime();
> for($a=0; $a<100000; $a++) if($t1!=$t2);//nonmatch
> echo getmicrotime()-$start;
> ?>
>
> <br>
> 1000x:<?
> $start=getmicrotime();
> for($a=0; $a<100000; $a++) if(!strcmp($t1,$t2));//match
> echo getmicrotime()-$start;
> ?>
> <br>
> 1000x:<?
> $start=getmicrotime();
> for($a=0; $a<100000; $a++) if($t1==$t2);//match
> echo getmicrotime()-$start;
> ?>
> <br>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
attached mail follows:
Alexander Kuznetsov schrieb:
> Hello Oliver, > > Thursday, July 25, 2002, 1:42:05 PM, you wrote: > > OW> Alexander Kuznetsov schrieb: > > >> i think u should set write permissions to directory > >> where u r trying to copy file > > OW> Thank you for answering. > OW> But how do I set write permisisons? With a .htaccess file? > OW> Oliver > > i think the reason is write permission on file system of the server > and u have to type chmod command: > > shell> chmod a+r /place/to/put/uploaded/file > > P.S. When reply message use Reply-To All option for you answer will be > accessible in PHP-general mailing list ;) > > -- > Best regards, > Alexander Kuznetsov
I got a ftp program that i wanna use to set write permission. It tells me to enter it like that: site chmod %a[Mode] %a[Filename] I still don't know how to do it, can somebody please give me an example? Oliver
attached mail follows:
Hi
Can anyone recommend a good portal system / content management system (polls, forums, etc.) I have tried phpnuke but am bound to the standard layout of it i.e content in the centre and blocks on the left or right.
Any recommendation will be appreciated.
Mohamed
attached mail follows:
I'd use the following code:
------------------------------ // DB QUERY $query = "SELECT columnFirst, columnSecond, columnThird FROM table_name"; $result = mysql_query($query) or die(mysql_error());
// NOW THE LOOP while ($row = mysql_fetch_assoc($result)) { echo "<tr>"; echo "<td>"; echo join("</td><td>", $row); echo "</td>"; echo "</tr>"; }; ------------------------------
-----Oorspronkelijk bericht-----
Van: Chris Earle [mailto:chris
earleweb.com]
Verzonden: 27 July 2002 06:54
Aan: php-general
lists.php.net
Onderwerp: [PHP] Re: Table formatting
You can do what he said or just put a separate loop inside the original loop.
Depending on how you get the info, you can use either way (his would create less overhead if you are just using the same <TD> info every row, otherwise they're really the same because his way you'll have to create an array to access later for multiple rows, or just do my way and have the loop access the NEXT *3* (or whatever) items ...).
i.e., for (LOOP FOR <TR>) { for (LOOP FOR <TD>) {} }
"César aracena" <icaam
icaam.com.ar> wrote in message
news:001a01c234f0$a5e8ad80$28ed0dd1
gateway...
Hi all.
Last nite I've came across a problem I wasn't able to figure out by my self. It's not difficult to make a loop that will make new *TABLE ROWS* (<tr>) to show several DB objects in a nice way. what I need to do, is to display 2 or maybe even 3 of this objects stored in a DB per table row, separated in different *TABLE COLUMS* (<td>). how can I achieve this? What I usually do is:
------------------------------ // DB QUERY $query = "SELECT * FROM table_name"; $result = mysql_query($query) or die(mysql_error()); $num_rows = mysql_num_rows($result);
// NOW THE LOOP for ($i=0; $i<$num_rows; $i++) { $row = mysql_fetch_array($result); echo "<tr>"; echo "<td>"; echo $row[whatever]; echo "</td>"; echo "</tr>"; } ------------------------------
but how can I get 2 or 3 columns displaying different db objects? A loop inside a loop?
Thanks in advance,
<mailto:webmaster
icaam.com.ar> Cesar Aracena
CE / MCSE+I
Neuquen, Argentina
+54.299.6356688
+54.299.4466621
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
attached mail follows:
ever since I put up a personal firewall, when I start MySQL I''ve been getting alerts that MySQL is trying to access this ip address when I start it...
what, exactly, is it, and is there any reason why MySQL would need to access the internet if I have apache on my own machine?
thanks,
Matt
----- Original Message -----
From: Jadiel Flores <jflores
abargon.com>
To: <php-general
lists.php.net>
Sent: Friday, July 26, 2002 6:33 PM
Subject: Re: [PHP] Installed PHP on home Win98se, now how can I get browser
to see it?
> Obiously you need a WebServer too, you can install Apache or Personal Web
> Server, and configure php to work with it, next you can browse you own
> server with the address http://localhost or http://127.0.0.1, maybe you
> will have to install mysql for windows too if you wanna work with
databases
> too.
>
> Jadiel
>
> At 03:18 PM 7/26/2002 -0700, you wrote:
> >Hello,
> >
> >I just installed the nice and easy one click PHP install to my Windows
> >98se machine.
> >
> >I just want to be able to test and practice My basic PHP /MySQL stuff
> >without up loading.
> >
> >So now what do I do.
> >
> >I ran the php info scripts and got bunch of weird messages.
> >
> >How do I get the PHP to work in my browsers IE, NN just as it does when
> >uploaded to my hosting co's servers?
> >
> >Thanks,
> >-Marcus
> >
> >--
>
>|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|||||||
> >
> >Marcus Unlimited
> >http://marcusunlimited.com
> >Multimedia Internet Design and Education
>
>|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|||||||
> >
> >-----------------------------------
> >Also visit:
> >- http://www.chromaticus.com
> >- http://ampcast.com/chromaticus
> >
> >
> >
> >--
> >PHP General Mailing List (http://www.php.net/)
> >To unsubscribe, visit: http://www.php.net/unsub.php
>
> Jadiel Flores
> -------------------------
> http://www.abargon.com
> jflores
abargon.com
> (52-55) 52-29-80-34
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
attached mail follows:
On Sat, 27 Jul 2002, Matthew K. Gold wrote:
> ever since I put up a personal firewall, when I start MySQL I''ve been > getting alerts that MySQL is trying to access this ip address when I start > it... > > what, exactly, is it, and is there any reason why MySQL would need to access > the internet if I have apache on my own machine?
127.0.0.1 == your machine.
127.0.0.1 == something called the local loopback.
In other words, pretty safe to let mysql access it.
attached mail follows:
I am on a server that has CURL & OpenSSL enabled. I assumed that this meant that I could do https: requests via CURL. But for some reason, my attempts to do this are not working.
If I do a CURL http: request, everything works fine (i.e., I get the web page, as expected). But if I use an https: request, no value is returned.
Do I need to do something else to make https: requests work in CURL?
Here's the code in question:
$ch = curl_init("https://secure.authorize.net/gateway/transact.dll"); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $result = curl_exec($ch);
In this case, $result is the null string (if you try that URL in your browser, you will that some text is returned). If I replace the curl_init with
$ch = curl_init("http://www.cnet.com");
I get the expected string in $result.
Any thoughts?
-- JR
attached mail follows:
Jonathan,
The exact same thing is happening to me right now, only that I'm working with the "Concord" people, not with authorize... it says SSL is enabled when I ask for the info.
The reason why you're not getting the values, is that cURL is telling PHP: curl: (1) libcurl was built with SSL disabled, https: not supported!
You can see this if you have shell access, and type on command line: curl "https://...".
I've tried all that I have found on the cURL mailing list history (make distclean, ./configure --with-ssl=SSLPATH, make install)..etc..etc.. but nothing works... Anyone has a solution?.
Oscar F.-
----- Original Message -----
From: "Jonathan Rosenberg" <jr40
earthlink.net>
To: <php-general
lists.php.net>
Sent: Saturday, July 27, 2002 1:50 PM
Subject: [PHP] CURL & SSL
> I am on a server that has CURL & OpenSSL enabled. I assumed that this meant > that I could do https: requests via CURL. But for some reason, my attempts > to do this are not working. > > If I do a CURL http: request, everything works fine (i.e., I get the web > page, as expected). But if I use an https: request, no value is returned. > > Do I need to do something else to make https: requests work in CURL? > > Here's the code in question: > > $ch = curl_init("https://secure.authorize.net/gateway/transact.dll"); > curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); > $result = curl_exec($ch); > > In this case, $result is the null string (if you try that URL in your > browser, you will that some text is returned). If I replace the curl_init > with > > $ch = curl_init("http://www.cnet.com"); > > I get the expected string in $result. > > Any thoughts? > > -- > JR > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >
attached mail follows:
cURL needs to be compiled with SSL support.
./configure --with-ssl=SSLPATH where SSLPATH is the actual path to where openssl can be found.
./configure --with-ssl=/usr works for me.
Jim Grill
Support
Web-1 Hosting
http://www.web-1hosting.net
----- Original Message -----
From: "Oscar F" <lists
webdevfm.com>
To: "Jonathan Rosenberg" <jr40
earthlink.net>; <php-general
lists.php.net>
Sent: Saturday, July 27, 2002 1:42 PM
Subject: Re: [PHP] CURL & SSL
> Jonathan,
>
> The exact same thing is happening to me right now, only that I'm working
> with the "Concord" people, not with authorize... it says SSL is enabled
when
> I ask for the info.
>
> The reason why you're not getting the values, is that cURL is telling PHP:
> curl: (1) libcurl was built with SSL disabled, https: not supported!
>
> You can see this if you have shell access, and type on command line: curl
> "https://...".
>
> I've tried all that I have found on the cURL mailing list history (make
> distclean, ./configure --with-ssl=SSLPATH, make install)..etc..etc.. but
> nothing works... Anyone has a solution?.
>
> Oscar F.-
>
> ----- Original Message -----
> From: "Jonathan Rosenberg" <jr40
earthlink.net>
> To: <php-general
lists.php.net>
> Sent: Saturday, July 27, 2002 1:50 PM
> Subject: [PHP] CURL & SSL
>
>
> > I am on a server that has CURL & OpenSSL enabled. I assumed that this
> meant
> > that I could do https: requests via CURL. But for some reason, my
> attempts
> > to do this are not working.
> >
> > If I do a CURL http: request, everything works fine (i.e., I get the web
> > page, as expected). But if I use an https: request, no value is
returned.
> >
> > Do I need to do something else to make https: requests work in CURL?
> >
> > Here's the code in question:
> >
> > $ch = curl_init("https://secure.authorize.net/gateway/transact.dll");
> > curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
> > $result = curl_exec($ch);
> >
> > In this case, $result is the null string (if you try that URL in your
> > browser, you will that some text is returned). If I replace the
curl_init
> > with
> >
> > $ch = curl_init("http://www.cnet.com");
> >
> > I get the expected string in $result.
> >
> > Any thoughts?
> >
> > --
> > JR
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>
attached mail follows:
Is this for real? Rackspace hosts an awful lot of good-hearted people (including myself). Is there a specific reason why the entire ISP's customer base has been blocked from posting to php-general? I guess I have to give up participating on the PHP list...
miguel
---------- Forwarded message ----------
Date: 27 Jul 2002 19:21:15 -0000
From: MAILER-DAEMON
stoic.net
To: mnc
stoic.net
Subject: failure notice
Hi. This is the qmail-send program at stoic.net. I'm afraid I wasn't able to deliver your message to the following addresses. This is a permanent error; I've given up. Sorry it didn't work out.
<php-general
lists.php.net>:
216.92.131.4 does not like recipient.
Remote host said: 553 209.61.128.0/18 blocked by rackspace.blackholes.us
Giving up on 216.92.131.4.
--- Below this line is a copy of the message.
Return-Path: <mnc
stoic.net>
Received: (qmail 22694 invoked by uid 508); 27 Jul 2002 19:21:11 -0000
Received: from localhost (sendmail-bs
127.0.0.1)
by localhost with SMTP; 27 Jul 2002 19:21:11 -0000
Date: Sat, 27 Jul 2002 14:21:11 -0500 (CDT)
From: Miguel Cruz <mnc
stoic.net>
To: Tony Harrison <tonyh21
tharrison21.fsnet.co.uk>
cc: php-general
lists.php.net
Subject: Re: [PHP] Re: Date() Problem
In-Reply-To: <20020727120609.75001.qmail
pb1.pair.com>
Message-ID: <Pine.LNX.4.44.0207271420220.22623-100000
stoic.net>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
On Sat, 27 Jul 2002, Tony Harrison wrote: > I tried using UNIX stamps but it dont work, and why the hell does it default > to that date anyway? I thought it was supposed to default to the current > time?
Be very happy it works the way it does. Since it defaults to an easily-recognizable date and time, you can quickly tell when you've messed up your code.
If you don't provide a second argument to date() at all, then it'll default to the current date and time.
miguel
attached mail follows:
That's what happens when ISP's aren't careful about what happens on their network. Getting your IP's on the black list is probably one of the worst things you can let happen as an ISP. They warn you and give you time to rectify the situation (cancel accounts/access of offenders) before they actually add you to the list, which is impossible to get removed from.
Many sysadmins rely on the black list to keep their users from getting tons of spam. It's funny to see the current list of ISP's who ignored the warnings and got added. Another example of how clueless some of these big companies really are.
I am totally surprised to see rackspace on the list. I always thought they ran a pretty tight ship since they are probably one of the only large collo companies actually making profit.
That is a drag! You shouldn't give up on the list though. It's not like php.net has anything against rackspace users. They are just one of many who make use of the blacklist. Use another email account or get a hotmail account or something. The list needs you! :-)
Jim Grill
Support
Web-1 Hosting
http://www.web-1hosting.net
----- Original Message -----
From: "Miguel Cruz" <mnc
un.u.nu>
To: <php-general
lists.php.net>
Sent: Saturday, July 27, 2002 2:24 PM
Subject: [PHP] failure notice (fwd)
> Is this for real? Rackspace hosts an awful lot of good-hearted people
> (including myself). Is there a specific reason why the entire ISP's
> customer base has been blocked from posting to php-general? I guess I have
> to give up participating on the PHP list...
>
> miguel
>
> ---------- Forwarded message ----------
> Date: 27 Jul 2002 19:21:15 -0000
> From: MAILER-DAEMON
stoic.net
> To: mnc
stoic.net
> Subject: failure notice
>
> Hi. This is the qmail-send program at stoic.net.
> I'm afraid I wasn't able to deliver your message to the following
addresses.
> This is a permanent error; I've given up. Sorry it didn't work out.
>
> <php-general
lists.php.net>:
> 216.92.131.4 does not like recipient.
> Remote host said: 553 209.61.128.0/18 blocked by rackspace.blackholes.us
> Giving up on 216.92.131.4.
>
> --- Below this line is a copy of the message.
>
> Return-Path: <mnc
stoic.net>
> Received: (qmail 22694 invoked by uid 508); 27 Jul 2002 19:21:11 -0000
> Received: from localhost (sendmail-bs
127.0.0.1)
> by localhost with SMTP; 27 Jul 2002 19:21:11 -0000
> Date: Sat, 27 Jul 2002 14:21:11 -0500 (CDT)
> From: Miguel Cruz <mnc
stoic.net>
> To: Tony Harrison <tonyh21
tharrison21.fsnet.co.uk>
> cc: php-general
lists.php.net
> Subject: Re: [PHP] Re: Date() Problem
> In-Reply-To: <20020727120609.75001.qmail
pb1.pair.com>
> Message-ID: <Pine.LNX.4.44.0207271420220.22623-100000
stoic.net>
> MIME-Version: 1.0
> Content-Type: TEXT/PLAIN; charset=US-ASCII
>
> On Sat, 27 Jul 2002, Tony Harrison wrote:
> > I tried using UNIX stamps but it dont work, and why the hell does it
default
> > to that date anyway? I thought it was supposed to default to the current
> > time?
>
> Be very happy it works the way it does. Since it defaults to an
> easily-recognizable date and time, you can quickly tell when you've messed
> up your code.
>
> If you don't provide a second argument to date() at all, then it'll
> default to the current date and time.
>
> miguel
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>
attached mail follows:
I was wondering if there was any way to get MySQL to combine the specified SELECT columns into one column.
i.e.,
SELECT COMBINE(column_1, column_2) As column FROM column_list;
Would give me the results of column_1 and column_2 simply by going through "column".
Is there any thing that does this in MySQL, or do I have to do this in PHP? I've been searching mysql.com, but there search engine seems to be broken and gives me errors frequently. :(
attached mail follows:
> SELECT COMBINE(column_1, column_2) As column FROM column_list; > > Would give me the results of column_1 and column_2 simply by going through > "column".
Use CONCAT() where you have COMBINE().
---John Holmes...
attached mail follows:
Thanks for the reply, and I see that I didn't get specific enough (my fault! sorry).
Here's what I want to take from:
+-----+------+ | col_1| col_2 | +-----+------+ | 2.0 | 6.8 | +-----+------+ | 4.1 | 8.9 | +-----+------+
I want to do something like SELECT COMBINE(col_1, col_2) as col FROM column_list ORDER BY col;
Which would give me:
+---+ | col | +---+ | 2.0 | +---+ | 4.1 | +---+ | 6.8 | +---+ | 8.9 | +---+
CONCAT would only work if I want strings concatenated on the same row. Is there some way I can use JOIN to get what I want?
"John Holmes" <holmes072000
charter.net> wrote in message
news:000201c235a7$59348560$b402a8c0
mango...
> > SELECT COMBINE(column_1, column_2) As column FROM column_list;
> >
> > Would give me the results of column_1 and column_2 simply by going
> through
> > "column".
>
> Use CONCAT() where you have COMBINE().
>
> ---John Holmes...
>
attached mail follows:
You have a bad database design if you need something like what you are describing. The columns should probably be in another table, with a second column, a number, saying which column the number is for.
So your second table would look like the result you want to have...
You may be able to do it with a temporary table, though:
INSERT INTO temp (col) SELECT col1 FROM your_table; INSERT INTO temp (col) SELECT col2 FROM your_table; SELECT col FROM temp ORDER BY col ASC;
---John Holmes...
> -----Original Message-----
> From: Chris Earle [mailto:chris
earleweb.com]
> Sent: Saturday, July 27, 2002 4:08 PM
> To: php-general
lists.php.net
> Subject: Re: [PHP] Combining Columns in MySQL for PHP
>
> Thanks for the reply, and I see that I didn't get specific enough (my
> fault!
> sorry).
>
> Here's what I want to take from:
>
> +-----+------+
> | col_1| col_2 |
> +-----+------+
> | 2.0 | 6.8 |
> +-----+------+
> | 4.1 | 8.9 |
> +-----+------+
>
> I want to do something like SELECT COMBINE(col_1, col_2) as col FROM
> column_list ORDER BY col;
>
> Which would give me:
>
> +---+
> | col |
> +---+
> | 2.0 |
> +---+
> | 4.1 |
> +---+
> | 6.8 |
> +---+
> | 8.9 |
> +---+
>
> CONCAT would only work if I want strings concatenated on the same row.
Is
> there some way I can use JOIN to get what I want?
>
> "John Holmes" <holmes072000
charter.net> wrote in message
> news:000201c235a7$59348560$b402a8c0
mango...
> > > SELECT COMBINE(column_1, column_2) As column FROM column_list;
> > >
> > > Would give me the results of column_1 and column_2 simply by going
> > through
> > > "column".
> >
> > Use CONCAT() where you have COMBINE().
> >
> > ---John Holmes...
> >
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
attached mail follows:
Hi, I am wondering if anyone has created or know where I can get a code for browsing files and directory in using php in linux. The one I am looking for is file browsing capability that is similar to Window Explorer, meaning you can expand and collapse directory. I just don't want to re-invent the wheel. If anyone knows about this, please let me know. I appreciate the help.
Thanks in advance. Reuben D. Budiardja
attached mail follows:
On 27 Jul 2002 17:16:52 -0400, Reuben D. Budiardja wrote:
>Hi, >I am wondering if anyone has created or know where I can get a code for >browsing files and directory in using php in linux. The one I am looking >for is file browsing capability that is similar to Window Explorer, >meaning you can expand and collapse directory. >I just don't want to re-invent the wheel. If anyone knows about this, >please let me know. I appreciate the help. > >Thanks in advance. >Reuben D. Budiardja
Check out: http://www.phpbuilder.com/snippet/ http://www.phpclasses.org/
I don't know if what you want is there.
attached mail follows:
Hello there,
I found this very good snippet of Dijkstra's Alogrithm here. http://www.phpbuilder.com/snippet/detail.php?type=snippet&id=714
Anyway, I have a rather big node network (50000 nodes) and this is getting a bit low. I noted that the script calculates the shortest distance to every node in the network. Would it be possible to modify it so that it calculates the shortest distance only from point A to point B that I define both in advance?
I couldn't figure out that script structure so that I could make the needes change by myself. Would somebody help me a bit with that?
Or does anyone know another code snippet which makes the same - calculates the shortest distance and route from node to node?
Thank you, Ville
attached mail follows:
I am passing a value of checkboxes in a form to a new page like this (see example here: http://www.gibsonusa.com/test/check/) In a new page how can I pull the data from a MySQL database according to each value I passed from a previous page? In other words: Assume that the value of a checkbox equal to the ID of the record in a database. The value of checkbox 1 (for example) is 12345 and the value of checkbox2 is 67890. After passing those values to a new page how can I pull the rest of the information from a database for those values?
_________________________________________________________________ Chat with friends online, try MSN Messenger: http://messenger.msn.com
attached mail follows:
> I am passing a value of checkboxes in a form to a new page like this (see > example here: http://www.gibsonusa.com/test/check/) > In a new page how can I pull the data from a MySQL database according to > each value I passed from a previous page? In other words: Assume that the > value of a checkbox equal to the ID of the record in a database. The value > of checkbox 1 (for example) is 12345 and the value of checkbox2 is 67890. > After passing those values to a new page how can I pull the rest of the > information from a database for those values?
<? $IDs = implode(",",$_GET['chk']);
$Result = MySQL_query("SELECT * FROM your_table WHERE ID IN ($IDs)"); ...
That's assuming your chk[] values in the database are an integer or float type. If they are string, then use:
$IDs = "'" . implode("','",$_GET['chk']) . "'";
---John Holmes...
attached mail follows:
Hi.
I'm running PHP 4.2.1 & MySQL 3.23. I'm getting the error message "Call to undefined function: mysql_connect()" when I try to use it in my code. If anyone has any ideas as to why this might be happening, I'd be appreciative.
Thanks!
attached mail follows:
It seems then that your mysql support isn't installed correctly with your php.
Richard Pijnenburg
-----Original Message-----
From: lfindle
mindspring.com [mailto:lfindle
mindspring.com]
Sent: Sunday, July 28, 2002 12:25 AM
To: php-general
lists.php.net
Subject: [PHP] call to undefined function: mysql_connect
Hi.
I'm running PHP 4.2.1 & MySQL 3.23. I'm getting the error message "Call to
undefined function: mysql_connect()" when I try to use it in my code. If
anyone has any ideas as to why this might be happening, I'd be appreciative.
Thanks!
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
attached mail follows:
Hello,
I need a user to save an image file to their disk. Normally when someone clicks on an link to a .jpg file, the fil will display on the same browser window, since it is capable of displaying such files. Now, I don't want this to happen, I need to be able to show the user the "Save As.." dialog when they click the link. I know it can be done bc I've seen it in phpMyAdmin, when you want to save the database dump. If you dont click "Save as file" it just displays the text in your browser.
Any ideas??.. :)
Oscar.-
attached mail follows:
This works on everything I've tested so far.
$file = "/some/path/to/file"; header("Content-Disposition: inline; filename=" . basename($file)); header("Content-Type: application/octet-stream"); header("Content-Type: application/force-download"); header("Content-Type: application/download"); header("Content-Transfer-Encoding: binary"); header("Content-Length: " . filesize($file)); header("Pragma: public"); header("Expires: 0"); header("Cache-Control: must-revalidate, post-check=0, pre-check=0"); readfile("$file"); exit();
Jim Grill Support Web-1 Hosting http://www.web-1hosting.net
----- Original Message -----
From: "Oscar F" <lists
webdevfm.com>
To: <php-general
lists.php.net>
Sent: Saturday, July 27, 2002 5:46 PM
Subject: [PHP] Sending a File to User's Browser
Hello,
I need a user to save an image file to their disk. Normally when someone clicks on an link to a .jpg file, the fil will display on the same browser window, since it is capable of displaying such files. Now, I don't want this to happen, I need to be able to show the user the "Save As.." dialog when they click the link. I know it can be done bc I've seen it in phpMyAdmin, when you want to save the database dump. If you dont click "Save as file" it just displays the text in your browser.
Any ideas??.. :)
Oscar.-
attached mail follows:
Does anyone know of a good CMS using both PHP and PostgreSQL?
I see a lot of CMS' out there like pHpSlash, but I'd like to find one that works with PostgreSQL if possible.. :) (I use PostgreSQL for a few other things, and would much rather not have to load MySQL on the server as well....)
Thanks in advance, as always! Glenn
--- The original portions of this message are the copyright of the author (c)1998-2002 Glenn E. Sieb. ICQ UIN: 300395 IRC Nick: Rainbear "All acts of Love and Pleasure are Her rituals"-Charge of the Goddess
attached mail follows:
When I issue this command to remove any commas at end of string:
$query = rtrim($query, ",");
PHP give me an error saying "Wrong parameter count for rtrim()". How can this be? The online manual shows rtrim can accept two parameters. Shouldn't this work? I have PHP 4.0.6 installed on the server.
Thanks.
attached mail follows:
From the man page:
Note: The second parameter was added in PHP 4.1.0
-----Original Message-----
From: Monty [mailto:monty3
hotmail.com]
Sent: Saturday, July 27, 2002 7:28 PM
To: php-general
lists.php.net
Subject: [PHP] RTRIM() - Won't accept 2nd Param
When I issue this command to remove any commas at end of string:
$query = rtrim($query, ",");
PHP give me an error saying "Wrong parameter count for rtrim()". How can this be? The online manual shows rtrim can accept two parameters. Shouldn't this work? I have PHP 4.0.6 installed on the server.
attached mail follows:
> When I issue this command to remove any commas at end of string: > > $query = rtrim($query, ","); > > PHP give me an error saying "Wrong parameter count for > rtrim()". How can > this be? The online manual shows rtrim can accept two > parameters. Shouldn't > this work? I have PHP 4.0.6 installed on the server.
From what I can see, the second parameter (that you are trying to use) wasn't introduced until v4.1.0 - that is, you can't use it with your version of php.
You may find that if you can't upgrade your php you'll need to do something with substr() and str_pos().
CYA, Dave
attached mail follows:
Hey guys, I am using a textarea to pass information to PHP. I want to be able to include HTML tags inside the text area. I am using ln2br() to properly convert line breaks to HTML. This is where my issue comes up.
Lets say I have
<ul> <li>Blar</li> </ul>
ln2br() will crunch that and put out: <ul><br /> <li>Blar</li><br /> </ul><br />
That creates a lot of white space when that HTML is rendered. How do I tell PHP not to put line breaks in a situation like that?
Thanks!
-- Kevin Breit <mrproperximian.com>
attached mail follows:
How can I make my form which entered by a user, then sent to a company employee, secure, not vulnerable attack?
-- ----------------------------------------------------------------- Joy is just a thing (to be).. raised on, Love is just the way to Live and Die, John Denver. ----------------------------------------------------------------- He lost a friend, but kept his Memory (also John Denver), Thank you...John Corones...my friend always. ----------------------------------------------------------------- Look lovingly upon the present, for it holds the only things that are forever true. ----------------------------------------------------------------- Sincerely, Dennis Gearon (Kegley)
attached mail follows:
/usr/local/include/pth/pth.h:526: warning: this is the location of the previous definition In file included from /usr/local/apache/include/apr_portable.h:90, from /usr/local/apache/include/http_protocol.h:64, from sapi_apache2.c:38: /usr/local/include/pth/pthread.h:186: redefinition of `nfds_t' /usr/local/include/pth/pth.h:56: `nfds_t' previously declared here sapi_apache2.c: In function `php_input_filter': sapi_apache2.c:287: structure has no member named `__pthread_read' *** Error code 1
Stop in /usr/home/base/php-4.2.2/sapi/apache2filter. *** Error code 1
Stop in /usr/home/base/php-4.2.2/sapi/apache2filter. *** Error code 1
Stop in /usr/home/base/php-4.2.2/sapi. *** Error code 1
Stop in /usr/home/base/php-4.2.2.
Why
./configure --prefix=/usr/local/apache --enable-module=so --enable-suexec -- suexec-caller=www --enable-threads
./configure --with-pgsql --with-apxs2=/usr/local/apache/bin/apxs --with-gd - -with-zlib --with-png-dir=/usr/local/lib --with-jpeg-dir=/usr/local --with-f reetype-dir=/usr/local/include/freetype2 --enable-gd-native-ttf --with-tsrm- pth
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]