Re: [PHP] WYSIWYG online editor for Macintosh?

2003-09-01 Thread Joel Rees
 The client is using OS9
 and OSX so I need to find something that works with both. It's looking
 like Java at this moment in time. 

You will need to be aware -- Java on Mac OS 9 is somewhat limited. Look
up MRJ on Apple's tech pages. You will definitely want to test
separately on Mac OS 9 and keep track of any system extensions you have
to load to get things to work.

-- 
Joel Rees, programmer, Systems Group
Altech Corporation (Alpsgiken), Osaka, Japan
http://www.alpsgiken.co.jp
--

When software is patentable, anything is patentable. 
(http://swpat.ffii.org)

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] WYSIWYG online editor for Macintosh?

2003-08-28 Thread Joel Rees
 Hi there.  Slightly OT, but it's for a PHP project...  We normally use a
 plug-in WYSIWYG editor so that our clients can manage their content in a
 word-like interface.  Normally this works fine, but this time when we've
 completed the site we've discovered they have an entire department that
 is 100% Macintosh and this editor doesn't work.  Has anyone come across
 one of these that are cross-platform?  Would really appreciate some
 advice

First, the Text Edit application that comes with Mac OS X, coupled with
iDisk, may actually be more than you need. By default, it edits RTF, but
it also edits plain text. iDisk allows you to set up an FTP connection
and edit over the network. It has the OSAX (AppleScript, et. al.)
interface, so there is a way to interface with it programmatically.

BBEdit is supposed to support editing via the web. It's an editor, not a
word processor, but the interface is WYSIWYG, only modal in terms of
switching to raw binary and such. I've used it to good purpose:

http://www.barebones.com
http://www.barebones.com/products/bbedit

Mind you, it's a very powerful editor. Includes some neat integration
with perl, and should be easy enough to interface with php. BareBones's
Newer, cheaper TextWrangler is also supposed to support FTP, if that
would be enough. They have a good record about working with their
customers, too.

Hydra is a cute piece, allows people to simultaneous edit the same
text document over the local network. The Coding Monkeys's page seems to
be down right now.

I have only heard mention in passing of Pepper, but it looks like it has
returned to active development:

http://www.digitalwandering.com/ (Mac fork)
http://www.hekkelman.com/pepper.html (cross-platform)

Alpha has been highly praised by some I count as friends. It has been
compared with Emacs, although it is not really an Emacs work-alike. But
I don't find any recent information on it, the links all stall.

Hmm. Plugged text editor macintosh in at google.com, and got more
information than I want to wade through. Then I went to apple.com,
clicked on the Made4Mac tab, and wandered onto this page:

http://guide.apple.com/uscategories/productivity.lasso

scrolled down, selected text processing and editing utiliities, and got
quite a few hits.

HTH

-- 
Joel Rees, programmer, Systems Group
Altech Corporation (Alpsgiken), Osaka, Japan
http://www.alpsgiken.co.jp

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] webserver for mac

2003-08-27 Thread Joel Rees
 I am doing some php work for a local company who uses a mac.  I was telling
 them that I use apache as my webserver and they want to know what they can
 use as their webserver.  I know nothing about Macs and don't think you an
 run apache but I may be all wrong...what do mac owners use for a webserver?

_A_ mac? Do I sense the fragrance of ancient hardware?

First place you want to look is apple.com. After reading the white pages
on Mac OS X and Mac OS X Server, you really should plug apple web
server and macintosh web server and other variants into your favorite
search site and look around. You might even run into the fact that a Mac
(pre-Mac OS X) was once considered practically impenetrable. (I don't
remember if that challenge was ever defeated, the industry just seems to
have moved on.)

More information than you probably want:

Mac OSses 8 and 9 have a personal web server built it. There are also
freeware/shareware servers available that will run on Mac OSses 7 and 8.
There are some commercial webservers, as well, some of which are being
maintained and updated for Mac OS X, one has already been mentioned.

I know of a live site being maintained professionally, serving FileMaker
files on the web with the personal web server under Mac OS 8.6. It's a
low-traffic site, of course.

I think there's still an SE running System 6 and serving (hobby) web
pages somewhere out there, too, just to show it can be done. Haven't
looked for a while.

But you should understand that the Mac OS previous to Mac OS X was
cooperative multitasking, and it was difficult to serve multiple
requests simultaneously on those machines. 

on-topic
It'd surprise me if you could serve php on a pre-Mac OS X machine, but
you can definitely serve perl (MacPerl) on them. As the others have said,
I'd recommend Mac OS X for your customer, for a couple of reasons:

First, php is already installed, or, at least, it was there on Mac OS X
10.2 when I got my copy of that. It needs to be updated for security
reasons, but it is already in place. All I did was uncomment a couple of
lines in httpd.conf and I was testing php pages on my iBook. (Perl is
there, too, of course. Perl 5.8 will probably make it into Panther. Java
is also there, and installing Tomcat/Struts, and the like is not all
that hard.)

Second, unless you need to build an absolutely impenetrable site, you
and your customer will prefer to have the full Unix-family OS underlying
Mac OS X. (Mac OS X is pretty secure, too, anyway. If you need more than
that, you might want to look at openbsd, which, incidentally, does run
on some Mac hardware.)

Third, your customer really doesn't want to serve their site on a box
that is also being used to run applications. So, even if the box they
are thinking of putting the site on isn't a Mac OS X box, they really
want another box, and they might as well get Mac OS X for that box.
/on-topic

-- 
Joel Rees, programmer, Systems Group
Altech Corporation (Alpsgiken), Osaka, Japan
http://www.alpsgiken.co.jp

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] mail() usage in for loops

2003-08-14 Thread Joel Rees
 When you say batches of 500 , would that mean you put pauses between 
 each batch ?  Or do you prepare each email as a file and then send them 
 out in batches of 500? Whats the time space between each batch? Assuming 
 I was stuck with sendmail, what would you recommend ?

Well, I don't know what Michael is doing, but we found that mail tended
to be slow. If we didn't wait for each message, we tended to cause
errors. So we wrote a service that called a PHP routine to ship the
messages one at a time, and check that the process had completed for
each message before sending the next.

You can get mass-mailing systems written in Perl, I think there are now
some available for PHP. 

-- 
Joel Rees, programmer, Systems Group
Altech Corporation (Alpsgiken), Osaka, Japan
http://www.alpsgiken.co.jp


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Server-side script identified as IE

2003-08-14 Thread Joel Rees
(Quoting fixed)

Vchat20 [EMAIL PROTECTED] said
 Roger B.A. Klorese [EMAIL PROTECTED] wrote in message
 news:[EMAIL PROTECTED]
   umm. yes. I know that. the problem is the 1 site I want to pull news
  from
   has a robots.txt file which is preventing the script from working and
  I
   wanna get past that.
 
  Umm, yes, they put that there because they don't want you to, didn't
  they?
 
 I asked the owner and he says its ok if I do this as our sites are
 affiliated with each other. but he cannot remove the file due to hackers.

