php-general Digest 18 Jul 2004 05:31:12 -0000 Issue 2883

2004-07-17 Thread php-general-digest-help
php-general Digest 18 Jul 2004 05:31:12 - Issue 2883 Topics (messages 190853 through 190881): Re: RedHat Network Up2Date 190853 by: Curt Zirzow 190873 by: Jason Wong Re: Book Required 190854 by: Lester Caine 190856 by: Josh Close 190858 by:

Re: [PHP] upload an image and store it in mysql

2004-07-17 Thread raditha dissanayake
i sidhu wrote: * iNder Sidhu wrotes:- I use following query to upload the image in database DATABASE_query_die(INSERT INTO images (`name`, `status`, `image`, `size`, `type`) VALUES (name.gif', NULL, 0x52306c474f446c685a414179414f594141502f2f2f2f2f3238502f31372f54313976503, '1.624 kb',

Re: [PHP] Re: PHP5 and pass by reference bug.

2004-07-17 Thread Curt Zirzow
* Thus wrote Daevid Vincent: Yeah, I get what references are. The point is that when it was on the user to decide, they could do it. Now that PHP5 makes you put the in the function declaration instead of the passing parameter, you don't know what the user is going to send. Therefore it

Re: [PHP] sendmail_from not set in php.ini or custom From: header missing

2004-07-17 Thread Justin Patrin
On Sat, 17 Jul 2004 12:16:25 +0800, Wudi [EMAIL PROTECTED] wrote: Script: ?php mail('[EMAIL PROTECTED]', 'Subject', 'Message', From: [EMAIL PROTECTED]); ? Result: Warning: mail() [function.mail]: sendmail_from not set in php.ini or custom From: header missing in

Re: [PHP] sendmail_from not set in php.ini or custom From: header missing

2004-07-17 Thread Curt Zirzow
* Thus wrote Wudi: Script: ?php mail('[EMAIL PROTECTED]', 'Subject', 'Message', From: [EMAIL PROTECTED]); ? Result: Warning: mail() [function.mail]: sendmail_from not set in php.ini or custom From: header missing in D:\ApacheData\htdocs\downloader\mail.php on line 2 Why does the

[PHP] Re: PHPEclipse?

2004-07-17 Thread Lester Caine
Dan Joseph wrote: I was wondering, is anyone running Eclipse 3.0 w/PHPEclipse 1.1.0? I'm having trouble getting it working. I downloaded the July .ZIP file and unzipped it into the plugins directory. Its not recognizing it. Anyone have this working? I have some success with PHPEclipse

[PHP] RedHat Network Up2Date

2004-07-17 Thread Ed Lazor
Is the RedHat Network Up2Date really only on version 4.3.2 of PHP? If so, any idea why they're so far behind? Any idea of when it will be brought current? I have an ISP telling me that the security of their systems rely entirely on the RedHat Network. They acknowledge that RedHat's behind

Re: [PHP] RedHat Network Up2Date

2004-07-17 Thread Jason Wong
On Saturday 17 July 2004 15:01, Ed Lazor wrote: Is the RedHat Network Up2Date really only on version 4.3.2 of PHP? If so, any idea why they're so far behind? Any idea of when it will be brought current? I have an ISP telling me that the security of their systems rely entirely on the RedHat

[PHP] Book Required

2004-07-17 Thread Harlequin
Morning There's loads and loads of books available on the subject of PHP MySQL. Does anyone have any recommendations...? -- - Michael Mason Arras People www.arraspeople.co.uk - -- PHP General Mailing List (http://www.php.net/) To

RE: [PHP] Book Required

2004-07-17 Thread Will Collins
PHP MySQL Web Development is a pretty good one. It does a good job of giving a fairly thorough explanation on things, considering the broad range of topics to be covered. I never have really been a fan of the Fast and Easy... series, or the Learn * In 24 Hours series. Will -Original

Re: [PHP] Book Required

2004-07-17 Thread Chris
Harlequin wrote: Morning There's loads and loads of books available on the subject of PHP MySQL. Does anyone have any recommendations...? PHP and MySQL Web Development by Luke Welling and Laura Thomson has always been my favorite. http://www.samspublishing.com/title/067232525X That's the 2nd

RE: [PHP] Book Required

2004-07-17 Thread Will Collins
I apologize for requesting a read receipt. Won't happen again - I hope. :) -Original Message- From: Will Collins [mailto:[EMAIL PROTECTED] Sent: Saturday, July 17, 2004 2:27 AM To: [EMAIL PROTECTED] Subject: RE: [PHP] Book Required PHP MySQL Web Development is a pretty good one. It

Re: [PHP] Book Required

2004-07-17 Thread [EMAIL PROTECTED]
I agree that PHP MySQL Web Development (By Luke Welling and Laura Thompson) is a great resource for learning PHP. Armed with that book and the online PHP manual (with user comments), and you're on your way to being a well-informed developer. The second edition (2003) covers PHP 4.3, so it's

[PHP] Re: Book Required

2004-07-17 Thread Michael Purdy
Michael Your right there is a wide selection available and as such you need to select based on your particular development slant. PHP and Mysql Web Development ISBN 0-672-32525-X 2nd Edition by Welling Thomson is a good general text. Did you solve your table results printing question? Mike

[PHP] How can I tell if a path is absolute?

2004-07-17 Thread Trejkaz Xaoza
Hi! I used to detect whether a path is absolute by seeing if the first character is a forward slash. Unfortunately, Windows absolute paths are in a different syntax like C:\, and I don't know what other random systems might have for their syntax in the future. So, is there a portable way to

[PHP] Re: Book Required

2004-07-17 Thread Lester Caine
Harlequin wrote: There's loads and loads of books available on the subject of PHP MySQL. It would be nice to find one's that DON'T rely on MySQL ;) Does anyone have any recommendations...? Anybody seen a good NON MySQL one. -- Lester Caine - L.S.Caine Electronic

[PHP] Re: How can I tell if a path is absolute?

2004-07-17 Thread Michael Ochs
Hi, maybe you could try it with regular expressions! [A-Z]:\\ or better [C-Z]:\\ because A and B is used just for floppy drives... Take a look at www.php.net/preg_match/ Bye, Michael Trejkaz Xaoza [EMAIL PROTECTED] schrieb im Newsbeitrag news:[EMAIL PROTECTED] Hi! I used to detect whether a

Re: [PHP] Re: Book Required

2004-07-17 Thread raditha dissanayake
Lester Caine wrote: Harlequin wrote: There's loads and loads of books available on the subject of PHP MySQL. It would be nice to find one's that DON'T rely on MySQL ;) Does anyone have any recommendations...? Anybody seen a good NON MySQL one. Very true it's time to change partners, php's

[PHP] Re: How can I tell if a path is absolute?

2004-07-17 Thread Trejkaz Xaoza
Michael Ochs wrote: Hi, maybe you could try it with regular expressions! [A-Z]:\\ or better [C-Z]:\\ because A and B is used just for floppy drives... Take a look at www.php.net/preg_match/ I'm not sure if you noticed, but I said I wanted it to be portable. Sure, ([A-Za-z]:)?[/\\] would work

[PHP] Re: How can I tell if a path is absolute?

2004-07-17 Thread Tularis
Trejkaz Xaoza wrote: Michael Ochs wrote: Hi, maybe you could try it with regular expressions! [A-Z]:\\ or better [C-Z]:\\ because A and B is used just for floppy drives... Take a look at www.php.net/preg_match/ I'm not sure if you noticed, but I said I wanted it to be portable. Sure,

[PHP] Re: Book Required

2004-07-17 Thread Tularis
Programming PHP by O`Reilly :) Lester Caine wrote: Harlequin wrote: There's loads and loads of books available on the subject of PHP MySQL. It would be nice to find one's that DON'T rely on MySQL ;) Does anyone have any recommendations...? Anybody seen a good NON MySQL one. -- PHP General

[PHP] Re: How can I tell if a path is absolute?

2004-07-17 Thread Trejkaz Xaoza
Tularis wrote: c:/ wouldn't even work as a path on unix systems. [134] [EMAIL PROTECTED]:/tmp mkdir c: [135] [EMAIL PROTECTED]:/tmp ls -la c:/ total 8 drwxr-xr-x 2 trejkaz users 4096 Jul 17 21:01 . drwxrwxrwt 52 rootroot 4096 Jul 17 21:01 .. You were saying? Anyway it's looking a lot

[PHP] Re: How can I tell if a path is absolute?

2004-07-17 Thread Jason Barnett
Anyway it's looking a lot like I'll have to detect the Win32 build of PHP at runtime, and choose the method based on that. All because PHP doesn't have an is_absolute function or anything similarly convenient. :-/ TX A, methinks I have a competitor for a FileSystem Manager :) Perhaps I

[PHP] Re: Book Required

2004-07-17 Thread Michelle Konzack
Am 2004-07-17 08:16:36, schrieb Harlequin: Morning There's loads and loads of books available on the subject of PHP MySQL. Does anyone have any recommendations...? I can recommend Books from O'Reily Programming PHP The second book I use is Practical PostgreSQL But there is

[PHP] Re: Book Required

2004-07-17 Thread Michelle Konzack
Am 2004-07-17 09:29:37, schrieb Lester Caine: Harlequin wrote: There's loads and loads of books available on the subject of PHP MySQL. It would be nice to find one's that DON'T rely on MySQL ;) O'Reilly: Programming PHP Practical PostgreSQL Anybody seen a

Re: [PHP] Getting the primary key from a MySQL insert

2004-07-17 Thread zareef ahmed
Hi ! You can user mysql_insert_id() for this purpose. zareef ahmed --- Andrew Wood [EMAIL PROTECTED] wrote: If the primary key in a MySQL DB is an autoincrementing integer, is there anyway of automatically getting it back when I do an insert in PHP. In other words taking the status

[PHP] Re: Templates Are Driving me Nuts

2004-07-17 Thread Skrol 29
Hello, Here is a shema to explain Template Engines: http://www.tinybutstrong.com/index.php?page=template Some developers complain about Template Engines because they are too complex or because they are a kind of new language over PHP. The one you will found on the URL above is expected to be

[PHP] Re: How can I tell if a path is absolute?

2004-07-17 Thread Trejkaz Xaoza
Jason Barnett wrote: A, methinks I have a competitor for a FileSystem Manager :) Perhaps I misunderstand your problem, but this works fine for me (WinXP) because realpath [quote]Returns canonicalized absolute pathname[/quote]: ?php // we know __FILE__ is an absolute path $file =

[PHP] Re: Book Required

2004-07-17 Thread rush
Harlequin [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] There's loads and loads of books available on the subject of PHP MySQL. Does anyone have any recommendations...? here are some: http://www.templatetamer.org/index.php?RecommendedBooks rush -- http://www.templatetamer.com/

[PHP] Problem Stuffing Variable Value into an E-mail

2004-07-17 Thread Harlequin
I've generated a page where the user selects and completes a form. One of these is a free text area with the name TXT_Question. this is used later as $Question = $_Post['TXT_Question']; but for some reason when I send this in an e-mail like so: \nUser has selected eventID:\t$EventID \nAnd

[PHP] Emtying Variables

2004-07-17 Thread Harlequin
What's the best way of emptying my variables once my form has done with them because although I disconnect from the database if the user refreshes the screen it sends another e-mail to me. -- - Michael Mason Arras People www.arraspeople.co.uk

Re: [PHP] Re: Templates Are Driving me Nuts

2004-07-17 Thread Sean Malloy
The template system I use is extremely simple. Template.php: ?php class Template { var $Items; var $_document; function Template($document) { $this-Items = array(); $this-_document = $document; } function Render()

[PHP] CGI / PHP max_exec_time

2004-07-17 Thread Head
hello list, im running a php script from CLI/CGI on linux which has a variable execution time, some times it doesnt terminates by itself so i have to set a max_execution_time to terminate the script. My problem is that the max_exec_time on CGI versions is always 0 (never time out) which produces

[PHP] Re: Emtying Variables

2004-07-17 Thread Torsten Roehr
Harlequin [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] What's the best way of emptying my variables once my form has done with them because although I disconnect from the database if the user refreshes the screen it sends another e-mail to me. Even when you reset all variables on

[PHP] Re: Problem Stuffing Variable Value into an E-mail

2004-07-17 Thread Torsten Roehr
Harlequin [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I've generated a page where the user selects and completes a form. One of these is a free text area with the name TXT_Question. this is used later as $Question = $_Post['TXT_Question']; Shouldn't this be

[PHP] Re: CGI / PHP max_exec_time

2004-07-17 Thread Head
mh i tracked the bug down to be an FOPEN on a URL so i need to set a timeout on FOPEN hows that possible ? Using php version 4.3.7 Head [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] hello list, im running a php script from CLI/CGI on linux which has a variable execution time, some

[PHP] Re: Problem Stuffing Variable Value into an E-mail

2004-07-17 Thread Harlequin
yeah. I should have noticed that. Thanks again Torsten :) -- - Michael Mason Arras People www.arraspeople.co.uk - Torsten Roehr [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Harlequin [EMAIL PROTECTED] wrote in message

Re: [PHP] Re: How can I tell if a path is absolute?

2004-07-17 Thread Curt Zirzow
* Thus wrote Trejkaz Xaoza: Jason Barnett wrote: A, methinks I have a competitor for a FileSystem Manager :) Perhaps I misunderstand your problem, but this works fine for me (WinXP) because realpath [quote]Returns canonicalized absolute pathname[/quote]: ?php // we know

Re: [PHP] Re: CGI / PHP max_exec_time

2004-07-17 Thread Curt Zirzow
* Thus wrote Head: mh i tracked the bug down to be an FOPEN on a URL so i need to set a timeout on FOPEN hows that possible ? Using php version 4.3.7 see: http://php.net/stream_set_timeout Curt -- First, let me assure you that this is not one of those shady pyramid schemes you've been

Re: [PHP] RedHat Network Up2Date

2004-07-17 Thread Curt Zirzow
* Thus wrote Jason Wong: On Saturday 17 July 2004 15:01, Ed Lazor wrote: Is the RedHat Network Up2Date really only on version 4.3.2 of PHP? If so, any idea why they're so far behind? Any idea of when it will be brought current? I have an ISP telling me that the security of their

[PHP] Re: Book Required

2004-07-17 Thread Lester Caine
Tularis wrote: Programming PHP by O`Reilly :) Write-up says it STILL uses MySQL as it's database material ;( Since I'm pushing PHP5 into all new sites, I'll wait for a PHP5 book :) The Firebird Bible ( which has taken two years to write ) is being printed at the moment and should be out by next

Re: [PHP] if((strtolower(substr($author, 0, 1)) == $ausenquiry))

2004-07-17 Thread Skippy
On Mon, 12 Jul 2004 15:22:05 -0400 John Taylor-Johnston [EMAIL PROTECTED] wrote: So how would I recode $ausenquiry so if ausenquiry=e, it will choose words that begin with e, sorted this way: Before the actual sort, use strtr() with a translation array on a copy of the string. Use the strtr()

Re: [PHP] Re: Book Required

2004-07-17 Thread Josh Close
Here's a php5 book, and there's a few others. http://www.oreilly.com/catalog/learnphp5/index.html On Sat, 17 Jul 2004 19:28:37 +0100, Lester Caine [EMAIL PROTECTED] wrote: Tularis wrote: Programming PHP by O`Reilly :) Write-up says it STILL uses MySQL as it's database material ;(

[PHP] building php to have mysqli support...

2004-07-17 Thread bruce
hi... i'm trying to upgrade/install php-4.3.8 to include mysqli support. i'm running on a rh8.0 linux with mysql-4.x. i used the php-4.3.8 src rpm, and built using the following config ./configure --with-apxs2=/usr/sbin/apxs --with-config-file-path=/etc --with -mysql

Re: [PHP] Book Required

2004-07-17 Thread janet
In a message dated 7/17/2004 11:25:41 AM Pacific Daylight Time, [EMAIL PROTECTED] writes: Tularis wrote: Programming PHP by O`Reilly :) Write-up says it STILL uses MySQL as it's database material ;( I don't know what Write-up you are refering to. The book is not tied to MySQL. It mentions it

[PHP] Re: building php to have mysqli support...

2004-07-17 Thread Thomas Seifert
On Sat, 17 Jul 2004 13:11:41 -0700, Bruce wrote: has anybody managed to get php to work so you can actually use both mysql/mysqli??? pointers/criticisms/assistance is greatly appreciated! searching through google/php.net/etc.. hasn't turned up information on where i've gone wrong.

[PHP] Re: Emtying Variables

2004-07-17 Thread PHP
Harlequin [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] What's the best way of emptying my variables once my form has done with them because although I disconnect from the database if the user refreshes the screen it sends another e-mail to me. -- -

[PHP] Is Function Constants the Correct Term?

2004-07-17 Thread gohaku
Hi everyone, I have been experimenting with defining functions as constants. Below is what I am using to test Function Constants: pre ? define(LOGIN,user); define(PASS,pass); define(DB,mysql); define(DBLOGIN,dblogin(LOGIN,PASS,DB)); DBLOGIN; $set = mysql_query(Select user FROM user limit 1,1);

Re: [PHP] Is Function Constants the Correct Term?

2004-07-17 Thread Curt Zirzow
* Thus wrote gohaku: Hi everyone, I have been experimenting with defining functions as constants. Below is what I am using to test Function Constants: pre ? define(LOGIN,user); define(PASS,pass); define(DB,mysql); define(DBLOGIN,dblogin(LOGIN,PASS,DB)); This is simply not allowed.

Re: [PHP] Is Function Constants the Correct Term?

2004-07-17 Thread John W. Holmes
Curt Zirzow wrote: * Thus wrote gohaku: Hi everyone, I have been experimenting with defining functions as constants. Below is what I am using to test Function Constants: pre ? define(LOGIN,user); define(PASS,pass); define(DB,mysql); define(DBLOGIN,dblogin(LOGIN,PASS,DB)); This is simply not

[PHP] php.net like doc pages

2004-07-17 Thread \[php\]Walter
Anyone know a blog (I think) that will let me create documentation and let users add their comments to the tail of it, just like php.net can do?? Thanks Walter -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] php.net like doc pages

2004-07-17 Thread Justin Patrin
You could always use a wiki. ;-) I've found tikiwiki to be very well suited to such things. On Sat, 17 Jul 2004 17:44:29 -0500, [php]Walter [EMAIL PROTECTED] wrote: Anyone know a blog (I think) that will let me create documentation and let users add their comments to the tail of it, just like

[PHP] Compare two TXT files

2004-07-17 Thread C.F. Scheidecker Antunes
Hello all, Is there a more efficient way to compare 2 TXT files other than reading line by line ? What I was doing was reading line by line and compare both files, if one line is different the loops are interrupted and the function returns true. Any ideas? Thanks in advance. -- PHP General

Re: [PHP] Re: How can I tell if a path is absolute?

2004-07-17 Thread Trejkaz Xaoza
Curt Zirzow wrote: A simple workaround is testing OS: if (windows) // use realpath method } else { $absolute = $path{0} == '/'; } I don't know what the realpath method is since every one I've been given that involves realpath so far doesn't work. But here's what I'm doing now:

[PHP] Re: Compare two TXT files

2004-07-17 Thread Paul Chvostek
On Sat, Jul 17, 2004 at 07:07:44PM -0600, C.F. Scheidecker Antunes wrote: Is there a more efficient way to compare 2 TXT files other than reading line by line ? What I was doing was reading line by line and compare both files, if one line is different the loops are interrupted and the

[PHP] Re: Emtying Variables

2004-07-17 Thread Trejkaz Xaoza
Php wrote: And you can also used a php variable to detect multiple submit: Even better would be using a token which you give to the user when the form is displayed. That way they can't accidentally submit the form on first entry to the site (and believe me, this can happen, because Konqueror

Re: [PHP] Compare two TXT files

2004-07-17 Thread Justin Patrin
That sounds pretty efficient to me if all you want is whether they're different. If you actually want to know how different, you could use something like levenshtein() to compare the contents of the files as strings. http://www.php.net/manual/en/function.levenshtein.php Or, for a more full

Re: [PHP] Compare two TXT files

2004-07-17 Thread raditha dissanayake
C.F. Scheidecker Antunes wrote: Hello all, Is there a more efficient way to compare 2 TXT files other than reading line by line ? What I was doing was reading line by line and compare both files, if one line is different the loops are interrupted and the function returns true. Any ideas? how

Re: [PHP] Re: Embedded Email Directives

2004-07-17 Thread Manuel Lemos
Hello, On 07/17/2004 03:11 AM, Curt Zirzow wrote: remove carriage returns to prevent embedded email directives In an other thread, I readed that sentence. I'm interested to find more information about that. I have some mail forms and want to make them as secure and possible, but do not know

Re: [PHP] RedHat Network Up2Date

2004-07-17 Thread Jason Wong
On Sunday 18 July 2004 01:42, Curt Zirzow wrote: I dont know what is more evil.. backports or Microsoft :) No contest, M$, hands down. -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications

RE: [PHP] php.net like doc pages

2004-07-17 Thread Ed Lazor
phpNuke is also popular. -Original Message- You could always use a wiki. ;-) I've found tikiwiki to be very well suited to such things. On Sat, 17 Jul 2004 17:44:29 -0500, [php]Walter [EMAIL PROTECTED] wrote: Anyone know a blog (I think) that will let me create documentation and

[PHP] php 5 rpm spec file?

2004-07-17 Thread bclem
I know this is a bit early to ask, but I thought I'd ask it anyway. Does anyone have an rpm spec file for php 5 yet? If I don't get any responses to this question, I'll build on and sent it to the list. Have a great night! -Brent -- PHP General Mailing List (http://www.php.net/) To

[PHP] easiest way to CREATE XML with PHP5?

2004-07-17 Thread CD Baby
I see all these articles and tutorials about reading and parsing XML files. But what about creating and writing XML files with PHP5? Is the DOM the only way? It seems like such a bloated overkill. I just want to make simple little XML files like this: music album upc=123456789 artistPink

Re: [PHP] easiest way to CREATE XML with PHP5?

2004-07-17 Thread Robert Cummings
On Sun, 2004-07-18 at 00:40, CD Baby wrote: I see all these articles and tutorials about reading and parsing XML files. But what about creating and writing XML files with PHP5? Is the DOM the only way? It seems like such a bloated overkill. I just want to make simple little XML files like

[PHP] Re: easiest way to CREATE XML with PHP5?

2004-07-17 Thread Manuel Lemos
Hello, On 07/18/2004 01:40 AM, Cd Baby wrote: I see all these articles and tutorials about reading and parsing XML files. But what about creating and writing XML files with PHP5? Is the DOM the only way? It seems like such a bloated overkill. I just want to make simple little XML files like this:

RE: [PHP] building php to have mysqli support...

2004-07-17 Thread bruce
hi... after further reading/screams... it appears that only php-5.0.0 supports the mysqli interface. however, there appear to be numerous issues/problems with getting this up/running. my setup. i have rh8.0 linux, with php-5.0.0 source. i'm trying to build from souce, to do the

[PHP] old guy newbie needs some help

2004-07-17 Thread Bob Imperial
While I realize this is elementary to most of you, I am just getting started with php, moving from coldfusion :) I am currently reading through the chapter on sessions and running into a little issue that after making many changes to my php.ini file, I continue to get the following errors while

RE: [PHP] old guy newbie needs some help

2004-07-17 Thread bruce
bob... when using the sesion_start(), it needs to be the 1st thing on the page... -- ? session_start(); . . . ? html ? $_SESSION['foo'] = 40; ? /html -- i don't recall if there has to be anything within the php.ini file set to enable sessions... the reason you're

[PHP] Re: old guy newbie needs some help

2004-07-17 Thread Michael Purdy
Bob A. Example path session.save_path = c:\http\cgi\session Basically a directory under the root of your webserver B. session_start() must be before any other commands in your script such as HTML. So Line 1: ?php Line 2: session_start() Mike