|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
From: php-general-digest-help
lists.php.netDate: Sat Aug 25 2001 - 02:20:10 CDT
php-general Digest 25 Aug 2001 07:20:10 -0000 Issue 836
Topics (messages 64301 through 64403):
search engine friendly php + form
64301 by: Andras Kende
Help needed
64302 by: Javi - NeoDigit
Re: [PHP-DEV] Re: Re: sysvsem extention question
64303 by: Tom May
Large gzip I/O
64304 by: Shane Wegner
64384 by: Richard Lynch
Re: The future of PHP
64305 by: Manuel Lemos
64308 by: Egan
64309 by: Jeff Lewis
64315 by: Manuel Lemos
64316 by: Navid Yar
64321 by: Egan
64322 by: Sean C. McCarthy
64323 by: Martín Marqués
64324 by: Egan
64327 by: Egan
64329 by: Thomas Deliduka
64330 by: Mark Maggelet
64333 by: Christopher CM Allen
64336 by: Michael Kimsal
64337 by: Michael Kimsal
64338 by: Jeff Lewis
64343 by: Dave
64344 by: Jeff Lewis
64345 by: Michael Kimsal
64346 by: Dave
64347 by: Dave
64358 by: Thomas Deliduka
64365 by: Richard Lynch
64368 by: Richard Lynch
64394 by: Manuel Lemos
64395 by: Manuel Lemos
64396 by: Manuel Lemos
64397 by: Manuel Lemos
Re: code check
64306 by: Tom Malone
How to act on many files (i.e. *)
64307 by: Ken
64311 by: Ken
Re: PHP secure
64310 by: J Smith
64314 by: Brian Tanner
64341 by: Dave
Help help help ... or something like that
64312 by: Dan McCullough
64385 by: Richard Lynch
limit 1
64313 by: Jeremy Morano
64318 by: ERISEN, Mehmet Kamil
64342 by: Dave
`T_VARIABLE' or `'$''
64317 by: Paul Roberts
64319 by: Ken
Re: how can i cache php scripts enterpretet
64320 by: Ken
Flat file/mySQl combination
64325 by: Jeff Lewis
Re: PHP & sendmail
64326 by: Yasuo Ohgaki
HELP!!!
64328 by: BRACK
64386 by: Richard Lynch
Another question
64331 by: Dan McCullough
Re: \n
64332 by: Alexander Skwar
64340 by: Dave Freeman
pspell?
64334 by: Jay Paulson
zlib1.1.3 and ob_gzhandler
64335 by: Martin Helie
PHP2Perl converter?
64339 by: Nathan
64389 by: Richard Lynch
arg_separator
64348 by: Coskun SUNALI / TURKEY
64391 by: Richard Lynch
Re: someone please explain weird getforeignkeys
64349 by: Richard Lynch
Re: imagemagick and file size
64350 by: Richard Lynch
Which file extension?
64351 by: Seb Frost
Debuggers
64352 by: Grant Boggs
64392 by: Richard Lynch
Re: I get "headers already sent by" error each time I use setcookie function
64353 by: Chris Hayes
Re: path to php
64354 by: Chris Hayes
Re: always last
64355 by: Chris Hayes
64357 by: Chris Hayes
Re: Dynamic check boxes...
64356 by: Chris Hayes
Server Help
64359 by: Andy Ladouceur
64390 by: Richard Lynch
Re: HTTP headers and include()
64360 by: Richard Lynch
Re: restoring mysql db after mysqldump
64361 by: Richard Lynch
Re: session_write_close()
64362 by: Richard Lynch
Re: pointers in php
64363 by: Richard Lynch
Re: Executing perl scripts in a unix environment running php cgi-module
64364 by: Richard Lynch
Re: upload binary using postgres
64366 by: Richard Lynch
Re: $HTTP_REFERER problem
64367 by: Richard Lynch
Re: Cannot index a string index - Why?
64369 by: Richard Lynch
Re: Any Functions !!
64370 by: Richard Lynch
Re: Does not deliver mail
64371 by: Richard Lynch
Re: upgrading PHP
64372 by: Richard Lynch
Re: send mail to mailing list using mail() or smtp?
64373 by: Richard Lynch
Re: Session Problem
64374 by: Richard Lynch
Re: Dynamic Pages and Search Engines
64375 by: Richard Lynch
Re: Reading files from a directory
64376 by: Richard Lynch
Re: PHP 2 MySQL over the network
64377 by: Richard Lynch
Re: PHP with RSA/Java
64378 by: Richard Lynch
Re: Problems with PHP calling PGP
64379 by: Richard Lynch
64388 by: CO Group Support
Re: GET / POST strange error
64380 by: Richard Lynch
Re: PHP and RSA/Java (Repost with correct e-mail!)
64381 by: Richard Lynch
Re: fatal input in flex scanner
64382 by: Richard Lynch
Re: Outlook Express and Miltiple send to Addresses
64383 by: Richard Lynch
local time v.s. server time
64387 by: Joe Sheble \(Wizaerd\)
64393 by: Don Read
64398 by: Joe Sheble \(Wizaerd\)
64402 by: Don Read
formating numbers
64399 by: Javier Bellido
64401 by: Jack Dempsey
& help
64400 by: GaM3R
disable_features
64403 by: Andy Ladouceur
Administrivia:
To subscribe to the digest, e-mail:
php-general-digest-subscribe
lists.php.net
To unsubscribe from the digest, e-mail:
php-general-digest-unsubscribe
lists.php.net
To post to the list, e-mail:
php-general
lists.php.net
----------------------------------------------------------------------
attached mail follows:
Hello,
I was successfully created search engine friendly php from a tutorial on
zend site.. like:
salescomps.php?city=Canada&month=feb&year=2000
to
salescomps.php/cityCanada/month/feb/year/2001
Is there any way to modify a submit form to result a page with search engine
friendly format without using GET or POST ( / ) ??
Thanks,
Andras
attached mail follows:
I'm using copy() and the final owner is "nobody", I'm opening a socket
connection with fsockopen() so I have a validate user.
I want the validated user to be the owner of the new file
That`s de code:
- open the socket
- validate user
- change dir chmod so we can write
- write the file (with "nobody" owner and I need the "user" owner)
- change back dir chmod
- close connection
----------------------------------
$tftp = fsockopen("ftp.dominio.com", 21, $errno, $errstr, 60) or
die("Fallode Conexión");
socket_set_blocking($tftp, false);
fputs($tftp, "user $login\n");
fputs($tftp, "pass $password\n");
$ruta = "/www/".$direc;
fputs($tftp, "SITE chmod 0777 $ruta\n");
copy ("file1.php", "file2.php");
fputs($tftp, "SITE chmod $perm $ruta\n");
sleep(1);
fclose($tftp);
------------------------------------
Thanks for helping
Javi
attached mail follows:
Chris Chabot <chabotc
reviewboard.com> writes:
> Hey Jason, i do see your point.
>
> However, something still illudes me in my reasoning i think..
>
> In a web envirioment, you are most likely to be in one of two situations when using semaphores.
>
> - Plain standard lock (with ability of doing resource count)
> - All web servers connect to a external process that handles a service (like printer)
> - The web processes them selves are the 'external resource' which handle the decreasing of lock-count
>
> The notes in the original source code of the php extention explained that the second+third lock were used
> for:
> - Resource count
> - Be able to set initial max-resource count
>
> However, when i follow this reasoning, two things come to mind
> - Resource count is a API provided by the sysvsem implimentation via semctl (# waiting, etc)
> - if you try to set the semaphore's resource count, and it fails (other process connected to it and locked
> it?) then wouldnt it be safe to assume that that 'other process' is another web process, which sets the same
> resource counters... so we end up with an good situation anyways...
>
> So if you would do a semget with IPC_CREATE + IPC_EXCL. If this succeeds, do the SETALL/SETVAL routine via
> semctl, if it fails on EEXISTS, do a second semget without create+excl and attach to it..
I haven't looked at the code for years, but I may have been thinking
that the semaphore lives on after all the processes using it have
died. So, if you change the allowed resource usage in your php code
and restart the server, you want the new value to take effect and not
be stuck with the old value from the last run.
> Donno if it would work, or how-much overhead it would add, but it sounds like it could ;-)
>
> -- Chris
>
>
> Jason Greene wrote:
>
> > ----- Original Message -----
> > From: "Sascha Schumann" <sascha
schumann.cx>
> > To: "Jason T.Greene" <jason
inetgurus.net>
> > Cc: "Tom May" <tom.may
infospace.com>; "Chris Chabot" <chabotc
reviewboard.com>; <php-dev
lists.php.net>;
> > <php-general
lists.php.net>
> > Sent: Friday, August 24, 2001 1:49 AM
> > Subject: Re: [PHP-DEV] Re: Re: sysvsem extention question
> >
> > > > parent process right before fork. There is no parent
> > > > initializer for a php module author
> > >
> > > MINIT() is called from the parent process in forking servers.
> > > The mm storage handler uses this hook to instantiate a shared
> > > memory segment and propagate the handle to all child
> > > processes.
> > Sascha is right...
> > Allow me to reword..
> > There is no way to allow a php file author the ability to execute php source during
> > module startup of a forking web server. The module would have to allocate and
> > initialize all semaphores before the php source is parsed. This defeats the purpose
> > of a semaphore extension in a forking webserver environment, becuase the php source
> > author would be limited to just the semaphors allocated by the php module.
> >
> > -Jason
> >
> > > - Sascha Experience IRCG
> > > http://schumann.cx/ http://schumann.cx/ircg
> > >
Tom.
attached mail follows:
Hi,
I seem to be having trouble with the zlib support in PHP
and am curious if anyone has a workaround.
I am looking for an alternative to the gzuncompress
function. The problem with gzuncompress is that it needs
the entire gzip stream in memory in order to work. I'm
looking for something like is in the C API where you can
feed it many buffers in a while loop and it will construct
the uncompress stream.
If this is possible, I'd appreciate hearing from someone
who knows how to do it.
Thanks in advance,
Shane
-- Shane Wegner: shanecm.nu http://www.cm.nu/~shane/ PGP: 1024D/FFE3035D A0ED DAC4 77EC D674 5487 5B5C 4F89 9A4E FFE3 035D
attached mail follows:
You should be able to use http://php.net/popen and feed it chunks as you snag them...
-- WARNING richardzend.com address is an endangered species -- Use ceo
l-i-e.com 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: Shane Wegner <shane
cm.nu> Newsgroups: php.general To: <php-general
lists.php.net> Sent: Friday, August 24, 2001 1:33 PM Subject: Large gzip I/O
> Hi, > > I seem to be having trouble with the zlib support in PHP > and am curious if anyone has a workaround. > > I am looking for an alternative to the gzuncompress > function. The problem with gzuncompress is that it needs > the entire gzip stream in memory in order to work. I'm > looking for something like is in the C API where you can > feed it many buffers in a while loop and it will construct > the uncompress stream. > > If this is possible, I'd appreciate hearing from someone > who knows how to do it. > > Thanks in advance, > Shane > > -- > Shane Wegner: shane
cm.nu > http://www.cm.nu/~shane/ > PGP: 1024D/FFE3035D > A0ED DAC4 77EC D674 5487 > 5B5C 4F89 9A4E FFE3 035D
attached mail follows:
Hello,
Egan wrote:
>
> On Thu, 23 Aug 2001 20:32:10 -0500, "Christopher CM Allen"
> <callen
driver8.org> wrote:
>
> >hmmm, I might live in a smaller world than you but I find tons of small to
> >middle businesses that have no clue as to why or how things are done in
> >applications(primarily web). Sure they know the buzz words of Java etc but
> >when I come in and tell them I work with a certain tool set and that I can
> >get it done for less $ and time they really don't care if I have a hammer or
> >a mallet.
>
> Many small businesses would like to do e-commerce, but can't afford
> expensive consultants, expensive hardware, and expensive software
> tools developed by huge corporations.
e-commerce? You mean B2C? Can small business live from that? I'm afraid not! Maybe I am wrong. :-)
> There is a vast market for web developers who use free software tools > like Linux/Apache/PHP, and offer their services to small businesses at > modest rates. > > Look at all the large corporations bleeding money and cutting staff. > Mega-corporations are in decline, and their era is ending. Long live > the small business!
What? Large business are being affected because the whole networking business is in recession. It was over-hyped for all these years because of the Internet, so now everything is being brought down to the reality because investors took the money from those companies. So, every other dependent company was affected to some extent, large or small. I thought this was clear to every body by now.
Regards, Manuel Lemos
attached mail follows:
On Fri, 24 Aug 2001 15:34:04 -0300, Manuel Lemos <mlemos
acm.org>
wrote:
>> Many small businesses would like to do e-commerce, but can't afford
>> expensive consultants, expensive hardware, and expensive software
>> tools developed by huge corporations.
>
>e-commerce? You mean B2C? Can small business live from that? I'm afraid
>not! Maybe I am wrong. :-)
100 years ago you could easily do business without a telephone. But what percentage of businesses today operate without a telephone?
A web presence with web commerce will become a utility like the telephone. Having it will be more important than measuring artificial distinctions between B2C vs. B2B.
>> Look at all the large corporations bleeding money and cutting staff. >> Mega-corporations are in decline, and their era is ending. Long live >> the small business! > >What? Large business are being affected because the whole networking >business is in recession.
Large corporations don't know you or care about you as an individual customer. You're just an account number to them. The only thing they care about is the "big" sale to other "big" corporations. But even then, do they really care? Not in my experience.
The networking recession is just one symptom of their disease.
Why would anyone want to do business that way? If I can find a small business that sells the service or product I need, that's who gets my business first.
If people ask how large my company is, I tell them "We're large enough to handle your business, and small enough to care."
Egan
attached mail follows:
I actually had a talk with my boss today...
We discussed different technologies and why we chose them. The reasons we chose Java/JSP/J2EE etc:
1) Scalability (number 1 reason) 2) Different projects like EJB etc
I had been talking about PHP a lot and he says he likes it to but...
Jeff
> -----Original Message-----
> From: Egan [mailto:egan
sevenkings.net]
> Sent: Friday, August 24, 2001 2:53 PM
> To: php-general
lists.php.net
> Subject: Re: [PHP] The future of PHP
>
>
> On Fri, 24 Aug 2001 15:34:04 -0300, Manuel Lemos <mlemos
acm.org>
> wrote:
>
> >> Many small businesses would like to do e-commerce, but can't afford
> >> expensive consultants, expensive hardware, and expensive software
> >> tools developed by huge corporations.
> >
> >e-commerce? You mean B2C? Can small business live from that? I'm afraid
> >not! Maybe I am wrong. :-)
>
>
> 100 years ago you could easily do business without a telephone. But
> what percentage of businesses today operate without a telephone?
>
> A web presence with web commerce will become a utility like the
> telephone. Having it will be more important than measuring artificial
> distinctions between B2C vs. B2B.
>
>
> >> Look at all the large corporations bleeding money and cutting staff.
> >> Mega-corporations are in decline, and their era is ending. Long live
> >> the small business!
> >
> >What? Large business are being affected because the whole networking
> >business is in recession.
>
>
> Large corporations don't know you or care about you as an individual
> customer. You're just an account number to them. The only thing they
> care about is the "big" sale to other "big" corporations. But even
> then, do they really care? Not in my experience.
>
> The networking recession is just one symptom of their disease.
>
> Why would anyone want to do business that way? If I can find a small
> business that sells the service or product I need, that's who gets my
> business first.
>
> If people ask how large my company is, I tell them "We're large enough
> to handle your business, and small enough to care."
>
>
> Egan
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
>
>
attached mail follows:
Hello,
Egan wrote:
>
> On Fri, 24 Aug 2001 15:34:04 -0300, Manuel Lemos <mlemos
acm.org>
> wrote:
>
> >> Many small businesses would like to do e-commerce, but can't afford
> >> expensive consultants, expensive hardware, and expensive software
> >> tools developed by huge corporations.
> >
> >e-commerce? You mean B2C? Can small business live from that? I'm afraid
> >not! Maybe I am wrong. :-)
>
> 100 years ago you could easily do business without a telephone. But
> what percentage of businesses today operate without a telephone?
>
> A web presence with web commerce will become a utility like the
> telephone. Having it will be more important than measuring artificial
> distinctions between B2C vs. B2B.
Huh? That's a nice marketoid speech for you to talk Internet-ignorant people to get into e-commerce, but what does that have to do with my question?
Can small business live from e-commerce today?
> >> Look at all the large corporations bleeding money and cutting staff. > >> Mega-corporations are in decline, and their era is ending. Long live > >> the small business! > > > >What? Large business are being affected because the whole networking > >business is in recession. > > Large corporations don't know you or care about you as an individual > customer. You're just an account number to them. The only thing they > care about is the "big" sale to other "big" corporations. But even > then, do they really care? Not in my experience. > > The networking recession is just one symptom of their disease.
Do you really believe that? As far as I can recall, this recession started when a "mean judge" convicted Microsoft for anti-trust practices. That caused NASDAQ crash that scared people away from investing in tech company stocks. Many Internet companies dried and without cash from the investors many went bankrupt. That affected all the small or big corporations that have grown and were dependent on the networking market. I don't think this affected much non-technological companies, big or small. So I don't think your anti-big corporations speech has much to do with this.
Regards, Manuel Lemos
attached mail follows:
There are big players who have an eye on the open-source market right now, IBM being the biggest contributor. HP recently released their own Linux version on their desktop PCs and is marketing them as we speak. Microsoft is planning on giving away just part of their source code in their future products to software developers. Everyone has felt the heat on Open Source technology, and everyone knows it is the way to go.
The only thing that is missing from most Open Source products, probably excluding PHP, is user-friendliness. There are a lot of computer illiterate people out there that have gotten used to the click and drag features that make using an application so easy, but they never dream of going into a command line and typing in something. Right now Linux is easy to use thanks to the abundance of different GUIs out there, but there is no standard, like Windows has. Also it is harder to set-up for newbies than Windows is (not really, but for the newbie it's a whole different world). It is a new concept that users must grab in order to make good use of it. There must be a way that people can link MS-like features into Linux a bit more so that at least it will make it easier for people to make that transition over to a different OS and try it out. After it has the market share it needs, users will have gotten used to Linux or BSD or whatever and we can do what MS does, promote a bunch of Linux-specific features into the OS. By that time they will have grabbed the concept of "free" so much that Windows would sound ridiculously pricey (especially the licensing). MS can't afford to give it's OS away for free, just like it could give away it's IE browser and break Netscape. That's why Open Source is the first real challenge for MS in 15 years.
THEN follows the marketing, where everyone will be backing up Linux because of it's popularity and low cost, compared to Windows. And we'll see Bill Gates crawling on his knees and selling his Ferraris to pay his mortgage. Wouldn't I love to see that, just kidding. Until Linux gets better at certain things, I think I have no choice but to stick with Windows for now (especially in the design area). Anyway, that's my two cents worth.
Navid
P.S. -- When I say Linux, I mean all Open Source products, including PHP. Linux is just the driving force. And Christopher, keep up the promotion of PHP, you have some great ideas. I want it to grow as much as you do. Thanks :)
-----Original Message-----
From: Manuel Lemos [mailto:mlemos
acm.org]
Sent: Friday, August 24, 2001 12:57 PM
To: php-general
lists.php.net
Subject: Re: [PHP] The future of PHP
Hello,
Christopher Cm Allen wrote: > > > > > I'm afraid that PHP is not yet very credible in that world. The truth is > > there is not great marketing force behind PHP like there is Sun behind > > Java or Microsoft behind .Net > > Good point, and how does one go about marketing a language that is > open-source?
If you don't know it is because you are not very motivated to do it. So, the first step is to convince and motivate yourself that PHP needs to be marketed.
As for what to do, instead of suggesting new ideas, I would rather recall some old ideas that always seemed to work well.
For instance, provide PHP users compensation. It does not need to be financial compensation. It may be moral compensation as long as it is real compensation.
For instance, if I am not mistaken, Guido Van Rossum, the Python creator, sponsored a contest to develop software development tools with cash prizes. Only a few won, but the contest attracted a lot of people and was even mentioned in prestiged software development magazines like Dr. Dobbs. This required some investment, but if you look around you will not have much trouble to find a sponsor.
Another point is that they managed to get the media on their side. It seems that in the PHP community there is little effort to appeal to media. That is a major waste of oppiortunity because they can provide some much marketing for free.
One free way to provide compensation to any PHP user is to promote their work. 2 years ago I started a repository of PHP Classes of objects that basically allow anybody to contribute regardless of the quality and utility that you may attribute to what is contributed.
The point is that once users that anybody can have some fame to have his work exposed to a large PHP audience (over 40.000 subscribers), they want to contribute as well and the site grows thanks to the moral compensation that it offers to any PHP user.
There are other class repositories, like the official PHP PEAR repository, but the scope is different because the contributions are not accepted arbitrarily, so you don't get as many contributors.
Other than that, PHP resources sites like these should be officially linked altogether with things like Web rings. It would cause a much better impression to newcomers or ceptic people as it would make PHP more credible exposing the real level of support that the whole PHP community can provide. Unfortunately, the maintainers of PHP main site and Zend site do not seem to agree that it would be a good idea to promote other PHP resources sites with banners to pointing to them like what is done with Web rings.
Ok, these are just a few ideas that would help PHP to be better marketed. They are not new and have already been discussed before. It is up to the people that have more active roles in the PHP community to open their minds and pick them up.
> I do it by not allowing FP like extensions on my server's. All of my custom > apps are php or if need be I switch to C/perl. > If I get pushed hard enough I will do c++ :) > > By your own words though , the volume of users of a non-marketed php, > compared to the users of marketed Java et al. speaks for itself. > Php holds its own..
But for how long?
> What if a group of developers/designers started marketing PHP?
Marketing does wonders. I should not need to to tell you that. One problem seems to be some people in the PHP community have some kind of aversion to the idea of that somebody can make money from free software. That way you are ruling out people that can do a lot of good to the growth of the PHP market. I think it is a matter of being more open minded. The more opportunities you provide to others, the greater are the chances that opportunities benefit your goals, in this case a a wider acceptance of PHP making it more credible to people that basically ignore it.
ok, that's just me trying to be more constructive. :-)
Regards, Manuel Lemos
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribelists.php.net For additional commands, e-mail: php-general-help
lists.php.net To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
On Fri, 24 Aug 2001 16:30:04 -0300, Manuel Lemos <mlemos
acm.org>
wrote:
>Can small business live from e-commerce today?
What is the relevance of your question? Do businesses "live" from their telephone? Whether they do or not, they need it in either case.
>Do you really believe that? As far as I can recall, this recession >started when a "mean judge" convicted Microsoft for anti-trust >practices. That caused NASDAQ crash that scared people away from >investing in tech company stocks.
One "mean judge" all by himself, caused the NASDAQ crash, eh?
I am surely astounded to learn that! Good day and goodbye!
Egan
attached mail follows:
Manuel Lemos wrote: > Do you really believe that? As far as I can recall, this recession > started when a "mean judge" convicted Microsoft for anti-trust > practices. That caused NASDAQ crash that scared people away from > investing in tech company stocks. Many Internet companies dried and > without cash from the investors many went bankrupt. That affected all > the small or big corporations that have grown and were dependent on the > networking market. I don't think this affected much non-technological > companies, big or small. So I don't think your anti-big corporations > speech has much to do with this. > > Regards, > Manuel Lemos >
No, recesion on the "new economy" started as the fact that the .com (or dotcommers) companies did not develop with their market spectations. Shareholders then started to not give any more credit to bussines expectations and speculation stopped. Quarter after quarter with cash looses, and even worse "return on investement" expectations, made the shareholders move the money out of those companies and their confidence. It is the way the dotcommers made bussines and SE speculation what caused this problem.
Just as a point travelprice.com just announced that this is the first quarter without losses before taxes. It just happened that they have applied normal bussines strategies and bussines models.
Also the effect that this downturn is going through all the chain, from transportation to food and goods. And BTW most companies that caused this were startups not really big companies. Much more information on this can be found on the Wall Street Journal.
Sean C. McCarthy SCI, S.L. (www.sci-spain.com)
attached mail follows:
On Vie 24 Ago 2001 16:50, Egan wrote:
> On Fri, 24 Aug 2001 16:30:04 -0300, Manuel Lemos <mlemos
acm.org>
>
> wrote:
> >Can small business live from e-commerce today?
>
> What is the relevance of your question? Do businesses "live" from
> their telephone? Whether they do or not, they need it in either case.
>
> >Do you really believe that? As far as I can recall, this recession
> >started when a "mean judge" convicted Microsoft for anti-trust
> >practices. That caused NASDAQ crash that scared people away from
> >investing in tech company stocks.
>
> One "mean judge" all by himself, caused the NASDAQ crash, eh?
Even more: This person doesn't have the slightest idea of what he's saying. He knows nothing about the dot-com buissness, and why investment was heavilly done in that buissness, which was just vaporware.
DOT-COM is why NASDAQ crashed, not a mean-judge, who did the right thing.
Saludos... :-)
-- Porqué usar una base de datos relacional cualquiera, si podés usar PostgreSQL? ----------------------------------------------------------------- Martín Marqués | mmarquesunl.edu.ar Programador, Administrador, DBA | Centro de Telematica Universidad Nacional del Litoral -----------------------------------------------------------------
attached mail follows:
On Fri, 24 Aug 2001 14:40:47 -0500, "Navid Yar" <Superbus22
home.com>
wrote:
>Until Linux gets better at certain things, I think I have no choice but >to stick with Windows for now (especially in the design area).
True enough, for now.
Steam locomotives were an impressive technology, deeply entrenched with 100 years or more of history. They did not disappear from railroads overnight. But when the railroads realized it was cheaper to operate diesel locomotives, the end of the steam era was just a matter of time.
Egan
attached mail follows:
On Fri, 24 Aug 2001 20:54:33 +0100, "Sean C. McCarthy"
<smccarthy
sci-spain.com> wrote:
>Also the effect that this downturn is going through all the chain, from >transportation to food and goods. And BTW most companies that caused >this were startups not really big companies. Much more information on >this can be found on the Wall Street Journal.
WSJ writers can believe whatever they like.
But I believe this:
Large corporations are like railroad steam locomotives whose era has ended. They may continue running for a while, but in time, many will disappear like the steam locomotive did.
Egan
attached mail follows:
Wait, you blame someone convicting microsoft for a recession? Give me a break. Things were on the way out before it started.
Alan Greenspan was chasing the 'inflation' demon that didn't exist raising interest rates when things were going great. It came back to bite him in the arse with the collapse of the dot-coms. Now he's cutting them even further and we can barely break free.
On 8/24/2001 3:30 PM this was written:
> Do you really believe that? As far as I can recall, this recession > started when a "mean judge" convicted Microsoft for anti-trust > practices. That caused NASDAQ crash that scared people away from > investing in tech company stocks. Many Internet companies dried and > without cash from the investors many went bankrupt. That affected all > the small or big corporations that have grown and were dependent on the > networking market. I don't think this affected much non-technological > companies, big or small. So I don't think your anti-big corporations > speech has much to do with this.
--Thomas Deliduka IT Manager ------------------------- New Eve Media The Solution To Your Internet Angst http://www.neweve.com/
attached mail follows:
On Fri, 24 Aug 2001 16:25:08 -0400, Thomas Deliduka
(thomas
neweve.com) wrote:
>Wait, you blame someone convicting microsoft for a recession? Give >me a break. Things were on the way out before it started.
Was that the cause? Not really, there were many causes and that was just one of them.
Was that when it started? Yes, that's the way I remember it.
attached mail follows:
> > Large corporations are like railroad steam locomotives whose era has > ended. They may continue running for a while, but in time, many will > disappear like the steam locomotive did.
hmm not according to Marx. ;p Anyways,.... back on topic, how to promote php and who is going to do it? Who is in a position to offer a coding competition like Mr Lemos suggested? Who has the $'s that is willing to support it? Is this something that needs to be run through the PHP GROUP?
--ccma
attached mail follows:
Jeff Lewis wrote:
>I actually had a talk with my boss today... > >We discussed different technologies and why we chose them. The reasons we >chose Java/JSP/J2EE etc: > >1) Scalability (number 1 reason) >2) Different projects like EJB etc > >I had been talking about PHP a lot and he says he likes it to but... > >Jeff > What specifically about scalability and Java is he thinking of? I'm not saying at all that large scaleable sites aren't run under Java. But what does your company need to do that Java can that PHP can't? There may be some issues, but there may not.
Scaleability costs money. Yes, perhaps Java can scale. If I had a six figure budget, PHP would 'scale' too - more hardware. But how much are people willing to spend?
attached mail follows:
I've asked for help on this before, and will ask again - I've got a framework up at phpshowcase.com which allows people to post their own project details about PHP deployments, large and small. A growing information store there would be one avenue to help promote PHP. So many times on this list people say 'I want a list of big PHP sites'. Let's pool that information into one area. Anyone else care to contribute their info?
Christopher CM Allen wrote:
> >hmm not according to Marx. ;p >Anyways,.... >back on topic, how to promote php and who is going to do it? Who is in a >position to offer a coding competition like Mr Lemos suggested? >Who has the $'s that is willing to support it? Is this something that needs >to be run through the PHP GROUP? > >--ccma > >
attached mail follows:
Well our company uses a three tiered approach. Web servers in the front, application server iPlanet in the middle and out database server sits in the back.
I would imagine that they have thrown millions at it over time...
He also said he likes how Java is OOP and has great error handling.
Jeff
> -----Original Message-----
> From: Michael Kimsal [mailto:michael
tapinternet.com]
> Sent: Friday, August 24, 2001 5:34 PM
> To: jeff
hyrum.net
> Cc: php-general
lists.php.net
> Subject: Re: [PHP] The future of PHP
>
>
>
>
> Jeff Lewis wrote:
>
> >I actually had a talk with my boss today...
> >
> >We discussed different technologies and why we chose them. The
> reasons we
> >chose Java/JSP/J2EE etc:
> >
> >1) Scalability (number 1 reason)
> >2) Different projects like EJB etc
> >
> >I had been talking about PHP a lot and he says he likes it to but...
> >
> >Jeff
> >
> What specifically about scalability and Java is he thinking of? I'm not
> saying at all
> that large scaleable sites aren't run under Java. But what does your
> company need
> to do that Java can that PHP can't? There may be some issues, but there
> may not.
>
> Scaleability costs money. Yes, perhaps Java can scale. If I had a six
> figure budget, PHP
> would 'scale' too - more hardware. But how much are people willing to
> spend?
>
>
>
>
>
attached mail follows:
>He also said he likes how Java is OOP and has great error handling.
sound more of a judgement on the staffs ability to program than the capability of the language. A great language can have crappy error handling if the designed doesn't program it in well.
Dave
attached mail follows:
I would't say that. he says it's modular and easier to code in OOP.
Jeff
> -----Original Message-----
> From: Dave [mailto:dave
hawk-systems.com]
> Sent: Friday, August 24, 2001 6:15 PM
> To: jeff
hyrum.net; Michael Kimsal
> Cc: php-general
lists.php.net
> Subject: RE: [PHP] The future of PHP
>
>
> >He also said he likes how Java is OOP and has great error handling.
>
> sound more of a judgement on the staffs ability to program than
> the capability
> of the language. A great language can have crappy error handling if the
> designed doesn't program it in well.
>
> Dave
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
>
>
attached mail follows:
<opinion> PHP has many OOP features which are easy to use and beneficial, without the constraints of a more heavily OO system like Java </opinion>
I think error handling *could* be better in PHP - apparently they're thinking about a try/catch Java-esque setup in the next Zend engine. All is not lost!
As a RAD tool, PHP seems to have a pretty good foundation - it's FAST, to execute and to develop, yet flexible enough to accomodate some of the OOP stuff and other Java-like things that will be introduced. Best of both worlds, really.
I hate to bring up that eweek article (it's getting old now) but against Tomcat, PHP was 3x as fast. re: scaleability, you have to spend a lot more on hardware or Java middleware to be able to handle similar loads that you could just coding under PHP. Broad generalization, I know, but that math seems pretty basic.
Tomcat = 13 pages/sec PHP = 47 pages/sec
IMNSHO - "WOW".
re: modularity.
PHP can be extremely sloppy or coded extremely modularly. I think it's a shame that most tutorials on PHP (and ASP, from what I've experienced) show comingling of code and HTML - far more than we ever do in day-to-day PHP work. People get the impression that that's the only way to do stuff, and it's not. It's often the QUICKEST way for small projects (I needed a quick contact form yesterday and built one in a couple minutes with PHP. I don't think it would have been that painless under Java.) But we use PHP on some very large projects too - it requires you to plan ahead - but that should be the basis for any project, regardless of technology. :)
Michael Kimsal http://www.tapinternet.com/php/ PHP Training Courses 734-480-9961 Jeff Lewis wrote:
>I would't say that. he says it's modular and easier to code in OOP.
>
>Jeff
>
>>-----Original Message-----
>>From: Dave [mailto:dave
hawk-systems.com]
>>Sent: Friday, August 24, 2001 6:15 PM
>>To: jeff
hyrum.net; Michael Kimsal
>>Cc: php-general
lists.php.net
>>Subject: RE: [PHP] The future of PHP
>>
>>
>>>He also said he likes how Java is OOP and has great error handling.
>>>
>>sound more of a judgement on the staffs ability to program than
>>the capability
>>of the language. A great language can have crappy error handling if the
>>designed doesn't program it in well.
>>
>>Dave
>>
>>
>>--
>>PHP General Mailing List (http://www.php.net/)
>>To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
>>For additional commands, e-mail: php-general-help
lists.php.net
>>To contact the list administrators, e-mail: php-list-admin
lists.php.net
>>
>>
>>
>
attached mail follows:
personally I would say the same about PHP...
I include a select collection of pages with functions that have been preprogrammed... interacting with other files, sites ,server programs, databases... and so forth as necessary.
select the right function, enter variables...
the only real work done is in fine tuning or developing new master functions...
to each thier own
Dave
>-----Original Message-----
>From: Jeff Lewis [mailto:jeff
hyrum.net]
>Sent: Friday, August 24, 2001 6:22 PM
>To: Dave; Michael Kimsal
>Cc: php-general
lists.php.net
>Subject: RE: [PHP] The future of PHP
>
>
>I would't say that. he says it's modular and easier to code in OOP.
>
>Jeff
>
>> -----Original Message-----
>> From: Dave [mailto:dave
hawk-systems.com]
>> Sent: Friday, August 24, 2001 6:15 PM
>> To: jeff
hyrum.net; Michael Kimsal
>> Cc: php-general
lists.php.net
>> Subject: RE: [PHP] The future of PHP
>>
>>
>> >He also said he likes how Java is OOP and has great error handling.
>>
>> sound more of a judgement on the staffs ability to program than
>> the capability
>> of the language. A great language can have crappy error handling if the
>> designed doesn't program it in well.
>>
>> Dave
>>
>>
>> --
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
>> For additional commands, e-mail: php-general-help
lists.php.net
>> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>>
>>
>>
>
>
attached mail follows:
>PHP can be extremely sloppy or coded extremely modularly. I think it's >a shame that >most tutorials on PHP (and ASP, from what I've experienced) show >comingling of code >and HTML - far more than we ever do in day-to-day PHP work. People get the >impression that that's the only way to do stuff, and it's not. It's >often the QUICKEST >way for small projects (I needed a quick contact form yesterday and >built one in a couple >minutes with PHP. I don't think it would have been that painless under >Java.)
Often I have found though that those asking questions are limited in their ability to understand the finer programming methods though...
you give an explanation that uses arrays and functions and end up getting a "I don't understand" or "why does that do that"... and I consider those two the bare essentials for working smartly with PHP.
Dave
attached mail follows:
Most of my stuff is mingled right with the HTML. Heh. I guess I haven't advanced to the all-code-no-html formatting. :-)
Mainly it's like that because I work with a team of designers, They make the shell of the site, I then have to fill in the code. I'm sure many of you will say y'all do it the same way but don't mingle your code. I guess I have to figure it out.
On 8/24/2001 6:37 PM this was written:
> PHP can be extremely sloppy or coded extremely modularly. I think it's > a shame that > most tutorials on PHP (and ASP, from what I've experienced) show > comingling of code > and HTML - far more than we ever do in day-to-day PHP work. People get the > impression that that's the only way to do stuff, and it's not. It's > often the QUICKEST > way for small projects (I needed a quick contact form yesterday and > built one in a couple > minutes with PHP. I don't think it would have been that painless under > Java.) > But we use PHP on some very large projects too - it requires you to > plan ahead - > but that should be the basis for any project, regardless of technology. :)
--Thomas Deliduka IT Manager ------------------------- New Eve Media The Solution To Your Internet Angst http://www.neweve.com/
attached mail follows:
> Can small business live from e-commerce today?
Define small. Define e-commerce.
How about this one, doing *EXTREMELY* well selling CDs online:
Of course, that has almost nothing to do with his choice of PHP (the language he could understand the easiest) and everything to do with intelligent business decisions on the back-side.
No VC. No "we'll make money later". Just great service at a fair price.
I'm sure there are others out there.
*CAN* it be done? Sure.
Can the idiots who invested millions in companies with a business plan that involved *NO* revenue model make it? No.
As far as the future of PHP is concerned, all I can say is: "Scoreboard" :-)
Does Netcraft or e-Soft show JSP surpassing PHP? No.
Do you really think PHP will go stagnant at this point? Try looking at the CVS logs.
Are you going to convince some Java-kid that he's wrong? No.
-- WARNING richardzend.com address is an endangered species -- Use ceo
l-i-e.com 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
attached mail follows:
> >Do you really believe that? As far as I can recall, this recession > >started when a "mean judge" convicted Microsoft for anti-trust > >practices. That caused NASDAQ crash that scared people away from > >investing in tech company stocks.
This is the most warped view-point I have heard...
The NASDAQ crashed when investors finally figured out that all the dot-coms they had sunk billions into never had *ANY* revenue at all, and no real plan how to generate it, other than the IPO scam itself.
At a certain point, even Wall Street realizes that there has to be some reality behind the numbers.
There was no question in my mind there would be a net-recession dot-bomb -- I'm surprised it took that long for the VCs to wise up.
Microsoft's problems had virtually nothing to do with the NASDAQ crash.
-- WARNING richardzend.com address is an endangered species -- Use ceo
l-i-e.com 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
attached mail follows:
Hello,
Egan wrote:
>
> On Fri, 24 Aug 2001 16:30:04 -0300, Manuel Lemos <mlemos
acm.org>
> wrote:
>
> >Can small business live from e-commerce today?
>
> What is the relevance of your question? Do businesses "live" from
> their telephone? Whether they do or not, they need it in either case.
AFAIK, it costs a lot more money to have any start and operate a e-commerce business than a telephone. What is the motivation to spend that much money? Internet hype?
> >Do you really believe that? As far as I can recall, this recession > >started when a "mean judge" convicted Microsoft for anti-trust > >practices. That caused NASDAQ crash that scared people away from > >investing in tech company stocks. > > One "mean judge" all by himself, caused the NASDAQ crash, eh? > > I am surely astounded to learn that! Good day and goodbye!
Maybe that is because I am not a native English speaker. Maybe if I change the word "caused" by the word "triggered" in my sentence it will be more accurate.
Anyway, other than that, I read the messages ahead and it sounds that most people really forget the series of events that started NASDAQ crash. Maybe these links will remind you what happen after April 3, 2000:
Bad news started here: http://cnnfn.cnn.com/2000/04/03/technology/microsoft/
The day after: http://cnnfn.cnn.com/2000/04/04/technology/special_techstocks/
If you were on vacation then and did not notice how did that happen, there's one more reason to blame Microsoft! :-)
Regards, Manuel Lemos
attached mail follows:
Hello,
Michael Kimsal wrote: > > I've asked for help on this before, and will ask again - I've got a > framework up at > phpshowcase.com which allows people to post their own project details about > PHP deployments, large and small. A growing information store there > would be one > avenue to help promote PHP. So many times on this list people say 'I > want a list of > big PHP sites'. Let's pool that information into one area. Anyone else > care to contribute > their info?
If you read my previous message about marketing PHP, notice how I try to highlight that you really need to motivate people to contribute.
Regards, Manuel Lemos
attached mail follows:
Hello,
Richard Lynch wrote: > > > Can small business live from e-commerce today? > > Define small. > Define e-commerce. > > How about this one, doing *EXTREMELY* well selling CDs online: > > http://CDBaby.com/ > > Of course, that has almost nothing to do with his choice of PHP (the > language he could understand the easiest) and everything to do with > intelligent business decisions on the back-side. > > No VC. > No "we'll make money later". > Just great service at a fair price. > > I'm sure there are others out there. > > *CAN* it be done? Sure. > > Can the idiots who invested millions in companies with a business plan that > involved *NO* revenue model make it? No.
What is "doing extremely well"? Do you know that from facts or you have just been told?
If they are really doing so well because they have a business plan with a revenue model, why do they succeed when others that also have a business plan with revenue model don't?
Would their model work outside the US?
> As far as the future of PHP is concerned, all I can say is: "Scoreboard" > :-) > > Does Netcraft or e-Soft show JSP surpassing PHP? No. > > Do you really think PHP will go stagnant at this point? Try looking at the > CVS logs. > > Are you going to convince some Java-kid that he's wrong? No.
All I can say to you is that there was "then", then there is "now" and later "we'll see".
Meaning, in the past PHP has grown its user base because it was advanced for Web development compared to other languages, now other languages are catching up, later we'll see if PHP will keep its popularity when there is nobody marketing it assuring that PHP is a credible brand as programming language.
Anyway, once in a while I bother to make (intentionally) constructive criticisms to the way PHP development and its community are going. Usually I get a some of "nay -sayers", tipically in denial, trying to contradict me. So, I am kind of used to it. Depite of that, it is interesting that given some time I can see some positive reaction towards what I say, although not admiting that I influenced their views.
Never mind, as long as people end up listening and taking some positive action, it was worth spending my very scarce free time. :-)
Regards, Manuel Lemos
attached mail follows:
Richard Lynch wrote: > > > >Do you really believe that? As far as I can recall, this recession > > >started when a "mean judge" convicted Microsoft for anti-trust > > >practices. That caused NASDAQ crash that scared people away from > > >investing in tech company stocks. > > This is the most warped view-point I have heard... > > The NASDAQ crashed when investors finally figured out that all the dot-coms > they had sunk billions into never had *ANY* revenue at all, and no real plan > how to generate it, other than the IPO scam itself. > > At a certain point, even Wall Street realizes that there has to be some > reality behind the numbers. > > There was no question in my mind there would be a net-recession dot-bomb -- > I'm surprised it took that long for the VCs to wise up.
Exactly. :-)
> Microsoft's problems had virtually nothing to do with the NASDAQ crash.
You do know that Microsoft conviction started NASDAQ crash, don't you? (see the links in my other message)
Of course, Microsoft did not cause it (unless you believe in the theory of conspiracy ) :-)
Regards, Manuel Lemos
attached mail follows:
I do have the little script active on my website - http://www.tom-malone.com. I don't know anyone who has a mac though. Isn't there a site somewhere that allows you to view what your site looks like in other browsers/OSs? I've searched but can't find one. Or perhaps some kind mac user on the list would view source on it to determine if it worked by checking the font tags for face="geneva"? I could compensate you by being extremely nice to you for the rest of your life... =)
Tom Malone Web Designer http://www.tom-malone.com
-----Original Message-----
From: Gabe da Silveira [mailto:jiblet
visi.com]
Sent: Thursday, August 23, 2001 2:23 PM
To: php-general
lists.php.net
Subject: [PHP] Re: code check
Perhaps you could put it on a webpage and ask a Mac user to see if it works.
BTW, there is no reason to use preg_match for that. Instead use strpos(), it is MUCH faster.
In article <JPEOKCOKMOJMOOOEPBHJMEKBEKAA.tom
tom-malone.com>,
tom
tom-malone.com (Tom Malone) wrote:
> Sorry to bother you all with this, but I have no way to test this, as I have > no access to a Mac. Could you tell me if this little piece of code looks as > if it would work (detect whether someone's using the Mac OS)? > > if (preg_match("/mac/i", "$HTTP_USER_AGENT") || preg_match("/macintosh/i", > "$HTTP_USER_AGENT") || preg_match("/ppc/i", "$HTTP_USER_AGENT") || > preg_match("/PowerPC/i", "$HTTP_USER_AGENT")): > $basefont = "Geneva"; > else: > $basefont = "Verdana, Helvetica, Serif"; > endif; > > It doesn't return an error, but that doesn't mean it works. I really > appreciate your help. TIA > > Tom Malone > Web Designer > http://www.tom-malone.com >
-- __________________________________ Gabe da Silveira, Web Designer Twin Cities Student Unions University of Minnesota http://www.coffman.umn.eduwFone: (612)624-7270 eMail: jiblet
visi.com hPage: http://www.visi.com/~jiblet
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net For additional commands, e-mail: php-general-help
lists.php.net To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
I can't find a way in PHP to behave on multiple files, without knowing the script somehow knowing the filenames already.
In particular, I want to delete all files in a directory. unlink("*") doesn't seem to work with wildcards (at least not on my test Windows environment).
I can't find any function that gets me a list of filenames, either.
Am I missing something, or do I have to shell out to do this?
- Ken
kenzo
free-music.com
attached mail follows:
I got my answer: Use directory functions, not filesystem functions:
http://www.php.net/manual/en/ref.dir.php
- Ken
kenzo
free-music.com
At 02:51 PM 8/24/01 -0400, Ken wrote:
>I can't find a way in PHP to behave on multiple files, without knowing the script somehow knowing the filenames already.
>
>In particular, I want to delete all files in a directory. unlink("*") doesn't seem to work with wildcards (at least not on my test Windows environment).
>
>I can't find any function that gets me a list of filenames, either.
>
>Am I missing something, or do I have to shell out to do this?
>
>- Ken
>kenzo
free-music.com
attached mail follows:
If you can't trust your clients with the source code, what are you telling your clients?
J
Erik H. Mathy wrote:
>> Encode (or compile) the source. >> >> Zend's compiler costs 2400 dollars. At this cost is better to >> release your code on an open source license ;-) > > The open source license is only as effective as your ability to hire a > lawyer to enforce it. ;) > > It also depends on: > > a.) How much you're charging for the product > b.) If you feel confident in your ability to police your clients. > > My .02 cents, IMHO, etc, etc... > - Erik
attached mail follows:
Zend's compiler doesn't really cost that much. If you look at it that way yes.
But if you get a developer membership to Zend ($50 a month), you get the encoder as long as you have a membership (min 1 year).
So really, you can get the encoder for $600....
-----Original Message-----
From: J Smith [mailto:dark_panda
hushmail.com]
Sent: August 24, 2001 5:28 AM
To: php-general
lists.php.net
Subject: RE: [PHP] Re: PHP secure
If you can't trust your clients with the source code, what are you telling your clients?
J
Erik H. Mathy wrote:
>> Encode (or compile) the source. >> >> Zend's compiler costs 2400 dollars. At this cost is better to >> release your code on an open source license ;-) > > The open source license is only as effective as your ability to hire a > lawyer to enforce it. ;) > > It also depends on: > > a.) How much you're charging for the product > b.) If you feel confident in your ability to police your clients. > > My .02 cents, IMHO, etc, etc... > - Erik
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribelists.php.net For additional commands, e-mail: php-general-help
lists.php.net To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
>-----Original Message-----
>From: J Smith [mailto:dark_panda
hushmail.com]
>Sent: Friday, August 24, 2001 8:28 AM
>To: php-general
lists.php.net
>Subject: RE: [PHP] Re: PHP secure
>
>
>If you can't trust your clients with the source code, what are you telling
>your clients?
>
that we are willing to develop a 10k interface/package for them to use on thier site, and charge them only 3 for it, but we retain the intel. prop on it because we are going to offset the cost by licensing it to others...
all it is as text...
Dave
attached mail follows:
>I have a burning question that needs to be looked at, and see if
someone can give me an idea of a
>way to get the desired result. Are you ready.
>
>Here is my problem, I need to strip out of an mbox file everything but
the body of the email, now
>to complicate matters this is an extremly large file, now seeing as it
is a mbox file, and there
>for has a set pattern of information display, I figure there must be
some way of striping the
>header information.
>
>Here is my code, which displayes the file, very easy and gives me the
file size.
>
><?
>$fcontents = file("/home/sites/projects/web/extractor/Main.mbx",
"r");
>$file_size = filesize ("/home/sites/projects/web/extractor/Main.mbx");
>echo "<b>Size of this file is</b> - " . $file_size . "<br><br>";
>while (list ($line_num, $line) = each ($fcontents)) {
>echo "$line<br>\n";
>}
>clearstatcache (void)
>?>
>
>Here is the output resulting from the above code, I have only copied 3
listings.
>
>Size of this file is - 2915641
>
>From Tue Aug 21 10:32:42 2001
>Received: from killer2.nextmill.net [216.115.243.3] by
thedigitallab.com with ESMTP
>(SMTPD32-6.05) id AB392F8015A; Tue, 21 Aug 2001 10:32:41 -0700
>Subject: Kenwood Sovereign DVD Promo
>Sender: "alanlim
mail.com"
>From: "alanlim
mail.com"
>Date: Tue, 21 Aug 2001 10:32:41 -0700
>To: "kenwood
thedigitallab.com"
>X-Priority: 1
>X-MSMail-Priority: High
>Content-Transfer-Encoding: Quoted-Printable
>MIME-Version: 1.0
>Content-Type: text/plain;
>charset="iso-8859-1"
>X-Mailer: JMail 3.7.0 by Dimac (www.dimac.net)
>Message-Id: <200108211032115.SM01248
killer2.nextmill.net>
>X-RCPT-TO:
>X-UIDL: 298071585
>Status: U
>
>Contact Us
>Subject: Kenwood Sovereign DVD Promo
>State:: CA
>Name:: Alan T. Lim
>Address:: 3494 Yuba Avenue
>City:: San Jose
>e-mail: alanlim
mail.com
>Zip:: 95117
>opt-in: yes
>Button: Send Request
>
>From Tue Aug 21 10:32:50 2001
>Received: from killer2.nextmill.net [216.115.243.3] by
thedigitallab.com with ESMTP
>(SMTPD32-6.05) id AB414EB01A6; Tue, 21 Aug 2001 10:32:49 -0700
>Subject: Kenwood Sovereign DVD Promo
>Sender: "pwu888
hotmail.com"
>From: "pwu888
hotmail.com"
>Date: Tue, 21 Aug 2001 10:32:50 -0700
>To: "kenwood
thedigitallab.com"
>X-Priority: 1
>X-MSMail-Priority: High
>Content-Transfer-Encoding: Quoted-Printable
>MIME-Version: 1.0
>Content-Type: text/plain;
>charset="iso-8859-1"
>X-Mailer: JMail 3.7.0 by Dimac (www.dimac.net)
>Message-Id: <20010821103226.SM01248
killer2.nextmill.net>
>X-RCPT-TO:
>X-UIDL: 298071586
>Status: U
>
>Contact Us
>Subject: Kenwood Sovereign DVD Promo
>State:: Colorado
>Name:: Paul Wu
>Address:: 2313 Hampshire Road
>City:: Fort Collins
>e-mail: pwu888
hotmail.com
>Zip:: 80526
>opt-in: yes
>Button: Send Request
>
>From Tue Aug 21 10:32:58 2001
>Received: from killer2.nextmill.net [216.115.243.3] by
thedigitallab.com with ESMTP
>(SMTPD32-6.05) id AB494ED01A6; Tue, 21 Aug 2001 10:32:57 -0700
>Subject: Kenwood Sovereign DVD Promo
>Sender: "mjastuart
yahoo.com"
>From: "mjastuart
yahoo.com"
>Date: Tue, 21 Aug 2001 10:32:57 -0700
>To: "kenwood
thedigitallab.com"
>X-Priority: 1
>X-MSMail-Priority: High
>Content-Transfer-Encoding: Quoted-Printable
>MIME-Version: 1.0
>Content-Type: text/plain;
>charset="iso-8859-1"
>X-Mailer: JMail 3.7.0 by Dimac (www.dimac.net)
>Message-Id: <200108211032737.SM01248
killer2.nextmill.net>
>X-RCPT-TO:
>X-UIDL: 298071587
>Status: U
>
>Contact Us
>Subject: Kenwood Sovereign DVD Promo
>State:: Kentucky
>Name:: Janis Ross
>Address:: 2033 Damson Drive
>City:: Villa Hills
>e-mail: mjastuart
yahoo.com
>Zip:: 41017
>Button: Send Request
>
>This is the desired result:
>
>
>Kenwood Sovereign DVD Promo Kentucky Janis Ross 2033 Damson Drive
Villa Hills mjastuart
yahoo.com
>41017
>Kenwood Sovereign DVD Promo Colorado Paul Wu 2313 Hampshire Road Fort
Collins pwu888
hotmail.com
>80526 yes
>Kenwood Sovereign DVD Promo CA Alan T. Lim 3494 Yuba Avenue San Jose
alanlim
mail.com 95117 yes
>
>Please any help would be greatly appreciated ...
>
>thanks
>
>dan
>
>=====
>Dan McCullough
===== Dan McCullough ------------------------------------------------------------------- "Theres no such thing as a problem unless the servers are on fire!" h: 603.444.9808 w: McCullough Family w: At Work
__________________________________________________ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/
attached mail follows:
> >I have a burning question that needs to be looked at, and see if > someone can give me an idea of a > >way to get the desired result. Are you ready. > > > >Here is my problem, I need to strip out of an mbox file everything but > the body of the email, now > >to complicate matters this is an extremly large file, now seeing as it > is a mbox file, and there > >for has a set pattern of information display, I figure there must be > some way of striping the > >header information.
<?php $days = "Mon|Tue|Wed|Thu|Fri|Sat|Sun"; $months = "Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec"; $d = "[0-9]"; # This probably needs the : escaped with \\ or \\\\ or something... # And you may need \r\n instead of just \n... $fromline = "^From $days $months $d$d $d$d:$d$d:$d$d $d$d$d$d\n\$";
#Untested code: $mbox = fopen("/path/to/mbox", 'r') or die("Could not open mailbox."); $inheaders = TRUE; while (!feof($mbox)){ # Skip headers: $line = "This is not a blank line."; # I'm not sure if it's \r\n or just \n, but this will work: while (!feof($mbox) && ($line != "\n") && $line != "\r\n"){ $line = fgets($mbox, 1000000); } # Now you can parse the contents of the email... $contactus = fgets($mbox, 1000000); if ($contactus != "Contact Us\n"){ # This is not a "Contact Us" email # Some goof sent real email here. Do something with it. } else{ $errors = 0; #Snag the subject: $subject = fgets($mbox, 1000000); $subject = explode(": ", $subject); if (count($subject) != 2){ $errors++; } else{ $subject = $subject[1]; }
#Snag their state: $state = fgets($mbox, 1000000); # Are there really two colons in there?... $state = explode(":: ", $state); if (count($state) != 2){ $errors++; } else{ $state = $state[1]; }
# I'm not typing the rest of the fields... # ...
# Output the information you have parsed: if (!$errors){ echo "$subject\t$state\t$name\t$address\t$city\t$email\t$zip\t<BR>\n"; } else{ # This email was not processed properly. Do something with it. }
# Skip to the next message: while (!feof($mbox) && !ereg($fromline, $line){ $line = fgets($mbox, 1000000); } } } ?>
-- WARNING richardzend.com address is an endangered species -- Use ceo
l-i-e.com 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
attached mail follows:
Hi,
I wondering if it was possible to use limit on part of a query and not all.
this is my query which works the way it should.
$sql = "SELECT users.names FROM users, selection Where users.name = selection.name and setting = 'on' limit 1 ";
What I would like to do is put a limit of 1 to only this part -----> setting = 'on' limit 1 <--------------- and not on the rest.
You see, there are many users.name that have a setting = 'on'............I want, ALL those names , ONLY once..
How do I do this?
attached mail follows:
This is a sql question: Limit is limiting number of records that will come out of query. So, it would not work.
SELECT users.names FROM users, selection Where users.name = selection.name and setting = 'on' ;
you could use SELECT DISTINCT users.names FROM users, selection Where users.name = selection.name and setting = 'on' ;
or SELECT users.names FROM users, selection Where users.name = selection.name and setting = 'on' group by users.names
--- Jeremy Morano <jeremy
prepresshelp.com> wrote:
>
> Hi,
>
>
> I wondering if it was possible to use limit on part of a
> query and not all.
>
>
>
>
> this is my query which works the way it should.
>
> $sql = "SELECT users.names
> FROM users, selection
> Where users.name = selection.name
and setting =
> 'on'
> ";
>
>
>
>
> What I would like to do is put a limit of 1 to only this
> part -----> setting
> = 'on' limit 1 <--------------- and not on the rest.
>
> You see, there are many users.name that have a setting =
> 'on'............I
> want, ALL those names , ONLY once..
>
> How do I do this?
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail:
> php-general-unsubscribe
lists.php.net
> For additional commands, e-mail:
> php-general-help
lists.php.net
> To contact the list administrators, e-mail:
> php-list-admin
lists.php.net
>
===== Mehmet Erisen http://www.erisen.com
__________________________________________________ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/
attached mail follows:
you are probably looking for unique
if not, I am not understanding what you are trying to do
Dave
>-----Original Message-----
>From: Jeremy Morano [mailto:jeremy
prepresshelp.com]
>
>I wondering if it was possible to use limit on part of a query and not all.
>
>this is my query which works the way it should.
>
>$sql = "SELECT users.names
> FROM users, selection
> Where users.name = selection.name and setting = 'on' limit 1
> ";
>
>What I would like to do is put a limit of 1 to only this part -----> setting
>= 'on' limit 1 <--------------- and not on the rest.
>
>You see, there are many users.name that have a setting = 'on'............I
>want, ALL those names , ONLY once..
>
>How do I do this?
>
attached mail follows:
I'm using preg_replace and getting the following error
parse error, expecting `T_VARIABLE' or `'$''
anyone know where I can find out abut them, I did a search of the manual but nothing came up.
Paul Roberts
roberts_paul
bigfoot.com
+++++++++++++++++++++
attached mail follows:
At 02:31 PM 8/24/01 +0100, Paul Roberts wrote: >I'm using preg_replace and getting the following error > >parse error, expecting `T_VARIABLE' or `'$''
This sounds like PHP was expecting a variable name somewhere where you didn't provide one. Perhaps you left off a "$" before a variable name.
It might not be in your preg_replace call.
- Ken
kenzo
free-music.com
ken's last ever radio extravaganza http://free-music.com/ken/extrav/
>anyone know where I can find out abut them, I did a search of the manual but
>nothing came up.
>
>Paul Roberts
>
>roberts_paul
bigfoot.com
attached mail follows:
At 06:29 PM 8/24/01 +0200, Ralph Deffke wrote: >I have developed a web portal for big compamies with a lot of traffic on >their pages. main functions, like member authentication etc. are called >on every page request. it would make sence to have them ready >enterpretet to skip enterpretation on each request. i know that there >are tools arround like Zent Cache. however they require an >recompilation/binding on the server. but this is on such big corporate >servers almost impossible. > >Does anybody know a solution for that ?
Try "Alternative PHP Cache", open source: http://apc.communityconnect.com/
- Ken
kenzo
free-music.com
ken's last ever radio extravaganza http://free-music.com/ken/extrav/
attached mail follows:
Has anyone come up with an abstraction layer that would allow the users of their software to select either flat file or mySQL?
If so, is it downloadable somewhere or does anyone know or have any kind of tips? :)
Jeff
attached mail follows:
"Juraj Hasko" <hasko
cacleasing.sk> wrote in message
news:007c01c12ca3$c2ae51a0$ec01db0a
HASKO...
> Mail-Gear hasn't sendmail wrapper.
>
How about nullmailer? It has sendmail wrapper and could send message to any smtp or qmqp servers.
http://untroubled.org/nullmailer/
-- Yasuo Ohgaki
attached mail follows:
I have a script with combination:
$ins_u =
mysql_query("INSERT INTO users (name,email)
VALUES ('$u_name','$u_email')");
$userid =
mysql_insert_id($ins_u);
It's working fine on local server but now I put it on the web and it sais: Warning: Supplied argument is not a valid MySQL-Link resource in /home/sites/site21/web/incr/submition.inc on line 30 (which is line above) Youri
attached mail follows:
Your mysql_connect is wrong.
Stop using just
to suppress errors, and start doing something useful with
http://php.net/mysql_error like sending it to http://php.net/error_log or
something.
-- WARNING richardzend.com address is an endangered species -- Use ceo
l-i-e.com 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: Brack <brak
nettaxi.com> Newsgroups: php.general To: <php-general
lists.php.net> Sent: Friday, August 24, 2001 3:25 PM Subject: HELP!!!
> I have a script with combination: > $ins_u =
mysql_query("INSERT INTO users (name,email) > VALUES ('$u_name','$u_email')"); > $userid =
mysql_insert_id($ins_u); > > It's working fine on local server but now I put it on the web and it > sais: > Warning: Supplied argument is not a valid MySQL-Link resource in > /home/sites/site21/web/incr/submition.inc on line 30 > (which is line above) > Youri >
attached mail follows:
Okay I have stripped all header and bogus crap out of this file. Now I am left with formatting and breaking the data up. How can I do that?
Here is the script that gets me a clean file and print out. These a piece thats missing up that is a command line script that parses the file for this information.
<? $fcontents = file("/tmp/mail_file.tmp", "r"); $file_size = filesize ("/tmp/mail_file.tmp"); echo "<b>Size of this file is</b> - " . $file_size . "<br><br>"; while (list ($line_num, $line) = each ($fcontents)) { //name, address, city, state, zip, email, optin end of line //can you remove the field name echo "$line<br>"; } clearstatcache (void) ?>
Here is my output:
State:: CA
Name:: Alan T. Lim
Address:: 3494 Yuba Avenue
City:: San Jose
e-mail: alanlim
mail.com
Zip:: 95117
State:: Colorado
Name:: Paul Wu
Address:: 2313 Hampshire Road
City:: Fort Collins
e-mail: pwu888
hotmail.com
Zip:: 80526
State:: Kentucky
Name:: Janis Ross
Address:: 2033 Damson Drive
City:: Villa Hills
e-mail: mjastuart
yahoo.com
Zip:: 41017
Here is the desired result, this also involves reordering information:
Alan T. Lim 3494 Yuba Avenue San Jose CA 95117 alanlim
mail.com yes
Paul Wu 2313 Hampshire Road Fort Collins Colorado 80526 pwu888
hotmail.com yes
Janis Ross 2033 Damson Drive Villa Hills Kentucky 41017 mjastuart
yahoo.com yes
any help would be appreciated
thanks
dan
===== Dan McCullough ------------------------------------------------------------------- "Theres no such thing as a problem unless the servers are on fire!" h: 603.444.9808 w: McCullough Family w: At Work
__________________________________________________ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/
attached mail follows:
So sprach »Jeremy Morano« am 2001-08-24 um 11:18:10 -0400 : > echo " $team \n ";
HTML?
echo nl2br(" $team \n ");
Alexander Skwar
-- How to quote: http://learn.to/quote (german) http://quote.6x.to (english) Homepage: http://www.digitalprojects.com | http://www.iso-top.de iso-top.de - Die günstige Art an Linux Distributionen zu kommen Uptime: 13 hours 38 minutes
attached mail follows:
On 24 Aug 01, at 11:18, Jeremy Morano wrote:
> echo " $team \n ";
echo "$team<br>\n";
attached mail follows:
what is the switch to configure pspell in php? is it --enable-pspell? because i've tried that and --with-pspell and it's not working.. when i pull up my phpinfo.php pspell isn't configured with it. Anyone know how to configure it pspell with php?
jay
attached mail follows:
Hello everyone,
I'm a newbie here, so please forgive me if this topic has been discussed previously (I could find no mention of it).
I recently compiled PHP4.0.6 with gd1.8.4 and zlib 1.1.3 and experienced no problems --except! If you use ob_gzhandler as your output handler, you'll want to make sure any image functions you use in PHP return valid images for Netscape (I tried Netscape Communicator 4.7 on Linux, Irix and Windows and got "broken images"). Funny thing is, if you right-clicked on the image and did "view image", the browser would show it correctly.
After much frustration, I realized that using _no_ output handler (at least not ob_gzhandler) solved the problem.
I assume this is due to a different way of gzipping data in either PHP or zlib from previous versions.
I hope someone finds this information useful -- or can provide the "real" explanation, maybe even a better solution.
Martin
attached mail follows:
Hi, I just had a random thought as I was working on some php and perl code today and I ask, has anyone out there created a PHP to Perl converter? Similar to the ASP to PHP converter. I think only God could make a Perl2PHP converter.
attached mail follows:
Why would anybody bother? Perl can execute a PHP script if it needs to...
And if you already had it in PHP, you'd never want to code it in Perl :-) :-) :-)
-- WARNING richardzend.com address is an endangered species -- Use ceo
l-i-e.com 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: Nathan <nathan
ceweekly.com> Newsgroups: php.general To: <php-general
lists.php.net> Sent: Friday, August 24, 2001 4:40 PM Subject: PHP2Perl converter?
> Hi, I just had a random thought as I was working on some php and perl > code today and I ask, has anyone out there created a PHP to Perl > converter? Similar to the ASP to PHP converter. I think only God could > make a Perl2PHP converter. >
attached mail follows:
does anybody knows that how can i change the arg_separator?
i tried ini_set function but it didn't work.
Coskun SUNALI
Thanks.
attached mail follows:
By the time you call your ini_set function, it's too late.
Try altering php.ini or .htaccess
Or, call ini_set, but then use parse_url($PATH_INFO) or something.
-- WARNING richardzend.com address is an endangered species -- Use ceo
l-i-e.com 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: Coskun Sunali / Turkey <php_news
tr.gen.tr> Newsgroups: php.general To: <php-general
lists.php.net> Sent: Friday, August 24, 2001 5:59 PM Subject: arg_separator
> does anybody knows that how can i change the arg_separator? > > i tried ini_set function but it didn't work. > > Coskun SUNALI > > Thanks. > >
attached mail follows:
> How good is php in terms of managing database (sybase) data compare to > Java? I mean to display on the web?
PHP will talk to Sybase just fine.
I assume Java will also.
If you don't know either language, PHP is probably easier to understand.
First, build your database in Sybase, and use the Sybase "monitor" to do a few queries "by hand". The "monitor" will be a command-line utility to let you type in queries and see their results in simple ASCII layout.
Then, read http://php.net/sybase/
You'll particularly want to focus on the functions to: connect to the database execute a query get the results from the execution
Be sure to use error-checking on the return values of any functions you call.
IE, sybase_connect is supposed to return an integer, but will return FALSE if the connection failed. So check what you get back, and if it's FALSE, print out an error message for yourself.
-- WARNING richardzend.com address is an endangered species -- Use ceo
l-i-e.com 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
attached mail follows:
The hard drive may be showing you the file's ALLOCATED size, which will be an "even" number.
What does: <?php echo filesize('/path/to/new/file/');?> give you?
-- WARNING richardzend.com address is an endangered species -- Use ceo
l-i-e.com 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: Ben-Nes Michael <miki
canaan.co.il> To: Richard Lynch <ceo
l-i-e.com>; <php-general
lists.php.net> Sent: Thursday, August 23, 2001 3:03 AM Subject: Re: [PHP] Re: imagemagick and file size
> Hi Again > > Strange but same command to return the $data or to save it to the HD > returned diffrent data length > > when the data returend to $data > strlen($data) -> output 4075 > while the saved file is -> 4252 > > Any one know why there is diffrence ? > > > ----- Original Message ----- > From: "Richard Lynch" <ceo
l-i-e.com> > To: <php-general
lists.php.net> > Sent: Thursday, August 23, 2001 2:01 AM > Subject: [PHP] Re: imagemagick and file size > > > > > function example() { > > > $convert = "cat $userfile | /usr/X11R6/bin/convert - $type:-"; > > > return `$convert`; > > > } > > > > > > the returned binary value is uploaded to the DB. > > > > > > My main problem is that I don't know how to measure the decreased image > > size > > > while its stored in the variable. > > > > Use http://php.net/strlen on your binary value. Use > http://php.net/filesize > > on your input file. > > -------------------------- > Canaan Surfing Ltd. > Internet Service Providers > Ben-Nes Michael - Manager > Tel: 972-4-6991122 > http://sites.canaan.co.il > -------------------------- >
attached mail follows:
Is there any particular benefit to using a certain file extension on your website? I use .php4 but are search engines and the like as a result ignoring me?
- seb
attached mail follows:
What debuggers do you guys recommend? I've installed a trial copy of Zend IDE, but it seems a bit buggy to me, and I am having a hard time finding support for it (without payin $180 per incident!)
I also have installed Komodo IDE, but I can't even get it to work! ARG
My projects are getting complicated enough that a full-featured debugger would be helpful...
-- ================== Grant Boggs http://www.cornersonesoftware.ws
attached mail follows:
> What debuggers do you guys recommend? I've installed a trial copy of > Zend IDE, but it seems a bit buggy to me, and I am having a hard time > finding support for it (without payin $180 per incident!)
After you pay, you get some free support... At least, you used to when I worked there... You'll use the same system as the $180 folks, you just won't pay.
> I also have installed Komodo IDE, but I can't even get it to work! ARG > > My projects are getting complicated enough that a full-featured debugger > would be helpful...
Disclaimer: I still find echo and error_log sufficient...
-- WARNING richardzend.com address is an endangered species -- Use ceo
l-i-e.com 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
attached mail follows:
> Datum verz. Thu, 23 Aug 2001 12:20:52 +0200 > I don't know why I get : > "Warning: Cannot add header information - headers already sent by (output > started at c:\windows\bureau\cookie1.php:2) in c:\windows\bureau\cookie1.php > on line 6" message each time I use setcookie function.
So on line six you are sending cookies? I only know from the 'header (Location:http....)' to make this problem but the cause is probably the same.
You cannot send headers after you have written anything to the page. Apparently something is already sent in line one or two? Maybe there is something in line 1 causing this, a space can already make the server start sending the page (starting with headers). I don't think it is the newline.
Make sure there are no white spaces in line two. If that does not help put line one inside the script maybe, as a #comment. Make sure the file starts with <? php as the very start.
> The second line is : <?php > I put <html> at the end of the file. > Do you have any ideas ? </html> but that has nothing to do with the error.
Chris H.
-------------------------------------------------------------------- -- C.Hayes Droevendaal 35 6708 PB Wageningen the Netherlands -- --------------------------------------------------------------------
attached mail follows:
look for HTTP_ENV_VARS["SCRIPT_FILENAME"] it may show up when you ask for it and for sure in the list the phpinfo() results in.
Chris
Van: "ReDucTor" <sjdtmv
tpg.com.au>
Aan: <php-general
lists.php.net>
Datum verz. Thu, 23 Aug 2001 11:35:00 +1000
Onderwerp: [PHP] path to php
> does anyone know all the possible paths to php...because i can't seem to find
> it on my current host...i have tried using the following
>
> php /path/to/script.php
> /usr/php /path/to/script.php
> /usr/local/bin/php /path/to/script.php
> /usr/bin/php /path/to/script.php
>
> but i still can't seem to get it to work with out it saying that it can't
> find the path to php...any one got any ideas?!?
>
> btw. i know php is on it..
>
> I have tried contacting them, but they don't seem to want to reply...
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
-------------------------------------------------------------------- -- C.Hayes Droevendaal 35 6708 PB Wageningen the Netherlands -- --------------------------------------------------------------------
attached mail follows:
Hi Jeremy, it's always easier for us if you tab/organize the code a bit so we get the overview. like this:
$result =
mysql_query($sql,$connection) or die("Couldn't execute query.");
while ($row = mysql_fetch_array($result))
{
$uid = $row['uid']
$team = $row['team'];
$option_block .= "<option value=\"$uid\">$team</option>";
}
$display_block = "<FORM METHOD=\"post\" ACTION=\"show_makeapick.php\"> <P><strong>Team:</strong> <select name=\"uid\"> $option_block </select> <INPUT TYPE=\"SUBMIT\" NAME=\"submit\" VALUE=\"Select this Team\"></P> </form> ";
I find the way you use the uid in various ways confusing.
You use it as the name of the select object, and in the query and it is possible that this also is unclear when you use the $uid in the next page. Maybe it is the right choice at first but maybe if you print the form again in the result page, or for some other reason do a query like the above before you read the result, the $uid may be overridden and obviously the value is then set to the last team.
Please have a look at that. Also, could you please give us an example of the select part in the HTML page? just the part between <select name=uid> and </select>.
Sidestep I don't remember why but in a code page i made recently i named every option. No idea if that is proper coding but it's worth a try:
$option_block .= "<option name=\"uid\" value=\"$uid\">$team</option>";
(note that the name is a fixed name uid and is independent from the variable uid, and again, i would like you to rename it!)
hope this helps,
Chris
Antwoord naar: <jeremy
prepresshelp.com>
Van: "Jeremy Morano" <jeremy
prepresshelp.com>
Aan: <php-general
lists.php.net>
Datum verz. Thu, 23 Aug 2001 11:10:25 -0400
Onderwerp: [PHP] always last
> Hi, I need a little bit of help.
> My variable $team in the option block is always set to the last variable that
> is read....I would like it to contain the option that the user
> clicks.....Please help me!
>
>
>
> My Select works properly
>
> ...
>
>
> $result =
mysql_query($sql,$connection) or die("Couldn't execute query.");
>
>
> while ($row = mysql_fetch_array($result)) {
> $uid = $row['uid']
> $team = $row['team'];
>
>
> $option_block .= "<option value=\"$uid\">$team</option>";
> }
>
> $display_block = "
>
> <FORM METHOD=\"post\" ACTION=\"show_makeapick.php\">
>
> <P><strong>Team:</strong>
> <select name=\"uid\">
> $option_block
> </select>
>
> <INPUT TYPE=\"SUBMIT\" NAME=\"submit\" VALUE=\"Select this Team\"></P>
> </form>
>
> ";
>
> ?>
>
> <HTML>
> <HEAD>
> <TITLE>User Management: Modify a User</TITLE>
> </HEAD>
> <BODY>
> <h1>User Management</h1>
> <h2><em>Modify a User</em></h2>
> <P>Select a contact from the list below, to modify the user's record.</p>
>
> <? echo "$display_block"; ?>
>
> <p><a href="contact_menu3.php">Return to Main Menu</a></p>
>
> </BODY>
> </HTML>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
-------------------------------------------------------------------- -- C.Hayes Droevendaal 35 6708 PB Wageningen the Netherlands -- --------------------------------------------------------------------
attached mail follows:
Van: "Andrey Hristov" <andy
icygen.com>
Aan: <php-general
lists.php.net>
Datum verz. Thu, 23 Aug 2001 18:33:53 +0300
Onderwerp: Re: [PHP] always last
> Use a counter when fetching from the DB > if you use while the > $counter=0; > while(list(...)=mysql_fetch_array($res)){ > $option_block .= '<option '.(($counter==0)? ' > selected':'').'>'.$option.'</option>'; > }
How then would he find the team back?
-------------------------------------------------------------------- -- C.Hayes Droevendaal 35 6708 PB Wageningen the Netherlands -- --------------------------------------------------------------------
attached mail follows:
Datum verz. Thu, 23 Aug 2001 14:17:28 -0400 Onderwerp: [PHP] Dynamic check boxes...
> I have a form where users can enter a link (kind of a free for al links =
> When I load an admin script I can check all of the ones that have a 0 in = > that field. I want to have checkboxes form down the side of them so I = can > check the ones I want approved. =20
I suppposathe table has some ID field which i will call proposalID.
Admin page. form: echo '<form....
query (SELECT proposalID, proposalText WHERE proposals=new) while{ echo "<input type='checkbox' name='FORM$proposalID' value='Yes'> $proposalText"; } echo '<submit button> </form>';
Then you get the form back Suppose the ID is 129 then the variable will be called $FORM129
(This is what i use the very useful $$ function for. $helpvar='FORM'.$proposalID; now $$helpvar gives the same as $FORM129 !)
mysql_query (SELECT proposalID WHERE proposals=new) while...... { $helpvar='FORM'.$proposalID; if (isset($$helpvar) AND ($$helpvar=='Yes')) {$array_accepted[]=$proposalID notify_sender('ok'); } else { $array_rejected[]=... notify_sender('refused'); } }
$query=" (UPDATE tablename SET accepted='0' WHERE proposalID="; for ($i=0;$i<count($array_accepted);$i==) {$query.=$array_accepted[$i].',' } #get rid of the last comma somehow... $query.=" )";
do query
same for rejected but delete these or mark as rejected.
let me know! Chris H.
-------------------------------------------------------------------- -- C.Hayes Droevendaal 35 6708 PB Wageningen the Netherlands -- --------------------------------------------------------------------
attached mail follows:
I recently realized users are able to access my base document root using opendir() and readdir()... I find this to be a big security risk.. I am wondering if anyone knows of any ways to limit it so that the user can only usephp on his level,and not be able to access any server files. I hope that makes sense, heh.. If you need more info,say say.. Oh,btw,its a unix server. -Andy L
attached mail follows:
> I recently realized users are able to access my base document root using > opendir() and readdir()... I find this to be a big security risk.. I am > wondering if anyone knows of any ways to limit it so that the user can only > usephp on his level,and not be able to access any server files. I hope that > makes sense, heh.. If you need more info,say say..
You pretty much just described open_basedir:
http://php.net/manual/en/features.safe-mode.php#features.safe-mode
-- WARNING richardzend.com address is an endangered species -- Use ceo
l-i-e.com 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
attached mail follows:
Get rid of the trailing newline after your last ?> in slib.php
Warning: You may have configured Emacs to "add" that newline in for you automatically. Turn that off, if so.
Never have understood why:
<?php ... ?> <?php ... ?>
Doesn't generate HTML output, except when ?> is the end of the file...
-- WARNING richardzend.com address is an endangered species -- Use ceo
l-i-e.com 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: Casteele/Shadowlord <casteele
innocent.com> Newsgroups: php.general To: <php-general
lists.php.net> Sent: Wednesday, August 22, 2001 10:52 AM Subject: HTTP headers and include()
> I've written a separate function library for a cluster of web pages, and I > then include("slib.php") in each of the web pages, instead of copying 12k > of code to each page individually. Some of the pages require (simple) > authentication or redirection headers, which some of the code in the > library is supposed to handle. > > Problem is, when I include the library, even though there's no other output > to be processed, it still generates the linefeed that triggers sending all > the current headers, so if(!headers_sent) {...} fails. > > Is it possible to include php code without sending headers? I've tried > exit() within the library, but that fails to work. Instead, exit causes > generation of HTML code (a content type metatag) that is neither in the > main page nor the library. I've also tried a simple return() (per the > documentation), but that generates a parse error. > > I'm using Apache 1.3.12, PHP 4.0.2 and Slackware Linux (Not sure which > kernel version). > > Thanks > Cas > > PS: Please CC replies to casteele
innocent.com, since I'm not officially > subscribed to this list. Thanks. >
attached mail follows:
You probably just need to mess around with which users can do what to the table...
-- WARNING richardzend.com address is an endangered species -- Use ceo
l-i-e.com 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: Jay Paulson <jpaulson
lbjs.com> Newsgroups: php.db,php.general To: <php-db
lists.php.net>; <php-general
lists.php.net> Sent: Wednesday, August 22, 2001 11:29 AM Subject: restoring mysql db after mysqldump
> Hello everyone- > > I have done the mysqldump function and got the db in a all_database.sql > file. Now I am running this command at the shell prompt of my Linux > machine: > > mysql -u root -p -e 'all_databases.sql' > > When I do that it works fine until it starts to insert the information into > the database. I get the error that the table it is trying to read the > information into is 'read only'... Is there anyway around this problem? > > Thanks, > Jay >
attached mail follows:
PHP should be calling that for you, I think...
However, any error output will be swallowed up by the ether, since there is no browser connection any more.
Add some http://php.net/error_log statements to your session_write function and check your Apache logs.
-- WARNING richardzend.com address is an endangered species -- Use ceo
l-i-e.com 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: Gabor Gludovatz <ggabor
sopron.hu> Newsgroups: php.general To: <php-general
lists.php.net> Sent: Wednesday, August 22, 2001 1:47 PM Subject: session_write_close()
> Hello, > > I'm having problems with sessions. Since I use MySQL to store sessions, I > always have to call session_write_close() at the end of every page, > otherwise session variables don't get saved. > > If I use PHP's built-in 'files' method to store session vars, then > everything works fine, I don't need to call session_write_close() and even > so the variables get saved and are restored correctly. > > Is it a bug? Or is there something I don't know about? > > -- > Gabor Gludovatz <ggabor
sopron.hu> http://www.sopron.hu/~ggabor/ >
attached mail follows:
> I have a problem with pointers in php.
They're not pointers.
PHP is not C.
It happens to look C, but it's not.
> In the following code the parent object should be a pointer to class Main > ($this), but it's a copy ...
It's an alias, not a pointer.
> <?php > class Sub_A { > > // constructor > > function Sub_A(&$parent) { > > $this->parent = &$parent; > > } > > function Modify($text) { > > $this->parent->B->text = $text; > > } > > } > > class Sub_B { > > var $text = "untouched"; > > // constructor > > function Sub_B(&$parent) { > > $this->parent = &$parent; > > } > > } > > class Main { > > // constructor >
Style Tip: Add var $A; var $B;
> function Main() { > > $this->A = new Sub_A($this);
I *think* you want &$this as the argument to do what you are trying to do...
> > $this->B = new Sub_B($this); > > } > > > } > > $test = new Main(); > > $test->A->Modify('test'); > > // this method should work, but doesnt (should return "test" instead of > "untouched") > > echo $test->B->text."<br>"; > > // parent isnt a pointer but a copy so absolute addressing works > > echo $test->A->parent->B->text."<br>"; > > ?>
Bottom Line: It's not C. Don't expect it to work exactly like C.
-- WARNING richardzend.com address is an endangered species -- Use ceo
l-i-e.com 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
attached mail follows:
> Running the cgi-module trying to execute a perl script, dug through the > archives found something that would at least return something: > > exec("/full/path/to/file.cgi", $results, $errorCode); > while (list(,$line) = each($results)){ > echo $line, "<BR>\n"; > } > if ($errorCode){ > echo "OS Error: $errorCode<BR>\n"; > } > > It spits out nothing but but an error code of 2 ... so basically what i get > from it is OS Error: 2.
man errno will tell you exactly which error that is. (You have to count down, so it's the second one.)
I'm betting on path/permissions problem.
You are not running this Perl scripts as you -- You're running as "nobody" or whomever is set by the User directive in httpd.conf
You are also not running in your normal shell with your normal environment variables. You are running in "nobody"s shell with their environment set-up.
-- WARNING richardzend.com address is an endangered species -- Use ceo
l-i-e.com 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
attached mail follows:
Never used bytea so can't help directly but:
You're way better off to store the file as a file and just put the pathname into Postgre in the first place...
-- WARNING richardzend.com address is an endangered species -- Use ceo
l-i-e.com 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: Ben-Nes Michael <miki
canaan.co.il> Newsgroups: php.general To: <php-general
lists.php.net> Sent: Thursday, August 23, 2001 9:09 AM Subject: upload binary using postgres
> Hi > > Im using php to upload Binary data into bytea field in postgres DB. > The problem is that when I query what I uploaded I discover that it hold > only 13 characters and not the whole binary file > > I tried manual insert more then 13 characters successfully. > I tried to do addslashes($data); > > but still :( > $slashed_data = addslashes($data); > $sql = "insert into files (image_id, bin_data, filename, filesize, filetype) > values ('$image_id', '$slashed_data', '$new_name', '$filesize', > '$filetype');"; > > I tried strlen($slashed_data); before the insert to be sure that that the > binary is bigger then 13 characters and yes, its 4KB ( the tested file ); > > Any ideas ? > > -------------------------- > Canaan Surfing Ltd. > Internet Service Providers > Ben-Nes Michael - Manager > Tel: 972-4-6991122 > http://sites.canaan.co.il > -------------------------- > >
attached mail follows:
If you're going to go to the trouble for Lynx, you might as well just use it for everybody.
HTTP_REFERER is better since it keeps track of pages off of your site as well.
But if you don't care about that, tracking them all the same will be easier code to maintain.
-- WARNING richardzend.com address is an endangered species -- Use ceo
l-i-e.com 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: Pekesan <pekesan
jazzfree.com> Newsgroups: php.general To: <php-general
lists.php.net> Sent: Wednesday, August 22, 2001 10:53 PM Subject: $HTTP_REFERER problem
> I know that some browsers doesn't gives support to $HTTP_REFERER variable ( > lynx in example). I am thinking on checking the browser ident (with > HTTP_USER_AGENT) and managing $HTTP_REFERER as a session var in those cases > who doesn't give support. But it would be great that if somebody found > another solution shares it with me. > > Thanks in advance , and compaints about my English,
attached mail follows:
> if ($var){ > $tmp = explode("<|>",$vars); > for ($i = 0; $i < sizeof($tmp); $i++){ > $struct[$i] = array();
You really don't need this line...
> $tmp2 = explode("<||>",$tmp[$i]); > for ($j = 0; $j < sizeof($tmp2);$j++){
Try assigning $tmp3 = $tmp2[$j] and using $tmp3 below.
Also, var_dumb($tmp3) and see what it is.
> $struct[$i][$j] = explode("<|||>",$tmp2[$j]); > } > } > }
-- WARNING richardzend.com address is an endangered species -- Use ceo
l-i-e.com 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
attached mail follows:
> is there any PHP functions to create 3D object from the photo.
Not that I know of.
> if no, > is there any software exists??
I've always throught Apple's QuickTime VR was the coolest thing since sliced bread, but could never afford the tools to use it...
http://quicktimevr.apple.com I think...
-- WARNING richardzend.com address is an endangered species -- Use ceo
l-i-e.com 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
attached mail follows:
If PHP succeeds in getting the mail through to your internal box, then it's almost-for-sure your MAIL SERVER that is refusing to send mail to the outside world.
Review your MAIL SERVER configuration carefully, and keep in mind that PHP runs as a restricted user:
Apache: Module: httpd.conf User directive decides who PHP is. CGI: httpd.conf suExec and/or User directive decides who PHP is. IIS/PWS: I_usr_machine name is the user, unless you're smarter than me and you can figure out stupid MS interface to change it...
Other web-servers: You're on your own, kid.
You will find that this bug has absolutely nothing to do with PHP, and everything to do with your MAIL SERVER. That's probably why it got marked "Bogus" as a PHP bug report.
-- WARNING richardzend.com address is an endangered species -- Use ceo
l-i-e.com 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: Christof Coetzee <christof
cdesoftware.co.za> Newsgroups: php.general To: <php-general
lists.php.net> Sent: Thursday, August 23, 2001 1:36 PM Subject: Does not deliver mail
> ID: 12932 > Updated by: derick > Reported By: christof
cdesoftware.co.za > Old Status: Open > Status: Bogus > Bug Type: *Mail Related > Operating System: win2k > PHP Version: 4.0.4pl1 > New Comment: > > > [2001-08-23 14:18:01] christof
cdesoftware.co.za > > I have a mail account that points to my mail server, my domain name is > www.cdesoftware.co.za and my e-mail address is christof
cdesoftware.co.za > Problem: I have client submission forms on websites running on our server > that calls a PHP script for sendind the info on this form to a mail > address specified in a hidden field in the web page form. The php script > delivers all mail that must be sent to anyname.cdesoftware.co.za, but not > any other mail address on any other server. > > Please help me with this a possible > > Thank you > Christof > > ------------------------------------------------------------------------ > >
attached mail follows:
> Has anyone come up with an upgrade proceedure for upgrading PHP to a higher > version?
I totally depends on how PHP was installed in the first place, and what OS you are using, and what features you need, and...
There are wizards now that can maybe handle this for you.
http://zend.com has one. PHPTriad. NuSphere's thingamabob.
Various distro's RPM-like tools.
And a bunch more.
-- WARNING richardzend.com address is an endangered species -- Use ceo
l-i-e.com 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
attached mail follows:
> My question - is this going to work for a few thousand emails?
Depends on your server.
> What > about 100,000?
No way.
> Would it be better to send the mail directly to the > smtp server?
Yes.
> Can you foresee any problems?
Several. The first one is you didn't read the archives or look for pre-existing code to talk to SMTP directly. :-)
Manuel's upperdesign.com has one, and there are plenty of others. You could roll your own -- I did, so it can't be too tricky. :-)
Also, at that volume, I think you're going to run into trouble just in talking to the all the SMTP servers. I *BELIEVE* one major speed-up can be achieved by sorting the outgoing emails by their recipient's domains...
You may want to research how "real" mailing list software deals with this if you actually expect to hit 100K addresses.
If they're all the same email, you'd be *WAY* better off just interfacing to majordomo, ezmlm, SmartList, or whatever other mailing list software was designed to handle this.
-- WARNING richardzend.com address is an endangered species -- Use ceo
l-i-e.com 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
attached mail follows:
Register the variable whether it exists or not.
<?php session_start(); session_register('count'); if (!isset($count)){ $count = 0; } $count++; echo "You have visited this page $count times.<BR>\n"; ?>
-- WARNING richardzend.com address is an endangered species -- Use ceo
l-i-e.com 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: Lawrence Sheed <Lawrence.Sheed
dfait-maeci.gc.ca> Newsgroups: php.general To: <php-general
lists.php.net> Sent: Thursday, August 23, 2001 9:41 PM Subject: Session Problem
> I can't get session variables to work > > I know this has been done to death in the past, but I've looked on php.net, > and google for a solution, have tried the suggestions, and seem to fix it. > > My php session settings are as follows: > > Name Local Global settings > session.auto_start Off Off > session.cache_expire 180 180 > session.cache_limiter nocache nocache > session.cookie_domain no value no value > session.cookie_lifetime 0 0 > session.cookie_path / / > session.entropy_file no value no value > session.entropy_length 0 0 > session.gc_maxlifetime 1440 1440 > session.gc_probability 1 1 > session.name PHPSESSID PHPSESSID > session.referer_check no value no value > session.save_handler files files > session.save_path /tmp /tmp > session.serialize_handler php php > session.use_cookies On On > > The code I'm using to test is as follows: > > <?php > session_start(); > > echo "COUNT{$count}"; > if (!isset($count)) { > echo "registering session"; > session_register($count); > $count=1; > } > else { > $count++; > echo $count; > } > ?> > > The output is as follows: > > COUNTregistering session > > Refreshing shows the same output > > My /tmp directory exists and has the following permissions. > drwxrwxrwt 3 root root 4096 Aug 24 10:40 tmp > > > What should I be looking for?
attached mail follows:
Search engines assume URLs with ? in them are dynamic and not worth indexing as the info will change too fast.
Don't submit URLs with ? in them. Don't use ? in URLs you want search engines to index.
Do use $PATH_INFO instead. There's an old article from Zeev (?) on http://PHPBuilder.com (?) about how to do it...
-- WARNING richardzend.com address is an endangered species -- Use ceo
l-i-e.com 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: Georgie <georgiecasey
e-merge.ie> Newsgroups: php.general To: <php-general
lists.php.net> Sent: Thursday, August 23, 2001 4:34 PM Subject: Dynamic Pages and Search Engines
> Ok, i have a script that creates a page that will be submitted to search > engines. I had originally planned on having one line of code on the search > engine page: > include(http://localhost/freelance.php3?id=1); > > But for some reason, it doesnt work. I've tried everything, changing the > php3 to php and include("freelance.php3?id=1") > > The only thing that works is > header location("balh balh... > but that redirects to the freelance.php3?id=1 page and *i think* thats bad > for search engines (isnt it?) > > So what I'd like some info on is why my include() function doesnt work and > does a header lcoation command make any difference to the search engines. > > THANKS IN ADVANCE > >
attached mail follows:
Sounds like a bug...
Start searching on http://bugs.php.net for similar problems, make sure you've got current versions of OS and PHP.
-- WARNING richardzend.com address is an endangered species -- Use ceo
l-i-e.com 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: Niklas lampén <niklas.lampen
publico.fi> Newsgroups: php.general To: Php-General <php-general
lists.php.net> Sent: Friday, August 24, 2001 2:11 AM Subject: Reading files from a directory
> I have problem with reading files from directory. > > This is the code: > > <? > $Handle = opendir('/www/publico2/docs/map'); > > while ($file = readdir($Handle)) { > print "$file<br>\n"; > }; > ?> > > That is ALL code on a script file. > These are the file in directory: > > . > .. > array_maker.php4 > map.php4 > renamer.php4 > border_bl.gif > border_bm.gif > border_br.gif > border_ml.gif > border_mr.gif > border_ul.gif > border_um.gif > border_ur.gif > grid.gif > map_config.php4 > map_dot.php4 > handle.php4 > map_dot.gif > core > md_998634933_071758800998634933.gif > md_998634937_060465500998634937.gif > md_998634941_025996400998634941.gif > > If I have more than five of the files named like > "md_123456789_12345.....gif" page returns Internal Server Error (500). What > can cause this? Is there a solution? > > > Niklas >
attached mail follows:
pconnect will be your biggest "win", almost for sure.
After that, I'm guessing that you'll just be making very minor speed-ups...
-- WARNING richardzend.com address is an endangered species -- Use ceo
l-i-e.com 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: Boaz Yahav <berber
netvision.net.il> Newsgroups: php.general To: PHP General (E-mail) <php-general
lists.php.net> Sent: Friday, August 24, 2001 4:22 AM Subject: PHP 2 MySQL over the network
Hi
Till recently, out MySQL DB and our Apache/PHP/Solaris were on the same machine. We moved to front end / back end configuration and all of the queries are now done over the network (Switch). I was wondering if anyone has any experience in optimizing such a configuration from the System / MySQL / PHP side?
Issues like packet sizes, connect vs. pconect etc...
Sincerely
berber
attached mail follows:
> I need to use a public/private key encryption system for dredit card > details on a site I am developing. We are not taking Credit Card payments > with an online marchanmt such as NetBanx Sec Pay, etc, etc, but we need to > send the CC details to the Shop Management for putting through a PDQ > machine.
This is a really silly thing to do. Honest. You can find *SOME* way to do it online cheaper, easier, and faster with far, far less headaches...
> How can I use a Public Private key system to do this from PHP. I > know Java can support RSA (although never investigated it), and that PHP can > use standard Java classes (is this true?).
That said, I'm going to tell you how to do it, so you can hang yourself if you really want to... <Deity> knows why, when this is such a Bad Idea <tm>...
You don't really need to involve Java at all...
Use http://gnupg.org
Create your keypair on a non-networked machine.
Text-export only the *PUBLIC* half of the key-pair and sneaker-net it to the web-server.
Make the keyring readable by "nobody" (or whomever PHP runs as).
Use http://php.net/popen to execute gpg and get your encrypted data.
Put the PRIVATE half on a *VERY* physically secure machine that *ONLY* people you trust can access. You probably should have a separate machine just for this, with an email address used *ONLY* for these orders. Put the private key half on this machine, along with gpg to decode it.
You *ALSO* need to have procedures and policies in place to safely get the data from the decrypted email to the PDQ and then *DESTROYED* without any risk of somebody else seeing the cc#s. Very, very difficult in any real-world situation.
*MOST* credit card fraud comes from retail workers snarfing card numbers from pocketed carbons. Now you're just making it easy for them.
If you like spending money for some reason (and you must if you're doing things this way) you could use PGP instead.
-- WARNING richardzend.com address is an endangered species -- Use ceo
l-i-e.com 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
attached mail follows:
> Note: I am running my PHP script through a program called php-cgiwrap which > makes the PHP script execute as me on the server rather than as "nobody". I > can't let the script execute as "nobody" because "nobody" doesn't have > permission to run PGP, but I do.
You may want to look at suExec http://apache.org
Try the popen one without the pclose. If that works, upgrade PHP.
Also -- see if you can su to nobody, and run that php-cgiwrap thingie with this script without Apache being involved.
And, of course, you *ARE* looking at your Apache error_log, right?...
-- WARNING richardzend.com address is an endangered species -- Use ceo
l-i-e.com 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
attached mail follows:
Hello Richard.
Thanks for the response, but I finally, finally found and fixed the problem. It turns out that PGP generates output on STDERR, even when you run it in +batchmode. This extraneous output makes Apache unhappy, for some reason. So I fixed the problem by inserting a 2>/dev/null into the pgp command to flush all the STDERR noise down the terlet. Works great now (whew!).
The working code is below, for those who are interested.
Kurt
<script language="php">
/* set up some strings */
$pgppath = "/usr/home/myhome/.pgp";
$ruid = "Recipient Name <recip
isp.com>";
$suid = "Sender Name <sender
isp.com>";
$to = "recip
isp.com";
$subject = "Seekwit Message";
$from = "me
isp.com";
$msg = "This is a vewy, vewy seekwit message.";
putenv("PGPPATH=$pgppath");
/* * the following code snippets work fine as long as the 2>/dev/null is in there * to send the extraneous output * that PGP generates on STDERR into the bit bucket */
/* * I think the following is the most secure way to do it because it doesn't include the clear text message * in the command line, so it should be invisible to people running, for example, ps -auxxx */ $cmd = "/usr/local/bin/pgp -feat +force +batchmode '$ruid' -u '$suid' 2>/dev/null | /usr/bin/mail -s '$subject' $to"; $pp = popen($cmd, "w"); fputs($pp, $msg); pclose($pp);
/* this one does a straight echo | pgp | mail */ $cmd = "echo '$msg' | /usr/local/bin/pgp -feat +force +batchmode '$ruid' -u '$suid' 2>/dev/null | /usr/bin/mail -s '$subject' $to"; `$cmd`;
/* this one does an echo | pg, captures the stdout using backtick, and mails it using php mail */ $cmd = "echo '$msg' | /usr/local/bin/pgp -feat +force +batchmode '$ruid' -u '$suid' 2>/dev/null"; $encrypted = `$cmd`; $encrypted = "From: $from\n\n" . $encrypted; mail($to, $subject, "", "$encrypted");
</script>
----- Original Message -----
From: "Richard Lynch" <ceo
l-i-e.com>
To: "CO Group Support" <support
cogroupinc.com>
Cc: <php-general
lists.php.net>
Sent: Friday, August 24, 2001 9:05 PM
Subject: [PHP] Re: Problems with PHP calling PGP
> Note: I am running my PHP script through a program called php-cgiwrap which > makes the PHP script execute as me on the server rather than as "nobody". I > can't let the script execute as "nobody" because "nobody" doesn't have > permission to run PGP, but I do.
You may want to look at suExec http://apache.org
Try the popen one without the pclose. If that works, upgrade PHP.
Also -- see if you can su to nobody, and run that php-cgiwrap thingie with this script without Apache being involved.
And, of course, you *ARE* looking at your Apache error_log, right?...
-- WARNING richardzend.com address is an endangered species -- Use ceo
l-i-e.com 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: php-general-unsubscribe
lists.php.net For additional commands, e-mail: php-general-help
lists.php.net To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
What the heck is "2"?...
And why is "2" the "good" number for your authentication to return for successful login?...
I'm guessing that you are mis-interpreting the result codes for $authlib->login()...
-- WARNING richardzend.com address is an endangered species -- Use ceo
l-i-e.com 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: Mike <mike-nospam
blueroot.net> Newsgroups: php.general To: <php-general
lists.php.net> Sent: Friday, August 24, 2001 9:17 AM Subject: GET / POST strange error
> i have written a login page for a members area on my site - the code is as > follows... > > <? > require_once("backend.php"); > > if (!$userid || !$password) { > > include("loginform.php"); > exit; > } > else { > $login = $authlib->login($userid, $password); > > if ($login != 2) { > $error = $login; > include("loginform.php"); > exit; > } > else { > include("index.php"); > } > } > ?> > > it uses authlib to authorise the user and then include a different pasge if > they are logged in...fairly simple so far.. > > approx 50% of the time the user cannot log in straight away... the page just > reloads and you get the blank entry fields again. > > The logs show the page being posted and then get > > 213.165.1.171 - - [24/Aug/2001:15:05:36 +0100] "POST /cand/members/login.php > HTTP/1.1" 302 1792 > 213.165.1.171 - - [24/Aug/2001:15:05:36 +0100] "GET /cand/members/login.php > HTTP/1.1" 200 1094 > > i am using apache 1.3.19 and php 4.0.4 on redhat 7 > > I have had this problem reported on another form page as well... > >
attached mail follows:
Oh yeah: You *STILL* need to use SSH to get the data in the first place!
-- WARNING richardzend.com address is an endangered species -- Use ceo
l-i-e.com 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: Martin Gunther <mgunther
uknetprojects.co.uk> Newsgroups: php.general To: <php-general
lists.php.net> Sent: Friday, August 24, 2001 9:41 AM Subject: PHP and RSA/Java (Repost with correct e-mail!)
> Hi all, > I need to use a public/private key encryption system for dredit card > details on a site I am developing. We are not taking Credit Card payments > with an online marchanmt such as NetBanx Sec Pay, etc, etc, but we need to > send the CC details to the Shop Management for putting through a PDQ > machine. How can I use a Public Private key system to do this from PHP. I > know Java can support RSA (although never investigated it), and that PHP can > use standard Java classes (is this true?). > > Please any help would be great > > Martin Gunther > > >
attached mail follows:
> function group_include($directory) > { > $handle=opendir("$directory"); > while ($file = readdir($handle)) > { //load files in $directory into array > if ($file != ".." && $file != ".") > { > $files_to_include[count($files_to_include)] = $file;
The count(...) is pretty silly here. Get rid of it. PHP will do what you want.
> } > } > > //clean up and sort > closedir($handle); > if (is_array($files_to_include)) > { > while (list ($key, $val) = each ($files_to_include)) > { > include "$directory/$val"; > } > } > }
Why create an array and then walk through it? Why not just include() as you go?...
Also, this is pretty dangerous... A hacker only needs to manage to upload one file to your web-directory, and they've taken over your machine.
Don't do this.
> //include common and page specific modules > > $common_include_dir="modules/common"; > $page_include_dir="modules/page"; > > group_include($common_include_dir); > group_include($page_include_dir); >
The list of files simply can't be that large.
Why not just have a file in modules/common that includes all the other files in modules/common, and then edit that as you add files to modules/common, and then you can just include that one file.
-- WARNING richardzend.com address is an endangered species -- Use ceo
l-i-e.com 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
attached mail follows:
> I would like to send generate a list of members and allow the user to send a > mail to all the members. > > This is done using the users email client, so i would have to pass all the > names to the mailto link that is generated. > > Is it possible to do so?? and if it is any suggestions on how I can get it > done??
Where is PHP supposed to fit into this picture?...
So far, it sounds like you have described about half the stupid Outlook viruses floating around the 'net...
I guess you could go figure out how they work :-^
-- WARNING richardzend.com address is an endangered species -- Use ceo
l-i-e.com 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
attached mail follows:
My website is hosted with a provider, and there is a three hour difference in timezones, so when saving date and times to the database, they reflect the server time and not my own local time. The clincher is I know I could do some time math and just substract 3 hours, but I live in Arizona, so we do not go through daylight savings time. So right now it's a three hour difference, but when the time change happens, I'll only be two hours behind.
Because of this, what is the best method to get my local date and time entered into the database instead of the server date and time??
Thanx...
attached mail follows:
On 25-Aug-2001 Joe Sheble \(Wizaerd\) wrote: > My website is hosted with a provider, and there is a three hour difference > in timezones, so when saving date and times to the database, they reflect > the server time and not my own local time. The clincher is I know I could > do some time math and just substract 3 hours, but I live in Arizona, so we > do not go through daylight savings time. So right now it's a three hour > difference, but when the time change happens, I'll only be two hours behind. > > Because of this, what is the best method to get my local date and time > entered into the database instead of the server date and time?? >
In my case the server is in Atlanta, but I have to sync with my credit-card processor on the left coast.
So first i start the database (MySQL) on Pacific time with: ----- TZ=PST8PDT export TZ /usr/local/bin/safe_mysqld --user=mysql > /dev/null &
---- To make PHP date/time functions jive, during initialization:putenv('TZ=PST8PDT'); // Server on Pacific time
No matter that i'm in Texas (CST), everything is now reported on Pac time.
Regards, -- Don Read dread
texas.net -- It's always darkest before the dawn. So if you are going to steal the neighbor's newspaper, that's the time to do it.
attached mail follows:
Alas, I don't have this luxury since it's not my server, but one that is hosted with a web hosting provider. They control the setup and configuration of the machines... since it's a shared server I doubt I'll convince them to set the timezone to my location, thus throwing everyone else on the same server out of whack...
I can use the putenv() function though for use in PHP and then when saving the date and time into mySQL actually use the PHP date and time functions instead of the mySQL Now() function...
Where would I find the TZ codes to use for my area?
thanx
> -----Original Message-----
> From: Don Read [mailto:dread
texas.net]
> Sent: Friday, August 24, 2001 8:39 PM
> To: Joe Sheble (Wizaerd)
> Cc: General PHP List
> Subject: RE: [PHP] local time v.s. server time
>
>
>
> On 25-Aug-2001 Joe Sheble \(Wizaerd\) wrote:
> > My website is hosted with a provider, and there is a three hour
> difference
> > in timezones, so when saving date and times to the database,
> they reflect
> > the server time and not my own local time. The clincher is I
> know I could
> > do some time math and just substract 3 hours, but I live in
> Arizona, so we
> > do not go through daylight savings time. So right now it's a three hour
> > difference, but when the time change happens, I'll only be two
> hours behind.
> >
> > Because of this, what is the best method to get my local date and time
> > entered into the database instead of the server date and time??
> >
>
> In my case the server is in Atlanta, but I have to sync with my
> credit-card
> processor on the left coast.
>
> So first i start the database (MySQL) on Pacific time with:
> -----
> TZ=PST8PDT
> export TZ
> /usr/local/bin/safe_mysqld --user=mysql > /dev/null &
>
> ----
> To make PHP date/time functions jive, during initialization:
>
>
> putenv('TZ=PST8PDT'); // Server on Pacific time
>
> No matter that i'm in Texas (CST), everything is now reported on Pac time.
>
> Regards,
> --
> Don Read dread
texas.net
> -- It's always darkest before the dawn. So if you are going to
> steal the neighbor's newspaper, that's the time to do it.
>
>
attached mail follows:
On 25-Aug-2001 Joe Sheble \(Wizaerd\) wrote: > Alas, I don't have this luxury since it's not my server, but one that is > hosted with a web hosting provider. They control the setup and > configuration of the machines... since it's a shared server I doubt I'll > convince them to set the timezone to my location, thus throwing everyone > else on the same server out of whack... > > I can use the putenv() function though for use in PHP and then when saving > the date and time into mySQL actually use the PHP date and time functions > instead of the mySQL Now() function...
Well, El-sucko.
You'll have to use INT for your DATETIME columns. Then use mktime() to insert the NOW() value, & code around the MySQL DATE_FORMAT, DATE_SUB, & DATE_ADD functions and, umm, TIMESTAMP, UNIX_TIME ...
See if your provider will start a separate server for you, rather than you giving up most of the SQL date/time goodies ?
> > Where would I find the TZ codes to use for my area? >
Prolly MST7MDT or PST8PDT.
Regards,
-- Don Read dreadtexas.net -- It's always darkest before the dawn. So if you are going to steal the neighbor's newspaper, that's the time to do it.
attached mail follows:
Hi people!
I'm trying to migrate my site from perl to PHP4. The question is how I get numbers look like this: 0001, 0002, etc
Thanks for your time & help
Javier Bellido
attached mail follows:
Javier,
Can you provide a lil more info? What exactly are you trying to do? Without seeing your code, its hard to guess...i'd suggest though looking at www.php.net/number_format www.php.net/printf
jack
-----Original Message-----
From: Javier Bellido [mailto:javierbs
softhome.net]
Sent: Saturday, August 25, 2001 12:23 AM
To: lista php
Subject: [PHP] formating numbers
Hi people!
I'm trying to migrate my site from perl to PHP4. The question is how I get numbers look like this: 0001, 0002, etc
Thanks for your time & help
Javier Bellido
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribelists.php.net For additional commands, e-mail: php-general-help
lists.php.net To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
can anyone explain to me exactly what this would do differently?
$data = fread($fp, filesize($file));
$data = &fread($fp, filesize($file));
...
Cameron outworld.cx
attached mail follows:
Hello, I am wondering if there is any way to limit the disable_feature command to certain directories, and if so, could I please see an example? Thanks, Andy
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]