php-general Digest 25 Nov 2001 03:53:28 -0000 Issue 1014
Topics (messages 75613 through 75631):
Re: Hour Calculation
75613 by: Philip Olson
[php] telnet describe command for mysql
75614 by: cosmin laslau
75619 by: Andrew Brampton
Using zip files
75615 by: Emiliano Marmonti
pipe email to php?
75616 by: Kunal Jhunjhunwala
75617 by: Ashley M. Kirchner
75618 by: Hank Marquardt
75622 by: Michael Geier
75626 by: John S. Huggins
xslt compile error?
75620 by: James Green
75624 by: James Green
Re: Is Freetype needed for Gd? Or just truetype fonts?
75621 by: Joelmon2001.aol.com
MySQL function in a Table's Column
75623 by: Jared Howard
75625 by: Matt
75627 by: Webmaster M&B Trading Co., SA de CV
Can PHP take input from the command prompt interactively?
75628 by: David Yee
75629 by: Evan Nemerson
Can php do this?
75630 by: Joelmon2001.aol.com
Free Software--EasyType 1.2 Basic makes you type as fast you think
75631 by: Slimsoft
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 ---
Calm down grasshopper, everything will be okay :) Is there a way you can
modify 'start' and 'end' times as more 'standard' time strings? In
otherwords, how exactly are they created? I ask because it would be nice
to get strtotime() to work here. Or optimally, steps #1-2 would already
involve unix timestamps. A hack can be created but let's try to avoid
that :)
regards,
Philip Olson
On Sat, 24 Nov 2001, neeraj wrote:
> Hi List,
>
> !! Please help !!
> My problem,
> 1) My Start time for a xyz file is 11.15 am 14-11-2001
> 2) My End Time for xyz file is 01.20 pm 14-11-2001
> 3) Total number of hours on the file is 02.05 Hours.
>
> 1) Question is how do i calculate the difference in Hours as the result is in point
>number 3 ?
>
> Please help me Urgent
>
> !!! Thanks in advance !!!
>
> Warm Regards
> Neeraj Rattu
>
--- End Message ---
--- Begin Message ---
I've got a huge table that I'm trying to get information about. I use a
MySQL database, and the windows telnet utility to access it. To see info
about the table, the DESCRIBE command is used. However, since it's about 40
fields, it doesn't fit on the screen, so the top half just zips by in a
millisecond.
Is there any break command, something to show one screen of info, read key,
and then show another screen, for the DESCRIBE command?
Or just any other way to see the information...
Thanks.
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
--- End Message ---
--- Begin Message ---
You could get a better Telnet program...
Try Tucows for a better program...
Andrew
----- Original Message -----
From: "cosmin laslau" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, November 24, 2001 5:07 PM
Subject: [PHP] [php] telnet describe command for mysql
> I've got a huge table that I'm trying to get information about. I use a
> MySQL database, and the windows telnet utility to access it. To see info
> about the table, the DESCRIBE command is used. However, since it's about
40
> fields, it doesn't fit on the screen, so the top half just zips by in a
> millisecond.
>
> Is there any break command, something to show one screen of info, read
key,
> and then show another screen, for the DESCRIBE command?
>
> Or just any other way to see the information...
>
> Thanks.
>
> _________________________________________________________________
> Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
>
>
> --
> 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, e-mail: [EMAIL PROTECTED]
>
>
--- End Message ---
--- Begin Message ---
Hi people,
I´m looking for alternatives in
using zip files. Our users should upload into our server zipped files and we
need to unzip this files and process it. I have read there is a library that
could be used like an extension, but I´ve tried to use it from NT and don´t
seems like the extension was added and when I try to use the commands PHP says
that don´t recognoice the commands. In the other hand somebody has told me that
PHP must be recompiled for using this library. Our platform is Windows NT but in
the future could be Solaris.
Anybody could send me your
experience?
Thanks in advance.
Emiliano.
|
--- End Message ---
--- Begin Message ---
Hey,
Ive looked.. and tried... nothing seems to work.. any ideas on how to pipe
email to a php script? Ive already setup the valias.. the big question is,
how to process the info when the email comes in..
kunal
--- End Message ---
--- Begin Message ---
Kunal Jhunjhunwala wrote:
> Ive looked.. and tried... nothing seems to work.. any ideas on how to pipe
> email to a php script? Ive already setup the valias.. the big question is,
> how to process the info when the email comes in..
Heh, I just asked this two weeks ago. Look on the archives. Attila
Strauss posted a link to a script called robot.phps, located at
http://www.linuks.net/robot.phps
AMK4
--
H | "Life is the art of drawing without an eraser." - John Gardner
+--------------------------------------------------------------------
Ashley M. Kirchner <mailto:[EMAIL PROTECTED]> . 303.442.6410 x130
Director of Internet Operations / SysAdmin . 800.441.3873 x130
Photo Craft Laboratories, Inc. . 3550 Arapahoe Ave, #6
http://www.pcraft.com ..... . . . Boulder, CO 80303, U.S.A.
--- End Message ---
--- Begin Message ---
Open stdin and go to town --
#!/usr/bin/php4 -q
<?
$fp = fopen("php://stdin","r");
while(!feof($fp)) {
$buffer=fgets($fp,8192);
echo ++$cnt." $buffer";
}
fclose($fp);
?>
On Sun, Nov 25, 2001 at 12:20:10AM +0530, Kunal Jhunjhunwala wrote:
> Hey,
> Ive looked.. and tried... nothing seems to work.. any ideas on how to pipe
> email to a php script? Ive already setup the valias.. the big question is,
> how to process the info when the email comes in..
> kunal
>
>
> --
> 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, e-mail: [EMAIL PROTECTED]
>
--
Hank Marquardt <[EMAIL PROTECTED]>
http://web.yerpso.net
GPG Id: 2BB5E60C
Fingerprint: D807 61BC FD18 370A AC1D 3EDF 2BF9 8A2D 2BB5 E60C
*** Web Development: PHP, MySQL/PgSQL - Network Admin: Debian/FreeBSD
*** PHP Instructor - Intnl. Webmasters Assn./HTML Writers Guild
*** Beginning PHP -- Starts January 7, 2002
*** See http://www.hwg.org/services/classes
--- End Message ---
--- Begin Message ---
The real question is why? What is the purpose of piping the email to a
PHP script?
Are you trying to insert emails into a database?
Are you trying to deal with emails automatically based on subject?
Are you trying to deal with emails from a specific source?
The answers to these questions will change how a PHP script deals with the
input.
Also, you are piping the information to php://stdin and using fgetc() to
grab the data, correct?
.mg
[EMAIL PROTECTED] wrote:
> Hey,
> Ive looked.. and tried... nothing seems to work.. any ideas on how to
pipe
> email to a php script? Ive already setup the valias.. the big question
is,
> how to process the info when the email comes in..
> kunal
>
--- End Message ---
--- Begin Message ---
The forum PHP program package Phorum has something like this available. I
believe it is a file called phorummail.php.
I remember using it as a basis for another program and it really does a
good job of indentifying and splitting headers and body of emails into
assorted variables.
On Sun, 25 Nov 2001, Kunal Jhunjhunwala wrote:
>-Hey,
>-Ive looked.. and tried... nothing seems to work.. any ideas on how to pipe
>-email to a php script? Ive already setup the valias.. the big question is,
>-how to process the info when the email comes in..
>-kunal
>-
>-
>---
>-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, e-mail: [EMAIL PROTECTED]
>-
**************************************
John Huggins
VANet
7101 Oriole Avenue
Springfield, VA 22150
703-912-6453
703-912-4831 fax
[EMAIL PROTECTED]
http://www.va.net/
**************************************
--- End Message ---
--- Begin Message ---
Um, what's the fix for this:?
/bin/sh /usr/src/www/php-4.0.6/libtool --silent --mode=link gcc -I.
-I/usr/src/www/php-4.0.6/ -I/usr/src/www/php-4.0.6/main
-I/usr/src/www/php-4.0.6 -I/usr/local/apache/include
-I/usr/src/www/php-4.0.6/Zend -I/usr/include/freetype2/freetype
-I/usr/include/mysql -I/usr/src/www/php-4.0.6/TSRM -DLINUX=22
-DUSE_HSREGEX -DUSE_EXPAT -DSUPPORT_UTF8 -g -O2 -o libphp4.la -rpath
/usr/src/www/php-4.0.6/libs -avoid-version stub.lo Zend/libZend.la
sapi/apache/libsapi.la main/libmain.la regex/libregex.la
ext/zlib/libzlib.la ext/bz2/libbz2.la ext/pcre/libpcre.la
ext/posix/libposix.la ext/sablot/libsablot.la ext/session/libsession.la
ext/standard/libstandard.la ext/xslt/libxslt.la TSRM/libtsrm.la -ldl
-lexpat -lexpat -lsablot -lexpat -lexpat -lsablot -lgd -lfreetype -ljpeg
-lbz2 -lz -lcrypt -lresolv -lm -ldl -lnsl -lresolv
ext/xslt/.libs/libxslt.al(sablot.lo): In function `php_if_xslt_create':
/usr/src/www/php-4.0.6/ext/xslt/sablot.c:156: multiple definition of
`php_if_xslt_create'
ext/sablot/.libs/libsablot.al(sablot.lo):/usr/src/www/php-4.0.6/ext/sablot/sablot.c:566:
first defined here
/usr/bin/ld: Warning: size of symbol `php_if_xslt_create' changed from
246 to 202 in ext/xslt/.libs/libxslt.al(sablot.lo)
[ repeats ]
I have libsabloton 0.71 installed, trying to compile on linux (debian
sid) with php-4.0.6. configure options are:
./configure \
--prefix=/usr/local/php \
--with-apxs=/usr/local/apache/bin/apxs \
--disable-static \
--with-expat-dir=/usr \
--with-xml=/usr \
--with-gd=shared,/usr \
--enable-gd-native-ttf \
--with-jpeg-dir=/usr \
--with-png-dir=shared,/usr \
--with-freetype-dir=/usr/include/freetype2 \
--with-xslt-sablot \
--with-zlib=/usr \
--with-bz2=/usr \
--with-mysql=shared,/usr \
--enable-xslt \
--with-sablot=shared,/usr \
--with-sockets
Any ideas how to fix? Many thanks,
jg
--- End Message ---
--- Begin Message ---
On Sat, 2001-11-24 at 20:11, James Green wrote:
> --with-sablot=shared,/usr \
Remove that line and it works. Damn. Someone should really document
these options, --help doesn't help all that much...
On to my xslt fun...
jg
--- End Message ---
--- Begin Message ---
Thanks, Michael. For linux, did you/other reader install freetype as one
normally would? (I am raq 3)
./configure
make
make install
?
Just curious. I can't confirm free type installation, I can for the other
software
Thanks
Joel
--- End Message ---
--- Begin Message ---
I'm not really sure what I should be looking for in the MySQL manual. I
basically want to make a column that will do math to other columns, like in
a spreadsheet program. Is it possible? And if so, what do I look for?
And if you can give me an example that would be great.
--- End Message ---
--- Begin Message ---
> I basically want to make a column that will do math to other columns, like
in
> a spreadsheet program. Is it possible? And if so, what do I look for?
> And if you can give me an example that would be great.
No, you can't do that, you store the raw data, and do the math when you
retrieve it. It's bad database design to store summary data (i.e. a total
order amount vs calculating from detail lines), or data that can be derived
within a row itself by caclulating from other fields. The reasons are
basically that it wastes space in the db, and that the calculated values
become out of balance (and require cleanup programs/scripts to realign
them). Sometimes one must store this type of info for efficiency purposes,
and in those cases, the value is calculated (by you) and then stored in the
db; but it should be avoided as much as possible because of the db integrity
issue noted above.
In a spreadsheet it's different, right, the value isn't stored, it's
calculated when the sheet is modified. That's what you need to do. Retrieve
the row, calculate the value in the script, and display it. It looks to the
end-user like it was in the db, but only the basic info is there, such as
qty, and unit price. The extended price is calculated on demand as needed
from those two basic entities.
--- End Message ---
--- Begin Message ---
Look Pared, basically, if you want to do that, is done in the program
portion of it through variables, that way every time it reads the data,
it calculates the output. If you do the math, and then save it to the
record, it might not be accurate at all times. I'm of course not an
expert, so I will await input from someone else, but I suggest you read
about variables, and math processes in the Handbook.
Plus, if you change the pricing, you don't need to recalculate your
whole inventory value, cause it is always accurate.
As I said, look in the variables, and add it to the program portion of
it.
Elliot J. Balanza
CEO
M&B Trading Co., SA de CV
-----Mensaje original-----
De: Matt [mailto:[EMAIL PROTECTED]]
Enviado el: Sábado, 24 de Noviembre de 2001 17:55
Para: [EMAIL PROTECTED]; Jared Howard
Asunto: Re: [PHP] MySQL function in a Table's Column
> I basically want to make a column that will do math to other columns,
like
in
> a spreadsheet program. Is it possible? And if so, what do I look
for?
> And if you can give me an example that would be great.
No, you can't do that, you store the raw data, and do the math when you
retrieve it. It's bad database design to store summary data (i.e. a
total
order amount vs calculating from detail lines), or data that can be
derived
within a row itself by caclulating from other fields. The reasons are
basically that it wastes space in the db, and that the calculated values
become out of balance (and require cleanup programs/scripts to realign
them). Sometimes one must store this type of info for efficiency
purposes,
and in those cases, the value is calculated (by you) and then stored in
the
db; but it should be avoided as much as possible because of the db
integrity
issue noted above.
In a spreadsheet it's different, right, the value isn't stored, it's
calculated when the sheet is modified. That's what you need to do.
Retrieve
the row, calculate the value in the script, and display it. It looks to
the
end-user like it was in the db, but only the basic info is there, such
as
qty, and unit price. The extended price is calculated on demand as
needed
from those two basic entities.
--
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, e-mail: [EMAIL PROTECTED]
--- End Message ---
--- Begin Message ---
Can I write a command line PHP script like the following:
php -q test.php
Output:
==================
1)choice A
2)choice B
3)choice C
Please enter an option: 1
==================
Thanks.
David
--- End Message ---
--- Begin Message ---
Yes. you can fopen php://stdin
On Saturday 24 November 2001 06:29 pm, you wrote:
> Can I write a command line PHP script like the following:
>
> php -q test.php
>
> Output:
>
> ==================
> 1)choice A
> 2)choice B
> 3)choice C
>
> Please enter an option: 1
> ==================
>
> Thanks.
>
> David
--- End Message ---
--- Begin Message ---
Thanks for your time . *This* = create follow up autoresponders
Or at least have php run with cron, so I can daily hit a mysql
db and use php to email those people at a specified time, like
every 3 days. Just so when I have users to the site who register
and their name/email is in a table "users" in db "data",
php/cron can be used to pull the name/email from mysql
and (with unsubscribe message at bottom) email them when I
say to do so in cron. Getting cron by itself to work is fine
but with php script that connects to mysql and emails users?
Can that be done?
Sort of like cron doing what you would do if you visited
page.php and once it's hit, it emails specified users in a database
Would I need path to php in the cron script to do this?
Or am I just living a dream?
The idea of emailing users in a mysql db with php script
every day is very appealing to me. (Yes, with unsubscribe feature)
;)
Thanks, I hope to goodness this made sense and you
enjoyed your holiday
Joel
--- End Message ---
--- Begin Message ---
EasyType 1.2 Basic
EasyType increases your typing speed in ANY Windows editor. It takes you from
the age of inputting words letter by letter to the age of inputting
word-by-word and phrase-by-phrase. EasyType has three major functions: (1)
Auto-learning words and phrases 2) auto-completing words and phrases, and (3)
Auto-expanding shorthands into full text.
EasyType prompts the best-matched words to the user with a fully optimized
prediction algorithm. Just press a single hot key to auto-complete the word
you want. EasyType also expands its knowledge by learning new words that you
have typed. In contrast, shorthand expansion is based on targeting. For
example, type 'syl' and EasyType will expand it into 'See you later'.
Shorthand expansion is made more flexible with parameters, which are highly
useful for code auto-generation. You can even include special cursor controls
to make the expanded text well formatted.
Many libraries are provided to empower EasyType. International language
libraries make it easy to input non-English words on any keyboard.
Programming language libraries liberate programmers from the pain of typing
long identifiers. Everyone can find libraries suitable for their own needs.
You can create your own library from word list files or learn frequently used
words from a large number of text documents with just one click. EasyType is
ideal for users who must deal with a heavy load of typing everyday, such as
programmers, writers, lawyers, translators, secretaries, and medical clerks.
Website: http://www.flashpeak.com
EasyType 1.2 Basic Download(100% free)
http://www.flashpeak.com/easytype/etbasic.exe
EasyType 1.2 Professional Download(45-day evaluation)
http://www.flashpeak.com/easytype/easytype.exe
Another Freeware-EasyClip 1.0
EasyClip is the slimest clipboard and shell enhancement utility.
It's based on a slim always-on-top toolbar which can be hidden or shown. With
this toolbar, you can access all local drives, mapped network drives, all
folders and all files, IE favourite web pages, predefined email contacts by
selecting with mouse from drop-down lists. Much simpler than to direct
operation in windows explorer and IE.
It supports 16 clipboards in total, with one current clipboard and 15 history
clipboards. Whenever you copy, EasyClip will automatically push the existing
content of the windows clipboard into the history clipboard boards and then
copy the text into the current buffer. You can select any one of the
clipboards by mouse and EasyClip will automatically paste the content of the
selected clipboard into the window you are working with. It also supports
appending-mode copy which will keep appending copied text to the end of the
current clipboard. This is convenient for combining small pieces of text
from different places.
It also support a quick-run dialog where you can input short aliases for long
paths and URL's like in UNIX. Aliases can be defined in a text file with one
alias corresponding to one path/URL.
Webpage: http://www.flashpeak.com/easyclip/easyclip.htm
Download: http://www.flashpeak.com/easyclip/easyclip.exe(100% free)
--- End Message ---