OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
Subject: php3 Digest 26 Feb 2000 06:00:02 -0000 Issue 1502
From: php3-digest-helplists.php.net
Date: Sat Feb 26 2000 - 00:00:02 CST


php3 Digest 26 Feb 2000 06:00:02 -0000 Issue 1502

Topics (messages 78309 through 78464):

postgresql
        78309 by: Fernando Caamaño <fernandoconecta-t.com>

Displaying Source of .php under NT
        78310 by: "Florian Clever" <cleveraracnet.com>

Trick for adding site to browser Bookmark
        78311 by: Jorge Ruben Macias <jmaciasprotel.net.mx>
        78324 by: Gregor Welters <gregorwelters.de>
        78464 by: "SANIsoft" <tariquenagpur.dot.net.in>

problems with php4 warning reporting.
        78312 by: Richard Lynch <rlynchignitionstate.com>
        78319 by: Don Undeen <dundeegator.net>
        78419 by: Richard Lynch <rlynchignitionstate.com>

Althernatives other than cookie!!!
        78313 by: Richard Lynch <rlynchignitionstate.com>
        78314 by: Richard Lynch <rlynchignitionstate.com>
        78315 by: Richard Lynch <rlynchignitionstate.com>
        78316 by: Richard Lynch <rlynchignitionstate.com>
        78317 by: Richard Lynch <rlynchignitionstate.com>
        78328 by: Carlos Cardoso <cardosopobox.com>
        78356 by: Ron Chmara <ronopus1.com>
        78357 by: James Treworgy <jamietrewtech.com>
        78387 by: Jerry <jerryacusd.edu>
        78460 by: Aidan Skinner <aidanskinner.demon.co.uk>

Fwd: Re: ORACLE PHP3 Problem
        78318 by: "Knowledge Based" <phpnovicehotmail.com>

bcmul
        78320 by: Gregor Welters <gregorwelters.de>
        78363 by: Richard Lynch <rlynchignitionstate.com>
        78366 by: Richard Lynch <rlynchignitionstate.com>

solaris 2.6, php3.x (or php4.x), mysql - can do
        78321 by: Nathan Benson <phuzzphactor.org>

Is there a way to use DNS-less call to a databasse in php3 ?
        78322 by: Nathan Benson <phuzzphactor.org>
        78329 by: "Robert V. Zwink" <rzwinkmicrocenter.com>
        78352 by: "Claus Rasmussen" <clausc-net.dk>
        78374 by: Nathan Benson <phuzzphactor.org>
        78377 by: "Robert V. Zwink" <rzwinkmicrocenter.com>
        78435 by: "Claus Rasmussen" <clausc-net.dk>

ApacheCon2000
        78323 by: Nathan Benson <phuzzphactor.org>
        78326 by: Zeev Suraski <zeevzend.com>

Problem with fgets (and fgetss)
        78325 by: "Doug Williams" <dwilliamssoftec-e.com>
        78349 by: "Kevin Leavell" <kevinunder-cost.com>

Question from my isp guy.
        78327 by: Michael Stearne <mstearneentermix.com>

replace text in file
        78330 by: "Richard Heyes" <richard.heyesheyes-computing.net>
        78333 by: Gregor Welters <gregorwelters.de>
        78336 by: Richard Lynch <rlynchignitionstate.com>
        78344 by: Lawrence Blades <lrbladesclarksdale.com>
        78378 by: Lawrence Blades <lrbladesclarksdale.com>
        78410 by: "Mark Maggelet" <maggeletmminternet.com>
        78411 by: Caleb Shay <shayapollointeractive.com>
        78436 by: Richard Lynch <rlynchignitionstate.com>
        78455 by: Lawrence Blades <lrbladesclarksdale.com>
        78456 by: Lawrence Blades <lrbladesclarksdale.com>
        78461 by: Aidan Skinner <aidanskinner.demon.co.uk>

functions in Win32 binary
        78331 by: "Richard Heyes" <phpheyes-computing.net>

[php3] The REQUIRE function
        78332 by: "Richard Heyes" <phpheyes-computing.net>

Am I right or wrong?
        78334 by: "Chris Kovalcik" <php_listibcnetwork.net>
        78343 by: Michael Stearne <mstearneentermix.com>
        78346 by: Randy Janinda <randy.janindandcorp.com>
        78351 by: "Mark Roedel" <roedelmletu.edu>
        78354 by: Richard Lynch <rlynchignitionstate.com>
        78359 by: "Michael Geier" <mgeierhpd.acast.nova.edu>
        78373 by: Carlos Cardoso <cardosopobox.com>

Future developement of PHP4 ?
        78335 by: Andreas Jung <ajungsz-sb.de>
        78345 by: Gregor Welters <gregorwelters.de>
        78355 by: "Mark Roedel" <roedelmletu.edu>
        78400 by: Richard Lynch <rlynchignitionstate.com>
        78422 by: Zeev Suraski <zeevzend.com>
        78430 by: "Manuel Lemos" <mlemosacm.org>
        78450 by: Richard Lynch <rlynchignitionstate.com>
        78453 by: Richard Lynch <rlynchignitionstate.com>

Too many variables in one form?
        78337 by: Richard Lynch <rlynchignitionstate.com>

Why apache dies when the php3.so module is loaded
        78338 by: Richard Lynch <rlynchignitionstate.com>

system & passthru
        78339 by: Richard Lynch <rlynchignitionstate.com>

out of topic? mysql?
        78340 by: Jens Wabnitz <wabnitzalpha.fh-furtwangen.de>
        78406 by: Richard Lynch <rlynchignitionstate.com>

query variables
        78341 by: <artwellsinetarena.com>

PHP not pulling correct ID from table
        78342 by: "WL" <willlocalads.net>
        78350 by: Gregor Welters <gregorwelters.de>
        78414 by: Richard Lynch <rlynchignitionstate.com>

mysql_connect problems with ISP shared mysql server
        78347 by: joe.hansbauerac.com
        78404 by: Richard Lynch <rlynchignitionstate.com>

Photo Album
        78348 by: "Graeme B. Davis" <GraemeDUU.NET>
        78375 by: Boaz Yahav <berbernetvision.net.il>
        78407 by: Richard Lynch <rlynchignitionstate.com>
        78434 by: Sandeep Hundal <sandeephundalyahoo.com>
        78451 by: "Daevid Vincent" <DayWalkerTheMatrix.com>
        78452 by: sashamysql.com

File Upload Questions
        78353 by: "Jason Cox" <jasoncwebpipe.net>

Another source question
        78358 by: Ron Chmara <ronopus1.com>
        78361 by: Richard Lynch <rlynchignitionstate.com>
        78371 by: "Chris Kovalcik" <php_listibcnetwork.net>
        78372 by: "Chris Kovalcik" <php_listibcnetwork.net>
        78389 by: Richard Lynch <rlynchignitionstate.com>

'__eprintf' problem with PHP Build on Solaris-7?
        78360 by: Dave Alden <aldenmath.ohio-state.edu>

Automatic go back
        78362 by: Richard Lynch <rlynchignitionstate.com>

BMP images
        78364 by: Richard Lynch <rlynchignitionstate.com>

call function
        78365 by: Richard Lynch <rlynchignitionstate.com>

changing SMTP and sendmail_from parameter at run time
        78367 by: Richard Lynch <rlynchignitionstate.com>
        78433 by: "Manuel Lemos" <mlemosacm.org>

code <? errorr in html tag !
        78368 by: Richard Lynch <rlynchignitionstate.com>
        78381 by: "Richard Heyes" <phpheyes-computing.net>

Command line access
        78369 by: Richard Lynch <rlynchignitionstate.com>

crypt in windows
        78370 by: Richard Lynch <rlynchignitionstate.com>

PHP 3.0.15 released
        78376 by: Sascha Schumann <saschaschumann.cx>

Upgrading on Linux
        78379 by: Thomas Deliduka <thomasneweve.com>
        78380 by: "Ashley M. Kirchner" <ashleypcraft.com>
        78382 by: Thomas Deliduka <thomasneweve.com>
        78383 by: Paul Stavrides <paulsquad-sys.com>
        78385 by: PSE-Lmail.professional.org (Sean Straw / PSE)
        78393 by: Thomas Deliduka <thomasneweve.com>
        78396 by: Thomas Deliduka <thomasneweve.com>
        78399 by: "Ashley M. Kirchner" <ashleypcraft.com>
        78440 by: Richard Lynch <rlynchignitionstate.com>

URI '/' vs '?'?
        78384 by: Damien Mc Kenna <damienmc-kenna.com>
        78394 by: Jerry <jerryacusd.edu>
        78443 by: Richard Lynch <rlynchignitionstate.com>

fopen & ereg_replace
        78386 by: "Dread" <Dreadgmx.net>
        78444 by: Richard Lynch <rlynchignitionstate.com>

Date Arithmetic
        78388 by: Richard Lynch <rlynchignitionstate.com>
        78462 by: Chuck Hagenbuch <chagenbuwso.williams.edu>

Display documents in browser
        78390 by: Richard Lynch <rlynchignitionstate.com>

Do you know any GNU free e-shop aplication created in PHP and MySQL?
        78391 by: Richard Lynch <rlynchignitionstate.com>

Displaying just 3 rows
        78392 by: Richard Lynch <rlynchignitionstate.com>

Name of current file?
        78395 by: Bart van Bragt <bartvbIAE.nl>
        78446 by: Richard Lynch <rlynchignitionstate.com>

File upload maxsize
        78397 by: Richard Lynch <rlynchignitionstate.com>

forcing DES crypt ?
        78398 by: Richard Lynch <rlynchignitionstate.com>

BLOB / Displaying Results
        78401 by: "Brian Budnick" <dreamboyaros.net>
        78447 by: Richard Lynch <rlynchignitionstate.com>

Interactive php script debugger
        78402 by: Richard Lynch <rlynchignitionstate.com>

ldap
        78403 by: Richard Lynch <rlynchignitionstate.com>

MySQL sentence
        78405 by: Richard Lynch <rlynchignitionstate.com>

PHP CGI on NT IIS (phps?)
        78408 by: Richard Lynch <rlynchignitionstate.com>

PHP configure options?
        78409 by: Richard Lynch <rlynchignitionstate.com>

Using ezmlm and ezmlm-cgi
        78412 by: Chris Moewes-Bystrom <christophermoewes.com>
        78448 by: Richard Lynch <rlynchignitionstate.com>

