[PHP] Re: Attitude of B van Ouwerkerk

2001-08-03 Thread Inércia Sensorial

  When on mailing lists such discussion get longer and longer, like
'Attitude of B van Ouwerkerk', I always remember of this email. Could
everyone give a moment of thought and get back to the purpose of this list?
I know that this includes myself too, which I apologize for my behavior:

Q: How many mailing list subscribers does it take to change a light bulb?
A: Thousands!
1 to change the light bulb and post to the list that the light bulb has been
changed.
14 to share similar experiences of changing light bulbs and how the light
bulb could have been changed
differently.
7 to caution about the dangers of changing light bulbs.
27 to point out spelling and grammatical errors in posts about changing
light bulbs.
53 to flame the spell checkers.
156 to write to the list administrator complaining about the light bulb
discussion and its inappropriateness to
this mail list.
41 to correct spelling in the spelling/grammar flames.
109 to post that this list is not about light bulbs and would they kindly
take this email exchange to
alt.lite.bulb.
203 to demand that cross posting to alt.grammar, alt.spelling and
alt.punctuation about changing light bulbs be
stopped.
111 to defend the posting to this list saying that we all use light bulbs
and therefore the posts **are**
relevant to this mail list.
306 to debate which method of changing light bulbs is superior, where to buy
the best light bulbs, what brand of
light bulbs work best for this technique, and what brands are faulty.
27 to post URLs where one can see examples of different light bulbs.
14 to post that the URLs were posted incorrectly, and to ask for  corrected
URLs.
3 to post about links they found from the URLs that are relevant to this
list which makes light bulbs relevant
to this list.
33 to summarize all posts to date, then quote them including all headers and
footers, and then add Me
Too.
12 to post to the list that they are unsubscribing because they cannot
handle the light bulb controversy.
19 to quote the Me Too's to say, Me Three.
4 to suggest that posters request the light bulb FAQ.
1 to propose new alt.change.lite.bulb newsgroup.
47 to say this is just what alt.physic.cold_fusion was meant for, so leave
it there.
143 votes for alt.lite.bulb.
27 to post in HTML because they are using the IE or Netscape that had it
turned on by default and are too
clueless to look.
48 to complain about the HTML posts.
27 to post 'sorry I didn't realize it was on' -- in HTML.
96 to complain about more HTML and post detailed instructions on how to
change the setting.
58 to mumble something about using a web browser to read mail.
12 MIME posts with useless colors and bolds saying thanks for the help with
the HTML mail.
1 to post a GIF/JPG of the lightbulb hanging too close to his digital
camera.
58 to complain about the binary post.
14 to say they liked the binary and didn't mind it.
1 post about how you can M*A*K*E M*O*N*E*Y FA$T! by selling lightbulbs
and this report available for only
$5.
1328 to reply to the list with the full spam attached and then put 'remove'
at the end.
3 to flame the other morons for replying to the spammer and CC'ing the list.
1 from the list admin notifying that the list is looking for a bigger server
to handle the load.



-- 
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] Re: Get when it should be Post

2001-08-03 Thread Richard Lynch

Is it maybe one of those where you mixmatch your GET/POST?

FORM ACTION=foo.php?x=1 METHOD=POST

Try moving the ACTION before the METHOD.  No, it shouldn't matter...

--
WARNING [EMAIL PROTECTED] address is an endangered species -- Use
[EMAIL PROTECTED]
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm
- Original Message -
From: Christian [EMAIL PROTECTED]
Newsgroups: php.general
To: [EMAIL PROTECTED]
Sent: Wednesday, August 01, 2001 1:00 PM
Subject: Get when it should be Post


 Hi PHPers,

 I've been having a problem of late that some of my forms
 which are set to method=post are not submitting by post by via get.
 $REQUEST_METHOD reads get
 $HTTP_POST_VARS is not set but $HTTP_GET_VARS is ..

 What could be causing this ??

 Thanx,
 Christian



-- 
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] Re: ULTIMATE TUTORIAL? (where)

2001-08-03 Thread Richard Lynch

There has to be an ultimate php tutorial out there which goes from start to
finish being easy on the brain. if someone finds a tutorial this good,
i may be forced to post less on this list. and i wouldnt like that

Try the WebMonkey and the DevShed ones, I think...  Or just try the first
three pages of each tutorial you can find, and follow all the way through
the first one that makes sense to you.

To a large extent, it depends on what you want to *DO* with PHP.

MySQL, PostgreSQL, Oracle, MS-SQL, or all of the above?
Do you need GD?
How about high-precision mathematics with BC_MATH?
Super-fast but low-featured database action?  LDAP is your buddy.
Need to retrieve Email and News in a web page?  Find a PHP/IMAP HowTo.

There can't be an ultimate PHP tutorial from start to finish because, like,
unless you actually need LDAP or YP or HyperWave or any of the other rather
esoteric extensions there's not much point in forcing them into a tutorial.

You'd be looking at an encyclopedia before you were done with every
extension.  Hell, by the time somebody wrote the damn thing, somebody else
will have come up with another extension.

--
WARNING [EMAIL PROTECTED] address is an endangered species -- Use
[EMAIL PROTECTED]
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm



-- 
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]




Re: [PHP] MySql help #1

2001-08-03 Thread elias

Miles,

The LIMIT works great with UPDATE too.

Miles Thompson [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...

 Come on, you're pushing SQL in directions it's not supposed to go! It is
 set oriented after all.
 So it's experimentation time. I've never tried, but as LIMIT works on a
 SELECT, try it on an update. And let us know what happened.
 Miles

 At 10:30 AM 8/2/01 +0200, elias wrote:
 How can I update only N fields from the database?
 
 usually we do:
 
 UPDATE table1 SET field='VALUE' WHERE condition1
 
 now I want to update fields with a certain condition but only X fields
out N
 total fields.
 
 ie:
 
 id   value
 --- ---
 1a
 2b
 3c
 4d
 5e
 
 how can i update such like:
 UPDATE table1 SET {only 2 records} value='aa'
 so I have any two fields now have the 'aa' value
 
 
 
 
 
 --
 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]




Re: [PHP] mySQL Autoincrement Field

2001-08-03 Thread mike cullerton

on 8/2/01 9:01 PM, Ralph Guzman at [EMAIL PROTECTED] wrote:

 In mySQL, how do I set an auto increment field to start at a certain
 number-let's say 1? Do I just insert the first record with the desired
 number I wish to start with?
 

it appears to depend on the table type. i believe you are ok with MyISAM or
InnoDB  tables. check out the docs on table creation and column types at
mysql.com.

 -- mike cullerton



-- 
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] Re: How to Compare dates?

2001-08-03 Thread Richard Lynch

 Can someone tell me how to properly compare the value returned from the
 db to see if it is blank ?

Depending on how you got it in there, I suspect the value from the db could
be:

NULL
-00-00 00:00:00
0

You may need to test if the value is == '' to catch the NULL case.

Everything else has already been covered, I think.

--
WARNING [EMAIL PROTECTED] address is an endangered species -- Use
[EMAIL PROTECTED]
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm



-- 
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] Re: Mysql join and aliasing with mysql_fetch_object()

2001-08-03 Thread Richard Lynch

 select tableA.*, tableB.* from tableA,
 left join tableB ON tableA.keyfield = tableB.keyfield

 When I then try to access the column keyfield, after using

select tableA.keyfield as mykeyfield, tableA.*, tableB.* ...

Unless you actually need *EVERY* field, do *NOT* use tableA.*, tableB.*

Every piece of data you ask for takes time and resources in MySQL and PHP.

--
WARNING [EMAIL PROTECTED] address is an endangered species -- Use
[EMAIL PROTECTED]
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm



-- 
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] Re: can't get gettext() to work!

2001-08-03 Thread Richard Lynch

 setlocale(LC_ALL, '');

 putenv('LANG=fr');/*  changed here */
 setlocale(LC_ALL, '');

WILD GUESS ALERT!

My gut says you need setlocale(LC_ALL, 'fr') or similar in the French one...

And maybe even 'en' for the English one.

Even if the docs say you don't.

There was another thread recently about setlocale() and the second argument
and what it had to look like depending on some /etc file...

Search in the past three days for 'fr_FR' and it'll come up.

--
WARNING [EMAIL PROTECTED] address is an endangered species -- Use
[EMAIL PROTECTED]
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm



-- 
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]




RE: [PHP] ----- BEING AN ASS CLICK HERE NOT ABOVE!!!!!

2001-08-03 Thread Lawrence . Sheed

Kyle,

Apache runs as a background program.

When you've installed apache, and php, you don't actually run them from the
commmand line.

What you have to do is open up a browser window, and point it to your
computer.

Open up Internet Explorer (you're running windows it looks like),

and type in  http://127.0.0.1  or http://localhost

This should bring up a screen saying you've installed apache correctly.

If apache is installed in the default directories, then most likely you'll
need to put some webpages into

c:\apache\htdocs

I would recommend making a file called test.php with the following lines in

?php

phpinfo();

?

Save it into c:\apache\htdocs

now go to your webbrowser, and go to  http://localhost/test.php

If php shows the phpinfo screen then you've installed everything correctly.
If it doesn't work, we'll need to look at your apache settings and php
settings.  Try the stuff above first, then tell me what happens.

Cheers,

Lawrence.

-Original Message-
From: Kyle Smith [mailto:[EMAIL PROTECTED]]
Sent: August 3, 2001 1:46 AM
To: [EMAIL PROTECTED]
Subject: [PHP] - BEING AN ASS CLICK HERE NOT ABOVE!


(the damn thing took my attatchement off!!!)

Ok I have installed PHPTriad, when i run apache (gulp) dos opens, all fine
BUT when i run PHP.exe well look down

http://www.stupeedstudios.f2s.com/probs.gif


-lk6-
http://www.StupeedStudios.f2s.com
Home of the burning lego man!

ICQ: 115852509
MSN: [EMAIL PROTECTED]
AIM: legokiller666



-- 
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] New lists (was [PHP] Attitude of B van Ouwerkerk)

2001-08-03 Thread Darren Henderson

On Tue, 31 Jul 2001, B. van Ouwerkerk wrote:

 There's nothing wrong with being a newbie.. the only newbie-problem I 
 see/have is the lazy one.. ask ask ask ask without taking the time to read 
 the manual or to do a search in the archive. Sure there are newbies who 
 read the manual.. get some tutorials.. thats good. They should get all the 
 support they need..

Unfortunately this kind of thing happens on all the mailing lists I've seen
that are devoted to questions. The real problem here is that the list is
simply too busy. I can do no more then skim the subject lines and then
usually delete all of it unless something jumps out at me.

It might be helpful if some new mailing lists were created, it wouldn't be a
perfect solution but it would help if there were some degree of self
selecting behavior possible. Currenty all questions go to php-general. If
there were, say, a php-newuser and a php-questions list then perhaps
php-general could be used for slightly higher level discussions. Actually
its probably too late to save php-general, hard to get people to
change. Maybe a new list that caters to a higher level of discussion, say
php-authoring or the like?

Just a thought. So much tends to get lost or over looked in high volume
mailing lists.


Darren Henderson  [EMAIL PROTECTED]
[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] Messevorbereitung - Übersetzungen

2001-08-03 Thread Die Übersetzer

Sehr geehrte Damen und Herren,

Sie benötigen regelmäßig Übersetzungen von Fachtexten und Webseiten
- und das am besten in Stunden, und nicht in Tagen?

In nur 60 Sekunden können Sie sich hier umfassend über unseren innovativen B2B 
Übersetzungsdienst informieren:
http://www.eubylon.de/html/de.eubylonx.html



Wenn sie auch Informationen über weitere interessante Dienstleistungen erhalten 
bekommen möchten, klicken Sie hier:
mailto:[EMAIL PROTECTED]



Falls Sie keine weiteren Informationen wünschen dann klicken Sie bitte hier:
mailto:[EMAIL PROTECTED]



Mit freundlichen Grüßen

Klaus Neumann
Kundenbetreuung


www.dieuebersetzer.de
wir überwinden Barrieren

ein Service der:
Eubylon GmbH
Ackerstraße 14-15
10115 Berlin
[EMAIL PROTECTED]
T: +49-30-280 94 010
F: +49-30-280 94 008

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

Ladies and Gentlemen,

Do you regularly need translations of your product descriptions or 
services in hours and not in days?

The www.translate-b2b.com, provides innovative B2B online translation 
services for enterprises of the IT and E-Commerce industry.

You need just 60 seconds to find out right now how our service works.
Click here: www.eubylon.de/html/en.eubylonx.html


Simply test us and discover that our services will convince you!



If you would like more information about our services, click here:
mailto:[EMAIL PROTECTED]



If you do not require further information please click here:   
mailto:[EMAIL PROTECTED]



Your online translation team

Klaus Neumann
Customer service

Eubylon GmbH
Ackerstrasse 14-15
10115 Berlin
T: +49-30-280 94 010
F: +49-30-280 94 008
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]




[PHP] Re: timing functions / debug

2001-08-03 Thread Richard Lynch

 Does anyone know of any functions / tools / utilities / whatever that can
be
 used to provide a timing of the execution of each line of a php program?
I'm
 guessing this would probably be a test harness or a debug app or
something.

 I've used timing functions to record the execution of blocks of code or
 entire scripts, but I'm interested in taking it this one step further.

