php-general Digest 13 Jul 2003 14:58:27 -0000 Issue 2173
Topics (messages 154985 through 155003):
Re: touch file on shared web server?
154985 by: Paul O'Neil
154991 by: Jason Wong
Re: Code and Good Design Methods
154986 by: zbranigan
154987 by: zbranigan
154988 by: Dan J. Rychlik
154994 by: Ray Hunter
154995 by: Robert Cummings
Re: OK, So I am new to these List. Win2000 help!
154989 by: John Nichel
155002 by: John Nichel
Re: Newbie Directory question
154990 by: olinux
Re: Mailing list server with PHP frontend
154992 by: Juan Nin
154993 by: Manuel Lemos
154996 by: Paul Chvostek
How does PHP interact when using Java?
154997 by: Jan Bro
Weird Date problem driving me crazy...
154998 by: Boaz Yahav
php script billing receipt
154999 by: Duncan
Re: Need PHP on Win2000 Pro
155000 by: Burhan Khalid
155001 by: John A. Thomason
Re: dump $_POST into variables????
155003 by: Marek Kilimajer
Administrivia:
To subscribe to the digest, e-mail:
[EMAIL PROTECTED]
To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]
To post to the list, e-mail:
[EMAIL PROTECTED]
----------------------------------------------------------------------
--- Begin Message ---
Yes, create a temp directory like this -rw-rw-rw- 1 nobody nogroup
-----Original Message-----
From: Paul O'Neil [mailto:[EMAIL PROTECTED]
Sent: Saturday, July 12, 2003 5:52 PM
To: [EMAIL PROTECTED]
Subject: [PHP] touch file on shared web server?
you can only TOUCH a file that you own. Usually PHP is *nobody*. Is there a
way for a script to create a file on the web server?
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.498 / Virus Database: 297 - Release Date: 7/8/2003
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.498 / Virus Database: 297 - Release Date: 7/8/2003
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.498 / Virus Database: 297 - Release Date: 7/8/2003
--- End Message ---
--- Begin Message ---
On Sunday 13 July 2003 10:13, Paul O'Neil wrote:
> Yes, create a temp directory like this -rw-rw-rw- 1 nobody nogroup
The directory needs the 'x' bits as well otherwise no-one will be able to get
into it.
--
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
------------------------------------------
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
------------------------------------------
/*
Death comes on every passing breeze,
He lurks in every flower;
Each season has its own disease,
Its peril -- every hour.
--Reginald Heber
*/
--- End Message ---
--- Begin Message ---
>>>>> "Dan" == Dan J Rychlik <[EMAIL PROTECTED]> writes:
Dan> I am reading PHP and MySQL web development 2nd edition book.
Dan> Chapter 6 talks about displaying dynamic web content using
Dan> class objects. For the type of project that I am building,
Dan> this is not optimal. How do I keep my self from having html
Dan> mixed with my PHP code?
try having a look at the Smarty templating engine.
--
no toll on the internet; there are paths of many kinds;
whoever passes this portal will travel freely in the world
--- End Message ---
--- Begin Message ---
>>>>> "Dan" == Dan J Rychlik <[EMAIL PROTECTED]> writes:
Dan> I am reading PHP and MySQL web development 2nd edition book.
Dan> Chapter 6 talks about displaying dynamic web content using
Dan> class objects. For the type of project that I am building,
Dan> this is not optimal. How do I keep my self from having html
Dan> mixed with my PHP code?
Ok, here's another one. I've never used the php port of TAL, but I've
used TAL a little bit in Zope and it's really nice.
Here's a link to an article on the zope site about TAL. One really
good thing about TAL (below) is that HTML editing tools tools like
Dreamweaver, Amaya or and GoLive, for instance, can be used to edit
the templates. So the Interface Engineers can do their 'thang' and the
programmers can do their 'thang' with less interference.
,----[ http://www.zope.org/Documentation/Articles/ZPT1 ]
| The tal:content attribute is a TAL statement. Since it has an XML
| namespace (the tal: part) most editing tools will not complain that
| they don't understand it, and will not remove it. It will not change
| the structure or appearance of the template when loaded into a
| WYSIWYG editor or a web browser. The name content indicates that it
| will set the content of the title tag, and the value "here/title" is
| an expression providing the text to insert into the tag.
`----
here's a link to the PHP port.
http://phptal.sourceforge.net/
--
no toll on the internet; there are paths of many kinds;
whoever passes this portal will travel freely in the world
--- End Message ---
--- Begin Message ---
hmm.. ill have a look. Thanks again.
----- Original Message -----
From: "zbranigan" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, July 12, 2003 9:15 PM
Subject: [PHP] Re: Code and Good Design Methods
> >>>>> "Dan" == Dan J Rychlik <[EMAIL PROTECTED]> writes:
>
> Dan> I am reading PHP and MySQL web development 2nd edition book.
> Dan> Chapter 6 talks about displaying dynamic web content using
> Dan> class objects. For the type of project that I am building,
> Dan> this is not optimal. How do I keep my self from having html
> Dan> mixed with my PHP code?
>
> try having a look at the Smarty templating engine.
>
>
> --
> no toll on the internet; there are paths of many kinds;
> whoever passes this portal will travel freely in the world
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
--- End Message ---
--- Begin Message ---
Also u could build your own system that is php xml and xslt based. That
will really help you separate the logic from the presentation.
Check out (dom)xml and (dom)xslt. Sometimes there is still logic in the
presentation with template systems....with xslt however, it might be to
much for the design (interface) guys.
Those should help u out.
--
BigDog
On Sat, 2003-07-12 at 20:08, Dan J. Rychlik wrote:
> I am reading PHP and MySQL web development 2nd edition book. Chapter 6 talks about
> displaying dynamic web content using class objects. For the type of project that I
> am building, this is not optimal. How do I keep my self from having html mixed with
> my PHP code? In other words how do I serperate the two. I need to concentrate on
> writing good code and not designing a nice looking website. (someone else is going
> to do that)
>
> Can I assign include() statements to a variable ? How would you guys accomplish
> this?
>
> Thanks so much in advance,
> Daniel
--- End Message ---
--- Begin Message ---
Let's be honest, XSL is is one big logic step itself -- moreover it's a
whole other language to learn.
Cheers,
Rob.
On Sun, 2003-07-13 at 02:07, Ray Hunter wrote:
> Also u could build your own system that is php xml and xslt based. That
> will really help you separate the logic from the presentation.
>
> Check out (dom)xml and (dom)xslt. Sometimes there is still logic in the
> presentation with template systems....with xslt however, it might be to
> much for the design (interface) guys.
>
> Those should help u out.
>
> --
> BigDog
>
>
> On Sat, 2003-07-12 at 20:08, Dan J. Rychlik wrote:
> > I am reading PHP and MySQL web development 2nd edition book. Chapter 6 talks
> > about displaying dynamic web content using class objects. For the type of project
> > that I am building, this is not optimal. How do I keep my self from having html
> > mixed with my PHP code? In other words how do I serperate the two. I need to
> > concentrate on writing good code and not designing a nice looking website.
> > (someone else is going to do that)
> >
> > Can I assign include() statements to a variable ? How would you guys accomplish
> > this?
> >
> > Thanks so much in advance,
> > Daniel
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--
.---------------------------------------------.
| Worlds of Carnage - http://www.wocmud.org |
:---------------------------------------------:
| Come visit a world of myth and legend where |
| fantastical creatures come to life and the |
| stuff of nightmares grasp for your soul. |
`---------------------------------------------'
--- End Message ---
--- Begin Message ---
John A. Thomason wrote:
The following is my output in the command prompt window(DOS Prompt?)
C:\PHP>hello.php
Content-type: text/html
X-Powered-By: PHP/4.3.2
!#C:\php\;
echo"Hello World!";
if ($foo):
echo "yep\n";
elseif ($bar):
echo "almost\n";
else:
echo "nope\n";
endif;
phpinfo();
C:\PHP>
And the following is the PHP code to generate it.
!#C:\php\;
echo"Hello World!";
if ($foo):
echo "yep\n";
elseif ($bar):
echo "almost\n";
else:
echo "nope\n";
endif;
phpinfo();
Now, I know that the variables are not set, so they should be false, but the
output just displays a "listing" of the code and doesn't process it. In the
documentation, it states that PHP can be run from the command prompt, like a
batch file. Now what am I doing wrong.
I do have it working correctly with an Apache server, that I am using
backend.
and my install dir is "C:\php", and it is listed first in the path.
John A. Thomason
[EMAIL PROTECTED]
Looks like you're trying to run it as a shell script, or a cgi program.
Replace the sh-bang on the first line with <?php and make sure the
last line of the script is ?>
eg:
<?php
echo"Hello World!";
if ($foo):
echo "yep\n";
elseif ($bar):
echo "almost\n";
else:
echo "nope\n";
endif;
phpinfo();
?>
--- End Message ---
--- Begin Message ---
John A. Thomason wrote:
Thanks, that did it. And yes, I am trying to run this as a shell script.
Thank you very much.
John.
----- Original Message -----
From: "John Nichel" <[EMAIL PROTECTED]>
To: "John A. Thomason" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Saturday, July 12, 2003 10:01 PM
Subject: Re: [PHP] OK, So I am new to these List. Win2000 help!
John A. Thomason wrote:
The following is my output in the command prompt window(DOS Prompt?)
C:\PHP>hello.php
Content-type: text/html
X-Powered-By: PHP/4.3.2
!#C:\php\;
echo"Hello World!";
if ($foo):
echo "yep\n";
elseif ($bar):
echo "almost\n";
else:
echo "nope\n";
endif;
phpinfo();
C:\PHP>
And the following is the PHP code to generate it.
!#C:\php\;
echo"Hello World!";
if ($foo):
echo "yep\n";
elseif ($bar):
echo "almost\n";
else:
echo "nope\n";
endif;
phpinfo();
Now, I know that the variables are not set, so they should be false, but
the
output just displays a "listing" of the code and doesn't process it. In
the
documentation, it states that PHP can be run from the command prompt,
like a
batch file. Now what am I doing wrong.
I do have it working correctly with an Apache server, that I am using
backend.
and my install dir is "C:\php", and it is listed first in the path.
John A. Thomason
[EMAIL PROTECTED]
Looks like you're trying to run it as a shell script, or a cgi program.
Replace the sh-bang on the first line with <?php and make sure the
last line of the script is ?>
eg:
<?php
echo"Hello World!";
if ($foo):
echo "yep\n";
elseif ($bar):
echo "almost\n";
else:
echo "nope\n";
endif;
phpinfo();
?>
Yeah, you just need to enclose the actual script in the opening/closing
php tags (<?php and ?>). And to run it as a shell script, you can
either call the script as...
c:\path\to\php\php.exe filename.php (or just 'php filename.php' if the
php interperter is in your path), or put the sh-bang as the first line
(before the opening php tag).
--- End Message ---
--- Begin Message ---
You can set any directory as the web root in apache's
httpd.conf file.
You might also want to check out the virtualhost
directive. (there's an example in the default
httpd.conf file)
http://httpd.apache.org/docs/mod/core.html#documentroot
http://httpd.apache.org/docs/mod/core.html#virtualhost
olinux
--- [EMAIL PROTECTED] wrote:
> I'm wondering if there is a way to have your php
> development files in
> another directory other than htdocs when using
> apache. Similar to the
> virtual directories IIS uses.
>
__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com
--- End Message ---
--- Begin Message ---
From: "Manuel Lemos" <[EMAIL PROTECTED]>
> You may want to try this class for creating lists with the ezmlm mailing
> list manager. It has support for creating and editing the lists
> properties and even has a SOAP interface for accessing the subscriptions
> from remote machines.
>
> http://www.phpclasses.org/ezmlmmanager
> ezmlm has MySQL bindings for managing the subscription records. The
> messages are stored in disk files though.
seems nice, but the problem is I'm not using qmail, I'm using Postfix, and
ezmlm works with qmail.. :(
thnx anyway!!!
I'm looking into programming a PHP interface to Sympa which is programmed in
Perl
haven't looked at it too much yet, I hope it isn't too much complicated..
regards,
Juan
--- End Message ---
--- Begin Message ---
Hello,
On 07/13/2003 02:37 AM, Juan Nin wrote:
You may want to try this class for creating lists with the ezmlm mailing
list manager. It has support for creating and editing the lists
properties and even has a SOAP interface for accessing the subscriptions
from remote machines.
http://www.phpclasses.org/ezmlmmanager
ezmlm has MySQL bindings for managing the subscription records. The
messages are stored in disk files though.
seems nice, but the problem is I'm not using qmail, I'm using Postfix, and
ezmlm works with qmail.. :(
Apparently there is a way to make it work with Postfix too:
http://www.dmumford.com/tech/ezmlm-postfix.html
--
Regards,
Manuel Lemos
Free ready to use OOP components written in PHP
http://www.phpclasses.org/
--- End Message ---
--- Begin Message ---
On Sat, Jul 12, 2003 at 08:17:03PM -0300, Manuel Lemos wrote:
>
> You may want to try this class for creating lists with the ezmlm mailing
> list manager. It has support for creating and editing the lists
> properties and even has a SOAP interface for accessing the subscriptions
> from remote machines.
The ezmlm package has a number of problems that make it really annoying
to deal with; it has its own way of interpreting message headers which
isn't much related to any RFC. The primary problem is the fact that it
considers the "Return-Path" header (i.e. the envelope sender) to be the
authoritative address of the sender, superceding the From and Reply-To
headers. The only way around it is to "spoof" the envelope sender,
thereby falsifying your headers. Gahgh.
Now ... if you were to write a class to manage Mailman configs ... that
would be useful. ;-)
--
Paul Chvostek <[EMAIL PROTECTED]>
it.canada http://www.it.ca/
Free PHP web hosting! http://www.it.ca/web/
--- End Message ---
--- Begin Message ---
Hi,
I've just got PHP working with Java. It connects to a remote Oracle DB
with Java and without the Oracle Client installed on my machine,
it's sure a beauty. What I was wondering, what's behind it, I mean how
does it work? I transfer Objects in Java and get data out. How do PHP
and Java interact, after all they are two different technologies.
I've searched google and pretty much every site I could think off, but
I've found nothing more than a setup tutorial.
By the way, I should mention if you have them interact, Apache + PHP
doesn't like java packages at all. PHP blows off with a severe error
message.
thx
Jan Bro
--- End Message ---
--- Begin Message ---
I have two date strings coming out from MySQL.
Both fields are defined as datetime.
When i come to print them like this :
Echo"<B>Ticket Opened</B> : " . date("l, F jS Y
H:i",$row->OpenDate) . "<BR>";
Echo"<B>Problem Start</B> : " . date("l, F jS Y
H:i",$row->ProblemStart) . "<BR>";
I get :
Ticket Opened : Sunday, July 13th 2003 13:37
Problem Start : Thursday, January 1st 1970 02:33
Notice that the 2nd date is wrong and it's some kind of default that the
function
returns. Only if i add strtotime() and only to the 2nd field do i get
the correct answer :
Ticket Opened : Sunday, July 13th 2003 13:37
Problem Start : Saturday, July 12th 2003 20:36
any idea?
Sincerely
berber
Visit http://www.weberdev.com/ Today!!!
To see where PHP might take you tomorrow.
--- End Message ---
--- Begin Message ---
Hi,
I just finished a script for an US company and now have to provide them
with a billing receipt stating my work and the price for it.
google didn't come up with anything usefull, most search results came up
with billing scripts and not an example text of such a billing receipt.
Does anyone have an example text, which you use when you have to charge
a client for your work?
I am asking because english isn't my first language and instead of
making s.th. up in my own words it would surely look better, if I can
present s.th. which is 100% correct :)
Thanks,
Duncan
--- End Message ---
--- Begin Message ---
On Saturday, July 12, 2003, 10:31:14 PM, John wrote:
JAT> Hello,
JAT> I need some advice on getting PHP 4 up and running on my Windows 2000
JAT> Professional. I have followed all of the instructions in the installation
JAT> file, but when I try to run a PHP as a batch from the command prompt, all I
JAT> get is the file listed. Help!
You need a web server in order to run the scripts (unless you are
strictly doing it command line).
I have a tutorial that shows you how to setup Apache with PHP on
Windows (its not OS specific, but it can be applied to any Windows
version).
Here is the link <http://www.meidomus.com/archives/000059.php>
Please read the use comments, and if you have any questions, you can
email me off-list :)
--
Regards,
Burhan Khalid
phplist[at]meidomus[dot]com
http://www.meidomus.com
--- End Message ---
--- Begin Message ---
Thanks for your help. Also, I checked out your tutorial and Apache and PHP.
I have Apache installed, and I am using it for backend work. I have been
using Perl, but have discovered PHP, and want to be able to use it on the
command line. Another email told me the solution.
Replace the shebang line with <?PHP and end the script with ?>
And that is how simple the fix was, and now I am going to rewrite all of my
batch files and perl scripts using PHP. I do need a little more
understanding of Apache and will be studying your Apache tutorial. Thanks
again.
John A. Thomason
[EMAIL PROTECTED]
----- Original Message -----
From: "Burhan Khalid" <[EMAIL PROTECTED]>
To: "John A. Thomason" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Sunday, July 13, 2003 8:08 AM
Subject: Re: [PHP] Need PHP on Win2000 Pro
> On Saturday, July 12, 2003, 10:31:14 PM, John wrote:
>
> JAT> Hello,
>
> JAT> I need some advice on getting PHP 4 up and running on my Windows 2000
> JAT> Professional. I have followed all of the instructions in the
installation
> JAT> file, but when I try to run a PHP as a batch from the command prompt,
all I
> JAT> get is the file listed. Help!
>
> You need a web server in order to run the scripts (unless you are
> strictly doing it command line).
>
> I have a tutorial that shows you how to setup Apache with PHP on
> Windows (its not OS specific, but it can be applied to any Windows
> version).
>
> Here is the link <http://www.meidomus.com/archives/000059.php>
>
> Please read the use comments, and if you have any questions, you can
> email me off-list :)
>
>
>
> --
> Regards,
> Burhan Khalid
> phplist[at]meidomus[dot]com
> http://www.meidomus.com
>
>
--- End Message ---
--- Begin Message ---
Remember this is identical to having register_globals on with the same
security risks. Read http://www.php.net/register_globals first.
Joe Harman wrote:
Ah... Jason.... Man Of Few Words! THANKs... You have saved me time and
lines in my code :-)
extract()
--- End Message ---