WHOIS Help
        78413 by: "SheepCow" <sheepcowdarksectorcenter.com>
        78420 by: "Jason Cox" <jasoncwebpipe.net>
        78427 by: Brian Clark <brianjais.ais-gwd.com>
        78449 by: Richard Lynch <rlynchignitionstate.com>
        78459 by: "destiney" <webmasterdestiney.com>

PHP/MySQL optimization question
        78415 by: Richard Lynch <rlynchignitionstate.com>

PHP3 + Textfile
        78416 by: Richard Lynch <rlynchignitionstate.com>

File write problem (?)
        78417 by: Richard Lynch <rlynchignitionstate.com>

please, help me!
        78418 by: Richard Lynch <rlynchignitionstate.com>

News server interface to this list is down?
        78421 by: "Michael Simcich" <msimcichaccesstools.com>
        78426 by: Tin Le <tinnetimages.com>
        78428 by: "Nicolas Aragon" <centro.graficolanavech.com.ar>
        78445 by: Richard Lynch <rlynchignitionstate.com>

[Fwd: [PHP3] settype function has bug!]
        78423 by: ºÎ־ǿ <hhzqqchinaweal.com>
        78454 by: Richard Lynch <rlynchignitionstate.com>

Remote directory
        78424 by: Richard Lynch <rlynchignitionstate.com>

imap_delete problem
        78425 by: listsikrsna.com

PHP vs ASP
        78429 by: Marlin Mixon <marlin_mixonmedicalogic.com>

Cursors in Oracle
        78431 by: "Manuel Lemos" <mlemosacm.org>
        78432 by: "Manuel Lemos" <mlemosacm.org>

Sending Mail in background
        78437 by: Richard Lynch <rlynchignitionstate.com>

Stop while loop "Short Circuting"
        78438 by: Richard Lynch <rlynchignitionstate.com>

strange problem in imap_fetchstructure...
        78439 by: Richard Lynch <rlynchignitionstate.com>

Multi-server enviroment?
        78441 by: Richard Lynch <rlynchignitionstate.com>

Strtok()/ Converting from HTML entities to plain characters
        78442 by: "Roderick Gammon" <gammonhawaii.edu>

timestamps
        78457 by: KevinWaterson <hatemailoceania.net>

retrieve known record #?
        78458 by: Dave Reinhardt <DaveSeaPortNet.com>

serialize and sessions
        78463 by: dgoa <dgoaou.edu>

Administrivia:

To subscribe to the digest, e-mail:
        php3-digest-subscribelists.php.net

To unsubscribe from the digest, e-mail:
        php3-digest-unsubscribelists.php.net

To post to the list, e-mail:
        php3lists.php.net

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

attached mail follows:


hi all
are there a version of postgres for win98???
thank you
Fernando Caamaño
Soporte técnico Conecta97
Travesera de Gracia 342-344
tel: 934465028
fax: 934465029
www.conecta-t.com

attached mail follows:


>The installation guide for php under IIS is quite
>stern in stating that %s %s must be used in the
>MIME types for
>php.exe %s %s

>This works wonderfully but my question is, how
>would you specify something like
>php.exe -s so that the extension .phps is spit
>out as source? I've tried multiple combinations
>for setting up a .phps mime type with no results.

You want to have the source of the php file sent to the browser. This means
you do not want to have the PHP file parsed. Apart from not seeing the sense
and a security problem you could call the file .html (Then the HTML Code in
the Source would be interpreted by your browser). Or just create a mime
extension in IIS (not the same as php.exe %s %s). In IIS management console
you specify MIME types under HTTP Headers tab. There add a new MIME typ with
your extension and use "text/plain" as Content-Type.

Florian Clever

****************************************************************************
Clever Software Solutions
Phone: ++49 (0)761 7070268 / Fax: ++49 (0)761 23565
Email: cleveraracnet.com / Internet: http://www.aracnet.com/~clever
Zasiusstr. 45 / D-79102 Freiburg / Germany
****************************************************************************

attached mail follows:


I don't think that's possible, at least I hope it's not. Maybe with a link that says "Put this page in your bookmarks", then prompting the user if he really want it ... but automatically, is not polite ... maybe Javascript 1.2 or 1.3 on Netscape does it ... I once saw a site with such a link but I didn't click it ...

-----Mensaje original-----
De: Steve Edberg [SMTP:sbedbergucdavis.edu]
Enviado el: Friday, February 25, 2000 12:57 AM
Para: SANIsoft; php3lists.php.net
Asunto: Re: [PHP3] Trick for adding site to browser Bookmark

At 8:32 AM +0000 2/25/00, SANIsoft wrote:
>Hello
>
>What is the trick to put you web page in the book marks of the visitor as
>soon as he visits your site
>
>I strongly suspect it has to be a javascript (flaw?)
>
>Regards
>Tarique
>=======================================
>Creating not just Web Sites but Web Applications
> http://www.sanisoft-india.com
>
>Search Engine for Nagpur http://nagpurcity.net
>=======================================
>

Why do you want to do this? I sure wouldn't re-visit a site that did that.

- steve

PS Yes, it probably is a JS flaw.

+---------------- Splurk! Glort! Klikrunk! Ploip! Katoong!---------------+
| Steve Edberg University of California, Davis |
| sbedbergucdavis.edu (530)754-9127 |
| Computer Consultant http://aesric.ucdavis.edu/ |
+------------------ Don Martin 18 May 1931 - 7 Jan 2000 -----------------+

attached mail follows:


At 13:18 25.02.2000 , Jorge Ruben Macias wrote:
>I don't think that's possible, at least I hope it's not. Maybe with a
>link that says "Put this page in your bookmarks", then prompting the user
>if he really want it ... but automatically, is not polite ... maybe
>Javascript 1.2 or 1.3 on Netscape does it ... I once saw a site with such
>a link but I didn't click it ...

unfortunately, it is possible for microsuck-internet-explorer using
vbscript (javascript which uses activeX !!)
and fortunately impossible on netscape, because there's no possible access
to this unsafe activeX.

mit freundlichen Grüßen,

        Gregor Welters

-----------------------------
Welters PC-Service,
Grafenberger Allee 81, 40237 Düsseldorf, Deutschland

Tel: 0211/9660096 Mobil: 0173/2776469 Fax: 0211/9660093
mailto: gwelterswelters.de
look at: http://www.welters.de

attached mail follows:


Thanks for the strong reactions - I can show them to my client :-)

Tarique
=======================================
Creating not just Web Sites but Web Applications
            http://www.sanisoft-india.com

Search Engine for Nagpur http://nagpurcity.net
=======================================

-----Original Message-----
From: Steve Edberg <sbedbergucdavis.edu>
To: SANIsoft <tariquenagpur.dot.net.in>; php3lists.php.net
<php3lists.php.net>
Date: Friday, February 25, 2000 7:01 AM
Subject: Re: [PHP3] Trick for adding site to browser Bookmark

>At 8:32 AM +0000 2/25/00, SANIsoft wrote:
>

attached mail follows:


At 10:16 AM 2/24/00 -0500, you wrote:

>Php3 doesn't require this, so when I try to run a php3 script (like the php
>frontend to udmsearch), I get "Warnings" out the wazoo. I've even tried
>hard-coding the error level into the script, with
>error_reporting(0);
>And the errors don't ALWAYS appear. Hit reload a handful of times, and
they'll
>appear and dissappear, and reappear.
>Does anybody know why this happens?

No. If I were you I would next try:

1. File a bug report, ideally with a link to the simplest script you can
write that somebody can reload a whole, whole lot and get this behavior.

2. Set the error_reporting in your php.ini file, in the vague hopes that
that will somehow be "stronger" than setting it dynamically in the script.

Disclaimer: I'm not sure the PHP bug filer is accepting 4.0 bug reports
yet, so you might have to jump a hurdle or two to file...

-- 
"TANSTAAFL"
We're looking for PHP/ASP hacker: http://ignitionstate.com/jobs/index.html
Need Work? Printer Driver: http://L-I-E.com/jobs.htm#PrinterDriver
I will be offline from March 8th through April 2nd.
http://CHaTMusic.com                       http://EmphasisEntertainment.com
http://L-I-E.com                           http://JadeMaze.com
http://CatCatalani.com                     http://MGMH.com
http://VoodooKings.net                     http://UncommonGround.com

attached mail follows:


Richard Lynch wrote: > > At 10:16 AM 2/24/00 -0500, you wrote: > > >Php3 doesn't require this, so when I try to run a php3 script (like the php > >frontend to udmsearch), I get "Warnings" out the wazoo. I've even tried > >hard-coding the error level into the script, with > >error_reporting(0); > >And the errors don't ALWAYS appear. Hit reload a handful of times, and > they'll > >appear and dissappear, and reappear. > >Does anybody know why this happens? > > No. If I were you I would next try: > > 1. File a bug report, ideally with a link to the simplest script you can > write that somebody can reload a whole, whole lot and get this behavior. I'll try that. I've never filed a bug report before. Exciting.

> > 2. Set the error_reporting in your php.ini file, in the vague hopes that > that will somehow be "stronger" than setting it dynamically in the script. Actually, the php.ini file didn't change a darn thing(it's already set to 1, yet I still get warnings). Setting it in the script worked better. Actually, I think Beta4 is doing a better job. With beta 3, the warnings just appeared LESS after setting it in the script. Since updating to beta 4, we haven't seen those warnings. Thoughlike Freddy Kreuger, they may just pop up again when you least expect it. ;)

> > Disclaimer: I'm not sure the PHP bug filer is accepting 4.0 bug reports > yet, so you might have to jump a hurdle or two to file... > > -- > "TANSTAAFL" > We're looking for PHP/ASP hacker: http://ignitionstate.com/jobs/index.html

> Need Work? Printer Driver: http://L-I-E.com/jobs.htm#PrinterDriver > I will be offline from March 8th through April 2nd. > http://CHaTMusic.com http://EmphasisEntertainment.com > http://L-I-E.com http://JadeMaze.com > http://CatCatalani.com http://MGMH.com > http://VoodooKings.net http://UncommonGround.com

attached mail follows:


At 01:42 PM 2/25/00 -0500, you wrote: >> 2. Set the error_reporting in your php.ini file, in the vague hopes that >> that will somehow be "stronger" than setting it dynamically in the script. >Actually, the php.ini file didn't change a darn thing(it's already set >to 1, yet I still get warnings). Setting it in the script worked better.