What you describe is called a profiler.

AFAIK, there aren't any for PHP at this time.

The odds on somebody writing one within the next six months now that there
are a half-dozen IDEs:  A virtual certainty.

Meanwhile, some rules of thumb:

Your biggest time-sink is your xxx_connect() to the database.  Use
xxx_pconnect().
P is for 'P'ersistent.  The Persistence is on the *database* side, *NOT* in
PHP.
Usual Stumbling Block: Your database has to be configured to have more
possible connections than the number of httpd processes.  Stress-test on a
development box to be sure you configured everything properly, or be
prepared to weep.

If you can do it in SQL instead of PHP, do it in SQL.
SQL has been optimized to hell and back for decades.  PHP is fast, but it's
designed to be easy as well, not to rip through a million records in minimal
time.

If it's something you'd expect somebody else to have needed a whole lot, PHP
probably has a built-in custom function for it that will beat the pants off
anything you can write in PHP.

The previous statements really are not arguable.  The next two will
undoubtably draw the ire of about 70% of this list.  Tough $#!^

[asbestos mode on]
Over-engineering your site with forty-leven Object-Oriented class include
files is a Bad Idea.
Unless you can afford the Zend Cache, in which case you don't care.

Over-engineering your site with a Template system so your graphic designer
can easily change GREEN to BLUE, but if they want to add a column you have
to re-code the damn PHP anyway is stupid.  Either re-educate your Graphic
Designers to grok a minimal amount of PHP, or have them edit PHP files using
an editor that won't screw up your PHP and you can re-edit it after to
re-integrate their static HTML as dynamic or have them edit a static sample
page and you re-integrat it or design the parts that you just know the
Graphic Designer will want to change as a non-PHP include file or...  Just
about anything other than a Template library is going to end up being lower
TCO in the long run.
Ditto on the Zend Cache.
[/asbestos]

--
WARNING [EMAIL PROTECTED] address is an endangered species -- Use
[EMAIL PROTECTED]
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm



-- 
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] Re: GET/POST name=value query var convention?

2001-08-03 Thread Richard Lynch

Does anyone know of a more-or-less authoritative source that states that
the common convention for HTTP GET/POST queries is a series of name=value
pairs joined by  characters? I know I'm not just making this up, but I
need to persuade someone that it is a commonly-accepted practice. Before
you look... it's not in the HTTP RFCs.

The W3C weenies and/or some other HTTP specification committee has decided
that it should be amp; or ; or somesuch.

Reality-check:  Every damn browser on the planet uses name=value

Why they make these standards up in the first place I dunno.

I'd sure appreciate it if they'd focus on putting pressure (or at least
nagging) IE and Netscape to agree on a few things that haven't worked
properly cross-platform for years now.

Of course, PHP will let you use any damn character you please in php.ini and
you can always get the full URL passed in (see ?php phpinfo();? output)
and tear it apart in any way you see fit.

YMMV.

--
WARNING [EMAIL PROTECTED] address is an endangered species -- Use
[EMAIL PROTECTED]
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm




-- 
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] Re: ? about PHP includes

2001-08-03 Thread Richard Lynch

 I just discovered PHP this week. I'm reading about include statements. If
I
 have a text file 2000 characters in length that I want to include, I would
 do this to include to whole file:

 ?php
 include (file.txt);
 ?

http://php.net/fopen
http://php.net/fread

?php
$path = file.txt;
$file = fopen($path, 'r') or die(Could not open $path.  Try full path
or something.);
$data = fread($file, 250);
echo $data;
?

Note that include not only includes a text file, but also executes any ?php
? tags within it.

So it's not ideal for sucking in a whole plain text file anyway.

Check out http://php.net/readfile

--
WARNING [EMAIL PROTECTED] address is an endangered species -- Use
[EMAIL PROTECTED]
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm



-- 
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] References: in front of functionnames

2001-08-03 Thread Rolf Rensaa

Hello.

I've read a book, PHP DEVELOPER'S COOKBOOK, with great interest and it's a
great contribution to my bookcollection :-)
There is something I would like to know thoughI have searched through
all my books and sites on PHP, but didn't find the answer

In chapter 16 (Creating a Database-Independent API with PHP) there are some
functions written with a  in front of them.
Ex. in DB/standard.php; function db_fetchall($args=array()){ ...

I've seen and used the pass by reference syntax on function parameters but
not on functionnames.
What effect does reference () have when used in front of the functionname??

It would help me a lot to get a fast answer.



Kind regards
Rolf Håkon Rensaa
Norway



-- 
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] Oh and one more thing

2001-08-03 Thread Kyle Smith

How do i set up extra functions on my computer like mail() and date()


-lk6-
http://www.StupeedStudios.f2s.com
Home of the burning lego man!

ICQ: 115852509
MSN: [EMAIL PROTECTED]
AIM: legokiller666





[PHP] Re: Netscape Enterprise Server

2001-08-03 Thread Richard Lynch

Any body there with experience setting up Netscape Enterprise Web Server
with PHP as CGI binary. I need to know how to configure Netscape Web
Server.

If Netscape Enterprise Web Server has a HowTo for setting up Perl as a CGI
binary, do PHP exactly the same way.

Except for the Perl-PHP bit, of course.  :-)

As far as the web server is concerned, Perl CGI and PHP CGI are the same
thing spelled differently.

--
WARNING [EMAIL PROTECTED] address is an endangered species -- Use
[EMAIL PROTECTED]
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm




-- 
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] Re: New lists (was [PHP] Attitude of B van Ouwerkerk)

2001-08-03 Thread Richard Lynch

 selecting behavior possible. Currenty all questions go to php-general. If
 there were, say, a php-newuser and a php-questions list then perhaps
 php-general could be used for slightly higher level discussions. Actually

This paricular can of worms has been discussed *WAY* too often already.

Check the archives.

We've already split off a half-dozen lists, to varying degress of success...

For sure, there are far too many INSTALL and WINDOWS questions here in
GENERAL, when there's perfectly good lists for those questions!

What *DOES* work well in my limited experience is regional lists set up by
PHP User Groups...  Anybody else experience this or have an alternate
experience?  Respond off-list please.  I'll summarize.

Frequent Posters of questions that are in the manual usually figure out how
to work the manual sooner or later.

If you can't handle the volume, consider using news://news.php.net or set up
some filters in your email client to weed out the crap.

PS  Once upon a time, a long time ago, I was just as bad as the people being
publicly berated.  Cut them some slack, email them off-line to explain how
to work the system to their advantage, and let's get back to work :-)

--
WARNING [EMAIL PROTECTED] address is an endangered species -- Use
[EMAIL PROTECTED]
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm



-- 
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]




Re: [PHP] MySql help #1

2001-08-03 Thread Miles Thompson


Come on, you're pushing SQL in directions it's not supposed to go! It is 
set oriented after all.
So it's experimentation time. I've never tried, but as LIMIT works on a 
SELECT, try it on an update. And let us know what happened.
Miles

At 10:30 AM 8/2/01 +0200, elias wrote:
How can I update only N fields from the database?

usually we do:

UPDATE table1 SET field='VALUE' WHERE condition1

now I want to update fields with a certain condition but only X fields out N
total fields.

ie:

id   value
--- ---
1a
2b
3c
4d
5e

how can i update such like:
UPDATE table1 SET {only 2 records} value='aa'
so I have any two fields now have the 'aa' value





--
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]




RE: [PHP] Phone Number #s Only?

2001-08-03 Thread Jack Dempsey

No, the ^ inside the [] means the negation of whatever's inside...so,
it'll strip out anything except 0-9.

jack

-Original Message-
From: Martin Cameron [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, August 02, 2001 8:40 PM
To: mike cullerton
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] Phone Number #s Only?

Just as the solution to spray paint the m/b green made me smile, this
did 
too. 

This will strip out all characters except numerals at the beginning,
right!

martin Cameron

On Fri, 03 Aug 2001 11:52, you wrote:
 on 8/2/01 5:32 PM, Jeff Oien at [EMAIL PROTECTED] wrote:
  Is there a routine out there to strip all characters from a phone
  number except the numbers? I was going to write my own but
  figured there must already be one out there I can use. Thanks.
  Jeff Oien

 ereg_replace ([^0-9],,$string);

  -- mike cullerton

-- 
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]




Re: [PHP] mail the contents of an array

2001-08-03 Thread Tim

You could use the implode() function to convert the arrays to strings
and then pass the concatenated strings to the mail() function.

- Tim

On 03 Aug 2001 09:00:04 +, Geoffrey Makstutis wrote:
 I'm sure that I'm missing something obvious (probably sleep), but how can I take the 
contents of several arrays and send them via email? I'd like to take each value from 
the arrays and include them in the message portion of a mail() command.



-- 
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] stop a file called foo.bar

2001-08-03 Thread void

stop a file called foo.bar from being downloaded with a web server ?

Say you'r web site's name is foobar.net.

..and...

Script-kiddy Johny knows that,
but also knows that you'r secret file is called foo.bar
and it is saved in the root dir. of you'r web site.

in a http browser little Johny
can simply type in http://www.foobar.net/foo.bar;
to download it, since the web server (i am on)
will trigger the clients download box to open,
because its not a wrapped extension, or php, or htm, or so .

I have looked into the .htaccess file and added the directive
IndexIgnore *.*
there'r millions of directives and i am looking at them now,

But please tell me if there IS NOT a directive I can add to the htacces file
to keep little Johny from downloading the file.
Because then i might just look the whole day long for nothing !

Thanx a lot for your time

Ben

enjoy the day :-)








-- 
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]




Re: [PHP] Re: FAQ

2001-08-03 Thread Werner Stuerenburg

 If I am talking to non geeky types, and they bother to ask, I
 go with Professional Hypertext Processor.


Now that's a good one I will keep in mind!


-- 
Herzlich
Werner Stuerenburg

_
ISIS Verlag, Teut 3, D-32683 Barntrup-Alverdissen
Tel 0(049) 5224-997 407 · Fax 0(049) 5224-997 409
http://pferdezeitung.de



-- 
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] Re: UDP Port listening, can it be done?

2001-08-03 Thread Richard Lynch

 I'm currently just playing around with a few things and want to
 write a script that will listen on a UDP port and then log/process the
 information. The problem i have it that i don't know if php can do this. I
 know that you can connect to a UDP port but can you listen on one? And if
 you cant then does anybody know if this is planned in a future version?

Never done it, but have you read:

http://php.net/manual/en/ref.sockets.php
http://php.net/manual/en/function.socket.php
'Valid arguments for the protocol argument are tcp and udp'
http://php.net/manual/en/function.bind.php
http://php.net/manual/en/function.listen.php

--
WARNING [EMAIL PROTECTED] address is an endangered species -- Use
[EMAIL PROTECTED]
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm



-- 
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]




Re: [PHP] shtml or php ??

2001-08-03 Thread Richard Lynch

 Can anyone help me with this, I am using apache and assume that this
virtual
 command should work, am I best to leave it in shtml or should I change to
 php as I am using php more and more ???  Please can somebody help me

There's using Apache with PHP as a Module, and there's using Apache with PHP
as a CGI.

If your httpd.conf file has something like:
AddModule php
LoadModule php
Handler application/x-httpd-php php
(and not with comment character # in front of them)
you are using Module

Conversely, if you httpd.conf file has stuff like:
Action application/x-httpd-php php
Alias php /path/to/php
in it, you are using CGI.

Actually, I'm betting ?php phpinfo();? will tell you if you are using PHP
as Module or CGI.

If it's CGI, virtual will not work, as Rasmus said.

--
WARNING [EMAIL PROTECTED] address is an endangered species -- Use
[EMAIL PROTECTED]
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm



-- 
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] Re: PHPTriad users

2001-08-03 Thread Richard Lynch

http://php.net/tut.php

Then jump over to WebMonkey and run through their tutorial.

--
WARNING [EMAIL PROTECTED] address is an endangered species -- Use
[EMAIL PROTECTED]
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm
- Original Message -
From: Kyle Smith [EMAIL PROTECTED]
Newsgroups: php.general
To: [EMAIL PROTECTED]
Sent: Thursday, August 02, 2001 1:20 PM
Subject: PHPTriad users


Could someone please help me sort out a database on this so i can find out
if php works, OR could you people please send me any scripts you have cause
i just got php working on my pc and i wanna know what its capable of.


-lk6-
http://www.StupeedStudios.f2s.com
Home of the burning lego man!

ICQ: 115852509
MSN: [EMAIL PROTECTED]
AIM: legokiller666





-- 
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] Re: How to create session??

2001-08-03 Thread elias

Please post in text format.

session_start();

if (isset($login))
{
  session_register(name, pwd);
  $name=
  $pwd = 
} else if (isset($logout))
{
  session_unregister(name);
  session_unregister(pwd);
}

-

Balaji Ankem [EMAIL PROTECTED] wrote in message
00db01c11be2$57e26c20$[EMAIL PROTECTED]">news:00db01c11be2$57e26c20$[EMAIL PROTECTED]...
Hi! dearest friend,
  how to create session while login and hoe to end session after pressing
logout button.

Thanks in advance.

Regards
-Balaji



-- 
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]




Re: [PHP] SQL syntax error in PHP script. dunno what's wrong