Yeah, that's what they all say. ;-/

I think most of the people who know how aren't interested in taking the
risk of helping yet another mail address harvester. If you're legit,
please take the time to learn to do it right.

Doing it right involves teaching your buddy how to publish an interface
to the parts of his site that he is willing to share, etc.

If you're not legit, find something more constructive to do with your
time.

-- 
Joel Rees, programmer, Systems Group
Altech Corporation (Alpsgiken), Osaka, Japan
http://www.alpsgiken.co.jp


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP vs ASP.NET formal opinions request

2003-08-11 Thread Joel Rees
 In a such poor country like this, Free Software and
 Open Source could be the answer to the government's
 software needs.

Well, open source and free software are not God. 

Netcraft surveys the internet and reports on actual server usage. It's
always good for a little dose of reality:

http://news.netcraft.com/

Hmm. I remember some news about Peru.

http://www.google.com/search?hl=enie=ISO-8859-1q=peru+free+software

Gives this

http://www.theregister.co.uk/content/4/25157.html

and, well, this

http://www.theregister.co.uk/content/4/26207.html

 Unfortunately, MS has the monopoly in the government's
 software, and our leaders see GNU like We don't have
 any support for that. Nobody guarantees us the GNU
 software's good performance. With MS we can demand
 answers to SOMEBODY. They say that they prefer to pay
 to get that warranty.

I guess you could always make the argument that, to get Microsoft's
attention and get bribes^H^H^H^H^H^Hhelp from the monopoly, you have to
threaten to break out of it. :-(

You might also mention that, if they want to buy support, RedHat and
other Linux companies are now selling support.

http://www.redhat.com/software/rhel/

Shoot, Mac OS X is a pretty decent buy, too, and ASP does not run native
on Apple's systems.

 I know that it's going to be hard, but I'm willing to
 fight for what I believe in. Wish me luck :D

Good luck, but don't be surprised if the road is longer and harder than
it ought to be. Make sure you can make a living while you're fighting.

-- 
Joel Rees, programmer, Systems Group
Altech Corporation (Alpsgiken), Osaka, Japan
http://www.alpsgiken.co.jp


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Opinions on Micro$oft .NET

2003-08-01 Thread Joel Rees
I hate to rain on this parade, but, 

 I'm a pretty good PHP programmer, and things
 I could knock out in a couple of hours seem to be WAY more difficult to
 do in .Net.  

This is the pith of the question. If you knew what you're doing,
anything from Microsoft takes longer to do than doing it the right way.

If you don't know what you're doing, M$ gets you most of the way there
for a cost.

Management has historically actually preferred that labor not know
anything. 

Therefore, Microsoft is Business.

If management thinks that's okay and you think that's okay, jump into
bed with them.

If you don't like the deepening recession, run like hell, because if you
think about it, it's exactly that kind of business that sucks all the
value out of things. (And that's exactly what recession and depression
are all about.)

-- 
Joel Rees
(The above opinion probably does not reflect the opinions of my employer.)


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Possible My Website was hacked... with PHP... please tell me what this is???

2003-07-31 Thread Joel Rees
Assuming you are not just trolling,

 Fortunatly I don't think they were doing something correctly, cause it
 didn't deface my site like some of the others 

Don't count on it. They only deface servers they don't want to use.

 ...
 everyone can execute shell commands via system(); on your server.
 - delete the script ;)

Oh, by all means, delete it if you want. But it's not the hole it came
in through, and it's not the real backdoor.

It's so blatent, I'd guess it's a script kiddy or a decoy. Even if it's
a script kiddy, you _want_ to know how it got on the box.

I'd take the box offline, back up all the data and configuration files,
and re-install the whole system and all programs from scratch. Go over
every configuration file with a fine-tooth comb. 

If the machine is on a subnet and I controlled the subnet, I think I'd
take the whole subnet down, including the firewall, and clean every
machine up, not putting any machine back on the subnet until it was
clean and any holes patched. If I didn't control the subnet, I'd make
sure the persons who did know there had been a break-in.

And if you have any valuable data, consider it to have been stolen. If
you have credit card numbers, report the possibility of theft to the
credit card companies. Etc.

If you're trolling, go away.

-- 
Joel Rees, programmer, Systems Group
Altech Corporation (Alpsgiken), Osaka, Japan
http://www.alpsgiken.co.jp


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Possible My Website was hacked... with PHP... please tell me what this is???

2003-07-31 Thread Joel Rees
Well, now I feel slightly embarassed. I wasn't thinking of the
possibility your site was hosted. My apologies for being a little overly
dramatic.

 Yeah, definatley reason to explore the possibilities... But this is
 really my own stupid fault it got there in the first place... I had an
 image upload form and I didn't tell it only to accept image/jpeg or
 image/gif

So you know how it probably got there. That's a good thing.

The next step would have been to check whether the form would actually
run. If it didn't, then _maybe_ you had some breathing room. 

 Resolution... I deleted everything, and took down the upload form and
 notified my webhost... I guess it wasn't the first time they've seen
 this... So the are taking action on it and probably canceling my
 account... LOL... 

That's probably the safest and quickest approach, anyway. And I'm sure
they appreciate the notification. I sure would.

-- 
Joel Rees, programmer, Systems Group
Altech Corporation (Alpsgiken), Osaka, Japan
http://www.alpsgiken.co.jp


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP or CGI in C/C++

2003-07-31 Thread Joel Rees
 Greetinx,

Greetinx to you to.

 I'm a newbie and wondering which PHP script or CGI in C/C++ generally can
 run/respond faster via http from the same server doing the same tasks.

CGI is inherently slow. The way I understand it, php as CGI will
probably be pretty much the same speed as C/C++ as CGI. PHP with mod_php
should be faster than C/C++ as CGI. 

Compiling a server module is a complicated business, so you would
probably want to avoid trying to compile a C/C++ webapp as a server
module unless you have lots of experience (and I doubt you would be
asking this question if you have that much experience.

A book you might find useful in this context is Chris Radcliff's Perl
for the Web. (Perl is one of PHP's grandpappies, so much of the
discussion will apply to PHP.)

 I appreciate your comments in advance.

I made no comments in advance, but you're welcome anyway. ;-P

-- 
Joel Rees, programmer, Systems Group
Altech Corporation (Alpsgiken), Osaka, Japan
http://www.alpsgiken.co.jp


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] arguments against moving site from Linux/Apache/PHP server to Windows/IIS/PHP needed

2003-07-25 Thread Joel Rees
 First of all, security.. Windows is full of security holes

Did anyone mention the weak password encryption that cnet.com talked
about recently? If you get a copy of the password file, you can break
any MSW password in a few seconds. Macintosh passwords takes 4000 times
as long (or 4000 times as much memory). And Microsoft saying Well, we
don't think it's a problem. or something like that.

At any rate, check the advisory lists, break them down by platform for
management. Make sure they don't overlook Mac OS X Server and openBSD.
Do some research -- the research your management is most likely to
understand is research that is done in house.

