[PHP] Re: Problem with functions
Whenever I have had similar errors, it usually was a syntax error in or before the function code. Just a thought. Jeff "Beauford.2002" <[EMAIL PROTECTED]> wrote in message 003601c2a840$41278ec0$6401a8c0@p1">news:003601c2a840$41278ec0$6401a8c0@p1... > Hi, > > I keep getting errors in my script that says 'x' function is undefined or > 'y' function is undefined. I defined it as 'function test ($a, $b)' and call > it using 'test($a, $b)' From my knowledge this is correct, but it just > simply doesn't work. > > Anyone have any ideas on this? > > TIA > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Is there any method to filter the single quote from astring?
On Saturday 21 December 2002 15:02, Justin French wrote: > If you're adding stuff to a database, and getting an error, use > addslashes(), then on the way out of the database, you need to > stripslashes(). Easy. This seems to be a common misconception (yes, I did it too when I first started out) -- you don't stripslashes() when retrieving the data. The slashes that were added with addslashes() are _not_ stored when the data is inserted. -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * /* Most legends have their basis in facts. -- Kirk, "And The Children Shall Lead", stardate 5029.5 */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: real time output
"Art Chevalier" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > I want to start a native process and capture the output while it is being > generated and display it to the screen. I dont want to output to be > displayed on the screen all at once after the process completes. http://www.php.net/manual/en/ref.outcontrol.php However note the section in flush() that says, "Note: flush() has no effect on the buffering scheme of your webserver or the browser on the client side. Several servers, especially on Win32, will still buffer the output from your script until it terminates before transmitting the results to the browser." This was my issue with using this capability of PHP...it didn't seem to work, like Perl's "$| = 1;" did on the same server (Unix Apache). The server's config has the output_buffering INI setting set to "no value". Seems odd since I got the Perl script to not buffer, which would imply it's not a browser issue. - Steve Yates - A fool and his money are soon popular. ~ Taglines by Taglinator - www.srtware.com ~ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Disable session cookies
I'm guessing then that it's possible to use only server side sessions and use trans_id then if you need to store values throughout a site? Ed On Fri, 20 Dec 2002, John W. Holmes wrote: > > Is there any way to disable using cookies in sessions? I haven't found > a > > good > > reason to do this, only my boss's predisposition against cookies ;). > > Yep, session.use_cookies setting in php.ini. Set it to zero to not use > cookies. > > ---John W. Holmes... > > PHP Architect - A monthly magazine for PHP Professionals. Get your copy > today. http://www.phparch.com/ > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] session life
Hi I'm setting a session with session_set_cookie_params (time()+648); so the cookie should last 70 days+ but the data wasn't returned. from looking in the manual i see that session_cache_expire is used to set or print the current value of the expire. Its set in php.ini by default to 180 minutes. So it seems that the garbage collector will clean up the session file after 180 mins or 10800 seconds which is less then i was expecting after setting the cookie life. do i need to set session_set_cookie_params (time()+648); session_cache_expire (648); for the data to still be available if the user returns during the cookies life and is this on a per session basis. Paul Roberts [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
php-general Digest 21 Dec 2002 14:19:20 -0000 Issue 1776
php-general Digest 21 Dec 2002 14:19:20 - Issue 1776 Topics (messages 129044 through 129056): Re: the numeric key of an array??? 129044 by: Alexander Guevara 129045 by: John W. Holmes 129046 by: Alexander Guevara Re: Is there any method to filter the single quote from astring? 129047 by: Alexander Guevara 129050 by: Justin French 129051 by: Philip Olson 129053 by: Jason Wong running perl script via su 129048 by: Larry Brown table trouble 129049 by: Didier McGillis Re: Problem with functions 129052 by: Jeff Re: real time output 129054 by: Steve Yates Re: Disable session cookies 129055 by: ed.home.homes2see.com session life 129056 by: Paul Roberts Administrivia: To subscribe to the digest, e-mail: [EMAIL PROTECTED] To unsubscribe from the digest, e-mail: [EMAIL PROTECTED] To post to the list, e-mail: [EMAIL PROTECTED] -- --- Begin Message --- Yeah this workes fine.. thanks!! "Philip Olson" <[EMAIL PROTECTED]> wrote in message Pine.BSF.4.10.10212210135051.36987-10@localhost">news:Pine.BSF.4.10.10212210135051.36987-10@localhost... > > No, but you can do this: > > $arr2 = array_values($array); > > print $arr2[0]; // VALUE1 > > Regards, > Philip Olson > > > On Fri, 20 Dec 2002, Alexander Guevara wrote: > > > How can i do for printing the value of an array given the numeric key for > > example i have this code: > > > > $array = array ( > > 'VAL1' => "VALUE1", > > 'VAL2' => "VALUE2", > > 'VAL3' => "VALUE3" > > ) > > > > So the only way i have found to print the value is like this : > > echo $array['VAL1']; > > > > and it prints = VALUE1 but i want to know if its possible to do it something > > like this: > > echo $array[0]; > > i mean give the numeric key for printing VALUE1 so instead the string key > > (VAL1) use the numerc (0) > > > > Thanks in advance! > > > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > > --- End Message --- --- Begin Message --- > > If you're looking to loop through your array, there are other methods. > Well which kind of methods are you talking about?? could you tell me some > for do it?? foreach($array as $key=>$value) www.php.net/foreach while(list($key,$value) = each($array) www.php.net/each www.php.net/list $cnt = count($array); for($x=0;$x<$cnt;$x++) www.php.net/count ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/ --- End Message --- --- Begin Message --- Thanks. it worked fine.. and the reply at the botton too.. Thank you so much! "John W. Holmes" <[EMAIL PROTECTED]> wrote in message 000101c2a896$70aad5c0$7c02a8c0@coconut">news:000101c2a896$70aad5c0$7c02a8c0@coconut... > > > If you're looking to loop through your array, there are other > methods. > > > Well which kind of methods are you talking about?? could you tell me > some > > for do it?? > > foreach($array as $key=>$value) > > www.php.net/foreach > > while(list($key,$value) = each($array) > > www.php.net/each > www.php.net/list > > $cnt = count($array); > for($x=0;$x<$cnt;$x++) > > www.php.net/count > > ---John W. Holmes... > > PHP Architect - A monthly magazine for PHP Professionals. Get your copy > today. http://www.phparch.com/ > > --- End Message --- --- Begin Message --- It works.. but when you retrieve the data from the database to a text box it doesnt appear if it has the single quote ('), o tought it was cause i have the stripslashes but i delete stripslashes and it still doesnt appear in the text box! "Justin French" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... don't filter the quotes... escape them with add_slashes() justin on 20/12/02 10:50 PM, ªüYam ([EMAIL PROTECTED]) wrote: > as title that I'm getting a trouble on filtering the single quote ' , since > there would be error when storing those string into MySQL, thus, i have to > find the appropriate method to solve it, anybody can help please? > thx a lot > > --- End Message --- --- Begin Message --- on 21/12/02 2:00 PM, Alexander Guevara ([EMAIL PROTECTED]) wrote: > It works.. but when you retrieve the data from the database to a text box it > doesnt appear if it has the single quote ('), o tought it was cause i have > the stripslashes but i delete stripslashes and it still doesnt appear in the > text box! Huh? I can't really understand what you're saying. If you're adding stuff to a database, and getting an error, use addslashes(), then on the way out of the database, you need to stripslashes(). Easy. If you don't get any errors, then magic quotes is probably enabled in your php.ini file. Justin > "Justin French" <[EMAIL PROTECTED]> wrote in message > [EMAIL PROTECTED]">news:[EMAIL PROTEC
Re: [PHP] Is there any method to filter the single quote fromastring?
WEll for example i got this: In a field called name i write a name with single quotes for example 'Alex' and click submit... in the verify.php i store the data i filled in the form.php that contains name, surnmane,etcetc... so when i save my data to the db i use the addslashes($name) in this case... and the i look up the database and i see that the valeu oin my db for name is like i wrote it in this cas 'Alex'.. that's perfect.. but when i try to retrieve the user data in another page for example change_user.php i want to retrive the user name and show it in a text box but it doesnt show up.. and i have this code: where userName i retrieved from the data base with a simple query.. so tell me what is wrong there!...Thanks! "Justin French" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... on 21/12/02 2:00 PM, Alexander Guevara ([EMAIL PROTECTED]) wrote: > It works.. but when you retrieve the data from the database to a text box it > doesnt appear if it has the single quote ('), o tought it was cause i have > the stripslashes but i delete stripslashes and it still doesnt appear in the > text box! Huh? I can't really understand what you're saying. If you're adding stuff to a database, and getting an error, use addslashes(), then on the way out of the database, you need to stripslashes(). Easy. If you don't get any errors, then magic quotes is probably enabled in your php.ini file. Justin > "Justin French" <[EMAIL PROTECTED]> wrote in message > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > don't filter the quotes... escape them with add_slashes() > > justin > > on 20/12/02 10:50 PM, ªüYam ([EMAIL PROTECTED]) wrote: > >> as title that I'm getting a trouble on filtering the single quote ' , > since >> there would be error when storing those string into MySQL, thus, i have to >> find the appropriate method to solve it, anybody can help please? >> thx a lot >> >> > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] session life
> I'm setting a session with > session_set_cookie_params (time()+648); > so the cookie should last 70 days+ but the data wasn't > returned. > > from looking in the manual i see that session_cache_expire is used to set > or print the current value of the expire. Its set in php.ini by default to > 180 minutes. > > So it seems that the garbage collector will clean up the session file > after 180 mins or 10800 seconds which is less then i was expecting after > setting the cookie life. > > do i need to set > > session_set_cookie_params (time()+648); > session_cache_expire (648); > > for the data to still be available if the user returns during the cookies > life and is this on a per session basis. Well, first of all, session cookies are deleted when the user closes their browser. So unless the user is leaving the browser open for 70 days, this setting won't matter. session.gc_lifetime is the setting that controls the garbage cleanup. If the session is inactive past that time limit, then the session file will be deleted. Sessions aren't meant to be a "remember me" function. You'll need to use regular cookies that persist after the browser is closed for that. ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Is there any method to filter the single quote fromastring?
> WEll for example i got this: > In a field called name i write a name with single quotes for example > 'Alex' > and click submit... in the verify.php i store the data i filled in the > form.php that contains name, surnmane,etcetc... > > so when i save my data to the db i use the addslashes($name) in this > case... > and the i look up the database and i see that the valeu oin my db for name > is like i wrote it in this cas 'Alex'.. that's perfect.. but when i try to > retrieve the user data in another page for example change_user.php i want > to > retrive the user name and show it in a text box but it doesnt show up.. > and > i have this code: > > I thought this was already covered today? First, you don't need stripslashes() on the data when you pull it from the database unless you have magic_quotes_runtime enabled. Second, slashes mean nothing in HTML. It doesn't recognize them as escape characters. The reason your data isn't appearing is because it's coming out with a value like value=''Alex'', which HTML sees as a value of '' and ignores the rest of the data and an unrecognized attribute. Finally, what you need to do is use htmlentities() or htmlspecialchars() on $userName before you place it between the quotes. This will give you a value of value='"e;Alex"e;', which will display correctly with HTML. ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Disable session cookies
> I'm guessing then that it's possible to use only server side sessions > and use trans_id then if you need to store values throughout a site? Well, session are always server side, but, yes, basically. PHP must be compiled correctly so you can enable trans_sid. ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Adding to Apache access log from PHP
Hi folks, I would like to add a few fields to a custom Apache access log format and populate the values from mod_php. As a mechanism, I was thinking of using the PHP function putenv( ) to set environmental variables. I am assuming that these would be in the same request namespace used by Apache? Then in Apache, I would use the mod_log_config directive documented as: "%...{FOOBAR}e: The contents of the environment variable FOOBAR" to place the value of the variables in the log string. Is this a sensible approach? I only have a live server to test on, so I'd like to be sure I am on the right track b -- Geoff Caplan Advantae Ltd mailto:[EMAIL PROTECTED] http://www.advantae.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] pspell and html tags
Hello, I am looking for a way to tell pspell_check() to ignore html tags, I tried adding a few html tags using pspell_add_to_session() but it said it won't accept words starting with "<"... Any idea? Thanks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Is there any method to filter the single quote fromastring?
Thanks.. i solved it but not with that solution.. ill give a try with it.. the way i solved was using ereg_replace before storing in the db and chnging the ' and " with the html characters as you mention with htmlentities() Thank you all for the responsees!. "John W. Holmes" <[EMAIL PROTECTED]> wrote in message 000101c2a903$4672cd40$7c02a8c0@coconut">news:000101c2a903$4672cd40$7c02a8c0@coconut... > > WEll for example i got this: > > In a field called name i write a name with single quotes for example > > 'Alex' > > and click submit... in the verify.php i store the data i filled in the > > form.php that contains name, surnmane,etcetc... > > > > so when i save my data to the db i use the addslashes($name) in this > > case... > > and the i look up the database and i see that the valeu oin my db for > name > > is like i wrote it in this cas 'Alex'.. that's perfect.. but when i > try to > > retrieve the user data in another page for example change_user.php i > want > > to > > retrive the user name and show it in a text box but it doesnt show > up.. > > and > > i have this code: > > > > > > I thought this was already covered today? First, you don't need > stripslashes() on the data when you pull it from the database unless you > have magic_quotes_runtime enabled. Second, slashes mean nothing in HTML. > It doesn't recognize them as escape characters. The reason your data > isn't appearing is because it's coming out with a value like > value=''Alex'', which HTML sees as a value of '' and ignores the rest of > the data and an unrecognized attribute. > > Finally, what you need to do is use htmlentities() or htmlspecialchars() > on $userName before you place it between the quotes. This will give you > a value of value='"e;Alex"e;', which will display correctly with > HTML. > > ---John W. Holmes... > > PHP Architect - A monthly magazine for PHP Professionals. Get your copy > today. http://www.phparch.com/ > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] pspell and html tags
Hello, I am looking for a way to tell pspell_check() to ignore html tags, I tried adding a few html tags using pspell_add_to_session() but it said it won't accept words starting with "<"... Any ideas? Thanks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] running perl script via su
I am getting a lot of information about running the web server as root and the associated problems and so on as I've been looking for a quick solution. I have a perl script that is run by cron that executes sequence of events via sftp. The sftp client has no option that I know of to denote a different user than the one executing the command using rsa so I set up a user with the same name as the user needed to log into the remote server and run it under cron for that user. I want to place a simple button on my web site that executes that script but it has to be run by that user. Since there will be no interface on the site for which commands can be sent using this page I'm not too worried about any kind of exploit. I also don't want to have to go through the process of installing and learning the methods of use for apache suExec. I also don't want the entire web server running as this user. Does anyone know of a quick and dirty solution for this Larry S. Brown Dimension Networks, Inc. (727) 723-8388 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Sorry
Hey there, Sorry for sending my question twice, I got a strange error saying: Sorry. Your message could not be delivered to: php-list,emc (The name was not found at the remote site. Check that the name has been entered correctly.) -- So I assumed it didn't make it (so I registered to the list and tried again...) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] No tshowing url in title bar....
Dont know if this concerns to php genral.. but i want to know how can i do for preventing showing the url in the title bar of the browser.. for example i click a link that goes to a php page called verify.php and in the windows browser title bar is show this.. http://www.server.com/verify.php It is posssible to not show the url.. i mena show a title i dont know. Thanks! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] No tshowing url in title bar....
Before the tag you have the tags. Place Title of the page and it will show up on the title bar instead of the url. If you want to get rid of the address bar of the browser window, let me know and I can post the javascript for creating that window. Larry S. Brown Dimension Networks, Inc. (727) 723-8388 -Original Message- From: Alexander Guevara [mailto:[EMAIL PROTECTED]] Sent: Saturday, December 21, 2002 12:54 PM To: [EMAIL PROTECTED] Subject: [PHP] No tshowing url in title bar Dont know if this concerns to php genral.. but i want to know how can i do for preventing showing the url in the title bar of the browser.. for example i click a link that goes to a php page called verify.php and in the windows browser title bar is show this.. http://www.server.com/verify.php It is posssible to not show the url.. i mena show a title i dont know. Thanks! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Problem with the List?
Are my posts getting through? They appear to come back on the list but I also get this response... Sorry. Your message could not be delivered to: php-list,emc (The name was not found at the remote site. Check that the name has been entered correctly.) Larry S. Brown Dimension Networks, Inc. (727) 723-8388 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] session life
On Sat, 2002-12-21 at 08:03, John W. Holmes wrote: > > I'm setting a session with > > session_set_cookie_params (time()+648); > > so the cookie should last 70 days+ but the data wasn't > > returned. > > > > from looking in the manual i see that session_cache_expire is used to > set > > or print the current value of the expire. Its set in php.ini by > default to > > 180 minutes. > > > > So it seems that the garbage collector will clean up the session file > > after 180 mins or 10800 seconds which is less then i was expecting > after > > setting the cookie life. > > > > do i need to set > > > > session_set_cookie_params (time()+648); > > session_cache_expire (648); > > > > for the data to still be available if the user returns during the > cookies > > life and is this on a per session basis. > > Well, first of all, session cookies are deleted when the user closes > their browser. So unless the user is leaving the browser open for 70 > days, this setting won't matter. This is incorrect, by default session cookies have a lifetime of 0 which means they are peresistent until the browser is closed. If you set the ini directive session.cookie_lifetime to something other than 0, for example 86400 then the session will for the number of seconds specified, in this case 1 day, even after the browser has been closed. > > session.gc_lifetime is the setting that controls the garbage cleanup. If > the session is inactive past that time limit, then the session file will > be deleted. > > Sessions aren't meant to be a "remember me" function. You'll need to use > regular cookies that persist after the browser is closed for that. > > ---John W. Holmes... > > PHP Architect - A monthly magazine for PHP Professionals. Get your copy > today. http://www.phparch.com/ > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] No tshowing url in title bar....
ill try it.. about the address bar icoulc be very cool for doing it! "Larry Brown" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Before the tag you have the tags. Place Title > of the page and it will show up on the title bar instead of the url. > If you want to get rid of the address bar of the browser window, let me know > and I can post the javascript for creating that window. > > Larry S. Brown > Dimension Networks, Inc. > (727) 723-8388 > > -Original Message- > From: Alexander Guevara [mailto:[EMAIL PROTECTED]] > Sent: Saturday, December 21, 2002 12:54 PM > To: [EMAIL PROTECTED] > Subject: [PHP] No tshowing url in title bar > > Dont know if this concerns to php genral.. but i want to know how can i do > for preventing showing the url in the title bar of the browser.. for example > i click a link that goes to a php page called verify.php and in the windows > browser title bar is show this.. http://www.server.com/verify.php > > It is posssible to not show the url.. i mena show a title i dont know. > > Thanks! > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] \Z characters
I've got a bunch of fields in a mysql database that have a \Z character in them. I want to search a field for \Z and if it contains that character, make the field blank. In running php 4.x on RH 8.0 Here is the code: $connection = db_connect("Could not connect DB"); $SQL="SELECT id,PVLN from lhpl_side WHERE PVLN =\"\\Z\" "; $result= mysql_query($SQL,$connection) or die (mysql_error()); $num = mysql_numrows($result); This query returns 0 rows. (no error messages either) But when I execute the query: SELECT id,PVLN from lhpl_side WHERE PVLN ="\Z"; from the mysql command prompt it works properly. (returns a 172 rows) I realize that I need to do an update to change the value in field. However, right now I just need to get a query that works to the db. Anyone got any ideas? :) Dave -- "...Unix, MS-DOS and Windows NT (also known as the Good, the Bad, and the Ugly)" OSIS Dave J. Hala Jr. 641.485.1606 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: \Z characters
$connection = db_connect("Could not connect DB"); $SQL="SELECT id,PVLN from lhpl_side WHERE PVLN =\"\\Z\" "; $result= mysql_query($SQL,$connection) or die (mysql_error()); $num = mysql_numrows($result); Not too sure on this, but it might solve the problem. Use single quotes instead... $connection = db_connect("Could not connect DB"); $SQL="SELECT id,PVLN from lhpl_side WHERE PVLN ='\Z'"; $result= mysql_query($SQL,$connection) or die (mysql_error()); $num = mysql_numrows($result); -- Kyle Gibson admin(at)frozenonline.com http://www.frozenonline.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Problem with the List?
Are my posts getting through? They appear to come back on the list but I also get this response... I see them, so I suppose the list has received them. I got that same error yesterday. Hmmm. :\ -- Kyle Gibson admin(at)frozenonline.com http://www.frozenonline.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Sessions on a shared server
Hi, I've finally got a host and I want to transfer my existing website - I have managed to copy and upload my database (wow that was easy.. had been dreading it) but now I'm worried that my sessions aren't going to work correctly, as I'm sure there are probably other users with "userID" variables being set and things like that - with it being a shared server, it's obviously a little different to a dedicated one. Would it be enough to simply set a variable like "mysiteidentifier" and only bother checking for other session variables if that's set? Or, do I need to override the server's session variables each time I start sessions in every page that uses them? I imagine the former would mean that other sites would be able to potentially get my session variables, which isn't great. Probably very simple, so sorry if it's incredibly dull! Thanks, -- Beth Gore http://bethanoia.dyndns.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Mass Mailing
An upcoming project I'm working and spec'ing out is a mass mailing application. Initially, I was looking at Mailman which was written in Python since it looks like it handles delivering emails efficiently without killing the server. We have 1 client able to send 110,000 emails at 6.5K avg per week on PIII 800 with 128 MB RAM using Mailman. The inteface however is very bad and we'd like to develop other features like text ads, tracking, templates, etc. This would require writing a wrapper around Mailman in PHP. I was considering of writing the mass mailing application in PHP instead though. If anyone has eperience writing such applications with this amount of emails, I'd like to know what you've done. I'm thinking of coding the front end in PHP that will put the email into a queue table that will force a command line PHP script listening on a particular port to scan the database for this new task in queue. Once it picks up the task, the timeout for this application to run will be set to infinite. It'll establish a SMTP socket either to a really beefed up mailing list server or the localhost SMTP server to begin blasting out these emails. >From what I understand, it's better to blast emails via an open socket connection to SMTP rather than looping through Sendmail. Is this the right thing todo? I've also heard that PHP is not good for writing mailing lists application, but Mailman is written in Python and it's able to send thousands of email just fine. Any thoughts on this? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Loading modules not compiled in php
Hello gang, I have a site hosted at JTL Networks, and I'm looking into setting up a spell checker for my message boards. The problem is, JTL doesn't have pspell compiled in with their php build, and it may be some time before they do (if they ever do). Does anyone know of a way to include something like pspell support in php dynamically? Like by using a .htaccess file to call it or something? -- By-Tor.com It's all about the Rush http://www.by-tor.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Mass Mailing
I have written a few useful php functions that put the email addresses on one file and the message on another file. I have a crontabbed script that runs every min looking for these files and then using qmail-inject to send them (sendmail is bad, replace it ;)) It's very good for sending a few thousands emails every time as the php script execution finishes in a second and you don't have to deal with max execution time and everything. If you wish I could send you the scripts. At 05:10 PM 12/21/2002 -0500, you wrote: An upcoming project I'm working and spec'ing out is a mass mailing application. Initially, I was looking at Mailman which was written in Python since it looks like it handles delivering emails efficiently without killing the server. We have 1 client able to send 110,000 emails at 6.5K avg per week on PIII 800 with 128 MB RAM using Mailman. The inteface however is very bad and we'd like to develop other features like text ads, tracking, templates, etc. This would require writing a wrapper around Mailman in PHP. I was considering of writing the mass mailing application in PHP instead though. If anyone has eperience writing such applications with this amount of emails, I'd like to know what you've done. I'm thinking of coding the front end in PHP that will put the email into a queue table that will force a command line PHP script listening on a particular port to scan the database for this new task in queue. Once it picks up the task, the timeout for this application to run will be set to infinite. It'll establish a SMTP socket either to a really beefed up mailing list server or the localhost SMTP server to begin blasting out these emails. From what I understand, it's better to blast emails via an open socket connection to SMTP rather than looping through Sendmail. Is this the right thing todo? I've also heard that PHP is not good for writing mailing lists application, but Mailman is written in Python and it's able to send thousands of email just fine. Any thoughts on this? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Regards Gil Disatnik UNIX system/security administrator. GibsonLP@EFnet http://www.disatnik.com _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_ "Windows NT has detected mouse movement, you MUST restart your computer before the new settings will take effect, [ OK ]" Windows is a 32 bit patch to a 16 bit GUI based on a 8 bit operating system, written for a 4 bit processor by a 2 bit company which can not stand 1 bit of competition. -_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] text parser
Uros Gruber wrote: Hi! I wan't to know if there is any goor text parser around here written in php. I'm asking before i create my own. I would like extract some text msgs to words and i would also like take care of stop words, special characters etc... So to know if some word is regular word, or if is number, html tag, html entry. it's not php but check out http://betsie.sourceforge.net/ written in Perl - the regular expressions may be portable to php -- Sean -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Mass Mailing
Yea, I'd like to see that. How many people are on your lists if you don't mind me asking? I also came across this evening, http://phpmailer.sourceforge.net and http://www.octeth.com/index.php uses this class on it's backend, claiming that it is able to send 500,00 on a AMD Duron 900 with 512MB RAM in 10 hours. The phpmailer class says that directly conneting to mail() is better than using SMTP as it puts more of an overhead. Though I was looking at Perl packages such BulkMail that uses SMTP was able to send out 100,000 emails. Everyone says that PHP's mail() causes several Sendmail instances to fork off which is ineffcient. -Original Message- From: Gil Disatnik [mailto:[EMAIL PROTECTED]] Sent: Saturday, December 21, 2002 6:46 PM To: Jonathan Chum Cc: [EMAIL PROTECTED] Subject: Re: [PHP] Mass Mailing I have written a few useful php functions that put the email addresses on one file and the message on another file. I have a crontabbed script that runs every min looking for these files and then using qmail-inject to send them (sendmail is bad, replace it ;)) It's very good for sending a few thousands emails every time as the php script execution finishes in a second and you don't have to deal with max execution time and everything. If you wish I could send you the scripts. At 05:10 PM 12/21/2002 -0500, you wrote: >An upcoming project I'm working and spec'ing out is a mass mailing >application. Initially, I was looking at Mailman which was written in Python >since it looks like it handles delivering emails efficiently without killing >the server. We have 1 client able to send 110,000 emails at 6.5K avg per >week on PIII 800 with 128 MB RAM using Mailman. The inteface however is very >bad and we'd like to develop other features like text ads, tracking, >templates, etc. This would require writing a wrapper around Mailman in PHP. >I was considering of writing the mass mailing application in PHP instead >though. > >If anyone has eperience writing such applications with this amount of >emails, I'd like to know what you've done. > >I'm thinking of coding the front end in PHP that will put the email into a >queue table that will force a command line PHP script listening on a >particular port to scan the database for this new task in queue. Once it >picks up the task, the timeout for this application to run will be set to >infinite. It'll establish a SMTP socket either to a really beefed up mailing >list server or the localhost SMTP server to begin blasting out these emails. > > From what I understand, it's better to blast emails via an open socket >connection to SMTP rather than looping through Sendmail. Is this the right >thing todo? > >I've also heard that PHP is not good for writing mailing lists application, >but Mailman is written in Python and it's able to send thousands of email >just fine. Any thoughts on this? > > > >-- >PHP General Mailing List (http://www.php.net/) >To unsubscribe, visit: http://www.php.net/unsub.php Regards Gil Disatnik UNIX system/security administrator. GibsonLP@EFnet http://www.disatnik.com _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_ "Windows NT has detected mouse movement, you MUST restart your computer before the new settings will take effect, [ OK ]" Windows is a 32 bit patch to a 16 bit GUI based on a 8 bit operating system, written for a 4 bit processor by a 2 bit company which can not stand 1 bit of competition. -_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] tool to organize & design a project?
dear list, I've noticed that the longer i work on a project, the more i use my 'organic' way of adding features and filter, and the less i understand what my own code is doing. Now I do have some projects of, say, 5000 lines and i started very organized with flow diagrams and function descriptions and shit, but during the project i still managed to sneak in all sorts of unintended mess. So I am looking for some thing that may help me develop, but will not cost me more time than it gives back. For instance i tried some flow diagram tools and it is just not worth it - the original scrible i make of it on paper is just as helpful. I was thinking of some sort of function list, where i describe the functions in a detailed way, including input and output of course. It should work with classes and object descriptions too, and lists of globals. Does any such tool exist? thanks, Chris PS apologies if this question is often asked, i just joined the list again. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Mass Mailing
Why not just use simple alias files? 1) You have a file with all your addresses file.asc: [EMAIL PROTECTED] [EMAIL PROTECTED] etc 2) You have the alias entry my-mass-list::include:/path/to/file.asc 3) PHP sends one email to [EMAIL PROTECTED] 4) The mail server (if it's any good), expands all the addresses from file.asc and does the mass mailing... Problem sorted? The alias file (included) can easily be managed with PHP. With a little tweaking, you can even include a script directly via the alias file by using a | (pipe). The script can go as far as to even get the list of email addresses from a MySQL DB or something... You can do the script in just about anything you want... Sh, Perl, PHP, Python, Java... Doesn't really make a difference. A pipe will actually give you better security, as you can verify the email before actually sending out 100,000 odd copies of it. Here, you can sign the message with a PGP key via PHP for example. If the key's do not match, the script doesn't send the email (And obviously, you remove the key from the email before sending it out from the piped script) Anyways, that's how I would do it if I couldn't use mailman for whatever reason. IMHO, keeping as much of the mail on a mail server will drastically improove the performance, because a mail server is made to process/send/receive email, PHP is not ;-) -- me - Original Message - From: "Jonathan Chum" <[EMAIL PROTECTED]> To: "'Gil Disatnik'" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Sunday, December 22, 2002 2:03 AM Subject: RE: [PHP] Mass Mailing > Yea, I'd like to see that. How many people are on your lists if you > don't mind me asking? > > I also came across this evening, http://phpmailer.sourceforge.net and > http://www.octeth.com/index.php uses this class on it's backend, > claiming that it is able to send 500,00 on a AMD Duron 900 with 512MB > RAM in 10 hours. > > The phpmailer class says that directly conneting to mail() is better > than using SMTP as it puts more of an overhead. Though I was looking at > Perl packages such BulkMail that uses SMTP was able to send out 100,000 > emails. > > Everyone says that PHP's mail() causes several Sendmail instances to > fork off which is ineffcient. > > -Original Message- > From: Gil Disatnik [mailto:[EMAIL PROTECTED]] > Sent: Saturday, December 21, 2002 6:46 PM > To: Jonathan Chum > Cc: [EMAIL PROTECTED] > Subject: Re: [PHP] Mass Mailing > > I have written a few useful php functions that put the email addresses > on > one file and the message on another file. > I have a crontabbed script that runs every min looking for these files > and > then using qmail-inject to send them (sendmail is bad, replace it ;)) > It's very good for sending a few thousands emails every time as the php > script execution finishes in a second and you don't have to deal with > max > execution time and everything. > > If you wish I could send you the scripts. > > At 05:10 PM 12/21/2002 -0500, you wrote: > >An upcoming project I'm working and spec'ing out is a mass mailing > >application. Initially, I was looking at Mailman which was written in > Python > >since it looks like it handles delivering emails efficiently without > killing > >the server. We have 1 client able to send 110,000 emails at 6.5K avg > per > >week on PIII 800 with 128 MB RAM using Mailman. The inteface however is > very > >bad and we'd like to develop other features like text ads, tracking, > >templates, etc. This would require writing a wrapper around Mailman in > PHP. > >I was considering of writing the mass mailing application in PHP > instead > >though. > > > >If anyone has eperience writing such applications with this amount of > >emails, I'd like to know what you've done. > > > >I'm thinking of coding the front end in PHP that will put the email > into a > >queue table that will force a command line PHP script listening on a > >particular port to scan the database for this new task in queue. Once > it > >picks up the task, the timeout for this application to run will be set > to > >infinite. It'll establish a SMTP socket either to a really beefed up > mailing > >list server or the localhost SMTP server to begin blasting out these > emails. > > > > From what I understand, it's better to blast emails via an open socket > >connection to SMTP rather than looping through Sendmail. Is this the > right > >thing todo? > > > >I've also heard that PHP is not good for writing mailing lists > application, > >but Mailman is written in Python and it's able to send thousands of > email > >just fine. Any thoughts on this? > > > > > > > >-- > >PHP General Mailing List (http://www.php.net/) > >To unsubscribe, visit: http://www.php.net/unsub.php > > > Regards > > Gil Disatnik > UNIX system/security administrator. > > GibsonLP@EFnet > http://www.disatnik.com > _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_ > "Windows NT has detected mouse movement, you MUST restart > your compu
RE: [PHP] Mass Mailing
In almost all cases the number of mail messages/time unit sent is a function of bandwidth, not CPU; my Pentium II 250Mhz machine saturates a 768K SDSL line no problem at all. Mark C. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Loading modules not compiled in php
>I have a site hosted at JTL Networks, and I'm looking into setting up > a spell checker for my message boards. The problem is, JTL doesn't have > pspell compiled in with their php build, and it may be some time before > they do (if they ever do). Does anyone know of a way to include > something like pspell support in php dynamically? Like by using a > .htaccess file to call it or something? At the last count (Apache 1.3.27/PHP4.2.3), aspell doesn't get compiled into PHP. It just sits in /usr/bin on RH Linux, at least.. The bad news is, that your code will have to be written for it. The good news is, that you can cheese the code off Horde's Imp. Best, Tony -- When all's said and done, there's nothing left to say or do ... http://www.billy.demon.nl - This mail sent through IMP: http://horde.org/imp/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Sessions on a shared server
Hi, Sunday, December 22, 2002, 7:24:41 AM, you wrote: BG> Hi, BG> I've finally got a host and I want to transfer my existing website - I BG> have managed to copy and upload my database (wow that was easy.. had BG> been dreading it) but now I'm worried that my sessions aren't going BG> to work correctly, as I'm sure there are probably other users with BG> "userID" variables being set and things like that - with it being a BG> shared server, it's obviously a little different to a dedicated one. BG> Would it be enough to simply set a variable like "mysiteidentifier" and BG> only bother checking for other session variables if that's set? Or, do I BG> need to override the server's session variables each time I start BG> sessions in every page that uses them? I imagine the former would mean BG> that other sites would be able to potentially get my session variables, BG> which isn't great. BG> Probably very simple, so sorry if it's incredibly dull! BG> Thanks, BG> -- BG> Beth Gore BG> http://bethanoia.dyndns.org Session data is kept seperate for each individual access so they will never get mixed up no matter what you call your session variables. -- regards, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Mass Mailing
Well, the problem I'm facing is that the application I'm building will have several users that may have a few subscribers to very large subscriber list. Using the include function in sendmail aliases will still be using Sendmail to deliver the email, but folks have been saying that SMTP is much faster and includes features such as enveloping which increases the speed of delivery. The ability to use include function seems too easy of a solution as there are list server apps out there that costs 6,000 with added support costs and SMTP server. "Chris Knipe" <[EMAIL PROTECTED]> wrote in message 000e01c2a94f$6cef0730$[EMAIL PROTECTED]">news:000e01c2a94f$6cef0730$[EMAIL PROTECTED]... > Why not just use simple alias files? > > 1) You have a file with all your addresses > > file.asc: > [EMAIL PROTECTED] > [EMAIL PROTECTED] > etc > > 2) You have the alias entry > my-mass-list::include:/path/to/file.asc > > 3) PHP sends one email to [EMAIL PROTECTED] > 4) The mail server (if it's any good), expands all the addresses from > file.asc and does the mass mailing... > > Problem sorted? The alias file (included) can easily be managed with PHP. > With a little tweaking, you can even include a script directly via the alias > file by using a | (pipe). The script can go as far as to even get the list > of email addresses from a MySQL DB or something... You can do the script in > just about anything you want... Sh, Perl, PHP, Python, Java... Doesn't > really make a difference. > > A pipe will actually give you better security, as you can verify the email > before actually sending out 100,000 odd copies of it. Here, you can sign > the message with a PGP key via PHP for example. If the key's do not match, > the script doesn't send the email (And obviously, you remove the key from > the email before sending it out from the piped script) > > Anyways, that's how I would do it if I couldn't use mailman for whatever > reason. IMHO, keeping as much of the mail on a mail server will drastically > improove the performance, because a mail server is made to > process/send/receive email, PHP is not ;-) > > -- > me > > > > - Original Message - > From: "Jonathan Chum" <[EMAIL PROTECTED]> > To: "'Gil Disatnik'" <[EMAIL PROTECTED]> > Cc: <[EMAIL PROTECTED]> > Sent: Sunday, December 22, 2002 2:03 AM > Subject: RE: [PHP] Mass Mailing > > > > Yea, I'd like to see that. How many people are on your lists if you > > don't mind me asking? > > > > I also came across this evening, http://phpmailer.sourceforge.net and > > http://www.octeth.com/index.php uses this class on it's backend, > > claiming that it is able to send 500,00 on a AMD Duron 900 with 512MB > > RAM in 10 hours. > > > > The phpmailer class says that directly conneting to mail() is better > > than using SMTP as it puts more of an overhead. Though I was looking at > > Perl packages such BulkMail that uses SMTP was able to send out 100,000 > > emails. > > > > Everyone says that PHP's mail() causes several Sendmail instances to > > fork off which is ineffcient. > > > > -Original Message- > > From: Gil Disatnik [mailto:[EMAIL PROTECTED]] > > Sent: Saturday, December 21, 2002 6:46 PM > > To: Jonathan Chum > > Cc: [EMAIL PROTECTED] > > Subject: Re: [PHP] Mass Mailing > > > > I have written a few useful php functions that put the email addresses > > on > > one file and the message on another file. > > I have a crontabbed script that runs every min looking for these files > > and > > then using qmail-inject to send them (sendmail is bad, replace it ;)) > > It's very good for sending a few thousands emails every time as the php > > script execution finishes in a second and you don't have to deal with > > max > > execution time and everything. > > > > If you wish I could send you the scripts. > > > > At 05:10 PM 12/21/2002 -0500, you wrote: > > >An upcoming project I'm working and spec'ing out is a mass mailing > > >application. Initially, I was looking at Mailman which was written in > > Python > > >since it looks like it handles delivering emails efficiently without > > killing > > >the server. We have 1 client able to send 110,000 emails at 6.5K avg > > per > > >week on PIII 800 with 128 MB RAM using Mailman. The inteface however is > > very > > >bad and we'd like to develop other features like text ads, tracking, > > >templates, etc. This would require writing a wrapper around Mailman in > > PHP. > > >I was considering of writing the mass mailing application in PHP > > instead > > >though. > > > > > >If anyone has eperience writing such applications with this amount of > > >emails, I'd like to know what you've done. > > > > > >I'm thinking of coding the front end in PHP that will put the email > > into a > > >queue table that will force a command line PHP script listening on a > > >particular port to scan the database for this new task in queue. Once > > it > > >picks up the task, the timeout for this application to run will be set > > to > > >infinite. It'll
Re: [PHP] Adding to Apache access log from PHP
Hi, Wednesday, December 4, 2002, 12:13:22 AM, you wrote: GC> Hi folks, GC> I would like to add a few fields to a custom Apache access log format GC> and populate the values from mod_php. GC> As a mechanism, I was thinking of using the PHP function putenv( ) to GC> set environmental variables. I am assuming that these would be in the GC> same request namespace used by Apache? GC> Then in Apache, I would use the mod_log_config directive documented GC> as: GC> "%...{FOOBAR}e: The contents of the environment variable FOOBAR" GC> to place the value of the variables in the log string. GC> Is this a sensible approach? I only have a live server to test on, so GC> I'd like to be sure I am on the right track b GC> -- GC> Geoff Caplan GC> Advantae Ltd GC> mailto:[EMAIL PROTECTED] GC> http://www.advantae.com You could use this Then the log formatter would be .\"%{PHP_TITLE}n\"... -- regards, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Forms and PHP variables
Hi, First off, thanks to all those that helped out with my other questions. Not all my problems were solved, but I'm certainly closer. Still working on the same project I need to do the following. I have a form where users input numbers only, is there a way I can have php check to make sure a letter or other character didn't get put in by accident. I was looking at ereg, but not to familiar with this or if it would work in this case. TIA -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
php-general Digest 22 Dec 2002 02:30:00 -0000 Issue 1777
php-general Digest 22 Dec 2002 02:30:00 - Issue 1777 Topics (messages 129057 through 129088): Re: Is there any method to filter the single quote fromastring? 129057 by: Alexander Guevara 129059 by: John W. Holmes 129063 by: Alexander Guevara Re: session life 129058 by: John W. Holmes 129070 by: Jason Sheets Re: Disable session cookies 129060 by: John W. Holmes Adding to Apache access log from PHP 129061 by: Geoff Caplan 129087 by: Tom Rogers pspell and html tags 129062 by: Gil Disatnik 129064 by: Gil Disatnik running perl script via su 129065 by: Larry Brown Sorry 129066 by: Gil Disatnik No tshowing url in title bar 129067 by: Alexander Guevara 129068 by: Larry Brown 129071 by: Alexander Guevara Problem with the List? 129069 by: Larry Brown 129074 by: Kyle Gibson \Z characters 129072 by: Dave J. Hala Jr. 129073 by: Kyle Gibson Sessions on a shared server 129075 by: Beth Gore 129085 by: Tom Rogers Mass Mailing 129076 by: Jonathan Chum 129078 by: Gil Disatnik 129080 by: Jonathan Chum 129082 by: Chris Knipe 129083 by: Mark Charette 129086 by: Jonathan Chum Loading modules not compiled in php 129077 by: John Nichel 129084 by: Tony Earnshaw Re: text parser 129079 by: Sean Burlington tool to organize & design a project? 129081 by: Chris Hayes Forms and PHP variables 129088 by: Beauford.2002 Administrivia: To subscribe to the digest, e-mail: [EMAIL PROTECTED] To unsubscribe from the digest, e-mail: [EMAIL PROTECTED] To post to the list, e-mail: [EMAIL PROTECTED] -- --- Begin Message --- WEll for example i got this: In a field called name i write a name with single quotes for example 'Alex' and click submit... in the verify.php i store the data i filled in the form.php that contains name, surnmane,etcetc... so when i save my data to the db i use the addslashes($name) in this case... and the i look up the database and i see that the valeu oin my db for name is like i wrote it in this cas 'Alex'.. that's perfect.. but when i try to retrieve the user data in another page for example change_user.php i want to retrive the user name and show it in a text box but it doesnt show up.. and i have this code: where userName i retrieved from the data base with a simple query.. so tell me what is wrong there!...Thanks! "Justin French" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... on 21/12/02 2:00 PM, Alexander Guevara ([EMAIL PROTECTED]) wrote: > It works.. but when you retrieve the data from the database to a text box it > doesnt appear if it has the single quote ('), o tought it was cause i have > the stripslashes but i delete stripslashes and it still doesnt appear in the > text box! Huh? I can't really understand what you're saying. If you're adding stuff to a database, and getting an error, use addslashes(), then on the way out of the database, you need to stripslashes(). Easy. If you don't get any errors, then magic quotes is probably enabled in your php.ini file. Justin > "Justin French" <[EMAIL PROTECTED]> wrote in message > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > don't filter the quotes... escape them with add_slashes() > > justin > > on 20/12/02 10:50 PM, ªüYam ([EMAIL PROTECTED]) wrote: > >> as title that I'm getting a trouble on filtering the single quote ' , > since >> there would be error when storing those string into MySQL, thus, i have to >> find the appropriate method to solve it, anybody can help please? >> thx a lot >> >> > > --- End Message --- --- Begin Message --- > WEll for example i got this: > In a field called name i write a name with single quotes for example > 'Alex' > and click submit... in the verify.php i store the data i filled in the > form.php that contains name, surnmane,etcetc... > > so when i save my data to the db i use the addslashes($name) in this > case... > and the i look up the database and i see that the valeu oin my db for name > is like i wrote it in this cas 'Alex'.. that's perfect.. but when i try to > retrieve the user data in another page for example change_user.php i want > to > retrive the user name and show it in a text box but it doesnt show up.. > and > i have this code: > > I thought this was already covered today? First, you don't need stripslashes() on the data when you pull it from the database unless you have magic_quotes_runtime enabled. Second, slashes mean nothing in HTML. It doesn't recognize them as escape characters. The reason your data isn't appearing is because it's coming out with a value like value=''Alex'', which HTML sees as a value of '' and ignores the rest of the data and an unrecognized attribute. Finally, wh
Re: [PHP] Forms and PHP variables
Use is_numeric() http://www.php.net/is_numeric See also the ctype functions which can be read about here: http://www.php.net/ctype And yes, regular expressions are another option but aren't needed here. Regards, Philip Olson On Sat, 21 Dec 2002, Beauford.2002 wrote: > Hi, > > First off, thanks to all those that helped out with my other questions. Not > all my problems were solved, but I'm certainly closer. Still working on the > same project I need to do the following. > > I have a form where users input numbers only, is there a way I can have php > check to make sure a letter or other character didn't get put in by > accident. I was looking at ereg, but not to familiar with this or if it > would work in this case. > > TIA > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] assignment by reference bug?
hi, I just found this behavior when trying to implement a linked list with php. In linked list it's common to say: $a =& $a->next; when traversing the list. but this doesn't work (it gives segmentation fault when trying to access the $head->next object (after the above assignment). but this work: $tmp =& $a; $a =& $tmp->next; I don't know if this can be considered a bug or if it's designed to work that way. But I think it would be nice to be able to do it without creating temporary variable. here is the full code. I'm using php 4.2.2 and I'm running the code from comand line. (if I execute it from the web it gives something like 'document contains no data' instead of segmentation fault) name = $n; $this->next = null; } function toString() { return $this->name; } } $a = new test('a'); $a->next = new test('b'); $a->next->next = new test('c'); echo 'a '. $a->toString() ."\n"; echo 'a next '. $a->next->toString() ."\n"; echo 'a next next '. $a->next->next->toString() ."\n"; $tmp =& $a; $a =& $tmp->next; // this is fine //$a =& $a->next; // this will result in Segmentation fault echo 'a '. $a->toString() ."\n"; echo 'a next '. $a->next->toString() ."\n"; ?> I would be glad to hear other people's opinion on this. thanks, - reynard __ The NEW Netscape 7.0 browser is now available. Upgrade now! http://channels.netscape.com/ns/browsers/download.jsp Get your own FREE, personal Netscape Mail account today at http://webmail.netscape.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Loading modules not compiled in php
Aspell is deprecated in favor of Pspell in PHP so using it is a bad idea. But you can do this to get Pspell going: a) On either the JTL box or on some other one with the same operating system, get the php source and get ready to compile. http://www.php.net/downloads b) Be sure the appropriate libraries are available as per the instructions found here: http://www.php.net/pspell c) Configure PHP like so: ./configure --with-apxs --with-pspell=shared d) Then build it: make e) This will then create the module which will exist in: yourphpsourcedir/modules/pspell.so f) Copy this file somewhere on your web server and in the php script load it with dl() like so: dl('pspell.so'); Easier said then done I know but the above is a possibility ;) You may want to ask them if they could create this .so so that clients can load it dynamically, that would be ideal. Regards, Philip Olson On Sun, 22 Dec 2002, Tony Earnshaw wrote: > >I have a site hosted at JTL Networks, and I'm looking into setting up > > a spell checker for my message boards. The problem is, JTL doesn't have > > pspell compiled in with their php build, and it may be some time before > > they do (if they ever do). Does anyone know of a way to include > > something like pspell support in php dynamically? Like by using a > > .htaccess file to call it or something? > > At the last count (Apache 1.3.27/PHP4.2.3), aspell doesn't get compiled into > PHP. It just sits in /usr/bin on RH Linux, at least.. > > The bad news is, that your code will have to be written for it. The good news > is, that you can cheese the code off Horde's Imp. > > Best, > > Tony > > -- > > When all's said and done, there's nothing left to say or do ... > http://www.billy.demon.nl > > - > This mail sent through IMP: http://horde.org/imp/ > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Function returning a reference - how ?!?
Hi all, I came across the following weird situation. I don't get it, I hope some of you can explain the logic of it all. [begin code]--- child = &new Child($this); } } /* Define class Child. Its constructor assigns a reference of the Parent object that contains this Child object to property $parent. */ class Child { var $parent; function Child(&$p) { $this->parent = &$p; } } /* This function instantiates and returns a new Parent class. */ function createParent() { return new Parent; } /* $p is a reference of the Parent object created by createParent(). */ $p = &createParent(); /* The $property property of the Parent object is changed. */ $p->property = 'two'; /* Since $p should be the same object as $p->child->parent, the following should print twice the same. */ print $p->property . ''; print $p->child->parent->property . ''; ?> [end code]--- Now the problem is: IT DOES NOT PRINT TWICE THE SAME!!! Instead it prints 'two' and then 'one', which indicates that $p->child->parent is another object than $p. The problem is that the object *returned* by createParent() is not the same object as the object that is *created* by createParent(). Just replace the line $p = &createParent(); by $p = &new Parent(); -- this works perfectly fine! Conclusion: createParent() does not return the object it creates! Someone knows why this ain't working and how to solve it?!? Hope so, can't wait to hear from you guys. Thanks in advance, Tim Molendijk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Function returning a reference - how ?!?
change your createParent function to return by reference: function &createParent() { return new Parent; } it returns 'two' and 'two' for me Regards, - reynard >Hi all, > >I came across the following weird situation. I don't get it, I hope some of >you can explain the logic of it all. > >[begin code]--- > >/* Define class Parent. Its constructor sets an instance of Child in >property $child and passes itself to Child's constructor. */ >class Parent >{ >var $child; >var $property = 'one'; > >function Parent() >{ >$this->child = &new Child($this); >} >} > >/* Define class Child. Its constructor assigns a reference of the Parent >object that contains this Child object to property $parent. */ >class Child >{ >var $parent; > >function Child(&$p) >{ >$this->parent = &$p; >} >} > >/* This function instantiates and returns a new Parent class. */ >function createParent() >{ >return new Parent; >} > >/* $p is a reference of the Parent object created by createParent(). */ >$p = &createParent(); > >/* The $property property of the Parent object is changed. */ >$p->property = 'two'; > >/* Since $p should be the same object as $p->child->parent, the following >should print twice the same. */ >print $p->property . ''; >print $p->child->parent->property . ''; > >?> >[end code]--- > >Now the problem is: IT DOES NOT PRINT TWICE THE SAME!!! >Instead it prints 'two' and then 'one', which indicates that >$p->child->parent is another object than $p. The problem is that the object >*returned* by createParent() is not the same object as the object that is >*created* by createParent(). Just replace the line $p = &createParent(); by >$p = &new Parent(); -- this works perfectly fine! Conclusion: createParent() >does not return the object it creates! > >Someone knows why this ain't working and how to solve it?!? Hope so, can't >wait to hear from you guys. > >Thanks in advance, > >Tim Molendijk __ The NEW Netscape 7.0 browser is now available. Upgrade now! http://channels.netscape.com/ns/browsers/download.jsp Get your own FREE, personal Netscape Mail account today at http://webmail.netscape.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Function returning a reference - how ?!?
Wow!! You're my king! Thanks, that syntax is completely new to me! Great, another thing learned today! :) Cheers mate! <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > change your createParent function to return by reference: > > function &createParent() > { >return new Parent; > } > > it returns 'two' and 'two' for me > > Regards, > - reynard > > >Hi all, > > > >I came across the following weird situation. I don't get it, I hope some of > >you can explain the logic of it all. > > > >[begin code]--- > > > > >/* Define class Parent. Its constructor sets an instance of Child in > >property $child and passes itself to Child's constructor. */ > >class Parent > >{ > >var $child; > >var $property = 'one'; > > > >function Parent() > >{ > >$this->child = &new Child($this); > >} > >} > > > >/* Define class Child. Its constructor assigns a reference of the Parent > >object that contains this Child object to property $parent. */ > >class Child > >{ > >var $parent; > > > >function Child(&$p) > >{ > >$this->parent = &$p; > >} > >} > > > >/* This function instantiates and returns a new Parent class. */ > >function createParent() > >{ > >return new Parent; > >} > > > >/* $p is a reference of the Parent object created by createParent(). */ > >$p = &createParent(); > > > >/* The $property property of the Parent object is changed. */ > >$p->property = 'two'; > > > >/* Since $p should be the same object as $p->child->parent, the following > >should print twice the same. */ > >print $p->property . ''; > >print $p->child->parent->property . ''; > > > >?> > >[end code]--- > > > >Now the problem is: IT DOES NOT PRINT TWICE THE SAME!!! > >Instead it prints 'two' and then 'one', which indicates that > >$p->child->parent is another object than $p. The problem is that the object > >*returned* by createParent() is not the same object as the object that is > >*created* by createParent(). Just replace the line $p = &createParent(); by > >$p = &new Parent(); -- this works perfectly fine! Conclusion: createParent() > >does not return the object it creates! > > > >Someone knows why this ain't working and how to solve it?!? Hope so, can't > >wait to hear from you guys. > > > >Thanks in advance, > > > >Tim Molendijk > > > __ > The NEW Netscape 7.0 browser is now available. Upgrade now! http://channels.netscape.com/ns/browsers/download.jsp > > Get your own FREE, personal Netscape Mail account today at http://webmail.netscape.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] assignment by reference bug? (update)
just a little update after playing arround with this stuffs, I think this behavior happens when there is nothing else pointing to variable $a. so for example, this works also: $tmp =& $a; $a =& $a->next; I'm wondering how php does garbage collection? does it immediately delete variables that have nothing pointing to it? - reynard >hi, > >I just found this behavior when trying to implement a linked list with php. >In linked list it's common to say: >$a =& $a->next; >when traversing the list. but this doesn't work (it gives segmentation fault when >trying to access the $head->next object (after the above assignment). >but this work: > >$tmp =& $a; >$a =& $tmp->next; > >I don't know if this can be considered a bug or if it's designed to work that way. >But I think it would be nice to be able to do it without creating temporary variable. > > >here is the full code. I'm using php 4.2.2 and I'm running the code from comand line. >(if I execute it from the web it gives something like 'document contains no data' >instead of segmentation fault) > __ The NEW Netscape 7.0 browser is now available. Upgrade now! http://channels.netscape.com/ns/browsers/download.jsp Get your own FREE, personal Netscape Mail account today at http://webmail.netscape.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re[2]: [PHP] Function returning a reference - how ?!?
Hi, Sunday, December 22, 2002, 1:43:27 PM, you wrote: TM> Wow!! You're my king! Thanks, that syntax is completely new to me! TM> Great, another thing learned today! :) TM> Cheers mate! You have setup a recursive reference there with child, I don't know if this causes bad things to happen in php? I guess time will tell :) -- regards, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Forms and PHP variables
Thanks for the info, but . is_numeric does not appear to accept variables i.e. is_numeric($num) and ctype gives me the following. Fatal error: Call to undefined function: ctype_digit() in /usr/local/apache/htdocs/.. on line 6 - Original Message - From: "Philip Olson" <[EMAIL PROTECTED]> To: "Beauford.2002" <[EMAIL PROTECTED]> Cc: "PHP General" <[EMAIL PROTECTED]> Sent: Saturday, December 21, 2002 9:50 PM Subject: Re: [PHP] Forms and PHP variables > > Use is_numeric() > > http://www.php.net/is_numeric > > See also the ctype functions which can > be read about here: > > http://www.php.net/ctype > > And yes, regular expressions are another > option but aren't needed here. > > Regards, > Philip Olson > > > On Sat, 21 Dec 2002, Beauford.2002 wrote: > > > Hi, > > > > First off, thanks to all those that helped out with my other questions. Not > > all my problems were solved, but I'm certainly closer. Still working on the > > same project I need to do the following. > > > > I have a form where users input numbers only, is there a way I can have php > > check to make sure a letter or other character didn't get put in by > > accident. I was looking at ereg, but not to familiar with this or if it > > would work in this case. > > > > TIA > > > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Loading modules not compiled in php
This is what I'm looking fordo you know if you can load it in a .htaccess file? I have a couple of files that are included in on every page, so I could do it in my config file, but there's no reason for me to load the module on the whole site, when I need it just in the forum section. I'm trying to work around my laziness here. :) Philip Olson wrote: Aspell is deprecated in favor of Pspell in PHP so using it is a bad idea. But you can do this to get Pspell going: a) On either the JTL box or on some other one with the same operating system, get the php source and get ready to compile. http://www.php.net/downloads b) Be sure the appropriate libraries are available as per the instructions found here: http://www.php.net/pspell c) Configure PHP like so: ./configure --with-apxs --with-pspell=shared d) Then build it: make e) This will then create the module which will exist in: yourphpsourcedir/modules/pspell.so f) Copy this file somewhere on your web server and in the php script load it with dl() like so: dl('pspell.so'); Easier said then done I know but the above is a possibility ;) You may want to ask them if they could create this .so so that clients can load it dynamically, that would be ideal. Regards, Philip Olson On Sun, 22 Dec 2002, Tony Earnshaw wrote: I have a site hosted at JTL Networks, and I'm looking into setting up a spell checker for my message boards. The problem is, JTL doesn't have pspell compiled in with their php build, and it may be some time before they do (if they ever do). Does anyone know of a way to include something like pspell support in php dynamically? Like by using a .htaccess file to call it or something? At the last count (Apache 1.3.27/PHP4.2.3), aspell doesn't get compiled into PHP. It just sits in /usr/bin on RH Linux, at least.. The bad news is, that your code will have to be written for it. The good news is, that you can cheese the code off Horde's Imp. Best, Tony -- When all's said and done, there's nothing left to say or do ... http://www.billy.demon.nl - This mail sent through IMP: http://horde.org/imp/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- By-Tor.com It's all about the Rush http://www.by-tor.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Function returning a reference - how ?!?
I'll try. /* This function instantiates and returns a new Parent class. */ function createParent() { return new Parent; } /* $p is a reference of the Parent object created by createParent(). */ $p = &createParent(); I believe the problem occurs here. $p becomes a reference to the createParent() function whose return value is the Parent object. This *should* work: function createParent() { //the lack of the '()' might have caused other problems return &new Parent(); } $p = createParent(); That way $p equals the value that is returned by the function createParent, which is a reference to the Parent object. Then again, I haven't tested any of this, just going on some instinct here. -- Kyle Gibson admin(at)frozenonline.com http://www.frozenonline.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] fwrite() blank-line Quirk?
Hi All, Relatively new PHP coder (was in an MS / ASP shop before)... I'm doing some flat-file manipulation (please, spare me the database comments, I'm working on it!), and I'm having to read strings out of one file and copy them into another until a while() condition is satisfied. The problem is, I seem to always end up with a blank line at the end of my files (which then screws up later file-processing) - I'm assuming because of the \n that fwrite() appends to the end of each string... Is there a simple way to get rid of this blank line or somehow get fwrite() to NOT put a newline on the end of a string? Thanks in Advance, --Noel Wade -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] uploading flat text to MySQL
I'm using a HTML form to submit flat text files to a MySQL database. When I upload the text file by FTP the script that loads it's contents into the database works as expected. When I upload using the HTML form it seems to ignore the new line in the text file. As a result it only creates one row in the table with some overflow in the last cell. Does anyone know how to deal with this? thanks, loop Relevant code (This executes without error)--- -- from .html -- ---end from .html --- from ,php $file = $_FILES['file']['tmp_name']; $file_name = $_FILES['file']['name']; $path = "userfile/" . $file_name; $size = filesize($file); $type = $_FILES['file']['type']; if($type != 'text/plain') { echo "You may only upload text files."; exit; } if($size > 1) { echo "The file is to large."; exit; } copy($file, "userfile/$file_name"); unlink($file); --- everything efter this working as expected _ MSN 8 with e-mail virus protection service: 3 months FREE*. http://join.msn.com/?page=features/virus&xAPID=42&PS=47575&PI=7324&DI=7474&SU= http://www.hotmail.msn.com/cgi-bin/getmsg&HL=1216hotmailtaglines_eliminateviruses_3mf -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] fgets() question?
Okay, attacking my flat-file issues from the other end: When you use $foo = fgets($fp_file); it appears that a blank line ends up looking exactly like a FALSE ("failed to read") return value... Is there any way to differentiate between an empty-string read (a blank line in a flat-file) and a FALSE return from fgets() ?? Thanks a bunch, --Noel -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] solved - uploading flat text to MySQL -
Changing ENCTYPE to "text/plain" from "multipart/form-data" solved the problem. :) loop From: "James Brennan" <[EMAIL PROTECTED]> To: [EMAIL PROTECTED] Subject: [PHP] uploading flat text to MySQL Date: Sun, 22 Dec 2002 01:04:14 -0500 I'm using a HTML form to submit flat text files to a MySQL database. When I upload the text file by FTP the script that loads it's contents into the database works as expected. When I upload using the HTML form it seems to ignore the new line in the text file. As a result it only creates one row in the table with some overflow in the last cell. Does anyone know how to deal with this? thanks, loop Relevant code (This executes without error)--- -- from .html -- _ MSN 8: advanced junk mail protection and 3 months FREE*. http://join.msn.com/?page=features/junkmail&xAPID=42&PS=47575&PI=7324&DI=7474&SU= http://www.hotmail.msn.com/cgi-bin/getmsg&HL=1216hotmailtaglines_advancedjmf_3mf -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] un-solved - uploading flat text to MySQL -
Nevermind. I'm a retard. That didn't actualy work. I was executing an old script. I'm going to get away from my computer now before I do something realy stupid :P g'night, loop sorry for the multiple posts Changing ENCTYPE to "text/plain" from "multipart/form-data" solved the problem. :) loop From: "James Brennan" <[EMAIL PROTECTED]> To: [EMAIL PROTECTED] Subject: [PHP] uploading flat text to MySQL Date: Sun, 22 Dec 2002 01:04:14 -0500 I'm using a HTML form to submit flat text files to a MySQL database. When I upload the text file by FTP the script that loads it's contents into the database works as expected. When I upload using the HTML form it seems to ignore the new line in the text file. As a result it only creates one row in the table with some overflow in the last cell. Does anyone know how to deal with this? thanks, loop Relevant code (This executes without error)--- -- from .html -- _ MSN 8: advanced junk mail protection and 3 months FREE*. http://join.msn.com/?page=features/junkmail&xAPID=42&PS=47575&PI=7324&DI=7474&SU= http://www.hotmail.msn.com/cgi-bin/getmsg&HL=1216hotmailtaglines_advancedjmf_3mf -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php _ The new MSN 8: smart spam protection and 3 months FREE*. http://join.msn.com/?page=features/junkmail&xAPID=42&PS=47575&PI=7324&DI=7474&SU= http://www.hotmail.msn.com/cgi-bin/getmsg&HL=1216hotmailtaglines_smartspamprotection_3mf -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Mass Mailing
Hello, On 12/21/2002 08:10 PM, Jonathan Chum wrote: An upcoming project I'm working and spec'ing out is a mass mailing application. Initially, I was looking at Mailman which was written in Python since it looks like it handles delivering emails efficiently without killing the server. We have 1 client able to send 110,000 emails at 6.5K avg per week on PIII 800 with 128 MB RAM using Mailman. The inteface however is very bad and we'd like to develop other features like text ads, tracking, templates, etc. This would require writing a wrapper around Mailman in PHP. I was considering of writing the mass mailing application in PHP instead though. If anyone has eperience writing such applications with this amount of emails, I'd like to know what you've done. If you do not need to send personalized messages (messages that differ for each recipient), just put all recipients in a BCc: header and send a single message to the local mailer queue (not via SMTP). If you do not care for the users that bounce messages, just make the return path be black hole email address. OTOH, if you care about bounces (you should if you mailing list is large or is not clean), consider using ezmlm, which is a mailing list manager than among other things takes care of bounce messages thanks to qmail VERP. I was told that is the one that eGroups hacked to use in the now known YahooGroups site. Once I built a small Web interface for ezmlm. It was meant just to create and edit several mailing lists meant to be used as newsletter for a portal with many sites. Is simple but it already comes with a SOAP interface to manage the mailing list subscribers remotely. http://www.phpclasses.org/ezmlmmanager I'm thinking of coding the front end in PHP that will put the email into a queue table that will force a command line PHP script listening on a particular port to scan the database for this new task in queue. Once it picks up the task, the timeout for this application to run will be set to infinite. It'll establish a SMTP socket either to a really beefed up mailing list server or the localhost SMTP server to begin blasting out these emails. From what I understand, it's better to blast emails via an open socket connection to SMTP rather than looping through Sendmail. Is this the right thing todo? No, queuing via SMTP is the slowest way to send messages. Your script should not bother to deliver the messages to the recipients SMTP servers. Delivery can take hours or days to finish due to network congestions and hard to conect SMTP servers. Just queue the messages in the local mailer and let it take care the actual delivery. I would recommend a qmail based system anytime, with or without ezmlm on top. In a production system that I manage, it just takes 3 seconds to queue a alert message to be sent to 50,000 via a local qmail server. You can also use sendmail almost as fast using the queue only mode. Some people think that sendmail is slow and many forks processes because they are not aware of how to configure it to queue the messages the fastest way that is possible. You may want to look into this class that has a sub-classes for delivering with sendmail program directly instead of using the mail(). It lets you configure the sendmail delivery mode. There is also a sub-class for delivering with qmail. http://www.phpclasses.org/mimemessage I've also heard that PHP is not good for writing mailing lists application, but Mailman is written in Python and it's able to send thousands of email just fine. Any thoughts on this? When people do not know how to do it properly, they blame it on the software. Note down: *smart software always beats fast software*. Sure you can use a faster language like C (not Python), but if you develop smart software in PHP it can be almost as fast as a similar solution in C and does not take an etternity to develop and debug. -- Regards, Manuel Lemos -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php