2001-08-03 Thread Werner Stuerenburg

   insert into test values (0,''; DELETE FROM test; ',1);
  ERROR 1064: You have an error in your SQL syntax near '' at line 1

what about

insert into test values (0,'\'; DELETE FROM test; ',1);

the character ' is used to denote the beginning and the end of a
field value.  If you have this character within the value, you
will have to escape it.  It's as simple as that.

-- 
Herzlich
Werner Stuerenburg

_
ISIS Verlag, Teut 3, D-32683 Barntrup-Alverdissen
Tel 0(049) 5224-997 407 · Fax 0(049) 5224-997 409
http://pferdezeitung.de



-- 
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]




Re: [PHP] (//// === huh??)

2001-08-03 Thread David Robley

On Fri,  3 Aug 2001 14:07, Gerard Samuel wrote:
 In my script that puts out a form I have a drop down list which include
 == echo option$Education/option\n;
 echo optionBachelor's Degree/option\n;

 It uses a $PHP_SELF target.  After the form is submitted, on the new
 page, in the textbox I have Bachelor\\\'s Degree getting outputed by
 $Education and the more I submit the form the more \ I get.

 Any ideas as to how to clean this up?
 Thanks

Stripslashes()

Also see the magic_quotes_gpc setting in your ini file

-- 
David Robley  Techno-JoaT, Web Maintainer, Mail List Admin, etc
CENTRE FOR INJURY STUDIES  Flinders University, SOUTH AUSTRALIA  

   Skiier: Someone who pays an arm and a leg to break them.

-- 
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]




Re: [PHP] References: in front of functionnames

2001-08-03 Thread Tim

The function return value is by reference.

http://www.php.net/manual/en/language.references.php

- Tim

 Ex. in DB/standard.php; function db_fetchall($args=array()){ ...
 
 I've seen and used the pass by reference syntax on function parameters but
 not on functionnames.
 What effect does reference () have when used in front of the functionname??



-- 
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]




Re: [PHP] Spot the difference?

2001-08-03 Thread Kyle Smith

Well which is easier to program?


-lk6-
http://www.StupeedStudios.f2s.com
Home of the burning lego man!

ICQ: 115852509
MSN: [EMAIL PROTECTED]
AIM: legokiller666


- Original Message - 
From: scott [gts] [EMAIL PROTECTED]
To: php [EMAIL PROTECTED]
Sent: Thursday, August 02, 2001 8:45 AM
Subject: RE: [PHP] Spot the difference?


 ASP is basically like PHP, only it uses a VB-based
 language instead of perl/c-based one.
 
 which means it sucks - vb is evil.
 
  -Original Message-
  From: Jon Yaggie [mailto:[EMAIL PROTECTED]]
  Subject: Re: [PHP] Spot the difference?
 
  isnt this fact a good enough reason to believe it worthless???
 
 
 
 --
 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]




Re: [PHP] Re: Netscape Enterprise Server

2001-08-03 Thread Herman Tolentino

Sorry I missed the important detail: Solaris Sparc (2.6). I already saw the
site you mentioned. Thanks.
- Original Message -
From: R. [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, August 02, 2001 11:07 AM
Subject: [PHP] Re: Netscape Enterprise Server


 On which system?

 You can fined for Win9x an Nt/2000 a lot of usefull info there:
 http://benoit.noss.free.fr/php/install-php.html

 If like me you use 2000 you will save a lot of trouble by changing the way
 you are making the file association for php files. You need to have the
 shell-open-command directly under the .php key in the registry.

 Hope it's help

 R.

 Herman Tolentino [EMAIL PROTECTED] wrote in message
 000e01c11bcb$2ae75800$[EMAIL PROTECTED]">news:000e01c11bcb$2ae75800$[EMAIL PROTECTED]...
 Dear folks,

 Any body there with experience setting up Netscape Enterprise Web Server
 with PHP as CGI binary. I need to know how to configure Netscape Web
Server.

 TIA,

 Herman Tolentino





 --
 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] Re: php

2001-08-03 Thread Richard Lynch

I'm still trying to compress an entire directory on a linux server to be
decompressed probably in windows client. I'm trying to use exec command and
tar (compressor for linux), but I don't know how to do it. Can anybody
pleeeaase help me?

So, like, do they download it later, or is your PHP program supposed to
return the compressed archive?...

Let's assume the latter, cuz that's more fun :-)

Use a URL like this:
http://yourserver.com/whatever.php/whatever.tgz

Your PHP file is whatever.php
That bogus-looking whatever.tgz on the end is because [BLEEP]ing IE 3.mumble
ignores MIME-Type and goes by the URL ending to decide what kind of file you
are returning.  MS sucks.  Or is it Netscape that does that?  Netscape sucks
too.