-- 
Joel Rees, programmer, Kansai Systems Group
Altech Corporation (Alpsgiken), Osaka, Japan
http://www.alpsgiken.co.jp


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: Redirection Question (I spoke to soon)

2003-07-25 Thread Joel Rees
 Finally,
 
 Thanks to all that tried to help, but I found part of the problem - sort
 of. In the file that I am trying to redirect to I have a form with the
 line:
 
 FORM onSubmit=return checkrequired(this) ACTION=season-write.php
 action=post name=testing
 
 It appears this line was corrupt somehow.

CR/LF in your files brought over from MSWindows?

 After I rewrote the line from
 scratch it solved the problem of my paths being screwed up - why - I
 have no idea. Maybe it had some weird control characters or something
 that was screwing things up.

 However, there is still a problem with the header function - it still
 will not redirect. 

So did you check for things like CR/LF?

-- 
Joel Rees, programmer, Kansai Systems Group
Altech Corporation (Alpsgiken), Osaka, Japan
http://www.alpsgiken.co.jp


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] classes v. functions

2003-07-24 Thread Joel Rees
 Hi,
 
 am Wednesday 23 July 2003 11:48 schrieb Joel Rees:
 
  (You know that $accesses-count and $accesses-resetCounter() are at
  least declared in the same class declaration. $accesses_count and
  accesses_resetCounter() could be declared in entirely unrelated include
  files for entirely different purposes.)
 
 That is the only benefit. But it's not OOP. If you need namespaces and can't
 take care of them w/o misuse of a semi-OOP construct youre not any more
 efficient with it.

 misuse? (I leaned sideways and cross my eyes, then I stood on my
head, but that still makes no sense.)

  Is there any performance benefit one way or the other?
  
  Programmer performance?
  
  I used EZ_Sql which is cool but didn't seem to speed things up in
  comparison to the said include file.
  Still don't see the beef.
  
  Execution speed isn't all that matters. In fact, speed is not the point
  at all.
 
 Then you must be an PHPNuke or Typo3-programmer, beeing lucky to get at
 least 1 request per second ;). 

Oh, yeah, gotta watch those bees.

 Don't take it hard, but If you had ever been in computer-science
 [school|college|...] you would know that speed is all that matters.

Sure. ROFDDCI

-- 
Joel Rees, programmer, Kansai Systems Group
Altech Corporation (Alpsgiken), Osaka, Japan
http://www.alpsgiken.co.jp


















Rate that troll, maybe a 4/10?


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] classes v. functions

2003-07-23 Thread Joel Rees
 Say I have a database class with all kinds of functions for connection, 
 data manipulation, errors, etc:
 
  $db = new db_sql;
 $db-connect();
 $db-do_this();
 $db-do_that();
 
 How would that be different from an include file with a bunch of functions 
 doing the same thing?

As far as I'm concerned, the primary benefit of classes is that you
don't clutter up your namespace. If you have, for instance, 
$accesses-count, you know more about that count than if you have 
just $count. It's a method of organizing your code that doesn't (once
you get used to it) get in the way.

Also, you can be really sure that $accesses-resetCounter() is somehow
related to $accesses-count, whereas $accesses_count and 
accesses_resetCounter() might win your confidence incorrectly. Or maybe
you slip and use access_resetCounter() instead, which might be the cause
of no end of grief.

(You know that $accesses-count and $accesses-resetCounter() are at
least declared in the same class declaration. $accesses_count and
accesses_resetCounter() could be declared in entirely unrelated include
files for entirely different purposes.)

 Is there any performance benefit one way or the other?

Programmer performance?

 I used EZ_Sql which is cool but didn't seem to speed things up in 
 comparison to the said include file.
 Still don't see the beef.

Execution speed isn't all that matters. In fact, speed is not the point
at all.

 Brad recommended I spend even more time with google looking for OOP, maybe 
 that's why I'm so confused:).

I think he's trying to point you to the mind-set. Do you like complex
puzzles with intricate interactions where you have to keep tens of
thousands of lines of code constantly in your head? Or do you like to
focus on several hundred lines at a time, get those to behave, then move
on to another part with a fairly high level of confidence that you won't
shoot yourself in the foot by using the wrong count or resetCount()
somewhere?

-- 
Joel Rees, programmer, Kansai Systems Group
Altech Corporation (Alpsgiken), Osaka, Japan
http://www.alpsgiken.co.jp


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] I need a PHP alternative to Windows Scheduled Tasks

2003-07-23 Thread Joel Rees
 However, on 7/18 all 26 of my scheduled tasks stopped running; one of 
 which continuously ran for 4 days straight w/o stopping (nor could I
 manually stop it).  I deleted the runaway process and recreated it; now
 not a single one of my 26 scheduled Win2000 tasks I created using
 MS-DOS AT commands work (which were working since 7/2).

I really don't know what I'm talking about here, but I think you have to
register those scheduled tasks. Is the registry ok?

 I am now looking into programmatic alternatives.  I really could use 
 some ideas that are practical given my situation.  I'm thinking PHP
 since I am very comfortable with it, were it possible within my bizarre
 Win2000 environment, but I need something that will clean those XML
 files remotely on a regular basis, it's important for website
 maintenance.  Any help appreciated.

Just a random suggestion, but how about having one scheduled task, and
it's job is to run the 26 jobs you are presently trying to run as
scheduled tasks. You reduce the load on MSW's scheduling, and you get
more control over things like which tasks have to complete before others
run.

Of course, moving it all to Linux or one of the BSDs might help, but you
might also want to check the design -- maybe there are some
interdependencies, so that it would help to be able to make sure certain
tasks are done before others, and that they all finish before starting
over.

I did a little script to mail out files on a regular basis. A co-worker
wrote a C program that was called by the MSW2k scheduler, and that C
program checked that my mailing script had completed before it tried to
start another instance of the script.

-- 
Joel Rees, programmer, Kansai Systems Group
Altech Corporation (Alpsgiken), Osaka, Japan
http://www.alpsgiken.co.jp


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Jumping between HTTP and HTTPS

2003-07-22 Thread Joel Rees
 if you do sniff the hash, the key, and the session.  You will  have to
 get your request in before the key becomes stale,

race, race!

 In most cases the authentication is the
 first thing done so we're dealing with micro seconds.

Most cases?

Why re-invent the wheel? 

-- 
Joel Rees, programmer, Kansai Systems Group
Altech Corporation (Alpsgiken), Osaka, Japan
http://www.alpsgiken.co.jp


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Code and Good Design Methods

2003-07-16 Thread Joel Rees
 Hi Joel,
 
 Thanks for nice comments on the XML, XSL.
 
 I want to know more about it. can you please send me
 some article, links and tutorials?
 
 Thanks
 
 Hardik

The ultimate source for xml related technologies is the World
Wide Web Consortium at

http://www.w3.org

Most of the pages there are legalese, and really deep swimming. I think
they do have some introductory materials, however.

Model/View/Controller materials are most likely to be found in relation
to SmallTalk, Objective C, and Java, since the concepts were originally
worked out in those arenas. MVC and XML don't mix well, but the MVC
concept is good to keep in mind if you want to use XML well.

