php-general Digest 11 Mar 2005 17:32:13 -0000 Issue 3332

2005-03-11 Thread php-general-digest-help
php-general Digest 11 Mar 2005 17:32:13 - Issue 3332 Topics (messages 210495 through 210522): Re: Using javascript function from php 210495 by: b.rbz.biz HELP TO GET OUT OF PHP MAILING LIST 210496 by: Abiodun Akala Re: free php live chat with visitor/customer script

RE: [PHP] free php live chat with visitor/customer script

2005-03-11 Thread Kim Madsen
-Original Message- From: p80 [mailto:[EMAIL PROTECTED] Sent: Friday, March 11, 2005 1:17 AM To: php-general@lists.php.net Subject: [PHP] free php live chat with visitor/customer script I was recently visiting a commercial site and suddunly a window chat popped up and some assistant

RE: [PHP] Increase execution time

2005-03-11 Thread Kim Madsen
-Original Message- From: Jeremy Schreckhise [mailto:[EMAIL PROTECTED] Sent: Thursday, March 10, 2005 11:25 PM To: php-general@lists.php.net Subject: [PHP] Increase execution time How do you increase the execution time in php? Like You have done I have set max_execution_time to 360

Re: [PHP] Re: Imap and attachments

2005-03-11 Thread Evert | Rooftop Solutions
Jim Plush wrote: here is a script I use to get jpg attachments with IMAP.. good luck ?php [snip] Thanx Jim, Unfortunaly some e-mail clients send the headers in ways the imap-functions can't read. So I figured something out using regular expressions. If anyone needs this, mail me (in total

Re: [PHP] PHP 5.0.3 and base64 encoded cookie value issue?

2005-03-11 Thread Pink Floyd
Greetings again, Thanks to richard for pointing out a good way to devle into the source. It appears after browsing through the source that the ' ' (space) is encoded to '+'. Also the characters '_', '-', '.' do get special treatment. Obviously, this works great in the scenario where the cookie

RE: [PHP] incrementing a number from a text file

2005-03-11 Thread Kim Madsen
-Original Message- From: Richard Lynch [mailto:[EMAIL PROTECTED] Sent: Thursday, March 10, 2005 10:14 PM To: Ross Hulford Cc: php-general@lists.php.net Subject: Re: [PHP] incrementing a number from a text file I want to read a number from an external (txt) file and increment it.then

[PHP] Newbie Question: breaking a substr() string on a space

2005-03-11 Thread Jackson Linux
Hi, everyone, I apologise if this posts twice; I'm having issues with my outgoing email server. I'm making 'teasers' of the first, say 200 to 250 characters of some articles. This works great: $content = strip_tags($article['content']); $striptease = substr($content, 0, 275); but cuts

RE: [PHP] Newbie Question: breaking a substr() string on a space

2005-03-11 Thread Jay Blanchard
[snip] Hi, everyone, I apologise if this posts twice; I'm having issues with my outgoing email server. I'm making 'teasers' of the first, say 200 to 250 characters of some articles. This works great: $content = strip_tags($article['content']); $striptease = substr($content, 0, 275);

Re: [PHP] incrementing a number from a text file

2005-03-11 Thread Steve Buehler
At 03:14 PM 3/10/2005, Richard Lynch wrote: I want to read a number from an external (txt) file and increment it.then save the number back on the text file. I know this is possible but want a simple amd economical way to do this. That's what you *THINK* you want to do :-) But what happens when

RE: [PHP] PHP help Quotations, Quotations, Quotations

2005-03-11 Thread stg
Thanks a lot for that, I am really grateful, now it sends along the link properly, which is great, however it is now having trouble converting spaces to %20 and it does it for some and not others, eg It does this: http://localhost/knewsl/NewsletterName.pdf When it should be:

Re: [PHP] PHP causes Apache segmentation fault?

2005-03-11 Thread Burhan Khalid
John Swartzentruber wrote: I am running Fedora core3 with Apache 2.0.52 (from default RPMs), MySQL 4.1.10 (from RPMs from MySQL site), and PHP 5.0.3 built from source. I'm going through the PHP manual and trying some of the mysqli examples. The last one I tried didn't work. The problem appears

[PHP] Newbie Question: breaking a substr() string on a space

2005-03-11 Thread Jackson Linux
Hi, everyone, I'm 'teasers' of the first, say 200 to 250 characters of some articles. This works great: $content = strip_tags($article['content']); $striptease = substr($content, 0, 275); but cuts off words right in the midd ... I'd like to find a way to take $content, look at the first

RE: [PHP] incrementing a number from a text file

2005-03-11 Thread Ariceaga, Luis TQM
Is it possible to let the OS handle the collisions? For example: $last_value = system('cat counter.txt', $retval); $last_value++; $result = system('echo $last_value counter.txt', $retval); ...just a suggestion! Regards /Luis -Original Message- From: Richard Lynch [mailto:[EMAIL

[PHP] showing an image with php

2005-03-11 Thread Ross Hulford
I want to asssign an image to a variable and show it if certain conditions are met. E.g If condition is met { $myimage= retrieve image (images/myimage.jpg) echo $myimage } Have not used image creation before with php just dipping my toe in the water. Thanks R. -- PHP General Mailing

[PHP] Searching Multiple Columns, Multiple Tables in MySQL...

2005-03-11 Thread Nick Zukin
Sorry if this is too DB oriented. PHP 4.3, MySQL 3.23 I've got a somewhat complex search of a MySQL database I'm trying to make. (At least it's complex to me.) And I'm wondering if it's better to try to handle it in MySQL or to split it up into multiple processes using PHP. Essentially, I have

Re: [PHP] Temporary storage of data

2005-03-11 Thread Jason Barnett
Dan wrote: dan wrote: ... Before we go through all of this, why isn't SQLite an option? It is in by default as of PHP5.0.0 so if the server is / will be PHP5 soon then I would go that route. http://php.net/manual/en/ref.sqlite.php -- Teach a man to fish... NEW? |

Re: [PHP] Newbie Question: breaking a substr() string on a space

2005-03-11 Thread John Nichel
Jackson Linux wrote: Hi, everyone, I apologise if this posts twice; I'm having issues with my outgoing email server. I'm making 'teasers' of the first, say 200 to 250 characters of some articles. This works great: $content = strip_tags($article['content']); $striptease =

Re: [PHP] incrementing a number from a text file

2005-03-11 Thread Ross Hulford
I am just going to adda auto incrementing DB filed and get the numbers that way. Seems the best way. Kim Madsen [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] -Original Message- From: Richard Lynch [mailto:[EMAIL PROTECTED] Sent: Thursday, March 10, 2005 10:14 PM To: Ross

[PHP] Re: showing an image with php

2005-03-11 Thread Jason Barnett
Ross Hulford wrote: I want to asssign an image to a variable and show it if certain conditions are met. E.g Make it a little more clear what you want. Is this an already existing image, or one you are trying to create? If it already exists then you want to use an img tag. ?php echo 'img

Re: [PHP] incrementing a number from a text file

2005-03-11 Thread Jason Barnett
Luis TQM Ariceaga wrote: Is it possible to let the OS handle the collisions? For example: $last_value = system('cat counter.txt', $retval); $last_value++; $result = system('echo $last_value counter.txt', $retval); just a suggestion! Luis: if the OS handled the read/write collisions

Re: [PHP] PHP help Quotations, Quotations, Quotations

2005-03-11 Thread Jason Barnett
Stg wrote: Thanks a lot for that, I am really grateful, now it sends along the link properly, which is great, however it is now having trouble converting spaces to %20 and it does it for some and not others, eg It does this: http://localhost/knewsl/NewsletterName.pdf When it should be:

Re: [PHP] PHP causes Apache segmentation fault?

2005-03-11 Thread John Swartzentruber
On 3/11/2005 10:33 AM Burhan Khalid wrote: John Swartzentruber wrote: I am running Fedora core3 with Apache 2.0.52 (from default RPMs), MySQL 4.1.10 (from RPMs from MySQL site), and PHP 5.0.3 built from source. I'm going through the PHP manual and trying some of the mysqli examples. The last

Re: [PHP] Temporary storage of data

2005-03-11 Thread Dan Trainor
Jason Barnett wrote: Dan wrote: dan wrote: ... Before we go through all of this, why isn't SQLite an option? It is in by default as of PHP5.0.0 so if the server is / will be PHP5 soon then I would go that route. http://php.net/manual/en/ref.sqlite.php Jason - Yea, I saw that, but for this I have

Re: [PHP] showing an image with php

2005-03-11 Thread Richard Lynch
I want to asssign an image to a variable and show it if certain conditions are met. E.g If condition is met { $myimage= retrieve image (images/myimage.jpg) echo $myimage } Have not used image creation before with php just dipping my toe in the water. Not sure you need to use image

RE: [PHP] incrementing a number from a text file

2005-03-11 Thread Richard Lynch
Is it possible to let the OS handle the collisions? For example: $last_value = system('cat counter.txt', $retval); $last_value++; $result = system('echo $last_value counter.txt', $retval); ...just a suggestion! Even if your OS guarantees locks on re-direct, you'd still have the *WRONG*

[PHP] How to ge the ones which are not

2005-03-11 Thread Mário Gamito
Hi, I've built this little regular expression to test wether an e-mail address is valid or not: if(eregi ([EMAIL PROTECTED], $email)) print ('valid email) else print ('Invalid email'); -- ok, now i want to use this in a filling form web page scenario. I have this forms with its fields to

Re: [PHP] Newbie Question: breaking a substr() string on a space

2005-03-11 Thread Richard Lynch
Hi, everyone, I'm 'teasers' of the first, say 200 to 250 characters of some articles. This works great: $content = strip_tags($article['content']); $striptease = substr($content, 0, 275); but cuts off words right in the midd ... I'd like to find a way to take $content, look

Re: [PHP] PHP 5.0.3 and base64 encoded cookie value issue?

2005-03-11 Thread Richard Lynch
Greetings again, Thanks to richard for pointing out a good way to devle into the source. It appears after browsing through the source that the ' ' (space) is encoded to '+'. Also the characters '_', '-', '.' do get special treatment. Obviously, this works great in the scenario where the

Re: [PHP] Using javascript function from php

2005-03-11 Thread Richard Lynch
I am just learning php, and am currently converting some jsp pages to php. I used the follwing code in jsp to toggle between two images Instead of driving yourself nuts with echo and quote and backslash and semi-colon quote semi-colon, just do like this: ?php //PHP code here ? !-- Look ma!

Re: [PHP] `ls -l /` does not reproduce same info than when executed in bash. - SOLVED

2005-03-11 Thread Hans Deragon
Greetings. My problem with permissions when running an external executable like 'ls' under PHP, itself running under Apache on an Fedora Core 3 (FC3) machine has been solved. I disabled SELinux and everything is now working fine. SELinux prevents apache to access some directories, notably NFS

[PHP] SimpleXML add a node

2005-03-11 Thread Claudio
Hi, I probably have a stupid question... how can I add a node into an existing simplexml object. I create the object by $xml = simplexml_load_file('test.xml'); the xml file shows like this: ?xml version='1.0'? config /config Thanks for help... -- PHP General Mailing List

Re: [PHP] warning question about mysql sessions concurrency

2005-03-11 Thread Richard Lynch
On Wed, Mar 09, 2005 at 02:52:52PM -0800, Richard Lynch wrote: Agreed, initially I thought of that but I also need to use transactions in my business logic and MySQL doesn't support nested transactions, so I'd have to open a separate connection to the DB to handle the session transaction

Re: [PHP] free php live chat with visitor/customer script

2005-03-11 Thread Richard Lynch
I was recently visiting a commercial site and suddunly a window chat popped up and some assistant asked me if I needed some help. I thought this was pretty cool Ugh! I'd say it was pretty ANNOYING, myself. And it's gotta be pretty expensive on the back-end to have all these live chat

Re: [PHP] SimpleXML add a node

2005-03-11 Thread Guillermo Rauch
php.net/dom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Extending DOMDocument

2005-03-11 Thread Samuel J. Greear
http://evilcode.net/cgi-bin/viewsvn.cgi/exhibition/trunk/lib/php/xml/xmltree.php?rev=106view=auto ( http://tinyurl.com/5h47a ) I have been using the above to extend DOMDocument, as a quick workaround to avoid a root document element. Now that I have started using namespaces, it works

Re: [PHP] How to ge the ones which are not

2005-03-11 Thread Richard Lynch
I've built this little regular expression to test wether an e-mail address is valid or not: if(eregi ([EMAIL PROTECTED], $email)) First, you should be aware that your RegEx is wrong. I know it's wrong, because the CORRECT Regex is 3 *PAGES* long in the camel book. That said, maybe this

Re: [PHP] Extending DOMDocument

2005-03-11 Thread Richard Lynch
http://evilcode.net/cgi-bin/viewsvn.cgi/exhibition/trunk/lib/php/xml/xmltree.php?rev=106view=auto ( http://tinyurl.com/5h47a ) I have been using the above to extend DOMDocument, as a quick workaround to avoid a root document element. Now that I have started using namespaces, it works

RE: [PHP] How to ge the ones which are not

2005-03-11 Thread Chris W. Parker
Richard Lynch mailto:[EMAIL PROTECTED] on Friday, March 11, 2005 10:12 AM said: I've built this little regular expression to test wether an e-mail address is valid or not: if(eregi ([EMAIL PROTECTED], $email)) First, you should be aware that your RegEx is wrong. I know it's

[PHP] Tried to run PHP as shell script and got the error...

2005-03-11 Thread Scott Fletcher
Hi! I'm trying to run PHP as a shell script but I got the error message... Source code below is ... --snip-- #/usr/local/bin/php ? echo Hello World!!\n; ? --snip-- Attempt to run the file below and got the error --snip-- -=[/usr/local/bin]==./ecbi_inquiry_pull_experian.sh Hello World!!\n

Re: [PHP] How to ge the ones which are not

2005-03-11 Thread Jochem Maas
Richard Lynch wrote: ... First, you should be aware that your RegEx is wrong. I know it's wrong, because the CORRECT Regex is 3 *PAGES* long in the camel book. 3 pages? does any one use it? is it even feasible to use it? That said, maybe this will catch *some* invalid email addresses, and not

[PHP] Re: Tried to run PHP as shell script and got the error...

2005-03-11 Thread BlackDex
Try to put this at top. !/usr/local/bin/php so change the # for a !, becous thas is what is used to execute scripts etc.. :). Hoop it will work. Kind Regards, BlackDex Scott Fletcher [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi! I'm trying to run PHP as a shell script but I

Re: [PHP] Re: Tried to run PHP as shell script and got the error...

2005-03-11 Thread Jochem Maas
BlackDex wrote: Try to put this at top. !/usr/local/bin/php so change the # for a !, becous thas is what is used to execute scripts etc.. :). not quite right: the shebang line requires both those chars :-) http://dictionary.reference.com/search?q=shebang quote #! used in Unix to mark the

Re: [PHP] Tried to run PHP as shell script and got the error...

2005-03-11 Thread John Nichel
Scott Fletcher wrote: Hi! I'm trying to run PHP as a shell script but I got the error message... Source code below is ... --snip-- #/usr/local/bin/php ? echo Hello World!!\n; ? --snip-- Your first line needs to have both the # and the ! (shebang) #!/usr/local/bin/php -- John C. Nichel ÜberGeek

RE: [PHP] Tried to run PHP as shell script and got the error...

2005-03-11 Thread Chris W. Parker
John Nichel mailto:[EMAIL PROTECTED] on Friday, March 11, 2005 11:28 AM said: Your first line needs to have both the # and the ! (shebang) #!/usr/local/bin/php Would this also work??? williamhung/usr/local/bin/php :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe,

Re: [PHP] Tried to run PHP as shell script and got the error...

2005-03-11 Thread John Nichel
Chris W. Parker wrote: John Nichel mailto:[EMAIL PROTECTED] Your first line needs to have both the # and the ! (shebang) #!/usr/local/bin/php Would this also work??? williamhung/usr/local/bin/php :) Maybe now, but 20 years or so ago, it would have been... cyndilauper/usr/local/bin/php -- John C.

Re: [PHP] Newbie Question: breaking a substr() string on a space SOLVED

2005-03-11 Thread Jackson Linux
Hi, everyone, Thanks for the great suggestions! I've looked at all and found that the one here: http://www.php.net/explode that Jay recommended was the easiest for me to wrap my brain around. I wll tinker with the other ones as well - it's all really interesting. The function was: function

[PHP] PSPELL couldn't open the dictionary.

2005-03-11 Thread Brent Macnaughton
Has anyone successfully lused the PHP pspell functions with this version of aspell ? # aspell -v @(#) International Ispell Version 3.1.20 (but really Aspell 0.60.2) I am able to use aspell fromt he command line, but PHP gives me the following error when I try to use pspell_new() to load a

[PHP] Handling File uploads pre 4.2.0

2005-03-11 Thread Ed Curtis
I need a way to make sure an upload has been uploaded correctly to my server. I know version 4.2.0 has the $_FILE['userfile']['error'] directive but unfortunately I'm stuck with verision 4.1.2 at the moment and upgrading may be a way off for me. Should I use

Re: [PHP] SimpleXML add a node

2005-03-11 Thread Claudio
php.net/dom ?? Like this? --- try { $dom = new DOMDocument(); $config = $dom-appendChild($dom-importNode(dom_import_simplexml($this-configXML),true)); $config-appendChild( $dom-createElement(($mode? 'softactive':'active')) ); $this-configXML = simplexml_import_dom($config); }

[PHP] IMAP with ssl support

2005-03-11 Thread Bronislav Klucka
Hi, I'm trying to compile php with imap ssl support, I've downloaded imap source and run make lnp SSLTYPE=unix then i run php configure file with as ./configure --with-imap=/usr/src/php5/imap/ --with-openssl --with-imap-ssl=/usr/src/php5/imap/ configuration, make and make install worked but I

[PHP] Multiple file delete

2005-03-11 Thread Ashley M. Kirchner
I have a page that displays the contents of a folder. Right now, each file has a little 'delete' button next to it that users can click on, however with many files it gets cumbersome. I need to be able to have them click on checkboxes and then hit one delete button which will then get rid

[PHP] bulk emailer

2005-03-11 Thread Redmond Militante
hi i need some advice on making a bulk emailer script more robust. what i'm currently doing: -using mysql_fetcharray() to loop through an array of query results -for each iteration of the loop, get an email address from the current row in the result set, and use it with the mail() function to

Re: [PHP] How to ge the ones which are not

2005-03-11 Thread Robert Cummings
On Fri, 2005-03-11 at 13:12, Richard Lynch wrote: I've built this little regular expression to test wether an e-mail address is valid or not: if(eregi ([EMAIL PROTECTED], $email)) First, you should be aware that your RegEx is wrong. I know it's wrong, because the CORRECT Regex is

[PHP] Re: Multiple file delete

2005-03-11 Thread Jason Barnett
Ashley M. Kirchner wrote: I have a page that displays the contents of a folder. Right now, each file has a little 'delete' button next to it that users can click on, however with many files it gets cumbersome. I need to be able to have them click on checkboxes and then hit one delete

Re: [PHP] Multiple file delete

2005-03-11 Thread John Nichel
Ashley M. Kirchner wrote: I have a page that displays the contents of a folder. Right now, each file has a little 'delete' button next to it that users can click on, however with many files it gets cumbersome. I need to be able to have them click on checkboxes and then hit one delete

[PHP] Re: Multiple file delete

2005-03-11 Thread Jamie Alessio
I have a page that displays the contents of a folder. Right now, each file has a little 'delete' button next to it that users can click on, however with many files it gets cumbersome. I need to be able to have them click on checkboxes and then hit one delete button which will then get rid of

[PHP] Sending data via POST

2005-03-11 Thread Todd Cary
Currently I send data to another page by using header("Location: http://" . $_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF']) . "/" . $relative_url . "?" . $my_data); My client would like the data passed via a POST rather than in the URL. Can this be done and if so, how?

Re: [PHP] Sending data via POST

2005-03-11 Thread John Nichel
Todd Cary wrote: Currently I send data to another page by using header(Location: http://; . |$_SERVER['HTTP_HOST'] .| |dirname($_SERVER['PHP_SELF']) . | |/ . $relative_url . | |? . $my_data);| || ||My client would like the data passed

[PHP] POST multipart/form-data temp files not being created. File_upload directive is resetting to No.

2005-03-11 Thread Shawn Kelly
hello php.general: I want to send a file through an HTML form to my Linux server. Newbie to PHP, but I have been patient in inverse proportion to my knowledge. I have seen many confused people with similar problems and their respective solutions in my quest (!), but still no avail towards my

[PHP] Re: Sending data via POST

2005-03-11 Thread Shawn Kelly
This is from php.net: Just change the $out to fill with your POST request (instead of the GET). Works good, you can change ports. :) $fp = fsockopen("www.example.com", 80, $errno, $errstr, 30);if (!$fp) { echo "$errstr ($errno)br /\n";} else { $out = "GET / HTTP/1.1\r\n"; $out .= "Host:

[PHP] Re: Sending data via POST

2005-03-11 Thread Todd Cary
Shawn - Many thanks! I have a class I wrote that does that, but I thought I may have overlooked something simplier. Todd Shawn Kelly wrote: This is from php.net: Just change the $out to fill with your POST request (instead of the GET). Works good, you can change ports. :) |$fp =

Re: [PHP] POST multipart/form-data temp files not being created. File_upload directive is resetting to No.

2005-03-11 Thread Richard Lynch
Here are my questions (first): What sort of monster could possibly cause ini_get(file_uploads) to return Off even though php.ini has file_uploads = On? First and foremost, confirm that the php.ini you changed is the same file PHP is actually using. Create a phpinfo.php file with: ?php

Re: [PHP] How to ge the ones which are not

2005-03-11 Thread Richard Lynch
On Fri, 2005-03-11 at 13:12, Richard Lynch wrote: I've built this little regular expression to test wether an e-mail address is valid or not: if(eregi ([EMAIL PROTECTED], $email)) I can also say that the backslashes in here are maybe not doing what you think... Maybe \w has no

Re: [PHP] bulk emailer

2005-03-11 Thread Richard Lynch
what i'm currently doing: -using mysql_fetcharray() to loop through an array of query results -for each iteration of the loop, get an email address from the current row in the result set, and use it with the mail() function to send out an individual email to that email address, then echo out

Re: [PHP] SimpleXML add a node

2005-03-11 Thread Richard Lynch
php.net/dom ?? Like this? --- try { $dom = new DOMDocument(); $config = $dom-appendChild($dom-importNode(dom_import_simplexml($this-configXML),true)); $config-appendChild( $dom-createElement(($mode? 'softactive':'active')) ); $this-configXML = simplexml_import_dom($config); }

Re: [PHP] Handling File uploads pre 4.2.0

2005-03-11 Thread Richard Lynch
I need a way to make sure an upload has been uploaded correctly to my server. I know version 4.2.0 has the $_FILE['userfile']['error'] directive but unfortunately I'm stuck with verision 4.1.2 at the moment and upgrading may be a way off for me. Should I use

Re: [PHP] POST multipart/form-data temp files not being created. File_upload directive is resetting to No.

2005-03-11 Thread Shawn Kelly
Richard Lynch you are my new best friend! grep -n uploads /etc/httpd/conf/httpd.conf tells me 279:php_admin_value file_uploads off. I don't know how I could have missed it! I changed httpd.conf to have php_admin_value file_uploads On and everything worked like it was supposed to this morning

Re: [PHP] bulk emailer

2005-03-11 Thread Nicholas W . Miller
On Mar 11, 2005, at 2:34 PM, Richard Lynch wrote: what i'm currently doing: -using mysql_fetcharray() to loop through an array of query results -for each iteration of the loop, get an email address from the current row in the result set, and use it with the mail() function to send out an

Re: [PHP] free php live chat with visitor/customer script

2005-03-11 Thread p80
For those of you who might be interested I found this http://www.craftysyntax.com/ , it's GPL and it looks pretty updated. the web page says: A multi-user, multi-operator, multi-department live help support chat system that allows the operators of the websites to monitor their visitors as they

[PHP] Re: POST multipart/form-data temp files not being created. File_upload directive is resetting to No.

2005-03-11 Thread Jason Barnett
Shawn Kelly wrote: hello php.general: I want to send a file through an HTML form to my Linux server. Newbie to PHP, but I have been patient in inverse proportion to my knowledge. I have seen many confused people with similar problems and their respective solutions in my quest (!), but still

Re: [PHP] SimpleXML add a node

2005-03-11 Thread Jason Barnett
Richard Lynch wrote: ... } catch(Exception $e) {} I dunno about that whole try/catch thing, but if you're not going to USE it to catch the errors, then you might as well be old school and check the return values of all these functions. Agreed 100%. No sense in going through the overhead

Re: [PHP] Re: PHP hangs when exec'ing SSH

2005-03-11 Thread Rasmus Lerdorf
Ross Becker wrote: There's no output (besides the numeric return code) from SSH which I care about- there shouldnt be anything coming back via stdout or stderr. If there is, I'm happy to discard it. This SHOULD be a dead-nuts-simple case of exec the command and wait for it to return. And if

[PHP] Question about shortening a string

2005-03-11 Thread Mário Gamito
Hi, In Portgal we have big names. My complete name, for instance, is Mário Augusto Machado dos Reis Gamito. Mário is the Christian name and Gamito - the last one - is always the last name of the father. I have a form where i want to let my users insert their full big name like mine, but i want

[PHP] Re: Question about shortening a string

2005-03-11 Thread M. Sokolewicz
Mário Gamito wrote: Hi, In Portgal we have big names. My complete name, for instance, is Mário Augusto Machado dos Reis Gamito. Mário is the Christian name and Gamito - the last one - is always the last name of the father. I have a form where i want to let my users insert their full big name

Re: [PHP] how to verify image and not http error is returned to browser

2005-03-11 Thread Rasmus Lerdorf
Cindy Reeves wrote: Hi. I want to include an image on my home page that is dynamically created from another website. The source code on a typical HTML page would be img src=http://www.othersite.com/returnedimage.aspx; I don't trust their server will always be up/respond, so I want to use a PHP

Re: [PHP] Re: PHP hangs when exec'ing SSH

2005-03-11 Thread Ross Becker
I think you're probably right. My gut is telling me that this has to do with tty funkiness. I tried the batchmode option, but it didn't affect the problem. My bet is that ssh is mucking around with ttys, and PHP is loosing it's connection through apache. The php processing may actually be

Re: [PHP] Re: Question about shortening a string

2005-03-11 Thread Mário Gamito
Hi Sokolewicz, Thanks a lot. It just working really fine :) Thank you again. Warm regards, Mário Gamito M. Sokolewicz wrote: Mário Gamito wrote: Hi, In Portgal we have big names. My complete name, for instance, is Mário Augusto Machado dos Reis Gamito. Mário is the Christian name and

Re: [PHP] Re: Question about shortening a string

2005-03-11 Thread Ashley M. Kirchner
Mário Gamito wrote: Hi Sokolewicz, Thanks a lot. It just working really fine :) M. Sokolewicz wrote: Mário Gamito wrote: For example, if i fill the form with Mário Augusto Machado dos Reis Gamito, i want to change this string to only Mário Gamito. The total number of names is not fix. Could

[PHP] Table duplication

2005-03-11 Thread Marquez Design
I am trying to display information in an html table from a MySQL data base. I can do this rather easily, however, I am trying to multiply that table with as many entries there are in the database. Can someone point me in the right direction or give me an example of how I can accomplish this? I

[PHP] Unlimited categories

2005-03-11 Thread Popescu Dan
Hi, I have a database table withe the next fields: category_id, parent_id, category_name. How can i display all the categories with their subcategories, like this Category 1 Category 11 Category 12 Category121 Category 2 Category 21 Category 22 and so on

Re: [PHP] Re: PHP hangs when exec'ing SSH

2005-03-11 Thread Rasmus Lerdorf
Ross Becker wrote: I think you're probably right. My gut is telling me that this has to do with tty funkiness. I tried the batchmode option, but it didn't affect the problem. My bet is that ssh is mucking around with ttys, and PHP is loosing it's connection through apache. The php processing

Re: [PHP] Temporary storage of data

2005-03-11 Thread Jason Barnett
?php /** Page 1 of the form (uniqid.php). Try to protect this page with your server, mmmkay? Authentication is left as an exercise for the reader... */ $genkey = 'http://receiving_server.com/genkey.php?fname='; define('TMP', './'); $key = KEY admin's public key. In an optimal situation you

Re[2]: [PHP] incrementing a number from a text file

2005-03-11 Thread Tom Rogers
Hi, Friday, March 11, 2005, 6:30:52 PM, you wrote: KM -Original Message- KM From: Richard Lynch [mailto:[EMAIL PROTECTED] KM Sent: Thursday, March 10, 2005 10:14 PM KM To: Ross Hulford KM Cc: php-general@lists.php.net KM Subject: Re: [PHP] incrementing a number from a text file I want

[PHP] Unlimited categories

2005-03-11 Thread Popescu Dan
Hi, I have a database table withe the next fields: category_id, parent_id, category_name. How can i display all the categories with their subcategories, like this Category 1 Category 11 Category 12 Category121 Category 2 Category 21 Category 22 -- PHP General Mailing List

Re: [PHP] Unlimited categories

2005-03-11 Thread Burhan Khalid
Popescu Dan wrote: Hi, I have a database table withe the next fields: category_id, parent_id, category_name. How can i display all the categories with their subcategories, like this Category 1 Category 11 Category 12 Category121 Category 2 Category 21 Category 22 You need to use a

[PHP] Reading directory contents

2005-03-11 Thread Ashley M. Kirchner
A file system question for you folks. We have a folder that contains the following structure of files for each of our sales reps in the company: $TOP_FOLDER$/ /$SalesRep1/ /$Client1/ /File1.ext

Re: [PHP] Question about shortening a string

2005-03-11 Thread Steve Slater
Mario, Many ways to do it, most using regex. This is not as clean as it can be but still shows the idea: ?php $name = Mario Augusto Machado dos Reis Gamito; preg_match (/^(\w+)(\W*)(\w+\W+)*(\w+)$/,$name,$matches); $short_name = $matches[1] $matches[4]; ? This example works for any number of

Re: [PHP] Question about shortening a string

2005-03-11 Thread Stephen Johnson
Just a quick and dirty solution - but couldn't you explode the name into an array and use the first and last array fields ? On Mar 11, 2005, at 11:39 PM, Steve Slater wrote: Mario, Many ways to do it, most using regex. This is not as clean as it can be but still shows the idea: ?php $name =