?php
$path = /path/you/want/to/compress/*;
exec(tar -cz $path, $results, $errorcode);
if ($errorcode){
echo HTMLBODY\n;
echo OS Error: $errorcode.  Usually path/permissions.  Use 'man
errno' to look up this number if it makes you feel good.BR\n;
# Hmm.  You might need a  2S| or similar after the $path above
# to get stderr to redirect to stdout so PHP can get error messages
from tar...
# Any gurus want to comment on how that works, and if  2S|  is the
right mojo?
# I hate Un*x some days. :-)
echo Here's what tar had to say, if anything:BR\n;
while (list(,$line) = each($results)){
echo $line, BR\n;
}
}
else{
header(Content-type: application/octet-stream); # Force download
header(Content-disposition: filename=whatever.tgz);
# Is strlen() binary safe?...  If not, this next line will mess you
up...
# But without it, the browser can't do that nifty progress meter
during download.
header(Content-length:  . strlen($results));
# There's probably more headers you want...
echo $results;
}
?

I know I should test these, but sending a message is easier. :)
If a connect the server using ftp_connect and ftp_login, when I try to
create a directory using mkdir or ftp_mkdir or a file using fopen, will
they belong to me or to nobody???

They will belong to whomever you connected to the FTP server as, assuming
that user can even create files in the first place...

mkdir() and fopen() in your local server will belong to whomever PHP
(Apache) runs as, which is usually nobody, but could have been configred
in httpd.conf to be www or any valid user, including root if you were
incredibly stupid, or, if you run PHP as a CGI and wrap it in suExec, it
would be whatever user suExec is configured to run PHP as, which might be
your real login, or might not.  Didja follow all that? :-)
http://php.net/chown et al may or may not be of use...

--
WARNING [EMAIL PROTECTED] address is an endangered species -- Use
[EMAIL PROTECTED]
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm



-- 
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]




Re: [PHP] Q: Hiding Folder Directories from public while still...

2001-08-03 Thread Jon Yaggie

i dont know if this is elagant but ti works.  but a fake index.htmlin your
directory for browsers to default to.   . ..


- Original Message -
From: Marcus James Christian [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, August 03, 2001 12:30 AM
Subject: [PHP] Q: Hiding Folder Directories from public while still...


 Hello,

 How does one do the trick of hiding a  folder's directory listing from a
 public browser?

 i.e.  Lets say the full address is  www.mysite.com/php/magicphppage.php

 Well I still need some other files to read and write to
 magicphppage.php   I don't want the public to be able to simply type
 www.mysite.com/php/ and have all of my php files show up on a funky
 virtual directory.

 Thanks,
 Marcus

 --
 Marcus James Christian - UNLIMITED -
 Multimedia Internet Design
 http://mjchristianunlimited.com

 Proudly presents the music of CHROMATICUS
 at http://chromaticus.com
 and http://artists.mp3s.com/artists/275/chromaticus.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]


-- 
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]




Re: [PHP] ? about PHP includes

2001-08-03 Thread Christian Reiniger

On Friday 03 August 2001 05:59, Craig Westerman wrote:

 ?php
 $txtfile = fopen(text.txt, r);

 while (!feof($filePointer))

$txtfile instead of $filePointer

 {
  $line = fgets($txtfile, 250);

fgets reads a line (i.e. up to a newline) with at most the specified 
numbers of characters. So you read the entire file, line by line.
Use $Text = fread ($txtfile, 250); instead.

  print $line;
 }

 close($txtfile);

fclose

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

Software is like sex: the best is for free -- Linus Torvalds

--
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] again

2001-08-03 Thread Eduardo Kokubo

I'm still trying to transfer a directory form one server to another but with no 
results.
I have the username and password of the ftp account source and I know I'll have to ask 
for the username and password of the destination. I can't simply upload or copy the 
directory, but there must have an alternative way. I know I have been asking a lot of 
questions and I already asked this one, but I'm new with php and we can't learn 
everything from books, so...



Re: [PHP] Mysql Help #2

2001-08-03 Thread Tom Carter

Depends what is to happen to the array afterwards, but in general no.

An interesting thing is to put timing method calls around a block of code in
question, you will find something like this (depending upon size of db)
takes somehting like 0.005 seconds. Timing things can be useful measures of
a pages overhead (one page on a site I hvae currently takes almost 2 seconds
on average to build...eek!)

elias [EMAIL PROTECTED] wrote in message

- Original Message -
From: elias [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, August 02, 2001 9:31 AM
Subject: [PHP] Mysql Help #2


 Hi again.

 $result = mysql_query(SELECT id FROM table);
 $id_array = array();

 while ($r = mysql_fetch_array($result))
$id_array[] = $r[id];

 // now $id_array[] is an array of IDs that was grabbed from the database.

 Any faster and/or better approache to build the $id_array?



 --
 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] How to add an excel file directly to MySQL database using PHP?

2001-08-03 Thread Yeong CN

How can I add an excel file with *.xls extension
directly into MySQL database..is it possible to do or
I need to convert it into *.csv format or *.txt format
first?



Get 250 color business cards for FREE!
http://businesscards.lycos.com/vp/fastpath/

-- 
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] PHP developers needed

2001-08-03 Thread Jack Sameron

I need PHP developers for potential big project. The site is extremely big 
with ecommerce, membership areas...

If you're interested, please reply to me with a plaintext resume and the 
URLs of sites you've built in PHP. Also, I'd like to know your rate.

Thanks,
Jack.

_
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp


-- 
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] PHP Manual in PDF Format

2001-08-03 Thread Pere Vineta

Dear friends,

Any one of you know when PHP Manual in PDF Format will be available?

Thanks

Pere



-- 
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]




RE: [PHP] New lists (was [PHP] Attitude of B van Ouwerkerk)

2001-08-03 Thread Martin Marconcini

IMO: There should be something like the OpenBSD-misc = PHP General, and
OpenBS-Tech = A more advanced list... Please do not cross post...



Regards,

Martin Marconcini
www.marconcini.com.ar

Life must be lived looking forward and can be understood only looking
backward. Soren Kierkegaard

 -Original Message-
 From: Sam Masiello [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, August 02, 2001 1:15 PM
 To: Darren Henderson
 Cc: [EMAIL PROTECTED]
 Subject: RE: [PHP] New lists (was [PHP] Attitude of B van Ouwerkerk)
 
 
 I think the problem with spreading out discussions that can be as
broad as
 the PHP discussion is that you still tend to have people gravitate
towards
 some of the more general or higher level discussion groups
regardless
 of
 whether or not it should fall into the newbie category or not.
 
 This is for a couple of reasons:
 1) Newbies may think that their newbie group is read mainly by
 newbies...so
 their question either might not get answered at all or will not
receive
 the
 thorough answer they were hoping for.
 2) Being a newbie, they might think that their question is worthy
(for
 lack of a better term) of higher level discussion because, to them, it
is
 a
 very difficult problem to solve.
 
 ...not to mention that questions would then be spammed across
multiple
 mailing lists anyway.
 
 Either way, we would still need a PHP General Forum, so I am not
convinced
 that creating more specialized mailing lists would accomplish much
more
 than
 creating MORE mail traffic (from the spammed questions) and alienating
 people who used the more specialized lists because most everyone else
is
 still mainly reading the General Forum.
 
 My 2 copper pieces worth.
 
 Sam Masiello
 Software Quality Assurance Engineer
 Synacor
 (716) 853-1362 x289
 [EMAIL PROTECTED]
 
  -Original Message-
 From: Darren Henderson [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, August 02, 2001 10:41 AM
 To:   B. van Ouwerkerk
 Cc:   [EMAIL PROTECTED]
 Subject:  [PHP] New lists (was  [PHP] Attitude of B van Ouwerkerk)
 
 On Tue, 31 Jul 2001, B. van Ouwerkerk wrote:
 
  There's nothing wrong with being a newbie.. the only newbie-problem
I
  see/have is the lazy one.. ask ask ask ask without taking the time
to
 read
  the manual or to do a search in the archive. Sure there are newbies
who
  read the manual.. get some tutorials.. thats good. They should get
all
 the
  support they need..
 
 Unfortunately this kind of thing happens on all the mailing lists I've
 seen
 that are devoted to questions. The real problem here is that the list
is
 simply too busy. I can do no more then skim the subject lines and then
 usually delete all of it unless something jumps out at me.
 
 It might be helpful if some new mailing lists were created, it
wouldn't be
 a
 perfect solution but it would help if there were some degree of self
 selecting behavior possible. Currenty all questions go to php-general.
If
 there were, say, a php-newuser and a php-questions list then perhaps
 php-general could be used for slightly higher level discussions.
Actually
 its probably too late to save php-general, hard to get people to
 change. Maybe a new list that caters to a higher level of discussion,
say
 php-authoring or the like?
 
 Just a thought. So much tends to get lost or over looked in high
volume
 mailing lists.
 


 Darren Henderson
[EMAIL PROTECTED]

[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]



-- 
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]




Re: [PHP] Re: Phone Number #s Only?

2001-08-03 Thread mike cullerton

on 8/2/01 9:55 PM, Richard Lynch at [EMAIL PROTECTED] wrote:

 While the solution given will work, consider the following perfectly valid
 phone numbers:
 
 312-555-1234x1001
 1-800-MY-STUFF
 
 Also, once you strip out all the spaces and dashes, nobody but a computer
 can use it...
 
 Do you *really* want to make it difficult for humans to use?

good point richard. i never really considered the 1-800-MY-STUFF case. most
of my customers seem to want numbers only..

anyway, assuming numbers only and no extensions (you can change this to add
extensions pretty easily)...

in a form where i want a phone number, i have 3 separate fields of length
3,3,4 respectively. when the form is submitted, i check to make sure there
are only numbers. (actually, on some sites i use javascript to check this as
well)

i have two functions--phone_from_3() and phone_to_3(). i use phone_from_3()
to set $phone = $phone1 . $phone2 . $phone3. i then put $phone in the db.
when i want to display the phone number somewhere, i use phone_to_3() to
turn $phone into $phone1, $phone2, $phone3. i can then format the phone
number making it easy to read.

hope this helps,
mike

 -- mike cullerton



-- 
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] Phone Number #s Only?

2001-08-03 Thread Jeff Oien

Is there a routine out there to strip all characters from a phone 
number except the numbers? I was going to write my own but
figured there must already be one out there I can use. Thanks.
Jeff Oien

-- 
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]




RE: [PHP] SQL syntax error in PHP script. dunno what's wrong

2001-08-03 Thread Chris Worth


Thanks everybody, and Sam, that makes sense WRT the multiple words causing 
troubles.



On Wed, 1 Aug 2001 12:54:01 -0400, Sam Masiello wrote:


You will need to put single quotes around your variables in your SQL
statement.  Like this:

$sql = UPDATE TABLE seminar SET
title='$title',speaker='$speaker',event_date='$tdate',time='$time',bldg='$bu
ilding'
,rm='$room'  WHERE id='$id';

Without the quotes, SQL doesn't know that Something Amazing is supposed to
go together in the same string.

HTH

Sam Masiello
Software Quality Assurance Engineer
Synacor
(716) 853-1362 x289
[EMAIL PROTECTED]

 -Original Message-
From:  Chris Worth [mailto:[EMAIL PROTECTED]]
Sent:  Wednesday, August 01, 2001 12:36 PM
To:[EMAIL PROTECTED]
Subject:   [PHP] SQL syntax error in PHP script.  dunno what's wrong



hey gang.

here is my sql statement from my php script.

$sql = UPDATE TABLE seminar SET
title=$title,speaker=$speaker,event_date=$tdate,time=$time,bldg=$building
,rm=$room  WHERE id=$id;


it appears just like that in my code.

here is the $sql string echoed to the screen to verify the variables.


UPDATE TABLE seminar SET title=Something amazing,speaker=Mr.
Black,event_date=2001-08-05,time=11:00:am,bldg=BCC ,rm=201 WHERE id=48

all of the variable are valid.

here is my error.

1064: You have an error in your SQL syntax near 'TABLE seminar SET
title=Something
amazing,speaker=Mr.
Black,event_date=2001-08' at line 1

I'm baffled.


and I couldn't find error 1064 in the mysql manual.pdf either.

any ideas.  I know this is going to turn out to be something silly.

thanks,

chris




--
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]




Re: [PHP] PHP Manual in PDF Format

2001-08-03 Thread Andreas D. Landmark

At 03.08.2001 10:36, Pere Vineta wrote:
Dear friends,

Any one of you know when PHP Manual in PDF Format will be available?

Thanks

Probably when Adobe stops picking on innocent cryptographers pointing out
weaknesses in their software and stops hiding the source for what they forced
through as the defacto standard for document distribution...

;-)


-- 
Andreas D Landmark / noXtension
Real Time, adj.:
 Here and now, as opposed to fake time, which only occurs there
and then.


-- 
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]




Re: [PHP] web traffic report

2001-08-03 Thread Andreas D. Landmark

At 03.08.2001 04:44, mike cullerton wrote:
another vote for analog.

Dunno what this has got to do with php, but my vote is for
webalyzer... fast and easy to use...


-- 
Andreas D Landmark / noXtension
Real Time, adj.:
 Here and now, as opposed to fake time, which only occurs there
and then.


-- 
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]




Re: [PHP] (//// === huh??)

2001-08-03 Thread ReDucTor

$var = stripslashes($var);
- Original Message -
From: Gerard Samuel [EMAIL PROTECTED]
To: PHP [EMAIL PROTECTED]
Sent: Friday, August 03, 2001 2:37 PM
Subject: [PHP] ( === huh??)


 In my script that puts out a form I have a drop down list which include
==
 echo option$Education/option\n;
 echo optionBachelor's Degree/option\n;

 It uses a $PHP_SELF target.  After the form is submitted, on the new
 page, in the textbox I have Bachelor\\\'s Degree getting outputed by
 $Education and the more I submit the form the more \ I get.

 Any ideas as to how to clean this up?
 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]



-- 
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]




Re: [PHP] Spot the difference?

2001-08-03 Thread Jon Yaggie

isnt this fact a good enough reason to believe it worthless???


- Original Message -
From: Kyle Smith [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, August 03, 2001 6:34 AM
Subject: [PHP] Spot the difference?


Whats the difference between ASP and PHP cause ASP has gotta have something
good about it cause microsoft uses it!


-lk6-
http://www.StupeedStudios.f2s.com
Home of the burning lego man!

ICQ: 115852509
MSN: [EMAIL PROTECTED]
AIM: legokiller666





-- 
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] Re: How to add an excel file directly to MySQL database using PHP?

2001-08-03 Thread Chris Lee

I dont mean to be picky but .. .. allows you to import comma separated
files .. dunno about .csv ..

csv = comma seperated values

so yes mysql can import csv using the LOAD DATA func or user writen php func
:) sorry about pointing that out.

--

  Chris Lee
  [EMAIL PROTECTED]



James Holloway [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Hi,

 phpMyAdmin allows you to import comma separated files into your mysql
tables
 (dunno about .csv but certainly .txt files)..

 http://phpwizard.net/projects/phpMyAdmin/

 Also read up on this:

 http://www.mysql.com/doc/L/O/LOAD_DATA.html

 as you may eventually need to set up something to enable a client to
import
 data like this..

 James

 Yeong Cn [EMAIL PROTECTED] wrote in message
 [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
  How can I add an excel file with *.xls extension
  directly into MySQL database..is it possible to do or
  I need to convert it into *.csv format or *.txt format
  first?
 
 
 
  Get 250 color business cards for FREE!
  http://businesscards.lycos.com/vp/fastpath/





-- 
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]




RE: [PHP] ? about PHP includes

2001-08-03 Thread Craig Westerman

OPen the file and read in the required number of characters (short
explanation). Have a look at the file handling functions.

--
David Robley


Thanks David,

I came up with this, but it doesn't work. Does text file need to be in a
special format? It is 4 paragraphs of plain text created in notepad.

html
head
titleInclude Abbreviated File/title
/head

body

pre
?php
$txtfile = fopen(text.txt, r);

while (!feof($filePointer))
{
 $line = fgets($txtfile, 250);
 print $line;
}

close($txtfile);

?
/pre

/body
/html


Thanks

Craig 
[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]




Re: [PHP] stop a file called foo.bar

2001-08-03 Thread Matt Greer

on 8/3/01 4:22 AM, void at [EMAIL PROTECTED] wrote:

 stop a file called foo.bar from being downloaded with a web server ?
 
 Say you'r web site's name is foobar.net.
 
 ..and...
 
 Script-kiddy Johny knows that,
 but also knows that you'r secret file is called foo.bar
 and it is saved in the root dir. of you'r web site.

Does it need to be in the website's root directory? If you stick it off to
the side, no one will be able to access it via http. If you need this file
for php stuff, use an include to stick it in there.

I know that's not what you asked, but it's worth a try.

Matt


-- 
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]




Re: [PHP] George W.

2001-08-03 Thread Philip Olson


Please everyone, stop talking about this it's getting old.  If you have
issues with a list member, take it off the list.  We, your fellow list
members, don't want to hear about it.

Publically making fun of someone isn't cool but rather, it's stupid.

Regards,
Philip




-- 
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] Minutes between tow dates

2001-08-03 Thread Augusto Cesar Castoldi

Hi.

I'm using the timestamp format (AAMMDDHHMMSS) on my session.

how can I know the minutes between two dates.

I'm doing:

  $date   = $row_secao['date'];
  $date_now=date(ymdHis);
  $x=$date_atual-$date;
  if ($x  1000) {
echo Session expired.;
  }

but I have a problem when turns the hour, like this:

date=010803105958
date_now=010803110518

the sub is 4500 (45 minutes!), but in fact, the real time between is 6
minutes...

thanks.

Augusto


-- 
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] How to create session??

2001-08-03 Thread Balaji Ankem



Hi! dearest friend,
 how to create session while login and hoe to end 
session after pressing logout button.

Thanks in advance.

Regards
-Balaji

The Information contained and transmitted by this E-MAIL is proprietary to 
Wipro Limited and is intended for  use only by the individual or entity to which 
it is addressed, and may contain information that is privileged, confidential or 
exempt from disclosure under applicable law. If this is a forwarded message, 
the content of this E-MAIL may not have been sent with the authority of the 
Company. If you are not the intended recipient, an agent of the intended 
recipient or a  person responsible for delivering the information to the named 
recipient,  you are notified that any use, distribution, transmission, printing, 
copying or dissemination of this information in any way or in any manner is 
strictly prohibited. If you have received this communication in error, please 
delete this mail  notify us immediately at [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]


RE: [PHP] php date bug ?

2001-08-03 Thread Johnny Nguyen

I'm in the exact same position.  It's definitely not a PHP problem.

The problem with the way you're redefining your timestamp is that you may
get January 32, June 31st, etc.

I'm tempted to simply check for spring-forward and fallback before I advance
the timestep, but that's one extra if statement as much as 31 times in one
month.  1000 people generating the calendar would create 31000 extra if
statements, unless I get a Cache solution.  There should definitely be a PHP
function for getNextDay(), but until then, I'm going to use the extra if
statement.

regards,
Johnny Nguyen

-Original Message-
From: Steve Brett [mailto:[EMAIL PROTECTED]]
Sent: Friday, August 03, 2001 7:56 AM
To: [EMAIL PROTECTED]
Subject: [PHP] php date bug ?


hi,

i've got a calendar and i produce a month sort of outlook / filofax view
that shows the user's appointments for that month.

the way i was building it was but defining ADAY in the following manner:

define(ADAY, (60*60*24) );

once i'd done evrything i needed to do i incremented the timestamp for the
day by ADAY.

all seemed ok but then one of the users pointed out that October 28th
appeared twice and then month had 32 days in for this year.

after a bit of head scratching we realised that the clocks go forward (any
foreign readers please excuse the rediculous way the british time system
works) and technicallay i guess october 24th has 25 hours. thus the time was
incremented to a stamp within the same day.

redfining the stamp as

$start3=mktime(0,0,0,$dayArray[mon],$dayArray[mday]+1,$dayArray[year]);

does work however ?

is it php or the server that's at fault ?

Steve



--
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] Syntax

2001-08-03 Thread BRACK

Thank you everyone who replied on my treat Syntax There was 
just a typo and problem is solved

Youri
God is our provider 
http://www.body-builders.org

-- 
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]




Re: [PHP] MySql help #1

2001-08-03 Thread elias

the structur is like:
 id, item name, items in stock , frogserialnumber, status
 1,  frog,  7, 002121, Reserved
2,  frog,  7, 101011, Free
1,  frog,  7, 212001, Free

that's why I want to mark only N entries Reserved,

Lawrence Sheed [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]
...
 Have you thought about your database design carefully?

 You might want to create a column for item count

 eg

 id, item name, items in stock
 1,  frog,  7

 if, say a customer orders 3 frogs, decrement the items in stock by 3.

 Just an idea...

 Do you know about database normalization?  How is the database designed?



 -Original Message-
 From: elias [mailto:[EMAIL PROTECTED]]
 Sent: August 2, 2001 6:32 PM
 To: [EMAIL PROTECTED]
 Subject: Re: [PHP] MySql help #1


 Someone purchased items from my site let's say 3 items out of 5 total. All
 items are the same. I just want to update 3 items status to Reserved.
 When he buy he just tell how many and not which ones.

 Lawrence Sheed [EMAIL PROTECTED] wrote in message

[EMAIL PROTECTED]">news:[EMAIL PROTECTED]
 ..
  Sounds like a strange request, what are you trying to do?
 
  I don't think you can do this directly in mysql, but you could build an
  array of results in php.
 
  eg something like (crappy code below)
 
  //Grab results
  $db = mysql_connect($db_domain, $db_user,$db_password);
  mysql_select_db($db_databasename,$db);
  $sqlquery=select ID from table1 where condition1;
  $result = mysql_query ($sqlstring,$db);
  $count=0;
  while ($resultset = mysql_fetch_array ($result)) {
  $array[$count]=$resultset [ID];
  $count++;
  }
 
 
  for ($count=0;$count2;$count++){
  update table1 set field='VALUE' WHERE ID=.$array[$count];
  $result = mysql_query ($sqlstring,$db) or die (mysql_error());
  }
 
  -Original Message-
  From: elias [mailto:[EMAIL PROTECTED]]
  Sent: August 2, 2001 4:30 PM
  To: [EMAIL PROTECTED]
  Subject: [PHP] MySql help #1
 
 
  How can I update only N fields from the database?
 
  usually we do:
 
  UPDATE table1 SET field='VALUE' WHERE condition1
 
  now I want to update fields with a certain condition but only X fields
out
 N
  total fields.
 
  ie:
 
  id   value
  --- ---
  1a
  2b
  3c
  4d
  5e
 
  how can i update such like:
  UPDATE table1 SET {only 2 records} value='aa'
  so I have any two fields now have the 'aa' value
 
 
 
 
 
  --
  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]




[PHP] echo

2001-08-03 Thread Jeremy Morano




$sql = SELECT first_name, last_name, address, state, zip_code, country,
company, occupation, telephone, fax, email, entry_name, password, package,
registration_date, valid_until, max_users
FROM $table_name
WHERE uid = \$uid\
;


$result = @mysql_query($sql,$connection) or die(Couldn't execute query.);


---
---When I echo $sql, I get this result
---SELECT first_name, last_name ...
How can I echo the actual values?


-- 
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]




Re: [PHP] PHP Manual in PDF Format

2001-08-03 Thread George Pitcher

Er, that's a MySQL manual and it doesn't have much in terms of php coding i
n it, IIRC.

GP
- Original Message -
From: Augusto Cesar Castoldi [EMAIL PROTECTED]
To: Andreas D. Landmark [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Friday, August 03, 2001 3:51 PM
Subject: Re: [PHP] PHP Manual in PDF Format


 You can get here:

 http://monica.inf.ufsc.br/Docs/MySQL.pdf

 see you.

 Augusto

 On Fri, 3 Aug 2001, Andreas D. Landmark wrote:

  At 03.08.2001 10:36, Pere Vineta wrote:
  Dear friends,
  
  Any one of you know when PHP Manual in PDF Format will be available?
  
  Thanks
 
  Probably when Adobe stops picking on innocent cryptographers pointing
out
  weaknesses in their software and stops hiding the source for what they
forced
  through as the defacto standard for document distribution...
 
  ;-)
 
 
  --
  Andreas D Landmark / noXtension
  Real Time, adj.:
   Here and now, as opposed to fake time, which only occurs there
  and then.
 
 
  --
  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]


_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.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]




RE: [PHP] php date bug ?

2001-08-03 Thread Johnny Nguyen

I wasn't sure if mktime(0,0,0,1,32,2001) would work.

BUT!!! I stand corrected. you are absolutely right. PHP is smart enough to
know that January 32nd is really February first. :)

Next Time I'll test the code before i respond.

Johnny Nguyen
-Original Message-
From: Steve Brett [mailto:[EMAIL PROTECTED]]
Sent: Friday, August 03, 2001 8:33 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] php date bug ?


as far as i know adding 1 day to the day value of the timestamp will
increment the month as well.

adding i day to july 31st will give august 1st.

if you need it i'll send you my code whihc now works.

i think gmmktime() would also have worked.

Steve

Johnny Nguyen [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 I'm in the exact same position.  It's definitely not a PHP problem.

 The problem with the way you're redefining your timestamp is that you may
 get January 32, June 31st, etc.

 I'm tempted to simply check for spring-forward and fallback before I
advance
 the timestep, but that's one extra if statement as much as 31 times in one
 month.  1000 people generating the calendar would create 31000 extra if
 statements, unless I get a Cache solution.  There should definitely be a
PHP
 function for getNextDay(), but until then, I'm going to use the extra if
 statement.

 regards,
 Johnny Nguyen

 -Original Message-
 From: Steve Brett [mailto:[EMAIL PROTECTED]]
 Sent: Friday, August 03, 2001 7:56 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP] php date bug ?


 hi,

 i've got a calendar and i produce a month sort of outlook / filofax view
 that shows the user's appointments for that month.

 the way i was building it was but defining ADAY in the following manner:

 define(ADAY, (60*60*24) );

 once i'd done evrything i needed to do i incremented the timestamp for the
 day by ADAY.

 all seemed ok but then one of the users pointed out that October 28th
 appeared twice and then month had 32 days in for this year.

 after a bit of head scratching we realised that the clocks go forward (any
 foreign readers please excuse the rediculous way the british time system
 works) and technicallay i guess october 24th has 25 hours. thus the time
was
 incremented to a stamp within the same day.

 redfining the stamp as

 $start3=mktime(0,0,0,$dayArray[mon],$dayArray[mday]+1,$dayArray[year]);

 does work however ?

 is it php or the server that's at fault ?

 Steve



 --
 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]




RE: [PHP] fopen a URL with = in it

2001-08-03 Thread Corey Chapman

It does not work with the = right in the URL.. PHP gives me a warning 
about the fopen statement or file statement if I do.. and then returns 
nothing.

If I escape it, it loads the proper URL, but then the page it opens 
does not recognize the defined variables because it loads 
http://www.something.com/file.php?thing\=thething instead of 
http://www.something.com/file.php?thing=thething...

 why dont you try:
 fopen(http://www.something.com/file.php?thing=thething,r;);
 
 ...and are you sure it's not working, or just
 not returning anything???
 
 try putting checks on *all* IO/net functions:
 
 $fp = fopen( ... ) 
   or die(Cannot open file!);
 
 
 
 
  -Original Message-
  From: Corey Chapman [mailto:[EMAIL PROTECTED]]On Behalf Of Corey
  Chapman
  Sent: Friday, August 03, 2001 2:46 PM
  To: [EMAIL PROTECTED]
  Subject: [PHP] fopen a URL with = in it
  
  
  Something that's been driving me crazy for a few days. Could it 
  be a bug in PHP?
  
  Using the fopen function (or even the file function), I want to 
open a 
  web page for read. Sounds easy? Well, say I want to have an = 
sign in 
  the URL.. well that is where the problem comes. I have tried things 
  like this:
  
  $eq = urlencode(=);
  $URL = http://www.something.com/file.php?thing.$eq.thething;;;
  
  I have tried many other combinations as well.. the problem is this: 
  when PHP calls fopen(), it does not allow the = sign in the 
variable 
  passed in. So I figured I should escape it..
  
  fopen(http://www.something.com/file.php?thing\=thething,r;;);
  
  But that did not work either. It allows me to pass it in, but then 
it 
  tries to open the literal \= in the url, which of course doesn't 
  exist. The url has just an =. I thought encoding the whole or part 
URL 
  would work. well it loads the page, but the page itself doesn't 
  recognize the encoded = sign as being an = sign.. 
  
  Bah! Anyone have any ideas.. ?
  
  
  Corey Chapman
  Xnull CEO
  (Chat with us: http://forum.xnull.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: php-list-
[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: php-list-
[EMAIL PROTECTED]
 
 
 

Corey Chapman
Xnull CEO
(Chat with us: http://forum.xnull.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] html parsing question

2001-08-03 Thread Chuck Barnett

Hi I have a question about parsing a page on another server to grab some
headlines.

I want to search down the page until I find a string -headlines- then I
want to grab everything between the next pair of table/table tags.

Anyone have a quick solution?

Thanks,
Chuck



-- 
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] thoughts on sessions and members

2001-08-03 Thread mike cullerton

hey folks, hope the day is treating you well.

here's a programming theory/methodology type question for y'all. i am
relatively new to programming and very new to object-oriented(ness).


suppose i have a site using sessions managed with an object $dog. $dog
contains a member object $dog-member and $dog-member contains a memberid
$dog-member-memberid.

member information (username and encrypted password) are stored in a
database.


my index file begins

 require_once(dog.inc); // this is where the objects get defined
 session_start();
 session_register(dog);
 session_register(dog_member_id);
 if (!is_object($dog)) $dog = new dog;

i can authenticate a user and carry that user along throughout the session
within $dog-member. a member can also logout, meaning that $dog-member no
longer refers to them. when a member logs out, there is still a session and
valid $dog.

so, what are the favored ways of allowing folks to auto-login?

the approach i've taken is to set a cookie variable $dog_member_id. i assign
their memberid to the session variable $dog_member_id and within my index
file, i have

 if (!isset($HTTP_COOKIE_VARS[dog_member_id])) {
  if (isset($HTTP_SESSION_VARS[dog_member_id])) {
   setcookie(dog_member_id,$dog_member_id);
  }
 }

then, i can check to see if $HTTP_COOKIE_VARS[dog_member_id] is set when
someone visits my page by having this in my index.

 if ($HTTP_COOKIE_VARS[dog_member_id]  0)
  $dog-member = new Member($HTTP_COOKIE_VARS[dog_member_id]);
 if ((!is_object($dog-member)) || (!$dog-member-is_member()))
  $dog-member = new Member(-1);


whew!

i had this all working in an older site not using objects, so i understand
the basics of what's going on. i also can get this to work if i check for
$HTTP_COOKIE_VARS[dog_member_id] within my index file.

i believe i also had this working at one time by checking for
$HTTP_COOKIE_VARS[dog_member_id] within the dog object constructor, but of
course can't get that to work now :)

is this a good approach? is it possible (should i want) to make this check
within the dog constructor?

what are other approaches?

thanks everyone,
mike

 -- mike cullerton



-- 
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] Re: can't get gettext() to work!

2001-08-03 Thread Colin Viebrock


Richard Lynch [EMAIL PROTECTED] wrote in message
050001c11be5$c93a81c0$6401a8c0@Lynchux100">news:050001c11be5$c93a81c0$6401a8c0@Lynchux100...
  setlocale(LC_ALL, '');

  putenv('LANG=fr');/*  changed here */
  setlocale(LC_ALL, '');

 WILD GUESS ALERT!

 My gut says you need setlocale(LC_ALL, 'fr') or similar in the French
