[PHP] Performance

2001-12-13 Thread René Fournier
performance characteristics, I might be able to make better decisions when coding. Thanks. ...Rene --- René Fournier, [EMAIL PROTECTED] -- 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

[PHP] Is PHP up to task?

2001-12-14 Thread René Fournier
a better way than what I can see!) What I was thinking was to preload all the nav buttons and their states in the header.inc. Thanks. ...Rene --- René Fournier [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e

Re: [PHP] Is PHP up to task?

2001-12-15 Thread René Fournier
, December 15, 2001, at 02:08 AM, Charles Williams wrote: - Original Message - From: René Fournier [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, December 15, 2001 1:27 AM Subject: [PHP] Is PHP up to task? (Now that I have your attention... :-) Here's the situation: All

[PHP] OSX Migration Problem

2002-01-16 Thread René Fournier
query result in /Users/rene/Sites/smartslitters/jupiter/europa/header.inc on line 44 Warning: Supplied argument is not a valid MySQL result resource in /Users/rene/Sites/smartslitters/jupiter/europa/header.inc on line 45 --- ...Rene -- René Fournier -- PHP General Mailing List (http

[PHP] Mac OSX !?!?!?

2002-01-16 Thread René Fournier
/header.inc on line 45 --- After these lines, the pages load fine. I'm using PHP Session ID variables (or trying to)--they work fine as I said under other OSes, but now break under OSX. ...Rene --- René Fournier [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe

Re: [PHP] Mac OSX !?!?!?

2002-01-16 Thread René Fournier
in the arrangement of the books---a mysterious order which it does not comprehend, but only dimly suspects. - Albert Einstein From: René Fournier [EMAIL PROTECTED] Date: Wed, 16 Jan 2002 17:50:06 -0700 To: [EMAIL PROTECTED], [EMAIL PROTECTED] Subject: [PHP] Mac OSX !?!?!? Can someone PLEASE explain

Re: [PHP] Mac OSX !?!?!?

2002-01-16 Thread René Fournier
in the arrangement of the books---a mysterious order which it does not comprehend, but only dimly suspects. - Albert Einstein From: René Fournier [EMAIL PROTECTED] Date: Wed, 16 Jan 2002 17:50:06 -0700 To: [EMAIL PROTECTED], [EMAIL PROTECTED] Subject: [PHP] Mac OSX !?!?!? Can someone PLEASE explain

[PHP] Must results from MySQL fetches always be an Array??

2002-01-25 Thread René Fournier
as a string? (So that I don't have to write $series = $series[0]; immediately afterwards in order to treat $series as a $string.) ...Rene --- René Fournier [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e

[PHP] Can I be an ASP with PHP?

2002-06-20 Thread René Fournier
, is it necessary for me to resort to new, unknown technologies like XML or SOAP, or can I do it with PHP alone? Thanks for your comments. ...Rene --- René Fournier, [EMAIL PROTECTED] Toll-free +1.888.886.2754 Tel +1.403.291.3601 Fax +1.403.250.5228 www.smartslitters.com SmartSlitters

[PHP] Convert a grayscale value to a #RRGGBB hex value

2002-06-24 Thread René Fournier
. ...Rene --- René Fournier, [EMAIL PROTECTED] Toll-free +1.888.886.2754 Tel +1.403.291.3601 Fax +1.403.250.5228 www.smartslitters.com SmartSlitters International #33, 1339 - 40th Ave NE Calgary AB T2E 8N6 Canada -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http

[PHP] Convert a grayscale value to a #RRGGBB hex value

2002-06-24 Thread René Fournier
. ...Rene --- René Fournier, [EMAIL PROTECTED] Toll-free +1.888.886.2754 Tel +1.403.291.3601 Fax +1.403.250.5228 www.smartslitters.com SmartSlitters International #33, 1339 - 40th Ave NE Calgary AB T2E 8N6 Canada -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http

[PHP] Annoying syntax problem with RTRIM

2002-07-04 Thread René Fournier
4.0.6), I get the following error message: bWarning/b: Wrong parameter count for rtrim() in b/u/htdocs/smarts/jupiter/callisto/include/create.inc/b on line b216/bbr Any ideas why? Thanks. ...Rene --- René Fournier, [EMAIL PROTECTED] Toll-free +1.888.886.2754 Tel +1.403.291.3601 Fax

Re: [PHP] Annoying syntax problem with RTRIM

2002-07-04 Thread René Fournier
I did. It didn't help. (That's why I posted this message.) On Thursday, July 4, 2002, at 10:47 AM, Jason Wong wrote: On Friday 05 July 2002 00:41, René Fournier wrote: echo rtrim($feat,, ); On my local Apache-OSX web server (PHP 4.1.2), this command works fine. (The reason I use

Re: [PHP] Annoying syntax problem with RTRIM

2002-07-04 Thread René Fournier
^hint get them to upgrade php for you. Paul Roberts [EMAIL PROTECTED] - Original Message - From: René Fournier [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, July 04, 2002 6:00 PM Subject: Re: [PHP] Annoying syntax problem with RTRIM I did

[PHP] Storing images in MySQL bad idea, performance-wise?

2002-07-08 Thread René Fournier
store all such images in the DB? (Which I understand reduces performance.) Or do I--somehow--store the images as files on the client's web server? And if so, how? (Because my PHP scripts are being executed on a different server.) ...Rene --- René Fournier, [EMAIL PROTECTED] Toll-free

[PHP] Re: Images in Mysql

2002-07-10 Thread René Fournier
? And if so, how? (Because my PHP scripts are being executed on a different server.) ...Rene --- René Fournier, [EMAIL PROTECTED] --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.361 / Virus Database: 199 - Release Date: 5/7

[PHP] good article on creating a subscription form/script

2002-07-12 Thread René Fournier
I've looked on php.net, phpbuilder.com, and zend.com, but to no avail. Any suggestions? --- René Fournier, [EMAIL PROTECTED] Toll-free +1.888.886.2754 Tel +1.403.291.3601 Fax +1.403.250.5228 www.smartslitters.com SmartSlitters International #33, 1339 - 40th Ave NE Calgary AB T2E 8N6 Canada

[PHP] GD Graphics Library

2002-08-29 Thread René Fournier
for PHP4? (Or better yet, do you have any suggestions as to how I might persuade FatCow to add it?? ...Rene --- René Fournier, [EMAIL PROTECTED] Toll-free +1.888.886.2754 Tel +1.403.291.3601 Fax +1.403.250.5228 www.smartslitters.com SmartSlitters International #33, 1339 - 40th Ave NE Calgary AB

[PHP] How to do a dynamic UPDATE SET

2001-10-01 Thread René Fournier
I'm having a REALLY hard time with something that's probably easy to do (for someone :-)... Normally, to perform an update on a table with data from a submitted form, I would use something like: $sql = UPDATE $table SET pet='$pet', name='$name' WHERE id=$id; $result = mysql_query($sql);

RE: [PHP] How to do a dynamic UPDATE SET

2001-10-01 Thread René Fournier
Nope, still no go. Removing the single quotes stops PHP from updating the fields with $set's literal $fieldname, but still doesn't update the record with the value (or anything). === CODE === if ($submit) { // if there is an ID, then it's an update if ($id) {

[PHP] Pesky quotes

2001-10-03 Thread René Fournier
A little problem with single quotes messing up an SQL SET statement... I can type single quotes, double quotes--it seems, any 'special' character--into a form, and so long as my PHP script tries to INSERT, UPDATE or DELETE said row into the table, no problem. But when I try to DUPLICATE a row

[PHP] Should I convert special characters before writing them to a table?

2001-10-04 Thread René Fournier
The reason I ask is, I'm having a problem processing rows in a table that contain single quotes (specifically, the PHP code I wrote that allows the user to duplicate a row doesn't work if the a field in the row has a single quote in it). Would it be better for me to strip out the single quotes

[PHP] array to string

2001-10-19 Thread René Fournier
Just trying to convert an array to string before writing the whole thing back out to a file. (Trying to do a simple database-less database, using text files). $fcontents = file($name..db); // THE ENTIRE TABLE $fcontents[$update] = $updatedstring; // THE ROW TO BE UPDATED

[PHP] SIMPLE, secure user authentication

2001-10-25 Thread René Fournier
I'm looking for a good (simple) tutorial on user authentication. I want to create a login system that's secure, but I don't need all the features that PHPBuilder's A Complete, Secure User Login System scripts provide. (I don't need the the user to be able to register or confirm his account,

[PHP] Best [non-PHP] way to redirect a browser

2001-10-26 Thread René Fournier
This is really I guess a non-PHP question, so please excuse... What is the most reliable, browser-safe way to redirect the browser from a default index.html to, say, index.php? The I'm doing it now is with the following javascript: script type=text/javascript language=Javascript

[PHP] Fatcow and MySQL-Front

2001-10-29 Thread René Fournier
Hi All, Little problem: I want to transfer my MySQL database--a collection of 10 or so tables, with data--to my Fatcow account. They provide some lame MySQL tools, but nothing to faciliate moving an existing database, full of data, to their server. I tried using MySQL-Front to connect to

RE: [PHP] Fatcow and MySQL-Front

2001-10-30 Thread René Fournier
popit, volim zagalamit - Original Message - From: René Fournier [EMAIL PROTECTED] To: Php-General [EMAIL PROTECTED] Sent: 30. listopad 2001 00:04 Subject: [PHP] Fatcow and MySQL-Front Hi All, Little problem: I want to transfer my MySQL database--a collection of 10 or so

[PHP] Weird caching problem with PHP4/Apache

2001-10-30 Thread René Fournier
Having successfully uploaded my PHP4+MySQL site finally to Fatcow (and the MySQL stuff IS there--thanks for the help), I'm now left with making it actually work online. One curious problem: For every page in the site (*.php4), I include three parts, a header.inc (common to all), a body.inc

RE: [PHP] Re: Weird caching problem with PHP4/Apache

2001-10-30 Thread René Fournier
chegando: http://toca.sourceforge.net René fournier [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Having successfully uploaded my PHP4+MySQL site finally to Fatcow (and the MySQL stuff IS there--thanks for the help), I'm now left with making it

RE: [PHP] Re: Weird caching problem with PHP4/Apache -- THE SAGA CONTINUES

2001-10-31 Thread René Fournier
]] Sent: Wednesday, October 31, 2001 7:24 AM To: René Fournier; Hugh Danaher Cc: Php-General Subject: Re: [PHP] Re: Weird caching problem with PHP4/Apache On Wednesday 31 October 2001 14:48, René Fournier wrote: Nope, unfortunately, nothing. It's a really weird problem. It's like the PHP

RE: [PHP] Re: Weird caching problem with PHP4/Apache -- THE SAGA CONTINUES

2001-10-31 Thread René Fournier
Yes! That's it! I added that srand function, and it works great. Thanks! ..Rene -Original Message- From: Tamas Arpad [mailto:[EMAIL PROTECTED]] Sent: Wednesday, October 31, 2001 10:58 AM To: René Fournier Cc: Php-General Subject: Re: [PHP] Re: Weird caching problem with PHP4

[PHP] Array HELP PLEASE

2001-11-08 Thread René Fournier
(Before you write RTFM, please know that I have checked www.php.net, zend.com, phpbuilder.com, et all, and--in the eternal words of Bono--I still haven't found what I'm looking.) The situation: I extract an array from a MySQL table. Code: $models = mysql_fetch_array(mysql_query(SELECT

RE: [PHP] Array HELP PLEASE

2001-11-08 Thread René Fournier
Oops, guess I posted too soon. Just figured out the problem myself (use a do/while...). Thanks anyways. -Original Message- From: René Fournier [mailto:[EMAIL PROTECTED]] Sent: Thursday, November 08, 2001 3:25 PM To: Php-General Subject: [PHP] Array HELP PLEASE (Before you write

RE: [PHP] Array HELP PLEASE

2001-11-08 Thread René Fournier
Message- From: René Fournier [mailto:[EMAIL PROTECTED]] Sent: Thursday, November 08, 2001 3:39 PM To: Php-General Subject: RE: [PHP] Array HELP PLEASE Oops, guess I posted too soon. Just figured out the problem myself (use a do/while...). Thanks anyways. -Original Message- From

[PHP] How to set file extension php Mac OSX and PHP 4.0.6

2001-12-02 Thread René Fournier
I have successfully installed PHP 4.0.6, and it works! Only problem is that Apache only sends files to the PHP module that have a .php extension. However, I need to name the files .php4 (long story). As it stands, all I see is the actual PHP source, not the output. Does anyone know how I can

Re: [PHP] How to set file extension php Mac OSX and PHP 4.0.6

2001-12-02 Thread René Fournier
wrote: modify the apache configuration file (i.e. httpd.conf) and add it as and AddType, as in the following: AddType application/x-httpd-php .php4 .php3 .phtml .php AddType application/x-httpd-php-source .phps HTH -- René Fournier wrote: I have successfully installed PHP 4.0.6

[PHP] sizeof($array) with a twist

2001-12-04 Thread René Fournier
I'd like to count the number of rows in a 2 dimensional array that have the same data in their fifth field. Is there a PHP function that does this? Sizeof() appears to lack condition parameters... ...Rene --- René Fournier [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net

[PHP] Re: MySQL ORDER BY or PHP Sort? Oops.

2001-12-03 Thread René Fournier
From: René Fournier [EMAIL PROTECTED] Date: Mon Dec 03, 2001 06:11:23 PM US/Mountain To: Benjamin Pflugmann [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] [EMAIL PROTECTED] Subject: Re: MySQL ORDER BY or PHP Sort? Oops. Here is the snippet of code that is presenting a challenge

Re: [PHP] Re: MySQL ORDER BY or PHP Sort? Oops.

2001-12-03 Thread René Fournier
-Original Message- From: René Fournier [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 04, 2001 12:16 PM To: Benjamin Pflugmann; [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: [PHP] Re: MySQL ORDER BY or PHP Sort? Oops. From: René Fournier [EMAIL PROTECTED] Date: Mon Dec 03, 2001

[PHP] Mac OSX and MySQL

2001-12-04 Thread René Fournier
not sure which one[s] to use. Thanks. ...Rene --- René Fournier [EMAIL PROTECTED] -- 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]

[PHP] Re: Mac OSX and MySQL

2001-12-05 Thread René Fournier
PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php --- René Fournier [EMAIL PROTECTED] -- 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

[PHP] Dumped OK, Restore NOT

2001-12-05 Thread René Fournier
or otherwise. Seems to have worked, right? But when I check the 'smarts' database directory, there are no files in it. (Incidentally mysqld is running.) What am I doing wrong?? ...Rene --- René Fournier [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL

Re: [PHP] Dumped OK, Restore NOT

2001-12-05 Thread René Fournier
administrators, e-mail: [EMAIL PROTECTED] --- René Fournier [EMAIL PROTECTED] -- 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]

Re: [PHP] Dumped OK, Restore NOT

2001-12-05 Thread René Fournier
to ignore netiquette.) ...Rene On Wednesday, December 5, 2001, at 10:56 AM, Ernesto wrote: You should try: mysql -u username -p password database dump.sql Example: mysql -u joe -p mypass smarts smarts.sql René Fournier wrote: Little problem with MySQL 3.23.46 under Windows ME. I'm

Re: [PHP] Performance

2001-12-13 Thread René Fournier
. But they may be the same speed after a simple optimization pass. -Original Message- From: René Fournier [mailto:[EMAIL PROTECTED]] Sent: Tuesday, November 13, 2001 9:05 AM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: [PHP] Performance Is it true that mixing HTML and PHP

[PHP] Command-line PHP script CPU usage goes sky-high, stays there--why?

2007-12-10 Thread René Fournier
Hello, I have a command-line PHP script--called Listener--that is designed to run indefinitely with a predictable CPU usage and memory footprint. In a nutshell, it's a multi-client socket server that waits for incoming connections, processes incoming data, stores results in a MySQL

Re: [PHP] Command-line PHP script CPU usage goes sky-high, stays there--why?

2007-12-10 Thread René Fournier
Hi Jim, I have a server that listens like yours does. I get 80k - 85k connections a day to it. When I first started it, I was only getting about 3k of connections aday. Then I upped the listening pattern and it tanked. I noticed that all my mail/web/db connections just sat there.

Re: [PHP] Command-line PHP script CPU usage goes sky-high, stays there--why?

2007-12-10 Thread René Fournier
On 10-Dec-07, at 4:42 PM, Tom Rogers wrote: Put a usleep(1000) in the listen while() loop and give the cpu a break. Good advice, but I've already been doing that. The thing is, when the script first starts up, the CPU rarely exceeds 30%, even when many clients (200+) are simultaneously

Re: [PHP] Command-line PHP script CPU usage goes sky-high, stays there--why?

2007-12-10 Thread René Fournier
On 10-Dec-07, at 5:20 PM, Jim Lucas wrote: Tom Rogers wrote: Hi, Tuesday, December 11, 2007, 6:42:18 AM, you wrote: RF Hello, Put a usleep(1000) in the listen while() loop and give the cpu a break. This makes me think about asking if you have to short of a timeout on your receiving

Re: [PHP] Command-line PHP script CPU usage goes sky-high, stays there--why?

2007-12-11 Thread René Fournier
That makes sense, but I'm not sure I really want to do this, since it's fairly important that Listener continue listening without interruption. I also don't think it's probably necessary, since from what I read, I'm not really pushing the envelope in terms of real load. Right now, I

[PHP] Bug in stream_socket_server()?

2007-12-11 Thread René Fournier
If you want a high speed socket server, use the low-level sockets instead (socket_create/bind/listen). The stream_socket_server version appears to have internal fixed 8k buffers that will overflow if you don't keep up by reading. This is a serious problem if you an application that reads

[PHP] Pushing the limits of stream_socket_server() and stream_select()

2007-12-11 Thread René Fournier
Just curious what people found the limits to be with stream_socket_server(), in terms of maximum concurrent connections, packet sizes, etc. I'm am presently stress-testing a multi-client socket server and am finding I can sometimes break it with as few as 100 concurrent connections, and

Re: [PHP] Pushing the limits of stream_socket_server() and stream_select()

2007-12-11 Thread René Fournier
On 11-Dec-07, at 4:32 PM, René Fournier wrote: Just curious what people found the limits to be with stream_socket_server(), in terms of maximum concurrent connections, packet sizes, etc. I'm am presently stress-testing a multi-client socket server and am finding I can sometimes break

[PHP] Re: Mac OS X Server limits... was [PHP] Pushing the limits of stream_socket_server() and stream_select()

2007-12-11 Thread René Fournier
out there know how to increase OS X Server's (10.4.11) maximum connections per socket value? There seems to no such setting in sysctl or ulimit. Any ideas? Anyone? Anyone? ...Rene On 11-Dec-07, at 4:55 PM, René Fournier wrote: On 11-Dec-07, at 4:32 PM, René Fournier wrote: Just curious

Re: [PHP] Command-line PHP script CPU usage goes sky-high, stays there--why?

2007-12-19 Thread René Fournier
On 11-Dec-07, at 2:13 PM, Per Jessen wrote: René Fournier wrote: However, the number of socket clients connecting in the past 3-4 months has steadily increased, and this seems to have exposed (if not created) a strange performance issue with PHP 5.2.4, MySQL 5.0.45 and/or Mac OS X Server

[PHP] Got a makestringsafe_for_filename() function?

2005-06-22 Thread René Fournier
I imagine some of you have written a nice little function for taking an arbitrary user-input string, and sanitizing and cleaning it for us as a UNIX (Mac OSX) filename... Would you mind sharing it? Thanks. René --- René Fournier www.renefournier.com -- PHP General Mailing List (http

[PHP] array_search() with preg_match?

2005-06-23 Thread René Fournier
I need to search an array for a string, with a twist. E.g.: $array = array(0 = 'this sky is blue', 1 = 'pencils are orange', 2 = 'I like green apples', 3 = 'strawberries are red'); $key = array_search('green', $array); With the above code, nothing will be returned, but I would like it to

[PHP] Accessing data posted from a different URL

2006-03-20 Thread René Fournier
I have a script that periodically sends an email that includes form post to a script, which is meant to do something with the posted data. My problem is that apparently some PHP security measure is not permitting the externally posted data to be access via $_POST. I assume this is due to

Re: [PHP] Accessing data posted from a different URL

2006-03-20 Thread René Fournier
Hmm, perhaps I didn't explain clearly. To put it another: 1. A script sends an email to a user with sign-in details. 2. The user clicks a [submit] button in the email message called Quick Sign In 3. A web browsers opens to http://www.website.com/signin.php (from the form method=post

Re: [PHP] Accessing data posted from a different URL

2006-03-20 Thread René Fournier
On 20-Mar-06, at 3:05 PM, Jay Blanchard wrote: [snip] Hmm, perhaps I didn't explain clearly. To put it another: 1. A script sends an email to a user with sign-in details. 2. The user clicks a [submit] button in the email message called Quick Sign In 3. A web browsers opens to

Re: [PHP] Accessing data posted from a different URL

2006-03-20 Thread René Fournier
On 20-Mar-06, at 4:40 PM, Richard Lynch wrote: On Mon, March 20, 2006 5:04 pm, René Fournier wrote: form method=POST target=SI action=http:// www.website.cominput type=hidden name=signindetails value=serialized and htmlentitized array values...input What does this value actually look like

[PHP] Multi-threaded port listener

2006-04-28 Thread René Fournier
Anyone find any good tutorials, code samples, etc. on such a thing? Basically, I want to write server (in PHP) that listeners on a particular port, and spins off a thread/process (essentially, execute a separate script) for each incoming connection. There won't be a lot of data to process,

[PHP] Possible?

2006-04-28 Thread René Fournier
Simple problem: Many client apps need to send data to a server. By default each client will open a persistent TCP socket connection to a common IP address:port (10.10.10.10:1234) and write to it (which the server will save/log, etc.). My question is, what should be ready to listen at the

Re: [PHP] Possible?

2006-04-28 Thread René Fournier
Anyway, I've started looking at this, but I'm not quite sure if it's even possible. I mean, can something send a request to Apache, and continue to write data along that TCP socket? Normally, HTTP requests include GET or POST for such data, but this is not a a web browser that's opening

[PHP] PHPMailer inserting unwanted spaces

2005-12-29 Thread René Fournier
Has anyone encountered this? I am composing an HTML email with PHPMailer, and for some reason PHPMailer is inserted spaces periodically, which breaks the formatting. I've looked through the docs, but can only find a setting for Word Wrap (which is set to 0). ...Rene -- PHP General Mailing

Re: [PHP] PHPMailer inserting unwanted spaces

2006-01-03 Thread René Fournier
Cheuk Hin wrote: Can You Write The Strings/Text? On 12/30/05, René Fournier [EMAIL PROTECTED] wrote: Has anyone encountered this? I am composing an HTML email with PHPMailer, and for some reason PHPMailer is inserted spaces periodically, which breaks the formatting. I've looked through the docs

[PHP] String format best practice

2005-03-29 Thread René Fournier
(23602210718), so maybe sprintf would be a direct way? ...Rene Best regards, René Fournier --- René Fournier GPS Police.NET 31, 1339 - 40th Ave NE Calgary, AB T2E 8N6 Canada Tel +1 (403) 250. Fax +1 (403) 291-2997 www.gpspolice.net -- PHP General Mailing List (http://www.php.net/) To unsubscribe

[PHP] Sprintf?

2005-03-29 Thread René Fournier
I need to go from 1754210747 (decimal) to 17 54 21 a7 47 (hex per character) Basically, reformat the string for each character, converting it to Hex, and spacing after each two characters. Sprintf? ...Rene -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] Re: Create MDB File

2005-03-31 Thread René Fournier
Coincidentally, I also need a way to read a table from MySQL and write it out to an .MDB file on-the-fly (from within a PHP script). The CSV export idea isn't an option in this case. Has anyone found a way to create an MDB file (with a single table) from PHP? ...Rene On 28-Mar-05, at 7:18 PM,

[PHP] Can this code go faster?

2005-04-26 Thread René Fournier
I've looked in the docs and don't see anything for this per se... I need to convert a binary number of arbitrary length to a signed integer. This is how I'm doing it now: CODE function bin2int ($bin) { if (substr($bin,0,1) == 1) { $val = 0 -

[PHP] PHP cli on Mac OSX

2003-07-30 Thread René Fournier
Hello, I installed Entropy package of PHP on my 10.2.6 OSX (http://www2.entropy.ch/download/Entropy-PHP-4.3.2-5.dmg), which states that it includes PHP command line. But when I go to Terminal and type PHP somescript.php4, it returns Command not found. What am I missing? ...Rene -- PHP

[PHP] Sockets tutorial problem in Mac OSX

2003-07-31 Thread René Fournier
Hello, I'm just getting my feet wet with a Dev Shed sockets tutorial (http://www.devshed.com/Server_Side/PHP/SocketProgramming/page5.html). I am having a little problem with one of the tutorial code samples, which should socket_write some text back to the client--except it's not doing that.

[PHP] Yet another socket question...

2003-07-31 Thread René Fournier
Is it normal for a socket server to output all the echo'd messages only after the socket terminates? According to the source code, I would think that during its execution any echo text; commands would output to Terminal, but in practice (at least under Mac OSX), it's only after the Socket

Re: [PHP] Yet another socket question...

2003-07-31 Thread René Fournier
On Thursday, July 31, 2003, at 02:45 PM, Chris Shiflett wrote: --- René_Fournier [EMAIL PROTECTED] wrote: Is it normal for a socket server to output all the echo'd messages only after the socket terminates? Can you explain what situation you're trying to describe? For example, echo does not

[PHP] The stupidest question of the month.

2003-07-17 Thread René Fournier
(Okay, now you're prepared...) I need to write a little program that opens and maintains a TCP socket connection to a server across the Internet. This little program would wait for messages from the server it's connected to, then record those messages and send a kinda of acknowledgment Got it.

[PHP] Socket programming with PHP risky?

2003-07-21 Thread René Fournier
I've noticed in the PHP docs EXPERIMENTAL is marked over all the socket functions. Would it be risky to develop a PHP socket app using those functions? It seems they could change with the next release and my app would instantly stop working. On the other hand, I've found a lot of tutorials

[PHP] str_replace() problem

2003-03-31 Thread René Fournier
I am performing a str_replace() on a large string, and everything works fine, except that two of the elements I'm searching for (and replacing) have the same first letters. To keep it the issue clear, here's a simple example of what I'm talking about: Blue Blueberry Now, if I use:

[PHP] Tricky sorting problem

2002-10-30 Thread René Fournier
($a,$b) { if (substr($a,-5,2) == substr($b,-5,2)) return 0; return (substr($a,-5,2) substr($b,-5,2)) ? -1 : 1 ; } usort($list,cmp); Any ideas? (Thanks.) ...Rene --- René Fournier, [EMAIL PROTECTED] Toll-free +1.888.886.2754 Tel +1.403.291.3601 Fax +1.403.250.5228 www.smartslitters.com

Re: [PHP] Tricky sorting problem

2002-10-30 Thread René Fournier
It works! Thanks. On Wednesday, October 30, 2002, at 10:50 AM, @ Edwin wrote: ...and the 2 should be 3 :) - E Marek Kilimajer [EMAIL PROTECTED] wrote: the -5 should be -7 René Fournier wrote: (Well, at least it's tricky for me... :-) I need to sort an array based on three numbers

[PHP] Is there an ISP that supports GD Library 2.0?

2002-10-31 Thread René Fournier
I'm going to need it for a site I'm working on Any suggestions are much appreciated. --- René Fournier, [EMAIL PROTECTED] Toll-free +1.888.886.2754 Tel +1.403.291.3601 Fax +1.403.250.5228 www.smartslitters.com SmartSlitters International #33, 1339 - 40th Ave NE Calgary AB T2E 8N6 Canada

[PHP] Removing duplicates in multi-dimensional array

2002-11-14 Thread René Fournier
] and $myarray[3][2] are the same--I would like to remove/unset one of them. I know that array_unique() will do this for one-dimensional arrays, but I'm kinda stuck here, since the repeating element is in the second dimension. Any ideas how I might do this? Thanks. ...Rene --- René Fournier, [EMAIL

[PHP] How to implode multi-dimensional arrays?

2002-11-14 Thread René Fournier
The docs don't seem to discuss this... Or maybe I'm looking in the wrong place. Anyway, I want to convert a multidimensional array back to the tab-delimited format it began as (\t separating fields, \n seperating records/rows)... Any ideas??? ...Rene --- René Fournier, [EMAIL PROTECTED

[PHP] Simple array question

2003-10-22 Thread René Fournier
Is there a simple way to return the key (name) of one element in an array? I looked up key() in the docs, but there are no examples or notes... Thanks. ...Rene -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Check mysq_field_type, display appropriate FORM element

2003-10-22 Thread René Fournier
Hello everyone, I'm upgrading my simple CMS app, and would like to add a [simple] function to itwhich I'm finding is no so simple (at least for me). To illustrate: The user clicks Edit on a particular table row. The CMS then fetches that row from the table and begins displaying the value of

[PHP] Tricky variable syntax...

2003-10-27 Thread René Fournier
I'm trying to refer to a variable using $$, but with a twist. So far, this works: echo 'temp file: '.$$fld.'br'; In this case, $fld equals img_photo (although it could be anything). The above statement could have thus been echo 'file name: '.$img_photo.'br'; with the same results. So here I

[PHP] Copying an uploaded file...

2003-10-29 Thread René Fournier
I'm trying to get a little upload script working... But I can't seem to copy the tmp file to my local web directory (btw, do I really need to specify the path, or can I just use a filename, and the file will be written to the same directory as the PHP script??). Anyway, here is the code:

Re: [PHP] Copying an uploaded file...

2003-10-29 Thread René Fournier
directory maybe be set elsewhere? (If so, how can that be done? I've looked at the httpd.conf file, but there is no entry for upload tmp directory.) Many thanks in advance. ...Rene On Wednesday, October 29, 2003, at 12:41 PM, John Nichel wrote: René Fournier wrote: I'm trying to get a little

Re: [PHP] Copying an uploaded file...

2003-10-29 Thread René Fournier
directory maybe be set elsewhere? (If so, how can that be done? I've looked at the httpd.conf file, but there is no entry for upload tmp directory.) Many thanks in advance. ...Rene On Wednesday, October 29, 2003, at 12:41 PM, John Nichel wrote: René Fournier wrote: I'm trying to get a little

Re: [PHP] Copying an uploaded file...

2003-10-29 Thread René Fournier
I've added a path, but still no success On Wednesday, October 29, 2003, at 05:11 PM, John Nichel wrote: René Fournier wrote: Thanks John. I've simplified and improved the quote per your suggestions, but still no dice. (I'[m running OS X 10.2.8.) Here is the code: // MOVE FILE

Re: [PHP] Copying an uploaded file...

2003-10-30 Thread René Fournier
Ah, man, I just found my problem, and do I ever feel stupid... Thought I'd share it to highlight the it's right in front of one's nose feeling: copy($_FILES['userfile']['tmp_name']... ...was a sample code snippet. I had just copied and pasted it without changing the userfile partand since

[PHP] mysql_field_type() ...

2003-11-03 Thread René Fournier
...will say if a field is of type ENUM, but not its possible values (including default). Does anyone know how I can fetch possible values of a field type of ENUM? Thanks. ...Rene -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Sweet PHP backup / dump function for MySQL database

2003-11-04 Thread René Fournier
Right now, I'm using phpMyAdmin to periodically backup/dump a client MySQL database to a textfile (from which one can simply restore the database if it ever got corrupted). I'm also working on a super-simple CMS for the client to use themselves. I would like the client to also be able to

[PHP] GD question

2003-11-16 Thread René Fournier
I want to write a function the creates a new image composited from a 3x3 tile. The idea is that the center tile will be a photo, and the surrounding eight images will constitute a border and shadow to the composited image. So... The eight border/shadow images will always be the same, but the

[PHP] Problems with imagejpeg

2003-12-27 Thread René Fournier
I have a function that [is meant to] check if an image is greater than a certain width and height, and if it is, downsample it. The checking part works fine. Downsampling is happening though. Here's what I've got ($file = /somedirectory/photo.jpg): $src_img=imagecreatefromJPEG($file);

[PHP] HELP! -- Problem with imagejpeg()

2003-12-27 Thread René Fournier
Hello, I have a function that is meant to check if an image is greater than a certain width and height, and if it is, downsample it. The checking part works fine. Downsampling is not happening though. Here's what I've got (btw, $file = /somedirectory/photo.jpg):

[PHP] regular expressions

2004-04-09 Thread René Fournier
I'm trying to 'clean up' some text that is extracted from a web directory, and I need to use (I think) preg_replace or ereg_replace, etc. I've read a bunch of tutorials, but none of them seem to cover the particular thing I want to do. Here's an example of text I need to process: -

[PHP] Socket client application

2004-04-13 Thread René Fournier
Hi, I've gone through several good PHP sockets tutorials, but all of them seem to focused on making socket servers. What I actually need to do is write a socket client. There's an app runnning on a distant server that accepts incoming TCP connections at such-and-such an IP address and port,

[PHP] Socket Server problem

2004-04-15 Thread René Fournier
I'm working through Ori Staub's excellent Socket Server tutorial (http://www.zend.com/zend/tut/tutorial-staub3.php), but can't get the sample server working. I've read the user comments and fixed a couple things, but still, no dice. Here's the error I receive: [Valhalla:~/Sites/test] rene%

[PHP] Socket server with multiple connections

2004-04-23 Thread René Fournier
I've gone through a few good socket client and server tutorials (such as http://www.devshed.com/c/a/PHP/Socket-Programming-With-PHP/), and have got the samples working. What I'm trying to do now is write a simple Socket Server that will accept multiple connections, do its thing, and keep

[PHP] Constant questions

2004-05-12 Thread René Fournier
Hi, I have two questions involving Constants. 1. I want to refer to a refer to a Constant by its value (which is unique), and return its name. E.g.,: define (SEND_DS,1); define (SEND_DS_ACK,2); define (RESEND_DS,3); define (STARTUP_DS,12); For example, if I

  1   2   >