Other than that, there is plenty of material on the web. I know weeding
out the bad stuff is not easy, but many of the pages that got me started
have moved, I know not where.

-- 
Joel Rees, programmer, Kansai Systems Group
Altech Corporation (Alpsgiken), Osaka, Japan
http://www.alpsgiken.co.jp


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Code and Good Design Methods

2003-07-15 Thread Joel Rees
 Let's be honest, XSL is is one big logic step itself -- moreover it's a
 whole other language to learn.

ramble
I wouldn't call it a _big_ step. It only looks big when you look down.
8-)

I would tend rather to encourage the use of XSL, myself.  If you can
pick up php okay, you ought to have few problems with XSL. (My biggest
problem with XSL is remembering to let the application language handle
the hard logic. Don't try to calculate the company budget in XSL, except
as a logic game to amuse yourself while riding the train home.)

You have your data in the database, and a filter (ergo, PHP code) to
extract the data, dress it up a bit and add XML tags. Then you have an
XSL filter to munge the XML into HTML. And the nice thing about XSL is
that the web page layout is all determined by the XSL. 

Of course, it does work out to be a bit messier than it sounds, but the
benefits are definite.

To the OP -- don't focus on the code, don't focus on the coding style
either, focus on the problem. The object is not to avoid mixing PHP and
HTML, and the object is not to use (or not use) objects. Rather, it is
to separate processes that are more related to the business side of
things from processes that are more related to the presentation side. 

My comments on XSL aside, you can program both business and presentation
in PHP. HTML will mostly be in the presentation side, but not
necessarily always. For instance, on the business side, you may
sometimes want to provide a table of the projected monthly profits for
the next year as a complete table wrapped in tags, rather than providing
the raw numbers to the presentation side.

If the design is in someone else's hands, you'll want a template engine.
The basic concept is that the designer designs the template, putting
template tags in where the data should go. The presentation code picks
up the data and the template, replaces the tags with the data, and spits
the result out at the viewer's browser. 

Some template engines are better at actually conforming to that model
than others (particualarly in relation to your app), and XSL can
definitely be used in ways that don't conform to that model. That's no
big deal, just part of what makes life interesting. 

(And if you get into Javaland, you'll hear a lot about MVC and
frameworks. That's a slightly more refined, uhm, model.)
/ramble

-- 
Joel Rees, programmer, Kansai Systems Group
Altech Corporation (Alpsgiken), Osaka, Japan
http://www.alpsgiken.co.jp


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: Replacing newlines (\n) with smething else

2003-07-15 Thread Joel Rees
 But what if say I want to replace a newline with something else, say
 /pp.  How would I do that?

(with apologies for the lack of imagination :-P)

?php

$George = Hello\n\tall\nyou\nfriendly people;
echo 'George: ' . $George . \n;

$Henry = str_replace( \n, /p\np, $George );
$Henry = 'p' . $Henry . /p\n;
echo 'Henry: ' . $Henry . \n;

$Helen = Kindest\r\tgreetings\nto all\r\nyou\n\rwonderful people;
echo 'Helen: ' . $Helen . \nSee what that \\r does?\n\n;

$Marion = str_replace( \r, \n, $Helen );
$Marion = str_replace( \n\n, \n, $Marion );
$Marion = str_replace( \n, /p\np, $Marion );
$Marion = 'p' . $Marion . /p\n;
echo 'Marion: ' . $Marion . \n;

$Juliet = preg_replace( '/([^\r\n]*)(\r\n|\n\r|\r|\n)/', 
p\${1}/p\n, $Helen );
$Juliet = preg_replace( '/([^\r\n]+$)/', 
p\${1}/p\n, $Juliet );
echo 'Juliet: ' . $Juliet . \n;

?


-- 
Joel Rees, programmer, Kansai Systems Group
Altech Corporation (Alpsgiken), Osaka, Japan
http://www.alpsgiken.co.jp


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Grabbing info from other Sites

2003-07-15 Thread Joel Rees
  The site really does
 need Login.

 The thing is this, I'm developing for an internal site, (My dept) but I need
 to access other dept's site to get info but unfortunately They won't give me
 access to query the db directly. Prefering me to go through the site and
 input accordingly to grab the data. 

   I just find this to be SO troublesome as I need to get this data
 for every week. Week In.. Week Out and for a lot of items..

Screen scraping for fun and profit! Anything you can type into a form in
a web browser, you can throw at the server with a program (if you have
enough time to write the program).

In perl, there are LWP::UserAgent, HTTP::Request, HTTP::Cookies,
HTTP::Response, URI, etc.

In php, I don't see anything right offhand. But, there's always Pear,
which is becoming php's CPAN, and pear has at least these two:

http://www.pear.php.net/package-info.php?package=HTTP_Request
http://www.pear.php.net/package-info.php?package=HTTP_Client

and they look somewhat promising.

You'll probably need ssl related classes for the https stuff; it looks
like there's some support in Pear's encryption stuff. I'm sure the php
community would appreciate it if you would build and share anything
that's missing. ;-

   But I will take a look at SNOOPY. (hey.. isn't the name snoopy
 copyrighted??)

Trademarked, but only in relation to a cartoon character of a beagle and
products based on the character, I think.

-- 
Joel Rees, programmer, Kansai Systems Group
Altech Corporation (Alpsgiken), Osaka, Japan
http://www.alpsgiken.co.jp


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] BigEndian to integer

2003-07-15 Thread Joel Rees
  http://www.php.net/pack 
 
 A little background on what Im doing.  Im attempting to read realaudio 
 files for their metadata, so Im reading from a binary string,
 and Im currently using unpack() (Im new to using this function, so I may 
 be wrong with its usage) to unpack the data, along with ord(),
 and the result is something like what I posted before - 0 0 0 18  (I 
 put the spaces in there so we know that each number is a byte)
 So Im not exactly sure how the pack() function would play a role in this.

Just in case you're still groggy when you wake up this morning, the page
for pack() lists an 'N' format for unsigned long big endian byte order
for pack() and unpack(). I think what you probably want to do most is
use the 'N' format when you unpack.

(The other responses were amusing, was it a full moon last night? ;-))

-- 
Joel Rees, permanently jetlagged programmer, Kansai Systems Group
Altech Corporation (Alpsgiken), Osaka, Japan
http://www.alpsgiken.co.jp


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Missing php.ini file

2003-07-15 Thread Joel Rees
 Greetings again,
 
 Did as Ralph suggested...here is the output :
 
 [EMAIL PROTECTED] php]# find / -name php.ini -print

sudo is your friend.

 /home/chris/Documents/Mein Stuph/PHP 4
 Package/php-4.3.1/pear/tests/php.ini
 find: /mnt/floppy: Input/output error
 find: /mnt/cdrom: Input/output error
 /mnt/ClientWebs/knowledgeTree/etc/php.ini
 /mnt/Users/CBlake/Backup/Documents/Mein Stuph/PHP 4
 Package/php-4.3.1/pear/tests
 /php.ini
     What was that?

 /usr/local/Zend/bin/php.ini
 ---
 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] How To Ask Questions - Some List Guidelines