one...

After much fiddling, I found that, for some reason, I always need to use the
long version of the language codes.  LANG=fr didn't work, but
LANG=fr_FR did.

I then need to pass '' or 'fr_FR' to setlocale(), and all is working.

Thanks for the guess, though. :)

- Colin



-- 
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] Re: [php] undefined offset?

2001-08-03 Thread Chris Lee

?php
  $test[0] = 0;
  $test[1] = 1;
  echo $test[8];
?

you never defined test[8] thats why its undeined. more likley then not check
in your php.ini file, i bet you have

  warning = ~E_WARNINGS E_ALL;
in your linux box and
  warning = E_ALL;
in your win box.

I like all warnings and errors showing, personal opinion.

--

  Chris Lee
  [EMAIL PROTECTED]



Johnny Nguyen [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]...
 Can somebody explain to me the undefined offset warning?

 Warning: Undefined offset: 8 in D:\filepath\CalendarClass.php on line 387

 It was working fine on linux, but when i moved to iis 5.0 running php i
got
 this error.

 Regards,
 Johnny Nguyen




-- 
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] Multiple File Upload

2001-08-03 Thread Arne

Hi,

I want to upload multiple files in one step. I know how to handle the things
on PHP side, but how can I select more than one file in the select box. It
does not work with:
FORM ENCTYPE=multipart/form-data ACTION=_URL_ METHOD=POST
INPUT NAME=userfile TYPE=file/FORM

I can only select one file. Is there a possibillity to select more, like in
windows explorer?



-- 
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]




Re: [PHP] Re: Hmmm?

2001-08-03 Thread Ryan Fischer

You wrote:
 additionally I also tend to always provide an alternative, especially
if dealing
 with nested ifs or loops, even if just a comment...  call it habit
(from where I
 don't know).

 if($condition){
 do this
 }else{
 # oops, $condition didn't exist
 }

 saves a hell of alot of time when going back through the code 6 months
later
 trying to remember what was being done where. personal opinion mind
you

It's a good idea.  The only problem is when you come upon a situation
where you don't want to do anything else at that point.  Where you
simply want to skip the rest of the if block if the condition isn't
true, and continue on with the rest of your script.  Then, using an else
isn't what you want to do.

--
 -Ryan :: ICQ - 595003 :: GigaBoard - http://www.gigaboard.net/



-- 
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]




Re: [PHP] web traffic report

2001-08-03 Thread Corey Chapman

Can't you just run a cron job (set it to do it automatically every so 
often) to delete the file from your web account's tmp folder.. ?

 Has anyone figured a way to purge access-log files after webalizer is 
done
 using to data only so far back?
 
 -eric
 - Original Message -
  I'm rather fond of Webalizer (www.mrunix.net/webalizer).
 
 
 
 -- 
 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: php-list-
[EMAIL PROTECTED]
 
 
 

