[PHP] HOWTO: Installation on Cobalt RaQ (RaQ3 or RaQ4)

2001-01-24 Thread Derek Sivers
I run about 8 Cobalt RaQ3 and RaQ4 boxes, and this is the installation procedure that always works for me. Don't use the Cobalt RPMs. They're bad out of date. - GET THE SOURCE TARBALLS for MySQL and PHP4 from the command line: lynx

Re: [PHP] include() require()

2001-03-07 Thread Derek Sivers
Which is the main difference between include() and require() functions? "include" is optional you can put it inside an "IF" like this: if (0) { /* THIS WILL NOT SHOW... */ include "optional_file.php"; } but "require" happens every time, even if it is inside an "IF" that does not

Re: [PHP] payment - the death of CyberCash

2001-03-09 Thread Derek Sivers
Everyone so far has been recommending ClearCommerce: http://www.clearcommerce.com/ Since my site is 100% PHP and depends on CyberCash for sales, I'll let everyone here know what I find out about getting PHP to work with ClearCommerce or anyone else. -- PHP General Mailing List

Re: [PHP] How to protect my scripts ???

2001-03-10 Thread Derek Sivers
Can't the files be put into a directory that Apache has access to and the users don't, and just ask the users to include them? Or put them into a global prepend in a directory same as above? This isn't PERFECT, but I do this: #1 - make a user/group called "www" #2 - Set Apache to run as that

Re: [PHP] Sending pretty email

2001-03-10 Thread Derek Sivers
I often receive email from commercial sites (e.g. ZDnet) that looks like a Web page. How can I do that with Sendmail in PHP? The man page for "mail" gives an example of it. http://www.php.net/mail It's just one "$header" line, stating HTML, then the rest of your message should be in HTML:

Re: [PHP] Sending pretty email

2001-03-11 Thread Derek Sivers
At 07:49 AM 3/11/01 , Richard Scott Crawford wrote: The first thing to do is to take two aspirin and lie down until the temptation to do this passes. It may be cool, but those of us who use Eudora or Pine for our e-mail don't read HTML-encoded mail, don't *want* to read HTML-encoded mail, and

[PHP] spidering dynamic pages

2001-03-11 Thread Derek Sivers
if I move everything to php and just use a different text file for each page for the main body of text and load each text file depending on what page the user wants, would the search engine search though those text files and just link to those and not to the php file? Would it even be spidered

[PHP] normal for Apache to hang?

2001-03-14 Thread Derek Sivers
Does your Apache hang? Is that normal? To have commands sitting for 1-2 minutes? Using Apache 1.3.17 + PHP 4.0.4pl1 + newest MySQL on a Debian Linux box. I use PHP for pretty much everything. So I have Apache set to parse all files as PHP. But that's never been a problem before. (This is a new

Re: [PHP] Statistics function

2001-03-15 Thread Derek Sivers
the connection will close when you hit cancel but the PHP code can continue running if you choose. Really?!? How do you choose to have the PHP script continue even if a browser leaves/dumps? I've always wanted to do that. Didn't know it was possible. -- PHP General Mailing List

Re: [PHP] Classes and Object Oriented Programming

2001-03-17 Thread Derek Sivers
Is there a good tutorial on Classes? http://www.zend.com/zend/tut/class-intro.php That's a really good one. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators,

Re: [PHP] sessions broken when redirected?

2001-03-29 Thread Derek Sivers
I had this same problem and it constantly broke our whole site. So I tried a different approach and this has been working great: Instead of ? header ("Location: sometoherpage.php"); ? Consider: ? include "someotherpage.php"; ? It works flawlessly, always, and maintains your session. Because

[PHP] can you prompt for variables in command-line CGI?

2001-08-26 Thread Derek Sivers
for a SHELL SCRIPT using php binary: in bash I would do this: #!/bin/bash echo -n username: read username echo -n password: read password echo $username echo $password Run on the command-line, it would stop and ask me for the username and password, then continue the bash shell script. But

Re: [PHP] foo[bar] _or_ foo['bar'] ?

2001-02-13 Thread Derek Sivers
I'd really appreciate a clear statement whether to use better $foo = array('bar' = 'boing'); doWhatSoEver($foo[bar]); or $foo = array('bar' = 'boing'); doWhatSoEver($foo['bar']); I had heard someone on the list say that it's always best to use quotes, for the same reason as

[PHP] PARANOID PERMISSIONS for apache?

2001-02-13 Thread Derek Sivers
Can anyone think of any downside to this idea? Set Apache to run as user/group "www:www" Set ownership of PHP files and folders to "www:www" And set permissions to 700 So that ONLY Apache can read them. Now - even if I give someone shell access to my box, or someone finds my personal login

[PHP] use NEWLY-ASSIGNED SESSION id?

2001-04-05 Thread Derek Sivers
My PHP script (with --trans-sid enabled) assigns a session ID for people without cookies. No big deal, right? BUT THE BIG QUESTION IS: Can I immediately know what long string PHP assigned to the session, without having to click to a different page first? I want one single PHP page to #1 -