2003-07-15 Thread Joel Rees
  Next thing, please add a reply-to header that has the lists mailing
  address.
 
 This is a topic of debate, and many people (including myself) would urge people
 to ignore this advice. Mangling mail headers can have bad consequences, and
 there is very little reason to do so.

Yeah, but I think the OP was not talking about mangling headers. The
subject was how to ask questions, not how to set up the list server.

The question is whether or not a person wants personal replies, I think.

-- 
Joel Rees, programmer, Kansai Systems Group
Altech Corporation (Alpsgiken), Osaka, Japan
http://www.alpsgiken.co.jp


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Grabbing info from other Sites

2003-07-15 Thread Joel Rees
 In php, I don't see anything right offhand.

http://www.php.net/curl

blush/

-- 
Joel Rees, programmer, Kansai Systems Group
Altech Corporation (Alpsgiken), Osaka, Japan
http://www.alpsgiken.co.jp


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] So in summary this can't be done due to permission problems?

2003-07-15 Thread Joel Rees
 As part of a CMS I wanted to get the user to:
 1) Create a new recordset via a form (with a uniqueid).
 2) Press submit whereupon php gets the ID of the record just created in
 the DB, writes a new page to the server with that unique id and saves it
 as a filename determined by the user.

Seriously, aren't you really just trying to re-invent sessions?

A cookie tracks your session id, your php uses the session id to
maintain persistent data on the visitor, you use the persistent data to
customize the page that gets presented. You don't need to know about
file permissions beyond setting up apache and php.

If you want more than sessions can give you, then you probably want to
set up a directory that is not underneath your web root (maybe under /var
somewhere?) and is only accessible to your apache user. The functions to
read and write files in that directory should be declared in include
files, which should also not be underneath your web root.

If you want to really tighten the lid down, you can set up a separate
server process and communicate with it through local sockets instead of
IP. Or you could install a database and configure the database to not listen
to anything coming in over the network.

-- 
Joel Rees, programmer, Kansai Systems Group
Altech Corporation (Alpsgiken), Osaka, Japan
http://www.alpsgiken.co.jp


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Grabbing info from other Sites

2003-07-15 Thread Joel Rees
Ow Mun Heng wrote,
   Mind my ignorance but what is webservices??

http://www-106.ibm.com/developerworks/webservices/library/ws-starthere.html

You don't really need to use http/HTML when talking machine-to-machine.
XML is convenient and has some standards, but is also not necessary.

Write a DTD that reveals the data you need. Write a little server script
that reveals the data you want. Since you can't access the real data,
use stubs for the access methods and hard code the data in your
mock-server. Write a little client script that grabs the data from your
mock-server script and passes it to your application. When that's
running, encrypt the data stream from the server and decrypt in in the
client. Brew up a little (encrypted) login-logout routine to increase
their confidence level, then give all three to the other department and
ask if they could either fill in the blanks or build their own version
of the server. 

Then they control their side of the interface, both you and they control
the DTD/encryption/login/logout together, and all you have to worry
about is your client.

 ...
 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
 Sent: Monday, July 14, 2003 3:28 PM
 To: [EMAIL PROTECTED]
 Subject: Re: [PHP] Grabbing info from other Sites
 
 
 Hello
 The only way I can imageine is using curl and doing standard post get 
 requests. But this will put you at the mercy of the other dep. since a 
 change in design may force a change in your logic. 
 If you can, try to build a separate interface for your app which you can 
 use to interface the backend of the other deps. You might even consider 
 Webservices. This way you are independend of the design of the site.

-- 
Joel Rees, programmer, Kansai Systems Group
Altech Corporation (Alpsgiken), Osaka, Japan
http://www.alpsgiken.co.jp


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Is it possible to test an uploaded file to check the type?

2003-07-14 Thread Joel Rees
 Is it possible to check a file in $_FILES['userfile']['tmp_name'] to
 make sure it is of a certain format?  I want to allow a user to only
 upload jpegs or mpegs, and want to check what format the file is in.

If there are only a few types, and you know what those types should look
like, it shouldn't be too hard. Maybe. 

For instance, you could try having ypur application open the putative
jpeg with the GIMP, and if the GIMP fails to open it or bombs, then your
application rejects the upload. ;-P

(If you actually did use the GIMP for this, however, you don't want to
call the GIMP directly from PHP/Apache. Not only would it bog your web
app down, but it would potentially open your site up to secure attacks
against a piece of software that is not known to be secure. What you'd
want is something like a cron job to look at the upload directory for
new uploads and pass them to a script that would call the GIMP to do the
check. That way, if the GIMP dies, there is no open shell connected to
an IP port. The cron job would also want to call something to clean up
any dead processes left around.)

I think there are dedicated jpeg validation libraries floating around.
Not sure about MPEG. If it's a simple format, you may be able to write
your own parser (regex?) for it, in which case, maybe you only need to
check the first 100 or 1000 or so bytes.

Checking to make sure a file was _not_ an MS-DOS executable used to be
fairly easy.

Anyway, whether you parse or let the user tell you (MISE) depends on how
careful you need to be (i. e., what your application is going to do with
the upload).

-- 
Joel Rees, programmer, Kansai Systems Group
Altech Corporation (Alpsgiken), Osaka, Japan
http://www.alpsgiken.co.jp


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Looking for experienced PHP programmer in the Memphis, TN area

2003-07-14 Thread Joel Rees
 This position requires strong technical knowledge in a server-side
 scripting technology such as PHP (preferred) /JSP/Perl/ASP. Knowledge
 of SQL queries, stored procedures and database design required. Must
 have experience in HTML/CSS and familiarity with HTTP and networking
 concepts. Graphic design and user-interface skills are desired.
 Experience with CVS and Linux/Unix shell environments a plus.

Telecommuting from Japan okay?

;-



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Wrong parameter count for fgets

2003-07-08 Thread Joel Rees
  Warning: Wrong parameter count for fgets() in
 I had this error on of my scripts, any ideas on this part?

Well, I typed fgets into the search for field on a page at php.net,
left the in the field set to function list, and clicked the little
non-descript arrow to the right of that, and I found this:

http://www.php.net/manual/en/function.fgets.php

From what it says on that page, I would guess that less than one or
greater than two would be a wrong count.

I note that the first argument would appear to be the file pointer fopen
would return. The second is explained to be an optional limit to the
number of bytes to be read.

 How come this error occur?

My guess is that you tried to pass fgets either the wrong number or the
wrong type of arguments.

-- 
Joel Rees, programmer, Kansai Systems Group
Altech Corporation (Alpsgiken), Osaka, Japan
http://www.alpsgiken.co.jp


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] [ML] Are there any announcement rules for this list? (was Re: [PHP] Re: NEW SPAMMER ...)