Corey Chapman
Xnull CEO
(Chat with us: http://forum.xnull.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] Re: Error using databases

2001-08-03 Thread Steve Brett

check the cache settings in IE and change to check for new version always.

sounds like you're reading a cached version of your page.

Steve

Jorge Fernando Tamez Seceñas wrote in message
news:[EMAIL PROTECTED]...
Hi:

I'm coding my first programs in PHP using MySQL in Windows. I
instaled the Xitami Web Server for Windows.

I have a simple table catalog that includes 3 fields and one php
script that insert records into the table catalog using a the label FORM
and it works ok.

I have another php script that print a the records in a table of
HTML and it doesn't work correctly. The fisrt time I run this code works Ok,
but then I go to add a new record using the fisrt code and then return to
scrip that print the table and it doesn´t consider the last records I added.
I make the consult in mysql.exe and effectively there are the new records. I
have to suthdown the server and start again and the second script work
correclty.

I have been locking how to solve this problem by myself but a
couldn´t. I think that it's a basic problem but I'm beginning in this
programs.

If somebody can help me i would be thankful.

Thanks.
George Tamez





-- 
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]




Re: [PHP] Database classe to work with Oracle

2001-08-03 Thread Werner Stuerenburg



pierre-yves schrieb am Donnerstag, 2. August 2001, 21:50:55:

 Hello,
 I need to convert an application that run on mysql to an oracle database. The 
application strickly use the db_mysql class
 from phplib. Can anyone suggest me another class and maybe common pitfalls to avoid ?

As far as I understand the idea behind PHPLIB, you should be off
by exchanging the class db_mysql to db_oracle

From the manual
http://phplib.netuse.de/documentation/documentation-2.html#ss2.1 

You must change prepend.php3 to reflect the database interface
that you are using: Change the require statement for db_mysql.inc
appropriately.

-- 
Herzlich
Werner Stuerenburg

_
ISIS Verlag, Teut 3, D-32683 Barntrup-Alverdissen
Tel 0(049) 5224-997 407 · Fax 0(049) 5224-997 409
http://pferdezeitung.de



-- 
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] PayFlow Pro Problems

2001-08-03 Thread Graham Wooden


RedHat 6.2 / Apache 1.3.14 w/ matching modssl and openssl 0.9.6b
Latest SDK (3.0?) for Linux.

Hello all!

Problem is this:
PHP compiles just fine with
--with-pfpro=shared,/home/verisign/payflowpro/linux ... but I keep getting
Fatal error: Call to undefined function: pfpro_init() when trying to
initialize or pfpro_version() when I try to call it's version function.

I know something's working during the compile since it adds the bin to the
end of my include statement ... -I/home/verisign/payflowpro/linux/bin, and
I see the make process go in and make a couple of things in the  ext/pfpro
directory.

Output from configure: checking whether to include Verisign Payflow Pro
support... yes, shared .

Inside the 'linux' directory of payflowpro, the header and the lib file is
there as well as it being in their respective lib and bin directory.

I also copied the header file in /usr/local/include and the library in
/usr/local/lib, with adding /usr/local/lib in /etc/ld.so.conf and reran
ldconfig.

What I am doing wrong here?
I can execute a shell script and authorize just fine, so I *think* the ENV
variables are ok.

Is this right? --with-pfpro=shared,/home/verisign/payflowpro/linux ??

Thanks and I appreciate any help out there!

-
Graham Wooden, R.H.C.E.
 Systems Engineer | Web Services/Development
[EMAIL PROTECTED] | 770.428.5000
  Tridia Corp | www.tridia.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]




Re: [PHP] IF ELSEIF ELSE??

2001-08-03 Thread Richard Baskett

if (!$HTTP_POST_VARS) exit();
else {
  if (!$Age)   { echo Please enter your age.br\n; }
  if (!$Email) { echo Please enter your email.br\n; }
  if (!$State) { echo Please enter your Location.br\n;}
  if ($Age  $Email  $State) echo Thanks for your submission.;
}

Your if and else statements used every possibility up, so that last else
will never get hit.  There are a lot of things you can do better with the
above code, but it'll do what you want.  For example something you might
want to look at the type of data the person is entering, a little
validation.  I hope that helps.

Rick

 Whats wrong with this piece of code.  Basically, it not doing the last
 else statement.
 1.  If no form was submitted exit.
 2.  If a form was submitted, check for 'empty' strings.
 3.  If all is good, echo x;
 
 Thanks all.
 
 
 
 if (!$HTTP_POST_VARS) { exit(); }
 elseif ($HTTP_POST_VARS) {
 if (!$Age) { echo Please enter your age.br\n; }
if 
 (!$Email) { echo Please enter your email.br\n; }
 if (!$State) { echo Please enter your Location.br\n;}
 }
 else
 echo Thanks for your submission.;


-- 
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] Re: Error using databases

2001-08-03 Thread Richard Lynch

It's also remotely possible that some sort of transaction support is going
on, and/or in conjunction with mysql_pconnect that only after a _pconnect is
dead will the insert get committed...

--
WARNING [EMAIL PROTECTED] address is an endangered species -- Use
[EMAIL PROTECTED]
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm
- Original Message -
From: Jorge Fernando Tamez Seceñas
Newsgroups: php.general
To: [EMAIL PROTECTED]
Sent: Friday, August 03, 2001 11:55 AM
Subject: Error using databases


Hi:

I'm coding my first programs in PHP using MySQL in Windows. I
instaled the Xitami Web Server for Windows.

I have a simple table catalog that includes 3 fields and one php
script that insert records into the table catalog using a the label FORM
and it works ok.

I have another php script that print a the records in a table of
HTML and it doesn't work correctly. The fisrt time I run this code works Ok,
but then I go to add a new record using the fisrt code and then return to
scrip that print the table and it doesn´t consider the last records I added.
I make the consult in mysql.exe and effectively there are the new records. I
have to suthdown the server and start again and the second script work
correclty.

I have been locking how to solve this problem by myself but a
couldn´t. I think that it's a basic problem but I'm beginning in this
programs.

If somebody can help me i would be thankful.

Thanks.
George Tamez




-- 
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]




Re: [PHP] php date bug ?

2001-08-03 Thread Richard Lynch

 Just to throw one more unwelcome cat amongst the pigeons..

 Different countries/time zones have summer time, I think almost all
 countries do, but the actual days when they switch vary from country (yes
I
 know, bloody nusiance isn't it?)

 I know as an example of this theres about three weeks of the year where
new
 york is 6 hours behing UK, and the rest its only 5.

And, of course, some countries have time-zones that are off by a HALF hour.
Yes, really.

USE THE BUILTIN FUNCTIONS

Somebody else has already gone to a great deal of trouble to get this
date/time crap right, and you don't want to do it yourself.

All the mktime() functions know about time zones, and all of them know
better than to give you nonsense dates.  They'll wrap-around quite nicely
for you.

--
WARNING [EMAIL PROTECTED] address is an endangered species -- Use
[EMAIL PROTECTED]
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm



-- 
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] Netscape Enterprise Server

2001-08-03 Thread Herman Tolentino

Dear folks,

Any body there with experience setting up Netscape Enterprise Web Server with PHP as 
CGI binary. I need to know how to configure Netscape Web Server.

TIA, 

Herman Tolentino




Re: [PHP] Re: Left Join extremely slow (MySQL)

2001-08-03 Thread William Poarch

explain

 - - - - - - - - - -
 Scott Poarch
 www.globalhost.com
 - - - - - - - - - -

 From: Richard Lynch [EMAIL PROTECTED]
 Organization: Lynch Interplanetary Enterprises
 Date: Fri, 3 Aug 2001 17:09:49 -0500
 To: [EMAIL PROTECTED]
 Subject: [PHP] Re: Left Join extremely slow (MySQL)
 
 Use MySQL's built in analyze (describe? SQL statement to see what's
 taking so long).
 
 I'm betting on one server having an INDEX on the id or ex fields, and the
 other not.
 
 --
 WARNING [EMAIL PROTECTED] address is an endangered species -- Use
 [EMAIL PROTECTED]
 Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
 Volunteer a little time: http://chatmusic.com/volunteer.htm
 - Original Message -
 From: James Crowley [EMAIL PROTECTED]
 Newsgroups: php.general
 To: [EMAIL PROTECTED]
 Sent: Friday, August 03, 2001 11:40 AM
 Subject: Left Join extremely slow (MySQL)
 
 
 Hi,
 I had been using an INNER JOIN statement for a MySQL query, which
 worked fine. However, my new ISP does not have the latest version of
 MySQL. The version they have does not support conditions for Inner Join
 statements, so I have tried switching to a Left Join instead. However,
 the Left Join query takes 12.15 sec (which is obviously far too slow).
 The Inner join statement, meanwhile, completed the query in 0.04. Any
 idea why??
 
 Here are the two statements (fast):
 
 SELECT i.id, i.title, i.description FROM dir_items i INNER JOIN
 dir_assoc a ON a.itemid=i.id WHERE a.parentid=59 AND a.ex=0
 
 Here are the two statements (slow):
 
 SELECT i.id, i.title, i.description FROM dir_items i LEFT JOIN dir_assoc
 a ON a.itemid=i.id WHERE a.parentid=59 AND a.ex=0
 
 Regards,
 
 - James
 
 Editor, VB Web
 ==
 Web   - http://www.vbweb.co.uk
 Email - [EMAIL PROTECTED]
 ICQ#  - 60612011
 Fax   - +44(0)8707052859
 ==
 
 
 
 -- 
 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]




Re: [PHP] again

2001-08-03 Thread Richard Lynch

Then you'll need to do an ftp_cd or something to go down in that
sub-directory and do ftp_nlist again, I think...

--
WARNING [EMAIL PROTECTED] address is an endangered species -- Use
[EMAIL PROTECTED]
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm
- Original Message -
From: Eduardo Kokubo [EMAIL PROTECTED]
Newsgroups: php.general
To: Miles Thompson [EMAIL PROTECTED];
[EMAIL PROTECTED]
Cc: Eduardo Kokubo [EMAIL PROTECTED]
Sent: Friday, August 03, 2001 9:35 AM
Subject: Re: [PHP] again


 I'm trying to it using PHP. I tried to use ftp_nlist to know the names of
 the files and transfer them, but I think I need more than just the names
and
 locations of the files. Besides, I have to transfer the name of the
 subdirectory too.

  Eduardo,
 
  Are you trying to do this in PHP or interactively? If with PHP I won't
be
  much help, as the I've not used its FTP functions. Otherwise it's a
  straightforward FTP operation.
 
  There may be a problem doing it from within PHP as the webserver is
  probably running as nobody, who usually, and properly, has zilch for
  permissions.
 
  Not much help - Miles
 
  At 10:11 AM 8/3/01 -0300, Eduardo Kokubo wrote:
  I'm still trying to transfer a directory form one server to another but
  with no results.
  I have the username and password of the ftp account source and I know
 I'll
  have to ask for the username and password of the destination. I can't
  simply upload or copy the directory, but there must have an alternative
  way. I know I have been asking a lot of questions and I already asked
 this
  one, but I'm new with php and we can't learn everything from books,
so...
 
 
  --
  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]




Re: [PHP] shtml or php ??

2001-08-03 Thread Rasmus Lerdorf

 I have tried the virtual() command but keep receiving error - undefined
 function, can someone give an example in how to use this ?

virtual() only works if you are running PHP as an Apache module.

-Rasmus


-- 
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] PHP Grammar Definition

2001-08-03 Thread Jos Len Serna

Hello:
I'm looking for the formal grammar definition for PHP, Do you know where
I can find it? I'm trying to make a parser for it.

Best Regards.

QaDRAM, RAD development for the WEB
http://www.qadram.com

VCLCrawler.com, your VCL search engine
http://www.vclcrawler.com

W2Kwm, Windows 2000 interface for XWindow
http://www.vclcrawler.com/w2kwm/index.htm

delphi.deeuropa.net, enlaces revisados sobre Delphi
http://delphi.deeuropa.net

ebnoud.com, El Boletín No Oficial de Usuarios de Delphi
http://www.ebnoud.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]




RE: [PHP] html parsing question

2001-08-03 Thread Dave

below is a snippet from a larger code used to capture a daily output graphic
file from a site...  I put your requirements into it and removed a lot of
superfluous stuff, but it is not set to capture text spanning more than one
line, but you should be able to modify it accordingly if you can follow the
logic.

on 8/2/01 5:30 PM, Chuck Barnett at [EMAIL PROTECTED] wrote:

 Hi I have a question about parsing a page on another server to grab some
 headlines.

 I want to search down the page until I find a string -headlines- then I
 want to grab everything between the next pair of table/table tags.

 Anyone have a quick solution?

i would check out http://php.net/strpos


?PHP
/*
HTML Content Grabber

no copyright
*/
$file_url = http://www.somewhere.com/;;
$grabbed_file = file($file_url);
if ($grabbed_file[0]) {
for ($i = 0; $i = count($grabbed_file) - 1; $i++) {
if($returnstr = strstr ($grabbed_file[$i], '-headlines-')) {
$trim = substr ($returnstr, strpos($returnstr,
'table')+7,strpos($returnstr, '/table')-(strpos($returnstr, 'table')+7));
}else{
# not in this line, keep searching
}
}
} else {
# Something went wrong
}
?


-- 
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] Re: Retriving data from http request,

2001-08-03 Thread Richard Lynch

 How do I get the raw data from a http request?

There's some variable for it...

Add ?php phpinfo();? to your POST-processing script to find out what the
name is. :-)

Or, search http://php.net for raw URI

--
WARNING [EMAIL PROTECTED] address is an endangered species -- Use
[EMAIL PROTECTED]
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm



-- 
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]




Re: [PHP] again

2001-08-03 Thread Miles Thompson