Look at phpinfo() and see where PHP thinks the php3.ini file should be...

-- 
"TANSTAAFL"
We're looking for PHP/ASP hacker: http://ignitionstate.com/jobs/index.html
Need Work? Printer Driver: http://L-I-E.com/jobs.htm#PrinterDriver
I will be offline from March 8th through April 2nd.
http://CHaTMusic.com                       http://EmphasisEntertainment.com
http://L-I-E.com                           http://JadeMaze.com
http://CatCatalani.com                     http://MGMH.com
http://VoodooKings.net                     http://UncommonGround.com

attached mail follows:


At 12:00 PM 2/24/00 -0500, you wrote: >And cookies don't come with their own problems - we had a user who had his >time zone set incorrectly on his PC so the cookie was automatically expired >as soon as he got it. How many of these must there be out there? This site

That's why you set an expiration for a couple years, and embed the SERVER'S idea of when it should expire in the cookie itself, or in your tables.

And in case you missed it: IPs are completely unreliable for tracking. AOL et al shuffle them like crazy, and proxies have thousands of users sharing one (1) IP.

-- 
"TANSTAAFL"
We're looking for PHP/ASP hacker: http://ignitionstate.com/jobs/index.html
Need Work? Printer Driver: http://L-I-E.com/jobs.htm#PrinterDriver
I will be offline from March 8th through April 2nd.
http://CHaTMusic.com                       http://EmphasisEntertainment.com
http://L-I-E.com                           http://JadeMaze.com
http://CatCatalani.com                     http://MGMH.com
http://VoodooKings.net                     http://UncommonGround.com

attached mail follows:


At 11:05 AM 2/24/00 -0500, you wrote: >It should also be added that tracking the session ID in the URL makes >bookmarking impossible.

You can make URLs bookmarkable by not expiring sessions, or handle the situation of an expired bookmark by forcing a login and then redirecting to the page they had asked for originally.

>Also, what happens if someone wants to share a page they're looking at with >a friend. To pass that URL to the friend, it includes the session ID, so >suddenly the friend has everything in a shopping cart the friend already put >in there, a bigger privacy issue to me than cookies present.

Well... I don't really care who sees what's in my shopping cart. Just don't let 'em peek in my wallet for the credit card number.

-- 
"TANSTAAFL"
We're looking for PHP/ASP hacker: http://ignitionstate.com/jobs/index.html
Need Work? Printer Driver: http://L-I-E.com/jobs.htm#PrinterDriver
I will be offline from March 8th through April 2nd.
http://CHaTMusic.com                       http://EmphasisEntertainment.com
http://L-I-E.com                           http://JadeMaze.com
http://CatCatalani.com                     http://MGMH.com
http://VoodooKings.net                     http://UncommonGround.com

attached mail follows:


At 01:34 PM 2/24/00 -0700, you wrote:

>Combine HTTP_AUTH_USER and ssl with db-driven form vars. It provides the same

Correct me if I'm wrong, but SSL is considerably slower than straight HTTP...

This would be infeasible for a high-traffic site, no?

-- 
"TANSTAAFL"
We're looking for PHP/ASP hacker: http://ignitionstate.com/jobs/index.html
Need Work? Printer Driver: http://L-I-E.com/jobs.htm#PrinterDriver
I will be offline from March 8th through April 2nd.
http://CHaTMusic.com                       http://EmphasisEntertainment.com
http://L-I-E.com                           http://JadeMaze.com
http://CatCatalani.com                     http://MGMH.com
http://VoodooKings.net                     http://UncommonGround.com

attached mail follows:


At 09:43 AM 2/24/00 -0800, you wrote: >The thing about this whole privacy argument that I don't understand is that >when you store the session id in the URL or in POST arguments, you can do >just as much user tracking as you can with a cookie. At least with a cookie >as user can turn it off if they don't want to be tracked (some application >functionality may not be available to them). > >On my web site (www.tias.com) we uses cookies throughout the site. If you >turn them off, the shopping carts (and some other applications) stop >working. The static pages continue to work. I've been asked by some people >to making shopping carts work without cookie, but it seems to be that if a >user doesn't want their session tracked, then I should honor their request, >rather than find a way to track their session against their wishes.

The mass-market entertainment media known in the vernacular as "News" is responsible for virtually all of the users who turned off their cookies: Irresponsible and wildly inaccurate "reports" of what cookies can and can't do are the culprit.

99.9999% of the people who refuse to use cookies would turn them on in a heartbeat if they actually understood what was going on. The remainder are paranoid enough to see your tracking info in the URL/POST and not use your site.

If you really think they might be concerned, work it into your "privacy statement" page that everybody seems to be so enamoured of lately.

The real question is not what sort of information you track, but what you do with it. If you track who stays how long on which pages to decide what pages to keep/redesign/etc, who's going to get upset about that? If you use it to somehow sell them down the river to a telemarketer or other inherently evil entity...

-- 
"TANSTAAFL"
We're looking for PHP/ASP hacker: http://ignitionstate.com/jobs/index.html
Need Work? Printer Driver: http://L-I-E.com/jobs.htm#PrinterDriver
I will be offline from March 8th through April 2nd.
http://CHaTMusic.com                       http://EmphasisEntertainment.com
http://L-I-E.com                           http://JadeMaze.com
http://CatCatalani.com                     http://MGMH.com
http://VoodooKings.net                     http://UncommonGround.com

attached mail follows:


At 05:53 PM 2/24/00 +0100, you wrote:

>This problem also rises when you need to set up MySQL >privileges: when the admin uses a dial-up connection, >you grant privileges to him over a whole address pool... >Which is not specially comforting.

You could probably somehow give them an authenticated page to garner their IP, and then update the MySQL tables via PHP to allow them access...

Not, perhaps, a whole lot better than just allowing all the IPs access, but it seems a little more secure to this neophyte...

-- 
"TANSTAAFL"
We're looking for PHP/ASP hacker: http://ignitionstate.com/jobs/index.html
Need Work? Printer Driver: http://L-I-E.com/jobs.htm#PrinterDriver
I will be offline from March 8th through April 2nd.
http://CHaTMusic.com                       http://EmphasisEntertainment.com
http://L-I-E.com                           http://JadeMaze.com
http://CatCatalani.com                     http://MGMH.com
http://VoodooKings.net                     http://UncommonGround.com

attached mail follows:


> > 99.9999% of the people who refuse to use cookies would turn them on in a > heartbeat if they actually understood what was going on. The remainder are > paranoid enough to see your tracking info in the URL/POST and not use your > site.

Correct. When a friend say he does not use cookies because it's a invasion of privacy, I show him an http log from a webserver. "all this info about you, and not a single cookie". After that, I explain what cookies really are, and in 99% of the times, they switch cookies on.

> If you really think they might be concerned, work it into your "privacy > statement" page that everybody seems to be so enamoured of lately. > > The real question is not what sort of information you track, but what you > do with it. If you track who stays how long on which pages to decide what > pages to keep/redesign/etc, who's going to get upset about that? If you > use it to somehow sell them down the river to a telemarketer or other > inherently evil entity...

It IS possible to make a shopping cart without cookies, one may use hidden form variables, to simulate a session. But wanna know? I don't bother. Too much trouble.

It's easier to educate the visitor.

[]'s Carlos Cardoso - cardosopobox.com NAS LIVRARIAS: Redes - Curso Basico e Rapido Breve: FLASH4 - Para Principiantes ================================== www.carloscardoso.com Tech Writer, BOFH & Trekker Linux Reg user # 92301

attached mail follows:


Richard Lynch wrote: > At 01:34 PM 2/24/00 -0700, you wrote: > >Combine HTTP_AUTH_USER and ssl with db-driven form vars. It provides the same > Correct me if I'm wrong, but SSL is considerably slower than straight HTTP... > This would be infeasible for a high-traffic site, no?

Yes and no. SSL is always slower, and, depending on the OS/hardware, can be a performance loss of 80%, or 99.92%. That, of course, is in the thousands of requests per minute range, in which case, chances are that you can afford to use several machines for your web-serving, running against a central back-end db....it's significant on paper, and in labs, but in most cases, is *irrelevant* to actual applications.

Let me plot out the math on it, as I hear this often from folks who havn't actually crunched out the numbers to ascertain the relevance:

According to: http://www.zdnet.com/pcmag/stories/reviews/0,6755,402311-2,00.html even the slowest of machines hovers at about 350 SSL requests per second. Assuming a page requires, oh, 10 requests, that's 35 pages returned per second, or 2,100 page views every minute. Or 3 million page views per day. If you have three million page views a day, you might want to use two servers for this load, instead of one. :-)

How many php-driven sites are doing 3 million page requests per _day_?

Are _any_ sites doing three million page requests per day? Okay, let's shift the numbers for more complex pages, say, 100 requests per page. Now, the SSL barrier drops to a dramatic...300,000 pages per day. Again, how many folks on the PHP list are serving 300,000 pages per day?

Okay, lets make those pages much, much, much, more complex. Let's say that each page requires the equivalent of 10,000 connections, for complex images and text. That's down to 3,000 page views per day, on a single server. Now, it's down to a "heavily used, high traffic, site load".... but the sites that get 3,000 new page requests are stilll few and far between, since most of the requests will be satisfied from local cache. Again, the relevance is questionable.

So may PCLabs numbers are wrong? Well, Microsoft slams linux on their anti-linux propoganda page: http://www.microsoft.com/ntserver/nts/exec/compares/ntlinux.asp and ssl on linux comes in at a meager 250 requests...per second.

Aw, shucks. Ya mean, if I have a million page views a day, I might have to buy another server, or turn ssl off? Boy, that would suck. :-)

An astute reader will notice that there's _another_ measure on these pages, a measure of overall _bandwidth_. At 100 active clients, the single server can saturate a 100Mb ethernet card... Thats more than a T-1. That's a T-3. If you can afford a dedicated T-3, to your lowly *single SSL linux server*, I think you can probably afford to buy another web server.... or 20.

It's not about the connection, it's about the *bandwidth* of your pages, and the overhead of shoving that out.

-Bop

attached mail follows:


At 12:20 PM 2/25/00 -0600, Richard Lynch wrote: >At 12:00 PM 2/24/00 -0500, you wrote: > >And cookies don't come with their own problems - we had a user who had his > >time zone set incorrectly on his PC so the cookie was automatically expired > >as soon as he got it. How many of these must there be out there? This site > >That's why you set an expiration for a couple years, and embed the SERVER'S >idea of when it should expire in the cookie itself, or in your tables.

I do manage sessions on the server anyway, but for some reason stupid ASP seems unwilling to make a cookie not expire or expire in the distant future. In testing on this PC with the screwed up time zone it deleted my cookie every time. Haven't found any specifics on others having this problem so I feel I must be missing something obvious.

>And in case you missed it: IPs are completely unreliable for tracking. >AOL et al shuffle them like crazy, and proxies have thousands of users >sharing one (1) IP.

Right. Thanks,

Jamie

attached mail follows:


At 12:31 PM -0600 on 2/25/00, you wrote: >The mass-market entertainment media known in the vernacular as "News" is >responsible for virtually all of the users who turned off their cookies: >Irresponsible and wildly inaccurate "reports" of what cookies can and can't >do are the culprit.

I think it is also important to provide *good* information to the user that addresses their privacy concerns. Users have absolutely valid reasons for turning off cookies, but if they only get their technical expertise from the mainstream news, they probably don't understand the "middle option" which turns cookies off for site tracking, and leaves it on for well-written shopping carts.

If your "Why we use cookies" FAQ tells users that they're idiots for turning cookies off, they would be well-recommended to avoid your site completely; but if it explains the differences between "Refusing all cookies" and "refusing cookies that aren't sent back to the originating server", and why the latter disables cross-site tracking, it shows that you at least understand their privacy concerns.

You can also explain that they can turn cookies on temporarily and watch where each one goes.

(Explorer provides even better options for the privacy-aware; and the "middle option" does depend on webmasters not trying to sneak into it through frames.)

Jerry jerryacusd.edu http://www.acusd.edu/~jerry/ "It's too bad we don't have a can to listen to to get back to San Diego," said Voniece. "What do we make in San Diego, anyway?" "Tourists, I think," said Arthur. He brightened. "Do they sell tourists in cans?" "I think they do," said Voniece, "but they're awfully expensive." --The Shopping Cart Graveyard

attached mail follows:


Richard Lynch writes:

> At 01:34 PM 2/24/00 -0700, you wrote: > > >Combine HTTP_AUTH_USER and ssl with db-driven form vars. It provides the same > > Correct me if I'm wrong, but SSL is considerably slower than straight HTTP...

SSL is slower, because it encrypts the session.

It's doing more work, so it's slower.

There's not much you can do about it, if you want security.

It takes more processor time (which is cheap), but not significantly more bandwith (which is expensive).

I wouldn't imagine that SSL is slower *enough* to be a major concern though, and I would tend to say that the benefit in extra security is worth it.

OTOH that's a decision that should be made on a per-site basis, and should be weighed properly in a cost/benefit ratio.

- Aidan

-- 
http://www.skinner.demon.co.uk/aidan/
Currently looking for work: CV available on request.

attached mail follows:


> > > Hi all, > > I have a couple of questions to be asked. > > > > My SPECS : WINDOWS NT & PWS > > > > FIRST QUESTION: > > I have Oracle client running from my machine, how do I install > > tnsnames.ora to the web server ? > > > > SECOND QUESTION : > > I have made php3_oci73.dll and php3_oci80.dll to automatically >load > > through the php3.ini file. But still my Php program is unable to >recognize > > the ORA_* commands ? > > > > Thanks > > ______________________________________________________ > > Get Your Private, Free Email at http://www.hotmail.com

______________________________________________________ Get Your Private, Free Email at http://www.hotmail.com

attached mail follows:


At 18:41 25.02.2000 , Boget, Chris wrote: > > >Interesting. So if I get you right, bcmul() is seeing > > >($num = 5000000000;) > > I tested following: > > $x=5000000000000000; > > echo $x; > > result: 5E+15 > >Yes, I got the same results on a similar test. > > > and bcmul expects probably "5000000000000000" > >Why it does is beyond me. Well, not really, considering that the >largest number that php can store (in a non-scientific value) is >2.14billion. It just seems counter to what the bcmath functions >are supposed to be used for in the first place...

can you specify 2.14 billion? do you mean the british billion or the us-billion? give me a number ;-) not a string.

mysql-manual tells about storage-requirements:

int 4 bytes = signed range -2147483648 to 2147483647. bigint 8 bytes = I have no calculator with 16 hex-digits :-(( float 8 bytes , precision variable, depends on column-description, range unknown

I would assume, that bigint and float exceed the php-ranges, although I can't find info about the specific ranges. We should ask this separately.

the arbitrary precision functions are for numbers, that exceed the ranges of types (as you know). their approach to do this is to calculate with strings instead of numbers. I think they expect programmers to use strings in every occurence of this values, so that php-type-juggling does not happen.

> > php converts it to an integer-exponential (just tested) I testet: $x=5000000000000000.4567; echo $x;

result: 5E+15, which equals to 5000000000000000

> > maybe that's the reason, why banks use two fields for money-values > > (one for the integer part, one for the rest) in their online-forms. > >I've never come across this. How do you mean?

My bank uses 2 fields for the money-amount in money-transfer-forms. one for the euro, one for the cents.

> > >$query = "SELECT rec FROM table" > > >$result = mysql( $dbname, $query ); > > >...error checking... > > >$verylargevalue = mysql( $result, 0, "verylargevaluefield" ); > > >$newnum = bcmul( $verylargevalue, 10, 10 ); > > >By that time, $verylargevalue is being 'converted' to a scientific > > >notation and as such would be useless to me (and to bcmul()). > > maybe type-casting helps.... > >It does not. Tried that as well. Consider the following variation on >the above code:

probably it's necessary to store the numbers as strings in mysql (varchar , decimal, etc.), then you'll get the right format without having to fear the php-type-juggling and you never ever have to think about type-limits again.

>I think the bcmath functions *definitely* need to be looked at. Or >something...

I agree, and there must also be a proper converting of big floating-point-numbers without changing it to integer!

mit freundlichen Grüßen,

Gregor Welters

----------------------------- Welters PC-Service, Grafenberger Allee 81, 40237 Düsseldorf, Deutschland

Tel: 0211/9660096 Mobil: 0173/2776469 Fax: 0211/9660093 mailto: gwelterswelters.de look at: http://www.welters.de

attached mail follows:


At 09:59 AM 2/25/00 -0600, you wrote: >> > $num1 = 5000000000; >> > $num2 = 10; >> > echo bcmul( $num1, $num2, 10 ); >> >the second echo statement is echoing out a '0' value. >> >Why? >> >I've used bcmul() in the past and it's worked for me before, >> Because $num1 is too big to be an int, I think. Try: >> $num1 = "5000000000"; > >But I thought that the bcmath functions were supposed to work >with numbers that would be larger than what could be held by >an (int) type? If that is the case, then the above is certainly bigger >than an (int) and so bcmul() shouldn't have any problems with >it. But it does...?

The BCMath functions work with *STRINGS* whose contents just happen to *LOOK* like numbers.

If you try and stuff an overly-large BCMath result into an (int) you are going to be screwed.

The whole point of BCMath is to take *STRINGS* that happen to look like numbers, and manipulate them as if they were numbers, but being limited only by the size a string can reach (and any scale you, the programmer, elect to provide to the functions as arguments or the default you specified in php3.ini).

Here's what you were doing:

You PHP -------------------------- --------------------- $num1 = 5000000000000000; $num1 = 5.0E15; $num2 = 3; $num2 = 3; $res = bcmul($num1, $num2); bcmul(5.0E15, 3); bcmul('5.0E15', '3');

It is at this point that I would have to actually read the bcmul docs for you, and am guessing that they would say that BCMul expects a string that looks like an integer, not one that looks like scientific notation. Almost for sure, as soon as BCMul sees that decimal point, it decides that this isn't the right format for a string that looks like an integer, and decides to make it 0. bcmul('0', '3'); '0'

Again: BCMath functions take *STRINGS* as arguments. That's their whole point -- to not be faced with the limits of integer representation inherent in the underlying structure of computer mathematics stored as binary (int).

-- 
"TANSTAAFL"
We're looking for PHP/ASP hacker: http://ignitionstate.com/jobs/index.html
Need Work? Printer Driver: http://L-I-E.com/jobs.htm#PrinterDriver
I will be offline from March 8th through April 2nd.
http://CHaTMusic.com                       http://EmphasisEntertainment.com
http://L-I-E.com                           http://JadeMaze.com
http://CatCatalani.com                     http://MGMH.com
http://VoodooKings.net                     http://UncommonGround.com

attached mail follows:


At 07:57 PM 2/25/00 +0100, you wrote:

>can you specify 2.14 billion? do you mean the british billion or the >us-billion? give me a number ;-) not a string. > >mysql-manual tells about storage-requirements: > >int 4 bytes = signed range -2147483648 to 2147483647.

Same thing. PHP uses 4 bytes for an integer. This is in the manual, by the way.

>bigint 8 bytes = I have no calculator with 16 hex-digits :-(( >float 8 bytes , precision variable, depends on column-description, range >unknown > >I would assume, that bigint and float exceed the php-ranges, although I >can't find info about the specific ranges. We should ask this separately.

Absolutely. However, I'd be willing to bet you are going to get a *STRING* back from the MySQL functions, and you could pass the bigint strings to BCMath functions.

I do not know if there are any BCMath functions for float, since I've only played with BCMath for a few minutes, but if there are, you can probably pass your "strings that happen to look like 8-byte floats" that come out of MySQL to those as well.

You can also probably just use the 8-byte floats in PHP, and they'll just be rounded off... Unless the MySQL float has a higher range for the exponent as well as the mantissa... You'd have to read the two sets of docs and compare their range for exponents.

>the arbitrary precision functions are for numbers, that exceed the ranges >of types (as you know). >their approach to do this is to calculate with strings instead of numbers. >I think they expect programmers to use strings in every occurence of this >values, so that php-type-juggling does not happen.

YES!

>> > >$query = "SELECT rec FROM table" >> > >$result = mysql( $dbname, $query ); >> > >...error checking... >> > >$verylargevalue = mysql( $result, 0, "verylargevaluefield" ); >> > >$newnum = bcmul( $verylargevalue, 10, 10 ); >> > >By that time, $verylargevalue is being 'converted' to a scientific >> > >notation and as such would be useless to me (and to bcmul()). >> > maybe type-casting helps....

I expect not. Unless I am grossly mistaken, your MySQL functions return a string, which you can pass to BCMath functions.

Whoops. I dunno about very large scientific notation and whether BCMath does those or not.

>I agree, and there must also be a proper converting of big >floating-point-numbers without changing it to integer!

It would be Really Nifty (tm) if PHP had a "bignum" type which auto-contagioned into using the BCMath package.

But then it would start to look too much like Lisp :-)

Synopsis: You have to start thinking in terms of "strings that just happen to look like numbers" to use BCMath.

-- 
"TANSTAAFL"
We're looking for PHP/ASP hacker: http://ignitionstate.com/jobs/index.html
Need Work? Printer Driver: http://L-I-E.com/jobs.htm#PrinterDriver
I will be offline from March 8th through April 2nd.
http://CHaTMusic.com                       http://EmphasisEntertainment.com
http://L-I-E.com                           http://JadeMaze.com
http://CatCatalani.com                     http://MGMH.com
http://VoodooKings.net                     http://UncommonGround.com

attached mail follows:


[tdp-ws--02:~]-% uname -a SunOS tdp-ws--02 5.6 Generic_105181-05 sun4m sparc SUNW,SPARCstation-20

[tdp-ws--02:~]-% gcc --version 2.95

[tdp-ws--02:~]-% make --version | head -1 GNU Make version 3.76.1, by Richard Stallman and Roland McGrath.

[tdp-ws--02:~]-% php -v 3.0.14

------

i encountered this problem once, and I _think_ i just removed the apache source directory, unpacked it again, ran "make install" in the php directory, and tried again. if nothing else, just try it all again. it will compile.

i haven't tried php4b4 but i have tried php4b3, and it to compiled. hope this helps.

on Thu, 24 Feb 2000, Kenwrick Chan is accused of writing:

> Folks, > I haven't gotten a reply to my previous posts. Can PHP 4.0 Beta 4 or > 3.0.14 be installed on the following? If so are there any special > tricks? > > SunOS 5.6 Generic_105181-16 sun4u sparc SUNW,Ultra-1 > gcc version 2.95.2 19991024 (release) > GNU Make version 3.78.1 > mysql Ver 9.36 Distrib 3.22.27 > > I get the following errors during compile: > util.c: In function `ap_find_token': > util.c:1330: `test_char_table' undeclared (first use this function) > util.c:1330: (Each undeclared identifier is reported only once > util.c:1330: for each function it appears in.) > util.c:1330: `T_HTTP_TOKEN_STOP' undeclared (first use this function) > util.c: In function `ap_escape_shell_cmd': > util.c:1389: `test_char_table' undeclared (first use this function) > util.c:1389: `T_ESCAPE_SHELL_CMD' undeclared (first use this function) > util.c: In function `ap_escape_path_segment': > util.c:1516: `test_char_table' undeclared (first use this function) > util.c:1516: `T_ESCAPE_PATH_SEGMENT' undeclared (first use this > function) > util.c: In function `ap_os_escape_path': > util.c:1545: `test_char_table' undeclared (first use this function) > util.c:1545: `T_OS_ESCAPE_PATH' undeclared (first use this function) > make[3]: *** [util.o] Error 1 > make[2]: *** [subdirs] Error 1 > make[2]: Leaving directory > `/export/home1/local/pkg/apache/apache_1.3.11/src' > make[1]: *** [build-std] Error 2 > make[1]: Leaving directory > `/export/home1/local/pkg/apache/apache_1.3.11' > make: *** [build] Error 2 > > > > > -- > PHP 3 Mailing List <http://www.php.net/> > To unsubscribe, send an empty message to php3-unsubscribelists.php.net > To subscribe to the digest, e-mail: php3-digest-subscribelists.php.net > To search the mailing list archive, go to: http://www.php.net/mailsearch.php3 > To contact the list administrators, e-mail: php-list-adminlists.php.net

-- 
Nathan Benson
-------------
http://www.phactor.org/

Me spell chucker work grate. Need grandma chicken.

attached mail follows:


maybe i don't exactly know what you are talking about, but if you want to avoid dns lookups try specifiying the IP, as opposed to a hostname? that's what I do. hope this helps.

on Fri, 25 Feb 2000, Claus Rasmussen is accused of writing:

> Hi > > > Is there a way to use DNS-less call to a databasse using only php3 ?. I know asp language can do > > > > > > > Sincerly > > Claus Rasmussen > > > > Mail adresses > Email private : clausc-net.dk > > Email work : clausimc.dk > > > > URLs > private : www.c-net.dk > > work : www.imc.dk > > > > > > PHP 3 Mailing List <http://www.php.net/> > To unsubscribe, send an empty message to php3-unsubscribelists.php.net > To subscribe to the digest, e-mail: php3-digest-subscribelists.php.net > To search the mailing list archive, go to: http://www.php.net/mailsearch.php3 > > > > > > PHP 4.0 Beta Mailing List <http://www.php.net/version4/> > To unsubscribe, e-mail: php4beta-unsubscribelists.php.net > For additional commands, e-mail: php4beta-helplists.php.net > To contact the list administrators, e-mail: php4beta-adminlists.php.net >

-- 
Nathan Benson
-------------
http://www.phactor.org/

Me spell chucker work grate. Need grandma chicken.

attached mail follows:


I think Claus means DSN-less connection. not DNS. It is a way of connecting to a database without setting up a DSN. I don't know the answer, but thought I could help by clarifying the question.

> -----Original Message----- > From: Nathan Benson [mailto:phuzzphactor.org] > Sent: Friday, February 25, 2000 2:00 PM > To: Claus Rasmussen > Cc: php3lists.php.net > Subject: Re: [PHP3] Is there a way to use DNS-less call to a databasse > in php3 ? > > > maybe i don't exactly know what you are talking about, but if you > want to avoid dns lookups > try specifiying the IP, as opposed to a hostname? that's what I > do. hope this helps. > > on Fri, 25 Feb 2000, Claus Rasmussen is accused of writing: > > > Hi > > > > > > Is there a way to use DNS-less call to a databasse using only > php3 ?. I know asp language can do > > > > > > > > > > > > > > Sincerly > > > > Claus Rasmussen > > > > > > > > Mail adresses > > Email private : clausc-net.dk > > > > Email work : clausimc.dk > > > > > > > > URLs > > private : www.c-net.dk > > > > work : www.imc.dk > > > > > > > > > > > > PHP 3 Mailing List <http://www.php.net/> > > To unsubscribe, send an empty message to php3-unsubscribelists.php.net > > To subscribe to the digest, e-mail: php3-digest-subscribelists.php.net > > To search the mailing list archive, go to: http://www.php.net/mailsearch.php3 > > > > > > PHP 4.0 Beta Mailing List <http://www.php.net/version4/> > To unsubscribe, e-mail: php4beta-unsubscribelists.php.net > For additional commands, e-mail: php4beta-helplists.php.net > To contact the list administrators, e-mail: php4beta-adminlists.php.net >

--
Nathan Benson
-------------
http://www.phactor.org/

Me spell chucker work grate. Need grandma chicken.

-- PHP 3 Mailing List <http://www.php.net/> To unsubscribe, send an empty message to php3-unsubscribelists.php.net To subscribe to the digest, e-mail: php3-digest-subscribelists.php.net To search the mailing list archive, go to: http://www.php.net/mailsearch.php3 To contact the list administrators, e-mail: php-list-adminlists.php.net

attached mail follows:


Hi and thanks for your answer

I have written this script in asp and it shuth work as DSN-less call to an: database (access 97) But I need the same script but written in php because I could not use asp. Do You think you can figure it out

Hops you understand my bad english **sorry*

------------------------------------------------------------------------------------------------------- DB_name = database Tbl_name = contact fiel_I_call = name ------------------------------------------------------------------------------------------------------- <% strConnect = "Driver={Microsoft Access Driver (*.mdb)}; DBQ=d:\inetpub\wwwroot\dit_domæne.dk\db\din_database.mdb" %>

This file is required to be include in the file below -------------------------------------------------------------------------------------------------------

<html>

<!-- #include file="database.inc" --> // Here is the included file ;-)

<head></head>

<body> <% Dim objConn Dim objRec Set objConn = Server.CreateObject ("ADODB.Connection") Set objRec = Server.CreateObject ("ADODB.Recordset") objConn.Open "DSN=Contact" objRec.Open "Contact", objConn, 0, 1, 2 While Not objRec.EOF Response.Write objRec("Name") & "<br>" objRec.MoveNext Wend objRec.Close objConn.Close Set objRec = Nothing Set objConn = Nothing %> </body> </html> Med venlig hilsen/Best Regard Claus Rasmussen

mail: Private: clausc-net.dk Work: clausimc.dk

Url: Private: www.c-net.dk Work: www.imc.dk

----- Original Message ----- From: "Robert V. Zwink" <rzwinkmicrocenter.com> To: "Nathan Benson" <phuzzphactor.org>; "Claus Rasmussen" <clausimc.dk> Cc: <php3lists.php.net> Sent: Friday, February 25, 2000 8:12 PM Subject: RE: [PHP3] Is there a way to use DNS-less call to a databasse in php3 ?

> I think Claus means DSN-less connection. not DNS. It is a way of > connecting to a database without setting up a DSN. I don't know the answer, > but thought I could help by clarifying the question. > > > -----Original Message----- > > From: Nathan Benson [mailto:phuzzphactor.org] > > Sent: Friday, February 25, 2000 2:00 PM > > To: Claus Rasmussen > > Cc: php3lists.php.net > > Subject: Re: [PHP3] Is there a way to use DNS-less call to a databasse > > in php3 ? > > > > > > maybe i don't exactly know what you are talking about, but if you > > want to avoid dns lookups > > try specifiying the IP, as opposed to a hostname? that's what I > > do. hope this helps. > > > > on Fri, 25 Feb 2000, Claus Rasmussen is accused of writing: > > > > > Hi > > > > > > > > > Is there a way to use DNS-less call to a databasse using only > > php3 ?. I know asp language can do > > > > > > > > > > > > > > > > > > > > > Sincerly > > > > > > Claus Rasmussen > > > > > > > > > > > > Mail adresses > > > Email private : clausc-net.dk > > > > > > Email work : clausimc.dk > > > > > > > > > > > > URLs > > > private : www.c-net.dk > > > > > > work : www.imc.dk > > > > > > > > > > > > > > > > > > PHP 3 Mailing List <http://www.php.net/> > > > To unsubscribe, send an empty message to php3-unsubscribelists.php.net > > > To subscribe to the digest, e-mail: php3-digest-subscribelists.php.net > > > To search the mailing list archive, go to: > http://www.php.net/mailsearch.php3 > > > > > > > > > > > > PHP 4.0 Beta Mailing List <http://www.php.net/version4/> > > To unsubscribe, e-mail: php4beta-unsubscribelists.php.net > > For additional commands, e-mail: php4beta-helplists.php.net > > To contact the list administrators, e-mail: php4beta-adminlists.php.net > > > > -- > Nathan Benson > ------------- > http://www.phactor.org/ > > Me spell chucker work grate. Need grandma chicken. > > -- > PHP 3 Mailing List <http://www.php.net/> > To unsubscribe, send an empty message to php3-unsubscribelists.php.net > To subscribe to the digest, e-mail: php3-digest-subscribelists.php.net > To search the mailing list archive, go to: > http://www.php.net/mailsearch.php3 > To contact the list administrators, e-mail: php-list-adminlists.php.net > > > > -- > PHP 3 Mailing List <http://www.php.net/> > To unsubscribe, send an empty message to php3-unsubscribelists.php.net > To subscribe to the digest, e-mail: php3-digest-subscribelists.php.net > To search the mailing list archive, go to: http://www.php.net/mailsearch.php3 > To contact the list administrators, e-mail: php-list-adminlists.php.net >

attached mail follows:


haha .. ok, i'm a dork. thanks for clearing it up, it makes more sense now. (;

on Fri, 25 Feb 2000, Robert V. Zwink is accused of writing:

> I think Claus means DSN-less connection. not DNS. It is a way of > connecting to a database without setting up a DSN. I don't know the answer, > but thought I could help by clarifying the question. > > > -----Original Message----- > > From: Nathan Benson [mailto:phuzzphactor.org] > > Sent: Friday, February 25, 2000 2:00 PM > > To: Claus Rasmussen > > Cc: php3lists.php.net > > Subject: Re: [PHP3] Is there a way to use DNS-less call to a databasse > > in php3 ? > > > > > > maybe i don't exactly know what you are talking about, but if you > > want to avoid dns lookups > > try specifiying the IP, as opposed to a hostname? that's what I > > do. hope this helps. > > > > on Fri, 25 Feb 2000, Claus Rasmussen is accused of writing: > > > > > Hi > > > > > > > > > Is there a way to use DNS-less call to a databasse using only > > php3 ?. I know asp language can do > > > > > > > > > > > > > > > > > > > > > Sincerly > > > > > > Claus Rasmussen > > > > > > > > > > > > Mail adresses > > > Email private : clausc-net.dk > > > > > > Email work : clausimc.dk > > > > > > > > > > > > URLs > > > private : www.c-net.dk > > > > > > work : www.imc.dk > > > > > > > > > > > > > > > > > > PHP 3 Mailing List <http://www.php.net/> > > > To unsubscribe, send an empty message to php3-unsubscribelists.php.net > > > To subscribe to the digest, e-mail: php3-digest-subscribelists.php.net > > > To search the mailing list archive, go to: > http://www.php.net/mailsearch.php3 > > > > > > > > > > > > PHP 4.0 Beta Mailing List <http://www.php.net/version4/> > > To unsubscribe, e-mail: php4beta-unsubscribelists.php.net > > For additional commands, e-mail: php4beta-helplists.php.net > > To contact the list administrators, e-mail: php4beta-adminlists.php.net > > > > -- > Nathan Benson > ------------- > http://www.phactor.org/ > > Me spell chucker work grate. Need grandma chicken. > > -- > PHP 3 Mailing List <http://www.php.net/> > To unsubscribe, send an empty message to php3-unsubscribelists.php.net > To subscribe to the digest, e-mail: php3-digest-subscribelists.php.net > To search the mailing list archive, go to: > http://www.php.net/mailsearch.php3 > To contact the list administrators, e-mail: php-list-adminlists.php.net >

-- 
Nathan Benson
-------------
http://www.phactor.org/

Me spell chucker work grate. Need grandma chicken.

attached mail follows:


I don't believe DSN-less connections are possible in PHP. I could be wrong, but I have not heard reference to them. It is possible to use MS-ACCESS database and PHP but you will need a third party ODBC driver. I would search the php list archive for information about ODBC and your particular OS (search for "access odbc").

Robert Zwink

> -----Original Message----- > From: Claus Rasmussen [mailto:clausc-net.dk] > Sent: Friday, February 25, 2000 3:02 PM > To: Nathan Benson; Robert V. Zwink > Cc: php3lists.php.net > Subject: Re: [PHP3] Is there a way to use DNS-less call to a databasse > in php3 ? > > > Hi and thanks for your answer > > I have written this script in asp and it shuth work as DSN-less > call to an: > database (access 97) > But I need the same script but written in php because I could not > use asp. Do You think you can figure it out > > Hops you understand my bad english **sorry* > > > ------------------------------------------------------------------ > ------------------------------------- > DB_name = database Tbl_name = contact fiel_I_call = name > ------------------------------------------------------------------ > ------------------------------------- > <% > strConnect = "Driver={Microsoft Access Driver (*.mdb)}; > DBQ=d:\inetpub\wwwroot\dit_domæne.dk\db\din_database.mdb" > %> > > This file is required to be include in the file below > ------------------------------------------------------------------ > ------------------------------------- > > > <html> > > <!-- #include file="database.inc" --> // Here is the included file ;-) > > <head></head> > > <body> > <% > Dim objConn > Dim objRec > > Set objConn = Server.CreateObject ("ADODB.Connection") > Set objRec = Server.CreateObject ("ADODB.Recordset") > > objConn.Open "DSN=Contact" > > objRec.Open "Contact", objConn, 0, 1, 2 > > While Not objRec.EOF > Response.Write objRec("Name") & "<br>" > objRec.MoveNext > Wend > > objRec.Close > objConn.Close > Set objRec = Nothing > Set objConn = Nothing > > %> > > </body> > </html> > Med venlig hilsen/Best Regard > Claus Rasmussen > > > mail: > Private: clausc-net.dk > Work: clausimc.dk > > Url: > Private: www.c-net.dk > Work: www.imc.dk > > > > > ----- Original Message ----- > From: "Robert V. Zwink" <rzwinkmicrocenter.com> > To: "Nathan Benson" <phuzzphactor.org>; "Claus Rasmussen" <clausimc.dk> > Cc: <php3lists.php.net> > Sent: Friday, February 25, 2000 8:12 PM > Subject: RE: [PHP3] Is there a way to use DNS-less call to a > databasse in php3 ? > > > > I think Claus means DSN-less connection. not DNS. It is a way of > > connecting to a database without setting up a DSN. I don't > know the answer, > > but thought I could help by clarifying the question. > > > > > -----Original Message----- > > > From: Nathan Benson [mailto:phuzzphactor.org] > > > Sent: Friday, February 25, 2000 2:00 PM > > > To: Claus Rasmussen > > > Cc: php3lists.php.net > > > Subject: Re: [PHP3] Is there a way to use DNS-less call to a databasse > > > in php3 ? > > > > > > > > > maybe i don't exactly know what you are talking about, but if you > > > want to avoid dns lookups > > > try specifiying the IP, as opposed to a hostname? that's what I > > > do. hope this helps. > > > > > > on Fri, 25 Feb 2000, Claus Rasmussen is accused of writing: > > > > > > > Hi > > > > > > > > > > > > Is there a way to use DNS-less call to a databasse using only > > > php3 ?. I know asp language can do > > > > > > > > > > > > > > > > > > > > > > > > > > > > Sincerly > > > > > > > > Claus Rasmussen > > > > > > > > > > > > > > > > Mail adresses > > > > Email private : clausc-net.dk > > > > > > > > Email work : clausimc.dk > > > > > > > > > > > > > > > > URLs > > > > private : www.c-net.dk > > > > > > > > work : www.imc.dk > > > > > > > > > > > > > > > > > > > > > > > > PHP 3 Mailing List <http://www.php.net/> > > > > To unsubscribe, send an empty message to > php3-unsubscribelists.php.net > > > > To subscribe to the digest, e-mail: > php3-digest-subscribelists.php.net > > > > To search the mailing list archive, go to: > > http://www.php.net/mailsearch.php3 > > > > > > > > > > > > > > > > > > PHP 4.0 Beta Mailing List <http://www.php.net/version4/> > > > To unsubscribe, e-mail: php4beta-unsubscribelists.php.net > > > For additional commands, e-mail: php4beta-helplists.php.net > > > To contact the list administrators, e-mail: > php4beta-adminlists.php.net > > > > > > > -- > > Nathan Benson > > ------------- > > http://www.phactor.org/ > > > > Me spell chucker work grate. Need grandma chicken. > > > > -- > > PHP 3 Mailing List <http://www.php.net/> > > To unsubscribe, send an empty message to php3-unsubscribelists.php.net > > To subscribe to the digest, e-mail: php3-digest-subscribelists.php.net > > To search the mailing list archive, go to: > > http://www.php.net/mailsearch.php3 > > To contact the list administrators, e-mail: php-list-adminlists.php.net > > > > > > > > -- > > PHP 3 Mailing List <http://www.php.net/> > > To unsubscribe, send an empty message to php3-unsubscribelists.php.net > > To subscribe to the digest, e-mail: php3-digest-subscribelists.php.net > > To search the mailing list archive, go to: > http://www.php.net/mailsearch.php3 > > To contact the list > administrators, e-mail: php-list-adminlists.php.net > > > > > -- > PHP 3 Mailing List <http://www.php.net/> > To unsubscribe, send an empty message to php3-unsubscribelists.php.net > To subscribe to the digest, e-mail: php3-digest-subscribelists.php.net > To search the mailing list archive, go to: > http://www.php.net/mailsearch.php3 > To contact the list > administrators, e-mail: php-list-adminlists.php.net > >

attached mail follows:


Yes Thanks

I' allso belive I have to use Normaly ODBC connection

Thank you for helping anyway

Med venlig hilsen/Best Regard Claus Rasmussen

mail: Private: clausc-net.dk Work: clausimc.dk

Url: Private: www.c-net.dk Work: www.imc.dk ----- Original Message ----- From: "Robert V. Zwink" <rzwinkmicrocenter.com> To: "Claus Rasmussen" <clausc-net.dk> Cc: <php3lists.php.net> Sent: Friday, February 25, 2000 11:00 PM Subject: RE: [PHP3] Is there a way to use DNS-less call to a databasse in php3 ?

I don't believe DSN-less connections are possible in PHP. I could be wrong, but I have not heard reference to them. It is possible to use MS-ACCESS database and PHP but you will need a third party ODBC driver. I would search the php list archive for information about ODBC and your particular OS (search for "access odbc").

Robert Zwink

> -----Original Message----- > From: Claus Rasmussen [mailto:clausc-net.dk] > Sent: Friday, February 25, 2000 3:02 PM > To: Nathan Benson; Robert V. Zwink > Cc: php3lists.php.net > Subject: Re: [PHP3] Is there a way to use DNS-less call to a databasse > in php3 ? > > > Hi and thanks for your answer > > I have written this script in asp and it shuth work as DSN-less > call to an: > database (access 97) > But I need the same script but written in php because I could not > use asp. Do You think you can figure it out > > Hops you understand my bad english **sorry* > > > ------------------------------------------------------------------ > ------------------------------------- > DB_name = database Tbl_name = contact fiel_I_call = name > ------------------------------------------------------------------ > ------------------------------------- > <% > strConnect = "Driver={Microsoft Access Driver (*.mdb)}; > DBQ=d:\inetpub\wwwroot\dit_domæne.dk\db\din_database.mdb" > %> > > This file is required to be include in the file below > ------------------------------------------------------------------ > ------------------------------------- > > > <html> > > <!-- #include file="database.inc" --> // Here is the included file ;-) > > <head></head> > > <body> > <% > Dim objConn > Dim objRec > > Set objConn = Server.CreateObject ("ADODB.Connection") > Set objRec = Server.CreateObject ("ADODB.Recordset") > > objConn.Open "DSN=Contact" > > objRec.Open "Contact", objConn, 0, 1, 2 > > While Not objRec.EOF > Response.Write objRec("Name") & "<br>" > objRec.MoveNext > Wend > > objRec.Close > objConn.Close > Set objRec = Nothing > Set objConn = Nothing > > %> > > </body> > </html> > Med venlig hilsen/Best Regard > Claus Rasmussen > > > mail: > Private: clausc-net.dk > Work: clausimc.dk > > Url: > Private: www.c-net.dk > Work: www.imc.dk > > > > > ----- Original Message ----- > From: "Robert V. Zwink" <rzwinkmicrocenter.com> > To: "Nathan Benson" <phuzzphactor.org>; "Claus Rasmussen" <clausimc.dk> > Cc: <php3lists.php.net> > Sent: Friday, February 25, 2000 8:12 PM > Subject: RE: [PHP3] Is there a way to use DNS-less call to a > databasse in php3 ? > > > > I think Claus means DSN-less connection. not DNS. It is a way of > > connecting to a database without setting up a DSN. I don't > know the answer, > > but thought I could help by clarifying the question. > > > > > -----Original Message----- > > > From: Nathan Benson [mailto:phuzzphactor.org] > > > Sent: Friday, February 25, 2000 2:00 PM > > > To: Claus Rasmussen > > > Cc: php3lists.php.net > > > Subject: Re: [PHP3] Is there a way to use DNS-less call to a databasse > > > in php3 ? > > > > > > > > > maybe i don't exactly know what you are talking about, but if you > > > want to avoid dns lookups > > > try specifiying the IP, as opposed to a hostname? that's what I > > > do. hope this helps. > > > > > > on Fri, 25 Feb 2000, Claus Rasmussen is accused of writing: > > > > > > > Hi > > > > > > > > > > > > Is there a way to use DNS-less call to a databasse using only > > > php3 ?. I know asp language can do > > > > > > > > > > > > > > > > > > > > > > > > > > > > Sincerly > > > > > > > > Claus Rasmussen > > > > > > > > > > > > > > > > Mail adresses > > > > Email private : clausc-net.dk > > > > > > > > Email work : clausimc.dk > > > > > > > > > > > > > > > > URLs > > > > private : www.c-net.dk > > > > > > > > work : www.imc.dk > > > > > > > > > > > > > > > > > > > > > > > > PHP 3 Mailing List <http://www.php.net/> > > > > To unsubscribe, send an empty message to > php3-unsubscribelists.php.net > > > > To subscribe to the digest, e-mail: > php3-digest-subscribelists.php.net > > > > To search the mailing list archive, go to: > > http://www.php.net/mailsearch.php3 > > > > > > > > > > > > > > > > > > PHP 4.0 Beta Mailing List <http://www.php.net/version4/> > > > To unsubscribe, e-mail: php4beta-unsubscribelists.php.net > > > For additional commands, e-mail: php4beta-helplists.php.net > > > To contact the list administrators, e-mail: > php4beta-adminlists.php.net > > > > > > > -- > > Nathan Benson > > ------------- > > http://www.phactor.org/ > > > > Me spell chucker work grate. Need grandma chicken. > > > > -- > > PHP 3 Mailing List <http://www.php.net/> > > To unsubscribe, send an empty message to php3-unsubscribelists.php.net > > To subscribe to the digest, e-mail: php3-digest-subscribelists.php.net > > To search the mailing list archive, go to: > > http://www.php.net/mailsearch.php3 > > To contact the list administrators, e-mail: php-list-adminlists.php.net > > > > > > > > -- > > PHP 3 Mailing List <http://www.php.net/> > > To unsubscribe, send an empty message to php3-unsubscribelists.php.net > > To subscribe to the digest, e-mail: php3-digest-subscribelists.php.net > > To search the mailing list archive, go to: > http://www.php.net/mailsearch.php3 > > To contact the list > administrators, e-mail: php-list-adminlists.php.net > > > > > -- > PHP 3 Mailing List <http://www.php.net/> > To unsubscribe, send an empty message to php3-unsubscribelists.php.net > To subscribe to the digest, e-mail: php3-digest-subscribelists.php.net > To search the mailing list archive, go to: > http://www.php.net/mailsearch.php3 > To contact the list > administrators, e-mail: php-list-adminlists.php.net > >

attached mail follows:


Maurice,

I will be.

on Fri, 25 Feb 2000, Maurice Barnes is accused of writing:

> How many of you guys will be at Apache Con?? > > Regards, > Maurice > > > > -- > PHP 3 Mailing List <http://www.php.net/> > To unsubscribe, send an empty message to php3-unsubscribelists.php.net > To subscribe to the digest, e-mail: php3-digest-subscribelists.php.net > To search the mailing list archive, go to: http://www.php.net/mailsearch.php3 > To contact the list administrators, e-mail: php-list-adminlists.php.net

-- 
Nathan Benson
-------------
http://www.phactor.org/

Me spell chucker work grate. Need grandma chicken.

attached mail follows:


I'll be there as well.

Zeev

On Fri, 25 Feb 2000, Nathan Benson wrote:

> Maurice, > > I will be. > > on Fri, 25 Feb 2000, Maurice Barnes is accused of writing: > > > How many of you guys will be at Apache Con?? > > > > Regards, > > Maurice > > > > > > > > -- > > PHP 3 Mailing List <http://www.php.net/> > > To unsubscribe, send an empty message to php3-unsubscribelists.php.net > > To subscribe to the digest, e-mail: php3-digest-subscribelists.php.net > > To search the mailing list archive, go to: http://www.php.net/mailsearch.php3 > > To contact the list administrators, e-mail: php-list-adminlists.php.net > >

-- 
Zeev Suraski <zeevzend.com>
http://www.zend.com/

attached mail follows:


Has anyone experienced a problem with fgets() and/or fgetss()? I open a URL with fopen(). I then iterate through a loop doing and fgets() each time getting a line of data from the URL. After approximately 1050 reads, it just quits with no error message and no obvious reason.

I can run the same code over and over again and it stop in different places each time . . . anywhere from about 1050 lines of data to 1120 lines of data. Same code, same URL, same data. Different places that it stops each time.

I'm about to have to abandon PHP3 for this task and I don't want to. But I may have no choice unless anyone has any ideas??

Thanks in advance for any suggestions,

Doug dwilliamssoftec-e.com

attached mail follows:


You may check the setting -

max_execution_time = (whatever number you want) ; Maximum execution time of each script, in seconds

in your php.ini file (that is the PHP for windows name). I had to set mine for 200. Had similar problems looping through info in a database.

Hope this helps,

Kevin -----Original Message----- From: Doug Williams [mailto:dwilliamssoftec-e.com] Sent: Friday, February 25, 2000 12:07 PM To: list.php3 Subject: [PHP3] Problem with fgets (and fgetss)

Has anyone experienced a problem with fgets() and/or fgetss()? I open a URL with fopen(). I then iterate through a loop doing and fgets() each time getting a line of data from the URL. After approximately 1050 reads, it just quits with no error message and no obvious reason.

I can run the same code over and over again and it stop in different places each time . . . anywhere from about 1050 lines of data to 1120 lines of data. Same code, same URL, same data. Different places that it stops each time.

I'm about to have to abandon PHP3 for this task and I don't want to. But I may have no choice unless anyone has any ideas??

Thanks in advance for any suggestions,

Doug dwilliamssoftec-e.com

attached mail follows:


As a module, less load than mod_perl and as a CGI not much more than a perl script.

Michael

Floyd Baker wrote:

> Hello again. > > BTW; thanks for the pro arguments that I passed to my isp re PHP benny's. > > He's wondering now..., > "on a load of the apache server what average does php add to it?" > > Any opinions/estimates/comments that I can pass on to him? > > Thanks. > > Floyd > > -- > > -- > PHP 3 Mailing List <http://www.php.net/> > To unsubscribe, send an empty message to php3-unsubscribelists.php.net > To subscribe to the digest, e-mail: php3-digest-subscribelists.php.net > To search the mailing list archive, go to: http://www.php.net/mailsearch.php3 > To contact the list administrators, e-mail: php-list-adminlists.php.net

attached mail follows:


> $carriagereturn=chr(13).chr(10); // maybe only chr(13)

Does anyone know of where I might find a definitive list of all chr(x), specifically the ones you can't see when printed to the screen. Thanks.

--
Richard Heyes

attached mail follows:


At 19:52 25.02.2000 , Richard Heyes wrote: > > $carriagereturn=chr(13).chr(10); // maybe only chr(13) > >Does anyone know of where I might find a definitive list of all chr(x), >specifically the ones you can't see when printed to the screen. >Thanks.

In former DOS - times, there was a complete list in almost every dos-manual.

mit freundlichen Grüßen,

Gregor Welters

----------------------------- Welters PC-Service, Grafenberger Allee 81, 40237 Düsseldorf, Deutschland

Tel: 0211/9660096 Mobil: 0173/2776469 Fax: 0211/9660093 mailto: gwelterswelters.de look at: http://www.welters.de

attached mail follows:


At 12:14 PM 2/24/00 -0600, you wrote: >I need to OPEN A FILE and REPLACE every instance of a carriage RETURN >with a NEW LINE. > >I can open the file successfully:

Untested code follows. Copy the file before testing, since it alters the file.

> if (! ($myfile=fopen ("filename", "w+"))) > {

> echo "file could not be opened"; > }

Use r+ above or fseek($myfile, 0) here. $pos = 0;

> while(!feof($myfile)) > {

if (fread($myfile, 1) == 10){ fseek($myfile, $pos); fwrite($myfile, 13); } $pos++; }}

Actually, that's going to be pretty damn slow, so if it's a really small file, try this:

if (!($myfile=fopen("filename", "r+")){ echo "file could not be opened"; } else{ $size = filesize("filename"); $contents = fread($myfile, $size); $contents = str_replace(10, 13, $contents); fseek($myfile, 0); fwrite($myfile, $contents); }

OTOH, for a large file, a shell command to do 'sed' or 'tr' or 'dos2unix' or any of a number of other Un*x commands to alter the file my be significantly faster than any easily-coded PHP looping construct.

-- 
"TANSTAAFL"
We're looking for PHP/ASP hacker: http://ignitionstate.com/jobs/index.html
Need Work? Printer Driver: http://L-I-E.com/jobs.htm#PrinterDriver
I will be offline from March 8th through April 2nd.
http://CHaTMusic.com                       http://EmphasisEntertainment.com
http://L-I-E.com                           http://JadeMaze.com
http://CatCatalani.com                     http://MGMH.com
http://VoodooKings.net                     http://UncommonGround.com

attached mail follows:


I ran a php script that read the file into an array, exploded it, then translated the characters into ascii with the ord() function. Worked great. Unfortunately i threw it away.

> At 19:52 25.02.2000 , Richard Heyes wrote: > > > $carriagereturn=chr(13).chr(10); // maybe only chr(13) > > > >Does anyone know of where I might find a definitive list of all chr(x), > >specifically the ones you can't see when printed to the screen. > >Thanks.

--
 Lawrence Blades
 Digital Technologies
 P.O. Box 673
 Clarksdale, MS 38614

Church Office: 601.624.6586 COL Office: 601.627.5554 FAX: 601.627.6797 Home: 601-627-9539 Cell: 601.621.3092 http://www.clarksdale.com lrbladesclarksdale.com (If you can't find me, I can't be found.)

attached mail follows:


Ran the script below with no success. (Removed the extra "(" in "if.... ). Something else must be going on.

Kim Shrier gave an excellent explanation on why the ^M character is inserted in the browser uploaded file (see previous post). But he says there is BOTH a carriage return and a line feed in place of the line feed at the end of the line. The combo shows up as ^M.

HOWEVER, when viewed with vi editor, the entire file (some 100 lines) appears as ONLY ONE LINE. The ^M character appears everywhere there SHOULD be a new line, but the entire file acts like one line. Ie, the ^M is not recognized as a newline at all.

I ran the file through a script using php function ord(), and the only ascii character that showed up at the newline was chr 13.

SAMPLE OF THE TEXT:

^M338 Car MotorMaster Checker Marathon And Marathon Taxicab 74-81 74-81 All All F, R 3437-D 1.063\xd3 3.622\xd3 [1]^M339 Car MotorMaster Checker Marathon And Marathon Ta

xicab 69-73 69-73 All All F, R 3200-A 1.063\xd3 3.217\xd3 [1]^M340 Car MotorMaster Chevrolet Chevrolet

^M341 Car MotorMaster Chevrolet ---------------------------------------------------------- The new lines should begin with 338, 339, 340, 341.

Richard Lynch wrote:

> At 12:14 PM 2/24/00 -0600, you wrote: > >I need to OPEN A FILE and REPLACE every instance of a carriage RETURN > >with a NEW LINE. > > > if (!($myfile=fopen("filename", "r+")){ > echo "file could not be opened"; > } > else{ > $size = filesize("filename"); > $contents = fread($myfile, $size); > $contents = str_replace(10, 13, $contents); > fseek($myfile, 0); > fwrite($myfile, $contents); > } > > OTOH, for a large file, a shell command to do 'sed' or 'tr' or 'dos2unix'

--
 Lawrence Blades
 Digital Technologies
 P.O. Box 673
 Clarksdale, MS 38614

Church Office: 601.624.6586 COL Office: 601.627.5554 FAX: 601.627.6797 Home: 601-627-9539 Cell: 601.621.3092 http://www.clarksdale.com lrbladesclarksdale.com (If you can't find me, I can't be found.)

attached mail follows:


***********************************************

On 2/25/00 at 4:03 PM Lawrence Blades wrote:

>Ran the script below with no success. (Removed the extra "(" in "if.... ). >Something else must be going on. > >Kim Shrier gave an excellent explanation on why the ^M character is inserted in >the browser uploaded file (see previous post). But he says there is BOTH a >carriage return and a line feed in place of the line feed at the end of the >line. The combo shows up as ^M. > >HOWEVER, when viewed with vi editor, the entire file (some 100 lines) appears as >ONLY ONE LINE. The ^M character appears everywhere there SHOULD be a new line, >but the entire file acts like one line. Ie, the ^M is not recognized as a >newline at all.

I think that's mac format. If you're trying to import that into mysql with 'load data infile' you might want to try the lines terminated by option, i.e.

load data infile 'macformatteddfile' into table mytable lines terminated by '^M';

by the way, I'm not sure if you realize that the ^M isn't the ^ character next to an M, you get it in bash by pressing control-v followed by control-m

- Mark

attached mail follows:


Mark Maggelet wrote: <snip>

> > > >HOWEVER, when viewed with vi editor, the entire file (some 100 lines) appears as > >ONLY ONE LINE. The ^M character appears everywhere there SHOULD be a new line, > >but the entire file acts like one line. Ie, the ^M is not recognized as a > >newline at all. > > I think that's mac format. If you're trying to import that into mysql with 'load data infile' > you might want to try the lines terminated by option, i.e.

You can also fix this easily in vi with

:%s/<Ctrl-V><Ctrl-M>/<Ctrl-V><Ctrl-M>/g

the Ctrl-V Ctrl-M is handled by holding down Ctrl, hitting V NOT LETTING GO OF CTRL and then hitting M, it will appear as ^M. Yes, I know it looks like it is replacing ^M with ^M, but trust me, it works.

Caleb Shay cshayapolloi.com

attached mail follows:


At 04:27 PM 2/24/00 -0600, you wrote: >My real problem is that I am UPLOADING a tab delimited flat file that >will be loaded into a MySql table. I am uploading it via a WEB BROWSER >form (<input type=file...>) instead of ftp. > >For some reason, uploading it via the browser REPLACES the carriage >returns with a strange character - ^M. > >This can ONLY be detected viewing the file with the vi editor in >telenet. >The file also reads as ONE LINE - no new lines! >(If I download (via ftp) the uploaded file and open it as plain text, >all of the carriage returns are in place.) > >So, how can I replace this strange character (^M) with a real return, or >newline? >If I do a pattern search in vi editor (/^M), it does not recognize it.

This is a Unix/DOS-Unix problem. The file actually *HAD* chr(13) (aka "\n" aka ^M aka CR) in it, but since there wasn't a chr(10) (aka "\r" aka ^J aka LF) in front of it, your browser assumed it was needful to convert it from the newline into ^M, thinking that... well, I don't know *what* the hell they were thinking. I just know it's a pain in the ass.

Do you need to change it just this once, or in PHP all the time? If it's just this once, use ftp to transfer the file, and ftp will probably get it right. If not, some combination of saving it as DOS/Unix and using ASCII/BINARY before transferring the file will work.

Richard Heyes wrote: >Does anyone know of where I might find a definitive list of all chr(x), >specifically the ones you can't see when printed to the screen.

There should be a few million ASCII charts still on the 'Net, telling what *most* programs consider the characters to be.

Here's the ones I remember:

0 NULL often used as end of string 7 ^G "Bell" On really old terminals, you can make them make an actual sound with this one. 8 ^H "Backspace" Old terminals ==> Backspace 9 ^I (aka \t) Tab character 10 ^J (aka \r aka LF) Line Feed 13 ^M (aka \n aka CR) Carriage Return

On really old terminals, you needed CRLF to literally *move* the printing/typewriter head down (LF) and all the way to the left (CR). Hence DOS insistence that CRLF is the newline character. Of course, on another make/model of really old terminals, the CR alone was sufficient, and LF either was ignored or just make a blank line, hence Un*x insistence on just CR as the newline. And then there's Apple... Oh never mind.

As far as remembering them goes, note that M is the thirteenth letter of the alphabet. Hence ^M == 13.

Oh yeah, in vi, the esape character is \, but ^ is the way to actually get a control character, so it gets real confusing real fast, but something not unlike this will work:

:%gs/\[ESC]^M/\^M/

The first time I tried to find this out, I ended up using the command line 'tr' instead, but by the time I had figured that out, I knew enough the next time to do it in vi, but only by re-reading man tr and vi help several times and some trial and error.

-- 
"TANSTAAFL"
We're looking for PHP/ASP hacker: http://ignitionstate.com/jobs/index.html
Need Work? Printer Driver: http://L-I-E.com/jobs.htm#PrinterDriver
I will be offline from March 8th through April 2nd.
http://CHaTMusic.com                       http://EmphasisEntertainment.com
http://L-I-E.com                           http://JadeMaze.com
http://CatCatalani.com                     http://MGMH.com
http://VoodooKings.net                     http://UncommonGround.com

attached mail follows:


Problem is, I want this to work via a php script automatically after the file is uploaded by the browser.

> > > You can also fix this easily in vi with > > :%s/<Ctrl-V><Ctrl-M>/<