Re: [PHP] Problem with timeout
4 maj 2007 kl. 23.48 skrev Richard Lynch: On Fri, May 4, 2007 3:42 pm, Frank Arensmeier wrote: I still think that the best way to go is to not involve Apache at all when running the script. Because the script already has functions for output logging etc. it is no big deal to change the code so that it can be run from PHP CLI. Once you said it was something you did weekly, it's pretty much a given that you ought to use a cron job with PHP CLI and take Apache out of the picture entirely... You are absolutely right. I might also mention that running the script under PHP CLI did two things: 1) No problems with timeout settings anymore. 2) The script takes 10 minutes less time to finish However, I realized that PHP CLI is version 4.4.4 whereas the Apache module PHP is version 5.something. After some modifications to the script, it is running flawlessly now. Actually, even if it's for surfer interaction, anything taking that long should probably be turned into a "jobs" oriented architecture, and queue up the work for a cron job later, with user email notification when it's done. NOBODY wants to sit that long watching the browser do nothing. I totally agree. The script was never ment to be user-triggered. Instead, the archiving process takes place weekly. Thanks you all! Have a nice weekend. //frank -- Some people have a "gift" link here. Know what I want? I want you to buy a CD from some indie artist. http://cdbaby.com/browse/from/lynch Yeah, I get a buck. So? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PEAR MIME Construct
Hi All, I've read my mail through php://stdin and then decode email message using MIME package. How can I change the "To" header field and then reconstruct and send it again through sendmail ? Regards, Feris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Newbie Question - Form To Email Needed
1st page: 2nd page: $str_body = $_POST['thebody']; mail('[EMAIL PROTECTED]', 'This is the subject', $str_body); Of course you can have the email and the subject fields come also from the 1st page. Hope that helps! -- itoctopus - http://www.itoctopus.com "revDAVE" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi folks, > > I have a form on page one - and would like to submit to a second page in > PHP > that could grab the fields and send it out as an e-mail. > > Are there any links that show how do this? > > > Thanks in advance - Dave > > > -- > Thanks - RevDave > [EMAIL PROTECTED] > [db-lists] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Getting multitple select values on PHP side
Totally agree, generates a lot of support. -- itoctopus - http://www.itoctopus.com ""Richard Lynch"" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On Fri, May 4, 2007 3:56 pm, Skip Evans wrote: >> I have a requirement for a select on a form that >> has to be able to get multiple values in the form >> processing PHP side. >> >> You just multiple to the tag to be >> able to select multiple values, but on the PHP >> side the $_POST value for the form only has the >> last one selected. > > PS > WARNING: > Most surfers have NO IDEA how to work a MULTIPLE select... > > You need instructions right next to it, if it's important that they > pick more than one. > > If it's only a "nifty" feature to choose more than one, let the smart > ones revel in their edumacation and the not-so-swift will never > realize what they are missing. > > > -- > Some people have a "gift" link here. > Know what I want? > I want you to buy a CD from some indie artist. > http://cdbaby.com/browse/from/lynch > Yeah, I get a buck. So? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Mailbox @php.net
Hi, All. Does anybody know how someone can get an email @php.net? Thanks. - Don't pick lemons. See all the new 2007 cars at Yahoo! Autos.
[PHP] Re: Mailbox @php.net
Get a php.net CVS account and you get an @php.net email adress with it. It's an extra for the work you do, not just to be able to show off your new email. - tul Shadow wrote: Hi, All. Does anybody know how someone can get an email @php.net? Thanks. - Don't pick lemons. See all the new 2007 cars at Yahoo! Autos. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] mail() only working with php-cli
Is there any way to debug the mail() function within PHP4 or PHP5? The following code is not working when called from a browser, but it does work from the command line: php and php-cli use the same php.ini file. Php via Apache is launched as a module, NOT as CGI! sendmail_path is correctly set to /usr/sbin/sendmail -t -i the /var/log/mail.log only shows activity when I try my code via command line, so my best guess is that sendmail is never reached when run from the browser. I went a little deeper and modified the sendmail_path to /tmp/test.sh, which contains: #!/bin/bash echo "I was used!!" > /tmp/test.log (chmod 777 /tmp/test.sh) Again I tried my script from the web and from the command line. Same result... command line is fine and generates the test.log file. In the browser no log file is created. I have already made numerous LAMP installations, but I never had this kind of mail() issue. This installation is quite simple: standard Apache 2.0 with php5, php5-mysql, php5-gd, ... This makes it even more frustrating :-( What am I missing? Thanks a lot!! Andy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Feisty Fawn and apt-get
Hey all, I've installed Feisty Fawn on the curmudgeon barber's machine, but it won't get any of the outside packages I've tried to get. I've tried an apt-get install {package} ...on digikam, kate, gftp, and others. All stuff I had no trouble getting with Edgy. I checked the sources.list file and it has both universe and multiverse enabled. Is there something with the FF repositories or something I'm missing? Thanks, Skip -- Skip Evans Big Sky Penguin, LLC 61 W Broadway Butte, Montana 59701 406-782-2240 =-=-=-=-=-=-=-=-=-=-= Check out PHPenguin, a lightweight and versatile PHP/MySQL development framework. http://phpenguin.bigskypenguin.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Feisty Fawn and apt-get
Skip Evans wrote: > Hey all, > > I've installed Feisty Fawn on the curmudgeon barber's machine, but it > won't get any of the outside packages I've tried to get. I've tried an > > apt-get install {package} > > ...on digikam, kate, gftp, and others. All stuff I had no trouble > getting with Edgy. > > I checked the sources.list file and it has both universe and > multiverse enabled. > > Is there something with the FF repositories or something I'm missing? > > Thanks, > Skip Wrong list? T -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Feisty Fawn and apt-get
Em Sábado 05 Maio 2007 18:01, Skip Evans escreveu: > Hey all, > > I've installed Feisty Fawn on the curmudgeon > barber's machine, but it won't get any of the > outside packages I've tried to get. I've tried an > > apt-get install {package} > > ...on digikam, kate, gftp, and others. All stuff I > had no trouble getting with Edgy. > > I checked the sources.list file and it has both > universe and multiverse enabled. > > Is there something with the FF repositories or > something I'm missing? > > Thanks, > Skip First: use aptitude instead apt-get... =] Second: use an debian-list to debian's questions instead an php-list... =] HTH -- Davi Vidal [EMAIL PROTECTED] [EMAIL PROTECTED] -- "Religion, ideology, resources, land, spite, love or "just because"... No matter how pathetic the reason, it's enough to start a war. " pgp5RWUxpURPp.pgp Description: PGP signature
Re: [PHP] mail() only working with php-cli
On 5/5/07, Andy B. <[EMAIL PROTECTED]> wrote: Is there any way to debug the mail() function within PHP4 or PHP5? The following code is not working when called from a browser, but it does work from the command line: php and php-cli use the same php.ini file. Php via Apache is launched as a module, NOT as CGI! sendmail_path is correctly set to /usr/sbin/sendmail -t -i the /var/log/mail.log only shows activity when I try my code via command line, so my best guess is that sendmail is never reached when run from the browser. I went a little deeper and modified the sendmail_path to /tmp/test.sh, which contains: #!/bin/bash echo "I was used!!" > /tmp/test.log (chmod 777 /tmp/test.sh) Again I tried my script from the web and from the command line. Same result... command line is fine and generates the test.log file. In the browser no log file is created. I have already made numerous LAMP installations, but I never had this kind of mail() issue. This installation is quite simple: standard Apache 2.0 with php5, php5-mysql, php5-gd, ... This makes it even more frustrating :-( What am I missing? Thanks a lot!! Andy Are you sure that the PHP CLI and PHP-module are exactly the same build? And you could try to set error reporting level to E_ALL, maybe there's a warning generated that's hidden now because of a lower reporting level. Tijnema -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] mail() only working with php-cli
Yes, it's the same build. I am running php5 on a debian distribution that has been installed via apt-get. Details: -- CLI php.ini = /etc/php5/cli/php.ini PHP 5.2.0-8+etch3 (cli) (built: Apr 29 2007 10:42:07) Copyright (c) 1997-2006 The PHP Group Zend Engine v2.2.0, Copyright (c) 1998-2006 Zend Technologies -- -- APACHE php.ini = = /etc/php5/apache2/php.ini PHP Version 5.2.0-8+etch3 System Linux A011 2.6.21 #1 SMP Fri Apr 27 22:50:50 CEST 2007 i686 Build Date Apr 29 2007 10:24:27 Server API Apache 2.0 Handler Virtual Directory Support disabled Configuration File (php.ini) Path /etc/php5/apache2/php.ini -- Both are exactly the same, as I copied the CLI version into the Apache Version. Of course I first tested with the original Apache php.ini before overwriting it with the CLI version. Unfortunately error Reporting does not help. I've already tested with E_ALL and also dumping errors/warnings into log files... Andy -Original Message- From: Tijnema ! [mailto:[EMAIL PROTECTED] Sent: Saturday, May 05, 2007 23:58 To: Andy B. Cc: php-general@lists.php.net Subject: Re: [PHP] mail() only working with php-cli Are you sure that the PHP CLI and PHP-module are exactly the same build? And you could try to set error reporting level to E_ALL, maybe there's a warning generated that's hidden now because of a lower reporting level. Tijnema -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Why create_element function always return false?
On 5/5/07, Victor <[EMAIL PROTECTED]> wrote: create_element("para"); $newnode = $doc->append_child($node); $newnode->set_attribute("align", "left"); ?> I just run the example that is from php manual. But there is some error -- Warning: domnode::append_child() expects parameter 1 to be object, null given in C:\AppServ\www\tutorial\test.php on line 4 Fatal error: Call to a member function set_attribute() on a non-object in C:\AppServ\www\tutorial\test.php on line 5 -- It is very strangeI found that create_element always return falsenomatter what I dowhat example I tried... Not only create_element return false but also create_coment do so... Why??? I run php 5.2.2 with AppServ . The version of docmxl is 20626 (I just call domxml_version() ). OS is Windows XP. Would someone help me ,please? Thanks a lot. Victor. AFAIK, append_child and create_element are decprecated, they are only used in PHP4. You should use appendchild and createelement instead. try example 498 located here: http://www.php.net/manual/en/function.dom-domdocument-createelement.php Tijnema -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mail() only working with php-cli
Hello Andy, did you take a look into the apache log files? Regards, Oliver Am Samstag, 5. Mai 2007 22:53 schrieb Andy B.: > Is there any way to debug the mail() function within PHP4 or PHP5? > > The following code is not working when called from a browser, but it does > work from the command line: > > $to = '[EMAIL PROTECTED]'; > $subject = 'the subject'; > $message = 'hello...'; > $headers = 'From: [EMAIL PROTECTED]' . "\r\n" . > 'Reply-To: [EMAIL PROTECTED]' . "\r\n" . > 'X-Mailer: PHP/' . phpversion(); > > if(mail($to, $subject, $message, $headers)) > echo "IT WORKED"; > else > echo "DAMN!!!"; > ?> > > > php and php-cli use the same php.ini file. Php via Apache is launched as a > module, NOT as CGI! > > sendmail_path is correctly set to /usr/sbin/sendmail -t -i > > the /var/log/mail.log only shows activity when I try my code via command > line, so my best guess is that sendmail is never reached when run from the > browser. > > I went a little deeper and modified the sendmail_path to /tmp/test.sh, > which contains: > > #!/bin/bash > echo "I was used!!" > /tmp/test.log > > (chmod 777 /tmp/test.sh) > > Again I tried my script from the web and from the command line. Same > result... command line is fine and generates the test.log file. In the > browser no log file is created. > > I have already made numerous LAMP installations, but I never had this kind > of mail() issue. This installation is quite simple: standard Apache 2.0 > with php5, php5-mysql, php5-gd, ... This makes it even more frustrating :-( > > What am I missing? > > Thanks a lot!! > > > Andy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Feisty Fawn and apt-get
Davi wrote: First: use aptitude instead apt-get... =] Second: use an debian-list to debian's questions instead an php-list... =] Third: Go Feisty!!! -- ~Mike Shanley~ ~you are almost there~ ~no, wait. you are there!~ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: cURL: multipart/form-data POST request with empty file part
Hello, on 05/04/2007 09:44 AM Emmanuel Raulo-Kumagai said the following: > Hello > > I'm writting a client in PHP for some CMS. > I need to send an HTTP POST request with a multipart/form-data content. > One of the parts is a file which must look like the request was issued > after submitting a web form with a field left > empty, which is *NOT* the same as sending an empty file. > This means the part should look like this in the request: > > -8179530329826\r\n > Content-Disposition: form-data; name="file"; filename=""\r\n > Content-Type: application/octet-stream\r\n > \r\n > \r\n > -8179530329826\r\n > > Is there a way to do so with cURL ? I use this HTTP client class that implicitly composes HTTP requests like that when it is used to upload files emulating Web forms. http://www.phpclasses.org/httpclient -- Regards, Manuel Lemos Metastorage - Data object relational mapping layer generator http://www.metastorage.net/ PHP Classes - Free ready to use OOP components written in PHP http://www.phpclasses.org/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Best way to format double as money?
I have a MySQL DB that stores currency values as doubles. I want to display the values in the #,##0.00 format. What is the best way to do that? Todd -- Ariste Software 2200 D Street Ext Petaluma, CA 94952 (707) 773-4523 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Best way to format double as money?
http://www.php.net/money_format On Saturday 05 May 2007, Todd Cary wrote: > I have a MySQL DB that stores currency values as doubles. I want to > display the values in the #,##0.00 format. What is the best way to do > that? > > Todd > > -- > Ariste Software > 2200 D Street Ext > Petaluma, CA 94952 > (707) 773-4523 -- Larry Garfield AIM: LOLG42 [EMAIL PROTECTED] ICQ: 6817012 "If nature has made any one thing less susceptible than all others of exclusive property, it is the action of the thinking power called an idea, which an individual may exclusively possess as long as he keeps it to himself; but the moment it is divulged, it forces itself into the possession of every one, and the receiver cannot dispossess himself of it." -- Thomas Jefferson -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Best way to format double as money?
*sigh* http://www.google.com/search?hl=en&q=PHP+format+double+as+money&btnG=Search On 5/5/07, Larry Garfield <[EMAIL PROTECTED]> wrote: http://www.php.net/money_format On Saturday 05 May 2007, Todd Cary wrote: > I have a MySQL DB that stores currency values as doubles. I want to > display the values in the #,##0.00 format. What is the best way to do > that? > > Todd > > -- > Ariste Software > 2200 D Street Ext > Petaluma, CA 94952 > (707) 773-4523 -- Larry Garfield AIM: LOLG42 [EMAIL PROTECTED] ICQ: 6817012 "If nature has made any one thing less susceptible than all others of exclusive property, it is the action of the thinking power called an idea, which an individual may exclusively possess as long as he keeps it to himself; but the moment it is divulged, it forces itself into the possession of every one, and the receiver cannot dispossess himself of it." -- Thomas Jefferson -- 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