2003-07-08 Thread Joel Rees
 I've just read the other thread about spammers and such.
 Indeed, my announcement - even for a free platform - was not complying
 to the posting guidelines as it not a response to any questions asked.
 
 I apologize.

Where? The only guidelines that I can find for posting to this list are
at 

http://www.php.net/mailing-lists.php

I see nothing there at all concerning announcements.

I personally appreciate brief announcements of related products,
regardless of licensing. A tag, [ANNOUNCEMENT] or [ANN], in the subject
line would be helpful, but that's the only comment I have on the subject.

If the list maintainers do have rules or guidelines about announcements,
maybe one of them would speak up now?

-- 
Joel Rees, programmer, Kansai Systems Group
Altech Corporation (Alpsgiken), Osaka, Japan
http://www.alpsgiken.co.jp


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Spammer! ...

2003-07-07 Thread Joel Rees
 STOP SPAMING the list.

http://www.php.net/mailing-lists.php

Has some basic guidelines for list useage.

(To the OP, [ANN] or [ANNOUNCEMENT] is a kinder tag.)



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] print vs heredoc

2003-07-07 Thread Joel Rees
 Hi, again!!

I thought I saw this post once already.

 I'm looking for opinions as to which is better/faster, print or heredoc.

Well, like the guy said before, it sounds like you've
pretty much already made up your mind.

I don't use heredocs everywhere, but when I have a fairly large block of
html with a small number of straight variable substitutions (no
conditionals, etc.), I sometimes find heredocs to be convenient, and a
lot easier to read in the source.

reformatted style=wrapped
 print makes the code layout look nice

Well, one of the purposes of a heredoc is to get the code out of the
content, yielding a cleaner, more readable layout. If that's not what
you're getting, you probably don't want to use heredocs.

 and eazy to debug,

If there's something you need to debug, heredocs are possibly not
indicated.

 where heredoc 
 IS faster but makes the code look like a nightmare with everything
 jammed against the left side of the code.

Not sure what you're saying. When I use heredocs, that is not the result,
by any stretch of the imagination. (Well, I'm not sure about the speed
business.)

 I'm pretty picky about what looks good and heredoc is a nightmare of
 horrors...
/reformatted

If that's the results you're getting, I'd say heredoc is probably not
appropriate for what you're trying to do.

-- 
Joel Rees, programmer, Kansai Systems Group
Altech Corporation (Alpsgiken), Osaka, Japan
http://www.alpsgiken.co.jp


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Session vs Cookie Issues

2003-07-03 Thread Joel Rees
 If anyone can help shed any light on the sort of instability I'm seeing,
 that would really help. Apache child processes die right and left, with
 segfaults and bus errors.

Hardware? Overly agressive optimization switches when you compiled?
Using pre-release software somewhere in the chain?

-- 
Joel Rees, programmer, Kansai Systems Group
Altech Corporation (Alpsgiken), Osaka, Japan
http://www.alpsgiken.co.jp


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Get Rid of this Crook

2003-07-03 Thread Joel Rees
 Should people bend to the technology they use, or should the technology be
 manipulated to do the people's bidding?

If you want the non-standard, set it up in your client and don't bother
the rest of us. That's how you bend your technology to do your bidding.

If you aren't aware of what the standard says concerning this topic,
there are some RFCs you should read.

-- 
Joel Rees, programmer, Kansai Systems Group
Altech Corporation (Alpsgiken), Osaka, Japan
http://www.alpsgiken.co.jp


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP on one box, Apache on another?

2003-07-02 Thread Joel Rees
 Hi,
 
  I told him that support for PHP was compiled into Apache and that it
  would be impractical. I asked if he wanted the DB on another box. I
  asked if he wated the scripts on another box. I am quite sure that there
  is no particular logic behind the request as I have not received any
  answers. If he tells me more I'll let you know.
 
   We had a request for this type of setup a couple months ago.  The only
 logic behind it was a guy who didn't have any idea what he was talking about
 reading somewhere that you should have 3 servers per application you setup.
 1. Web Server, 2. File Server,

File server, of course, has nothing to do with php unless you write the
file server in php. 8*| Or, perhaps that mod_php is usually compiled
into the file server.

(Is this possibly echos of iSCSI?)

 3. DB Server.  After we all got done laughing
 him off the phone call, we setup 2 servers, 1. Web/Files, 2. DB.
 Fortunately he decided to listen that day.

Perhaps what he meant by web server was firewall (i. e., handling the
internet interface), and by file server he meant what we now call web
server (i. e., presenting the view of the file system that the outside
world is supposed to see)?

-- 
Joel Rees, programmer, Kansai Systems Group
Altech Corporation (Alpsgiken), Osaka, Japan
http://www.alpsgiken.co.jp


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP on one box, Apache on another?

2003-07-02 Thread Joel Rees
 I don't know the details of this request (like why., but as soon as I
 know I'll tell you) but can Apache live on one box with all PHP requests
 being handled on another box?

Yeah, but what you're likely to end up with is apache on one machine
just passing requests to and from apache-mod_php-your_app on another
machine.

Or, you could use some other web server on the second machine, might
even be something dead-simple, like a shell process running command-line
PHP (don't do that unless you know how and why already) or a perl (php?)
script that passes things on to the PHP cgi. 

Are you familiar with Tomcat?

The typical production arrangement with Tomcat, except for sites that
use very little static html, is to have Apache handle the static html,
and Tomcat handle the jsp/java. Apache and Tomcat can definitely be on 
separate machines.

I think I have read somewhere reports of some project working to set up
a similar special-purpose php-template server for php, but that may be
just my imagination.

-- 
Joel Rees, programmer, Kansai Systems Group
Altech Corporation (Alpsgiken), Osaka, Japan
http://www.alpsgiken.co.jp


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Installation for OS X

2003-07-01 Thread Joel Rees
 Does anyone know of a good installation kit like FoxServ, phpTriad, etc for
 Mac OS X?  I want a quick solution for adding MySQL, GD, phpLib support for
 my mac.

Well, if you're at least up to 10.1, it's already in there:

http://www.macdevcenter.com/pub/a/mac/2002/01/04/apache_macosx_pt3.html

It's an old version though (4.1.2 in 10.2), and there's an advisory out,
so you probably want to download the latest and recompile.

Did a quick search on google and discovered there's 

http://www.phpmac.com . 

Claims to be a member of the php developers' network, whatever that is.
First time I've looked at it, so I can't comment on quality. But it does
have a page on how to recompile. 

Also found these old docs at Apple. The one about customizing the dev
tools for php looks interesting:

http://developer.apple.com/internet/macosx/php.html
http://developer.apple.com/internet/macosx/phpappledevtools.html

-- 
Joel Rees, programmer, Kansai Systems Group
Altech Corporation (Alpsgiken), Osaka, Japan
http://www.alpsgiken.co.jp


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] php-general as REPLY TO