Eduardo,

Are you trying to do this in PHP or interactively? If with PHP I won't be 
much help, as the I've not used its FTP functions. Otherwise it's a 
straightforward FTP operation.

There may be a problem doing it from within PHP as the webserver is 
probably running as nobody, who usually, and properly, has zilch for 
permissions.

Not much help - Miles

At 10:11 AM 8/3/01 -0300, Eduardo Kokubo wrote:
I'm still trying to transfer a directory form one server to another but 
with no results.
I have the username and password of the ftp account source and I know I'll 
have to ask for the username and password of the destination. I can't 
simply upload or copy the directory, but there must have an alternative 
way. I know I have been asking a lot of questions and I already asked this 
one, but I'm new with php and we can't learn everything from books, so...


-- 
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]




Re: [PHP] web traffic report

2001-08-03 Thread mike cullerton

another vote for analog.

on 8/2/01 9:46 PM, Chris Fry at [EMAIL PROTECTED] wrote:

 analog seems to be the industry standard - use it with the extended log
 format.
 
 http://www.statslab.cam.ac.uk/~sret1/analog/
 


 -- mike cullerton



-- 
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]




RE: [PHP] weird behavior with a form

2001-08-03 Thread Ben Bleything

Submit should get set when you click the submit button... it is not used
anywhere else...

Again, it works when you click the button, just not when you press
enter...

=
I'm going to try what Richard just suggested, and I'll get back to you.

Ben

-Original Message-
From: Queen [mailto:[EMAIL PROTECTED]] 
Sent: Friday, August 03, 2001 5:31 PM
To: Benjamin Bleything
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] weird behavior with a form

On Fri, 3 Aug 2001, Benjamin Bleything wrote:

Date: Fri, 3 Aug 2001 17:05:54 -0700 (PDT)
From: Benjamin Bleything [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: [PHP] weird behavior with a form

Okay... so this is sorta off topic... but the form is generated by a
script =

Anyway, for some reason, when I fill in a form on my site and press
enter,
it doesn't actually submit the form and do the processing like it is
supposed to... it should be throwing some information into the
database.
Instead, it seems to just be reloading the page.

Source is below... if anybody has any idea, I would appreciate... I
imagine I'm just doing something stupid wrong.


Does $submit get unset in any of your include files? Does it get set at
all? Can you acess $submit through $GLOBALS[$submit]?

--- SOURCE ---
?php

include_once(../include/definitions.inc);
include_once(../include/functions.inc);

// Check to make sure they're allowed to be here
session_start();
check_access($session_data);

// They haven't clicked anything, so show the form
if(!$submit)
{ ?
html
head
titleAdd Genre/title
link rel=stylesheet href=?php echo $STYLESHEET; ?
type=text/css
scriptlanguage=javascript

function verify()
{
   if(document.forms[0].name.value==)
   {
   alert(The name field cannot be blank!);
   return false;
   }

   return true; // fallthrough
}
/script
/head
body
center
h1AddGenre/h1
hr
form method=post action=addgenre.php onSubmit=return verify()

table

tr
   tdName: /td
   tdinput type=text name=name size=20
maxlength=50/td
/tr

tr
   tdinput type=submit name=submit value=Add Genre/td
   tdinput type=reset/td
/tr

/table

/form
?php include ../include/footer.php; ?
/body
/html

?php } else {

   setup_db_connection('w') or die(Could not connect to
database!);

   //Stick it in
   $query = INSERT INTO genres (name) VALUES ('$name');;
   mysql_query($query);
   header(Location: genres.php);
}
?






-- 
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] Re:[PHP] IF ELSEIF ELSE??

2001-08-03 Thread Jack Sasportas

First you should manage your code nicer so that it is easier to read
and troubleshoot.  Go through this to find my notes...

if (!$HTTP_POST_VARS) { exit();}
elseif ($HTTP_POST_VARS) {
if (!$Age) { echo Please enter your age.br\n;
} if

Why would you use elseif above ? you are asking the full question in
the first line
if (!$HTTP_POST_VARS) { exit();}

if it's NOT then why say elseif, it's else, it's either one or the
other...that's one thing.

so lets change it to this:
if (!$HTTP_POST_VARS) {
exit();
} else {
if (!$Age) {
echo Please enter your age.br\n;
}

if (!$Email) {
echo Please enter your email.br\n;
}

if (!$State) {
echo Please enter your Location.br\n;
}

(MARK)
} else ( RIGHT HERE YOU DID NOT OPEN THE REST OF THE ELSE )
echo Thanks for your submission.;

( RIGHT HERE YOU DID NOT CLSE THEN END OF THE CONDITION )


so the last lines replacing after (MARK) should look like this

} else {
echo Thanks for your submission.;
}


As you can see keeping the code in this format makes it a lot easier to
see what is being exectued within the condition, allows you to see the
open  closes of the brackets, and should have easily let you see you
were missing something.


Hope that explains it



[PHP] another REGEX question

2001-08-03 Thread Julian Simpson

I have a string can look like either of the following:
psome stuff/p 
p align = leftsome stuff/p

I want to use eregi_replace to take out the first p tag whether it be p or p 
align.. with a space

I assumed that $str = eregi_replace (p.*,  ,$str);
but it matches the entire string and thus turns the whole string into one space.
aparently regex will match the biggest possible match rather than the smallest
my question is how do i get it to match the smallest.

thanx in advance..

Julian


-- 
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]




Re: [PHP] php date bug ?

2001-08-03 Thread Tom Carter

Just to throw one more unwelcome cat amongst the pigeons..

Different countries/time zones have summer time, I think almost all
countries do, but the actual days when they switch vary from country (yes I
know, bloody nusiance isn't it?)

I know as an example of this theres about three weeks of the year where new
york is 6 hours behing UK, and the rest its only 5.

HTH

- Original Message -
From: Johnny Nguyen [EMAIL PROTECTED]
To: Steve Brett [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Friday, August 03, 2001 4:25 PM
Subject: RE: [PHP] php date bug ?


 I'm in the exact same position.  It's definitely not a PHP problem.

 The problem with the way you're redefining your timestamp is that you may
 get January 32, June 31st, etc.

 I'm tempted to simply check for spring-forward and fallback before I
advance
 the timestep, but that's one extra if statement as much as 31 times in one
 month.  1000 people generating the calendar would create 31000 extra if
 statements, unless I get a Cache solution.  There should definitely be a
PHP
 function for getNextDay(), but until then, I'm going to use the extra if
 statement.

 regards,
 Johnny Nguyen

 -Original Message-
 From: Steve Brett [mailto:[EMAIL PROTECTED]]
 Sent: Friday, August 03, 2001 7:56 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP] php date bug ?


 hi,

 i've got a calendar and i produce a month sort of outlook / filofax view
 that shows the user's appointments for that month.

 the way i was building it was but defining ADAY in the following manner:

 define(ADAY, (60*60*24) );

 once i'd done evrything i needed to do i incremented the timestamp for the
 day by ADAY.

 all seemed ok but then one of the users pointed out that October 28th
 appeared twice and then month had 32 days in for this year.

 after a bit of head scratching we realised that the clocks go forward (any
 foreign readers please excuse the rediculous way the british time system
 works) and technicallay i guess october 24th has 25 hours. thus the time
was
 incremented to a stamp within the same day.

 redfining the stamp as

 $start3=mktime(0,0,0,$dayArray[mon],$dayArray[mday]+1,$dayArray[year]);

 does work however ?

 is it php or the server that's at fault ?

 Steve



 --
 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]




[PHP] huh??

2001-08-03 Thread Gerard Samuel

In my script that puts out a form I have a drop down list which include ==
echo option$Education/option\n;
echo optionBachelor's Degree/option\n;

It uses a $PHP_SELF target.  After the form is submitted, on the new
page, in the textbox I have Bachelor\\\'s Degree getting outputed by
$Education and the more I submit the form the more \ I get.

Any ideas as to how to clean this up?
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]




Re: [PHP] web traffic report

2001-08-03 Thread Richard Lynch

Your process should be:
logrotate access_log
Use Webalizer on old log.
Purge old log.
Webalizer does not need the raw data after it has processed it once.

--
WARNING [EMAIL PROTECTED] address is an endangered species -- Use
[EMAIL PROTECTED]
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm
- Original Message -
From: Corey Chapman [EMAIL PROTECTED]
Newsgroups: php.general
To: Eric Wood [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Friday, August 03, 2001 1:38 PM
Subject: Re: [PHP] web traffic report


 Can't you just run a cron job (set it to do it automatically every so
 often) to delete the file from your web account's tmp folder.. ?

  Has anyone figured a way to purge access-log files after webalizer is
 done
  using to data only so far back?
 
  -eric
  - Original Message -
   I'm rather fond of Webalizer (www.mrunix.net/webalizer).
 
 
 
  --
  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: php-list-
 [EMAIL PROTECTED]
 
 
 

 Corey Chapman
 Xnull CEO
 (Chat with us: http://forum.xnull.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]




Re: [PHP] PHP Manual in PDF Format

2001-08-03 Thread Richard Lynch

 Probably when Adobe stops picking on innocent cryptographers pointing out
 weaknesses in their software and stops hiding the source for what they
forced
 through as the defacto standard for document distribution...

Last I heard, Adobe had dropped charges, and it was the US Government that
won't back down... Details on http://eff.org almost for sure.

Also, the PDF format was only one of many options being promoted and
marketed for some time -- It succeeded by popular demand and technical merit
mostly, really, IMHO...

--
WARNING [EMAIL PROTECTED] address is an endangered species -- Use
[EMAIL PROTECTED]
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm



-- 
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]




Re: [PHP] Q: Hiding Folder Directories from public while still...

2001-08-03 Thread Jon Yaggie

dont knwo if ti easier but much better yes . . .


- Original Message -
From: scott [gts] [EMAIL PROTECTED]
To: php [EMAIL PROTECTED]
Sent: Friday, August 03, 2001 12:38 AM
Subject: RE: [PHP] Q: Hiding Folder Directories from public while still...


 if you're using apache, there's a *much* easier/secure way
 of doing this.

 setup an .htaccess file to restrict access to certain
 username/passwords.

 check out both:
 man htaccess
 man htpasswd


  -Original Message-
  From: Jon Yaggie [mailto:[EMAIL PROTECTED]]
  Sent: Thursday, August 02, 2001 1:34 PM
  To: [EMAIL PROTECTED]
  Subject: Re: [PHP] Q: Hiding Folder Directories from public while
  still...
 
 
  i dont know if this is elagant but ti works.  but a fake index.htmlin
your
  directory for browsers to default to.   . ..
 
 
  - Original Message -
  From: Marcus James Christian [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Sent: Friday, August 03, 2001 12:30 AM
  Subject: [PHP] Q: Hiding Folder Directories from public while still...
 
 
   Hello,
  
   How does one do the trick of hiding a  folder's directory listing from
a
   public browser?
  
   i.e.  Lets say the full address is
www.mysite.com/php/magicphppage.php
  
   Well I still need some other files to read and write to
   magicphppage.php   I don't want the public to be able to simply type
   www.mysite.com/php/ and have all of my php files show up on a
funky
   virtual directory.
  
   Thanks,
   Marcus
  
   --
   Marcus James Christian - UNLIMITED -
   Multimedia Internet Design
   http://mjchristianunlimited.com
  
   Proudly presents the music of CHROMATICUS
   at http://chromaticus.com
   and http://artists.mp3s.com/artists/275/chromaticus.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]
 
 
  --
  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]




[PHP] Re: ----- BEING AN ASS CLICK HERE NOT ABOVE!!!!!

2001-08-03 Thread Richard Lynch

http://www.stupeedstudios.f2s.com/probs.gif

You turned on browscap, but didn't snag a valid browscap.ini file anywhere,
and the default one with PHP is blank (I think) or maybe you just didn't
configure php.ini to find the good browscap.ini file where you put it...

Or, wait...

Line 8206 is a pretty big browscap.ini file.  What's on line 8206 of
browscap.ini, and why is it broken is what you should be asking yourself
right about now.

PS  Did you really need to make that a GIF instead of typing in the error
message for us?...

--
WARNING [EMAIL PROTECTED] address is an endangered species -- Use
[EMAIL PROTECTED]
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm




-- 
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]




RE: [PHP] How to Compare dates?

2001-08-03 Thread Johnson, Kirk

 Can someone tell me how to properly compare the value 
 returned from the
 db to see if it is blank ?

 if ( (  
 mysql_result($db_result,$db_record,'order_date')=00)
 ) ) {


Two things, Jack. Enclose 00 in quotes, since it is a string,
but more importantly, use '==' instead of '=' for comparison. I hate it when
I do that :)

Kirk 

-- 
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] PHP MyAdmin Error---weird

2001-08-03 Thread John Monfort



 Hello everyone,

 Need some help. I installed phpMyAdmin on this new server and cannot
 get it to work. I've installed this tool many times, so i'm pretty
 comfortable with the installation process. However, I've never ran into
 the errors I am getting today.

 The server is Apache+PHP 4.0.6

 Error 1) When I first installed phpMyAdmin, I got the following error:

... magic_quotes_gpc is not enabled. phpMyAdmin needs this to
work...

 Action:
  I had my ISP turned on Magic Quotes in my PHP.ini file.
  Now, phpinfo() shows the following settings:

 magic_quotes_gpc   On
 magic_quotes_runtime   On
 magic_quotes_sybaseOn