2003-07-01 Thread Joel Rees
  You'll have to learn to adjust then I guess. And do those 2k really
  matter? Come on...  Just get a good mailer that defaults to 
  Reply-All
  (like, mutt, pine, pcpine)
 
 Some of us don't have the choice -- we work in a corporate or institutional 
 environment where the decision is made centrally.  (Hence M$ Outlook 98 here!!!)

There is a setting in MSOutlook/MSOE to wrap your lines, say, at 62 or
70.

I don't remember my experiences with MSOE on Mac very well, but MSOE on
MSW2k had little triangles on buttons in various places. If you hit the
button, you got the standard function. If you hit the triangle, you got
a pop-up menu. Pop-up menu for replies included basically all the
potential reply addresses (according to MS judgement of potential reply
addresses). Look around, maybe you can find something like that on
MSOutlook 98.

rambling
We had some virus problems here last year, and now MS mail clients are
banned. The company standardized on Becky for the MSWxx boxes, which is
a really nice client, all sorts of features for mailing lists,
newsgroups, etc. The filter setup is a little weird, but it works great.
So I am beginning to forget the conveniences of MSOE on MSW2k, as well,
which is not something I mind forgetting.

But I have to admit, I find it puzzling why copy/pasting a mail address
should be considered such an inconvenience. I admit, copy/paste on MSWxx
feels clumsier than on a Mac, but the operations are fundamental to GUI.

I also find it a puzzle why so many companies seem to think that
MSOutlook's advantages outweigh the problems of having to bolt antivirus
on everything (and the occasional slip-through that then proceeds to
dirty entire subnets), but that is a separate topic.
/rambling

-- 
Joel Rees, programmer, Kansai Systems Group
Altech Corporation (Alpsgiken), Osaka, Japan
http://www.alpsgiken.co.jp


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Licenses -- was Re: [PHP][PHP-DEV][PHP-QA] PHP 5.0.0 Beta 1

2003-06-30 Thread Joel Rees
 Hello,
 
 On 06/29/2003 04:16 PM, Sascha Schumann wrote:
   - Due to issues surrounding the MySQL 4.0 license, the MySQL libraries
 are no longer bundled with PHP.  For more information on these
 licensing changes please see the MySQL licensing policy [1]
 
 [1] http://www.mysql.com/products/licensing.html
 
 I read the licensing information in the above link, but I'm curious what
 exactly in it necessitated the need to unbundle MySQL? Anyone have a
 quick answer?
  
  
  Note that the bundled library code was removed due to being
  unmaintained.  The old bundled library code was in the public
  domain and thus not subject to the GPL.  Only the MySQL 4
  library is GPLed; the MySQL 3 library is not.
  
  It is unfortunate that some people try to confuse the public
  about this topic.

Well, in this particular case, the confusion may not be incorrect. (So
to speak.)

 Many people think that all Open Source software has a GPL license. I 
 guess it is that old Lenine say, if you repeat the same lie many times, 
 it becomes the truth, that today is known as propaganda. Credits for 
 this Open Source lie should go to RMS.

I'd lay the blame elsewhere. 

Stallman's writings are fairly direct and concise. He has helped clarify
the semantics of free, and he has contrasted the sort of freedom he
expounds with other concepts of freedom and openness. Whether you agree
with him or not, his arguments and ideas are useful in both intellectual
and business senses.

You don't have to agree with people to learn from them, and you don't
even have to agree with people to let them do their work, in general.

The FUD comes from other sources.

 Anyway, MySQL 3 library seems to work perfectly to connect to MySQL 4 
 servers. What are MySQL 4 client library advantages?

It's the maintenance issue.

 Anyone thought of keep the bundle of MySQL 3 library? Was there a 
 problem, or is this unbundling initiative a sort of protest to make 
 MySQL AB reconsider MySQL 4 client library licensing?

There was a long thread (more than one, in fact) on this subject on the
postgresql list(s), which referenced a thread on the php-dev list:

http://marc.theaimsgroup.com/?l=postgresql-generalm=105631920423234w=2
http://marc.theaimsgroup.com/?l=php-devm=105621207500778w=2

Of course, the issue of the license the driver falls under is mostly one
of convenience, at least for the application programmer and end-user, I
think. It doesn't really alter the legal status of most projects using
MySQL and PHP (when the parts are assembled correctly), nor does it
alter the moral/enlightened-self-interest obligations to pass some of
the action back to the producers of free/open tools that help one make
money.

For MySQL AB, it will likely mean taking a slip in market share, since
they lose their favored status in the PHP community. From what I've
seen, Monty's a fairly sharp guy. For all I know, this may be a
deliberate move to level the playing field and let the free/open source
community get a broader view of some of the alternatives to the DB
software sold by the primary source of the FUD.

(my JPY 2)

-- 
Joel Rees, programmer, Kansai Systems Group
Altech Corporation (Alpsgiken), Osaka, Japan
http://www.alpsgiken.co.jp


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Securing PHP code

2003-06-25 Thread Joel Rees
 Maybe I am missing something totally obvious, but if the server is set up
 to
 properly parse php files - having configs outside of the doc root should not
 make much of a security difference?
 
 
 Is this a true statement or not?  (of course we have to make the assumption
 that server access has not been compromised)

There was a version of php where exactly this sort of hole existed under
certain conditions. That hole does not exist in the present version.
Check the security announcements for details.

However, you should always consider a file extension among the weaker
class of protections. 

-- 
Joel Rees, programmer, Kansai Systems Group
Altech Corporation (Alpsgiken), Osaka, Japan
http://www.alpsgiken.co.jp


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] free web host needed.

2003-06-24 Thread Joel Rees
  Perhaps the original poster should just set
 up their own linux box and run it off their home cable/dsl line.

Good answer, although I would recommend looking at the BSDs, too -- netBSD
in particular, runs on hardware you can drag out of dumpsters. Takes a
bit of work to get it all together, of course.

However, guessing from his e-mail address, he may physically not be
anywhere close to any dumpsters that would have old computers and parts
in them, much less to a home that could be hooked up to cable/dsl. 

http://www.matkurja.com/eng/country-info/

-- 
Joel Rees, programmer, Kansai Systems Group
Altech Corporation (Alpsgiken), Osaka, Japan
http://www.alpsgiken.co.jp


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Good PHP Books (topic wandering)

2003-06-17 Thread Joel Rees
 Some of the O'Reilly books that I thought were
 not perfect:
 - All books about Perl. Now that we have nice
   c-like script languages like PHP, Python and
   Javascript who still wants to study the mess
   that Perl is?

Heh. PHP, Python, Javascript? It's all perl to me.  ;-)

The O'Reilly books, as has been noted, are the standard references on
perl.

 - The introduction to Ruby, probably called Ruby in
   a Nutshell. I had read the introductory article
   in DrDobbs by the author of the language and the
   language seemed nice, but whilst reading the
   book I noticed more and more cases of half-Perl
   ugliness. The language Ruby was designed by
   a Japanese and a lot of Japanese designs are
   flawed by being a seemingly random combination
   of aspects from Western designs.

Ruby is also a dialect of perl, and very well done. You might want to
take a closer look at what seems random to you now.

But it seems to me you are criticizing languages rather than books in
the above.

 - The Java in a Nutshell book. It consisted mainly
   of a collection of standard library functions but
   with to few details to be of any use.

Java is a huge language and full of details. Once I got used to Java,
O'Reilly's Java in a Nutshell turned out to be just right to have on my
desk. The Examples volume is a necessity.

PHP's on-line docs are great because PHP is small and glosses over a lot
of details. Sun's on-line docs for Java just don't work as primary
source because you have to see too much through that itty-bitty
seventeen inch screen. (When monitors are 600dpi, and cheap and thin
enough that we can have seven or eight of them sitting on our desk, then
maybe we can finally get rid of books.)

 I propose that when looking for a book on a certain
 subject:
 - You check out if there is an O'Reilly book about it
   and when not, why not?
 - Compare any other book you encounter with the O'Reilly
   book and see if it is better. It might happen in
   selected cases.

That's probably not a bad approach.

 By the way, I think that the online PHP-manual at php.net
 is very good so I have no need for a PHP book,

No argument with that.

 except that
 I once bought O'Reilly's PHP Kort en Krachtig (the Dutch
 translation of the PHP Pocket Reference, probably the
 first version of 2000). Of course I would have bought
 the English version if it had been in stock here. The
 Dutch translations of computer books are often very
 flawed, plus that it's useful to learn the English
 terms.

I imagine things will improve with Dutch. Japanese docs have definitely
been improving -- less reliance on technical words borrowed from English,
greater accuracy when choosing native terminology, less Janglish grammar.

-- 
Joel Rees [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Good PHP Books

2003-06-16 Thread Joel Rees
 Thanks for your input.
 
 Yes I am already planning on using the book for extra information for the
 course, knowing I won't cover all the chapters in the book in such a short
 time.  I won't get into things like GD(images) or things like creating PDF
 files dynamically. I plan to in the future create 1 or 2 day workshops on
 move advance topics like GD, etc..  This course is just to get their feet
 wet and interested in PHP.  I have taught an ASP course for over 5 years and
 finally convinced the college to let me change it to PHP.

Hey, I just taught myself php from the on-line docs at

http://www.php.net/docs.php

and some good sample source. I'm thinking I'd focus less on the book and
more on choosing good samples. 

I personally like O'Reilly books in general. But I haven't seen their
PHP offerings, so I'll refrain from actually recommending anything there.

-- 
Joel Rees [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP vs. jsp, advice please

2003-06-10 Thread Joel Rees
  You might want to look around the jakarta projects and ask questions on
  some of those mailing lists.
 
 Thanks for the advice. I'll try that. But I *would* like to hear the 
 opinions of PHP'ers too. I'm worried that by asking people on that list 
 Ill get one-sided views.

Of COURSE you'll get one-sided opinions over there. No, actually,
they're mostly pretty open-minded.

I think I recall a thread or two on one or both of the lists I mentioned
comparing JSP with tomcat and maybe struts to php. You should be able to
find it on marc or one of the other places that archives the jakarta
lists. 

Hmm. php seems to get a lot of unrelated hits for some reason, but I
notice that some people seem to have apache, tomcat, and php all running
together.

 What do PHP people who've tried jsp or struts think?
 
  (tomcat is an open source java server that can be used with or without
  apache, and struts is an application framework.)
 
 The jsp'ers that I talked with could not stop praising struts ... which 
 is what got me interested in finding out more and maybe even switching.

Yeah, and the guys who developed struts are already working on something
even better ...

 I just hope that if I do decide that struts are worth the switch the 
 learning curve isn't too steep. Or the installation curve also since I'm 
 the lone sysadmin too ...

Well, it was pretty steep for me because I was trying to pick up Java
and objects at the same time. I think you'll have less trouble if you
already are comfortable with Java. 

-- 
Joel Rees [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Generate PHP using PERL???

2003-06-10 Thread Joel Rees
   Its kind of ugly, but its possible to call a php script thru a system()
 function in Perl.  

Why bother going through a system call? If you have apache loading both
mod_php and mod_perl, you can call (include or whatever) through normal http
methods.

-- 
Joel Rees [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Generate PHP using PERL???

2003-06-10 Thread Joel Rees
 Well, I'm a little light on techniqueso bare with me...
 I've got pages that are dynamically created via a perl program. 

Already? That was fast. ;-)

 The final
 HTTP output depends upon input to the perl script.

 I would like the output of this script to be interpreted as a .PHP page so
 that I can take advantage of PHP functionality within that page.

You're planning on piping perl into php? That sounds like fun.

 Since I dont know what my page will look like prior to running the perl
 script with its various inputs, I dont think I can do what your suggesting.

Wish I knew which post you were replying to here, because I can't tell
what was suggested, much less speculate much on why it doesn't look like
it will work.

 ...

Anyway, if I wanted to be able to use some graphics libraries that my
hosting company made available for php but not for perl, I'd do the
graphics manipulations on php pages and be done with it.

(It seems odd to me that your hosting company doesn't want to load the
perl modules. That might have me wanting to drop the hosting company and
fire up an openbsd box to host my own.)

-- 
Joel Rees [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP vs. jsp, advice please

2003-06-09 Thread Joel Rees
 ...
 Before I start my new project I am considering whether to use PHP again 
 or to switch to jsp. I'm worried that PHP won't scale well. And by 
 scaling I don't mean under heavy load, I mean maintenance wise :) I 
 can't imagine having to do a feature upgrade on a PHP project with more 
 than 100 files ... (this file requires that file which requires that one 
 and so on ...)
 
 I used to be a java programmer and always wax nostalgic about how easy 
 it was to program-by-contract using objects and interfaces. And I'm 
 always gripping about how much pain session handling is (not because of 
 PHP but because HTTP is stateless).
 ...

You might want to look around the jakarta projects and ask questions on
some of those mailing lists. I've monitored the tomcat and struts lists
in the past, and gotten a bit of help there:

http://jakarta.apache.org

(tomcat is an open source java server that can be used with or without
apache, and struts is an application framework.)

-- 
Joel Rees [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Heredoc question

2003-06-05 Thread Joel Rees
 That's fine for that but I have several places that use if's and else's...

AFAIK, you can't do conditionals inside a here doc. But then you don't
have to build your entire output string in one here doc, either.

Hmm. Maybe you're trying to build templates?

-- 
Joel Rees [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] static vars question

2003-06-02 Thread Joel Rees
 As I said, since I was recursing through the function by calling it numerous
 times in the middle of its execution, and since the function didn't
 explicitly return, I didn't expect it to continue past each call. That's
 all!

Sounds like you're coming in from CoBOL or maybe BASIC?



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] My Sincere Request!![Scanned]

2003-05-29 Thread Joel Rees
 1. This is the an example of the Nigeria 419 scam. I have no idea how it got 
 the 419 in the name.  

http://www.google.com/search?hl=enie=ISO-8859-1q=nigeria+419

in particular,

http://home.rica.net/alphae/419coal/  

-- 
Joel Rees [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php