error 2)

The above seetings solve the 'error' issues. However, phpMyAdmin now
shows a blank  page when I try to access it.

What can cause this ?
Does it have anything to do with magic_quotes being turned on?
...that's what it requested in the first place.


Am I missing something?

Please help.

-John




__John Monfort_
_+---+_
 P E P I E  D E S I G N S
   www.pepiedesigns.com
The world is waiting, are you ready?
-+___+-

On Fri, 3 Aug 2001, Jack Sasportas wrote:

 Yes, I see what you mean...
 In showing why the last section didn't work, I messed up the actual
 overall
 logic of the code.
 I should have noticed that...nice catch

 so for clarification where it says (MARK) should be
 echo Thanks for your submission.;
 }

 Thanks...

 Jack Sasportas wrote:

  Yes, I see what you mean...
  In showing why the last section didn't work, I messed up the actual overall
  logic of the code.
  I should have noticed that...nice catch
 
  so for clarification where it says (MARK) should be
  echo Thanks for your submission.;
  }
 
  Thanks...
 
  Richard Baskett wrote:
 
   Just curious but that last else you told him to put in... what is that
   referring to?  There is already an else statement, you can't have another.
   Unless you're putting the else statement after the if (!$State) which you
   would need to subtract the } before the else, but this would give you
   undesired results since this is just an else for the !$State statement.
  
   I could be missing what you were getting at.. it's definitely possible :)
  
   Rick
  
First you should manage your code nicer so that it is easier to read
and troubleshoot.  Go through this to find my notes...
   
if (!$HTTP_POST_VARS) { exit();}
elseif ($HTTP_POST_VARS) {
if (!$Age) { echo Please enter your age.br\n;
} if
   
Why would you use elseif above ? you are asking the full question in
the first line
if (!$HTTP_POST_VARS) { exit();}
   
if it's NOT then why say elseif, it's else, it's either one or the
other...that's one thing.
   
so lets change it to this:
if (!$HTTP_POST_VARS) {
exit();
} else {
if (!$Age) {
echo Please enter your age.br\n;
}
   
if (!$Email) {
echo Please enter your email.br\n;
}
   
if (!$State) {
echo Please enter your Location.br\n;
}
   
(MARK)
} else ( RIGHT HERE YOU DID NOT OPEN THE REST OF THE ELSE )
echo Thanks for your submission.;
   
( RIGHT HERE YOU DID NOT CLSE THEN END OF THE CONDITION )
   
   
so the last lines replacing after (MARK) should look like this
   
} else {
echo Thanks for your submission.;
}
   
   
As you can see keeping the code in this format makes it a lot easier to
see what is being exectued within the condition, allows you to see the
open  closes of the brackets, and should have easily let you see you
were missing something.
   
   
Hope that explains it
   
  
   --
   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]
 
  --
  ___
  Jack Sasportas
  Innovative Internet Solutions
  Phone 305.665.2500
  Fax 305.665.2551
  www.innovativeinternet.com
  www.web56.net

 --
 ___
 Jack Sasportas
 Innovative Internet Solutions
 Phone 305.665.2500
 Fax 305.665.2551
 www.innovativeinternet.com
 www.web56.net




-- 
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]




Re: [PHP] Re: Left Join extremely slow (MySQL)

2001-08-03 Thread Queen


explain

 Use MySQL's built in analyze (describe? SQL statement to see what's
 taking so long).

The statement is called EXPLAIN. You can find it described here:
http://www.mysql.com/doc/E/X/EXPLAIN.html

 I'm betting on one server having an INDEX on the id or ex fields, and the
 other not.

If the following fields are missing indexed your query will be slower.
itemid
id
parentid
ex

You can check the indexes on tables using SHOW INDEX FROM tablename.
If the indexes are missing add them with ALTER TABLE ADD INDEX:
http://www.mysql.com/doc/A/L/ALTER_TABLE.html

  I had been using an INNER JOIN statement for a MySQL query, which
 worked fine. However, my new ISP does not have the latest version of
 MySQL. The version they have does not support conditions for Inner Join
 statements, so I have tried switching to a Left Join instead. However,
 the Left Join query takes 12.15 sec (which is obviously far too slow).
 The Inner join statement, meanwhile, completed the query in 0.04. Any
 idea why??

 Here are the two statements (fast):

 SELECT i.id, i.title, i.description FROM dir_items i INNER JOIN
 dir_assoc a ON a.itemid=i.id WHERE a.parentid=59 AND a.ex=0

 Here are the two statements (slow):

 SELECT i.id, i.title, i.description FROM dir_items i LEFT JOIN dir_assoc
 a ON a.itemid=i.id WHERE a.parentid=59 AND a.ex=0


To do an INNER JOIN you simply do
SELECT *
FROM table_a, table_b
WHERE table_a.id = table_b.id
http://www.mysql.com/doc/J/O/JOIN.html

Exchanging an inner (full) join for a left join might not have desired
result.

The MySQL documentation is very good. http://www.mysql.com/doc/index.html

Tina.

-- 
Tina GunnarssonPhone: 408 732 1413
1616 Hollenbeck Ave. #20   Cell:  406 504 7310
Sunnyvale, CA 94087

   We only begin to live when we conceive life as Tragedy...
 - W. B. Yeats


-- 
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] Re: PHP Grammar Definition

2001-08-03 Thread Richard Lynch

I'm pretty sure PHP uses bison/flex/yacc/lex stuff, so there might be an
input file in the source you can use...

--
WARNING [EMAIL PROTECTED] address is an endangered species -- Use
[EMAIL PROTECTED]
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm
- Original Message -
From: José león serna [EMAIL PROTECTED]
Newsgroups: php.general
To: [EMAIL PROTECTED]
Sent: Friday, August 03, 2001 5:32 AM
Subject: PHP Grammar Definition


 Hello:
 I'm looking for the formal grammar definition for PHP, Do you know
where
 I can find it? I'm trying to make a parser for it.

 Best Regards.
 
 QaDRAM, RAD development for the WEB
 http://www.qadram.com

 VCLCrawler.com, your VCL search engine
 http://www.vclcrawler.com

 W2Kwm, Windows 2000 interface for XWindow
 http://www.vclcrawler.com/w2kwm/index.htm

 delphi.deeuropa.net, enlaces revisados sobre Delphi
 http://delphi.deeuropa.net

 ebnoud.com, El Boletín No Oficial de Usuarios de Delphi
 http://www.ebnoud.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]




Re: [PHP] Re:[PHP] IF ELSEIF ELSE??

2001-08-03 Thread Richard Baskett

Just curious but that last else you told him to put in... what is that
referring to?  There is already an else statement, you can't have another.
Unless you're putting the else statement after the if (!$State) which you
would need to subtract the } before the else, but this would give you
undesired results since this is just an else for the !$State statement.

I could be missing what you were getting at.. it's definitely possible :)

Rick


 First you should manage your code nicer so that it is easier to read
 and troubleshoot.  Go through this to find my notes...
 
 if (!$HTTP_POST_VARS) { exit();}
 elseif ($HTTP_POST_VARS) {
 if (!$Age) { echo Please enter your age.br\n;
 } if
 
 Why would you use elseif above ? you are asking the full question in
 the first line
 if (!$HTTP_POST_VARS) { exit();}
 
 if it's NOT then why say elseif, it's else, it's either one or the
 other...that's one thing.
 
 so lets change it to this:
 if (!$HTTP_POST_VARS) {
 exit();
 } else {
 if (!$Age) {
 echo Please enter your age.br\n;
 }
 
 if (!$Email) {
 echo Please enter your email.br\n;
 }
 
 if (!$State) {
 echo Please enter your Location.br\n;
 }
 
 (MARK)
 } else ( RIGHT HERE YOU DID NOT OPEN THE REST OF THE ELSE )
 echo Thanks for your submission.;
 
 ( RIGHT HERE YOU DID NOT CLSE THEN END OF THE CONDITION )
 
 
 so the last lines replacing after (MARK) should look like this
 
 } else {
 echo Thanks for your submission.;
 }
 
 
 As you can see keeping the code in this format makes it a lot easier to
 see what is being exectued within the condition, allows you to see the
 open  closes of the brackets, and should have easily let you see you
 were missing something.
 
 
 Hope that explains it
 


-- 
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]




Re: [PHP] Re:[PHP] IF ELSEIF ELSE??

2001-08-03 Thread Jack Sasportas

Yes, I see what you mean...
In showing why the last section didn't work, I messed up the actual
overall
logic of the code.
I should have noticed that...nice catch

so for clarification where it says (MARK) should be
echo Thanks for your submission.;
}

Thanks...

Jack Sasportas wrote:

 Yes, I see what you mean...
 In showing why the last section didn't work, I messed up the actual overall
 logic of the code.
 I should have noticed that...nice catch

 so for clarification where it says (MARK) should be
 echo Thanks for your submission.;
 }

 Thanks...

 Richard Baskett wrote:

  Just curious but that last else you told him to put in... what is that
  referring to?  There is already an else statement, you can't have another.
  Unless you're putting the else statement after the if (!$State) which you
  would need to subtract the } before the else, but this would give you
  undesired results since this is just an else for the !$State statement.
 
  I could be missing what you were getting at.. it's definitely possible :)
 
  Rick
 
   First you should manage your code nicer so that it is easier to read
   and troubleshoot.  Go through this to find my notes...
  
   if (!$HTTP_POST_VARS) { exit();}
   elseif ($HTTP_POST_VARS) {
   if (!$Age) { echo Please enter your age.br\n;
   } if
  
   Why would you use elseif above ? you are asking the full question in
   the first line
   if (!$HTTP_POST_VARS) { exit();}
  
   if it's NOT then why say elseif, it's else, it's either one or the
   other...that's one thing.
  
   so lets change it to this:
   if (!$HTTP_POST_VARS) {
   exit();
   } else {
   if (!$Age) {
   echo Please enter your age.br\n;
   }
  
   if (!$Email) {
   echo Please enter your email.br\n;
   }
  
   if (!$State) {
   echo Please enter your Location.br\n;
   }
  
   (MARK)
   } else ( RIGHT HERE YOU DID NOT OPEN THE REST OF THE ELSE )
   echo Thanks for your submission.;
  
   ( RIGHT HERE YOU DID NOT CLSE THEN END OF THE CONDITION )
  
  
   so the last lines replacing after (MARK) should look like this
  
   } else {
   echo Thanks for your submission.;
   }
  
  
   As you can see keeping the code in this format makes it a lot easier to
   see what is being exectued within the condition, allows you to see the
   open  closes of the brackets, and should have easily let you see you
   were missing something.
  
  
   Hope that explains it
  
 
  --
  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]

 --
 ___
 Jack Sasportas
 Innovative Internet Solutions
 Phone 305.665.2500
 Fax 305.665.2551
 www.innovativeinternet.com
 www.web56.net

--
___
Jack Sasportas
Innovative Internet Solutions
Phone 305.665.2500
Fax 305.665.2551
www.innovativeinternet.com
www.web56.net




RE: [PHP] How to Compare dates?

2001-08-03 Thread scott [gts]

or, if the field is a MySQL DATE field, try comparing to
-00-00, since that's what a blank date defaults to.


 -Original Message-
 From: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, August 02, 2001 10:34 AM
 To: Jack Sasportas
 Cc: php
 Subject: Re: [PHP] How to Compare dates?
 
 
  if ( (  mysql_result($db_result,$db_record,'order_date')=00)
 
 Uh, huh?  Just try ==0 there.  Not =000
 
 -Rasmus
 
 
 -- 
 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] Re: Left Join extremely slow (MySQL)

2001-08-03 Thread Richard Lynch

Use MySQL's built in analyze (describe? SQL statement to see what's
taking so long).

I'm betting on one server having an INDEX on the id or ex fields, and the
other not.

--
WARNING [EMAIL PROTECTED] address is an endangered species -- Use
[EMAIL PROTECTED]
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm
- Original Message -
From: James Crowley [EMAIL PROTECTED]
Newsgroups: php.general
To: [EMAIL PROTECTED]
Sent: Friday, August 03, 2001 11:40 AM
Subject: Left Join extremely slow (MySQL)


 Hi,
  I had been using an INNER JOIN statement for a MySQL query, which
 worked fine. However, my new ISP does not have the latest version of
 MySQL. The version they have does not support conditions for Inner Join
 statements, so I have tried switching to a Left Join instead. However,
 the Left Join query takes 12.15 sec (which is obviously far too slow).
 The Inner join statement, meanwhile, completed the query in 0.04. Any
 idea why??

 Here are the two statements (fast):

 SELECT i.id, i.title, i.description FROM dir_items i INNER JOIN
 dir_assoc a ON a.itemid=i.id WHERE a.parentid=59 AND a.ex=0

 Here are the two statements (slow):

 SELECT i.id, i.title, i.description FROM dir_items i LEFT JOIN dir_assoc
 a ON a.itemid=i.id WHERE a.parentid=59 AND a.ex=0

 Regards,

 - James

 Editor, VB Web
 ==
 Web   - http://www.vbweb.co.uk
 Email - [EMAIL PROTECTED]
 ICQ#  - 60612011
 Fax   - +44(0)8707052859
 ==



-- 
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]




  1   2   >