[PHP] simple image manager app?
I often travel and would like to be able to upload digital photos to my server (either using a simple multiple file upload (one that I can select multiple file using the windows file dialog, or some other method that's idiot proof) and simply save them to my hard disk, or to a mysql database. Is there a simple set of scripts available for that? I've searched the web and only found lots of references to how to build a huge table with a bunch of browse... buttons to select single files at a time to upload images in an array which doesn't seem like a meaningful solution. I haven't been able to figure out how to allow multiple selects in the windows file dialog box either. Is that possble using php and the html forms? Thanks, Jeff. --- Jeff D. Hamann Forest Informatics, Inc. PO Box 1421 Corvallis, Oregon USA 97339-1421 541-754-1428 [EMAIL PROTECTED] www.forestinformatics.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] cookbook/recipes sites?
I'm thinking about starting a cookbook/recipes website and I'm guessing there's some special skills for handling recipes (ingredients, cooking times, etc) and I would like to know if there's a PHP based project that is designed for that kind of the project. Doing google searches for anything that contains cookbook turn up all kinds of code repositories... Jeff. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] php app frameworks?
What application frameworks are avail for php? Jeff. -- Jeff D. Hamann Hamann, Donald Associates, Inc. PO Box 1421 Corvallis, Oregon USA 97339-1421 Bus. 541-753-7333 Cell. 541-740-5988 [EMAIL PROTECTED] www.hamanndonald.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] monster form and compression?
I have a monster form (really a funky grid - hey the client is always right) that does not display entirely each time the form is displayed. Some times, quite repeatably, the bottom half of the form's select boxes will be blank (not good). Is there a way to compress the web page before it gets sent, or any method to ensure the page will display correctly? Jeff. -- Jeff D. Hamann Hamann, Donald Associates, Inc. PO Box 1421 Corvallis, Oregon USA 97339-1421 Bus. 541-753-7333 Cell. 541-740-5988 [EMAIL PROTECTED] www.hamanndonald.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] mail reading newbie and line lengths...
I'm trying to read messages using php imap functions. I have emails that were sent as simple text but the line lengths are more than x characters. The orginal lines look like... F55232251820029 24006001 440023300 F55232251820029 18007002 440023300 F55232251820029 38011003 32002000170001700 and the messages look like F55292188520019 300150001001 29002000270002100 F55292188520029 18005002 440022200 F55292188520019 40012003 2900200022000 when I read them using the following code echo ph1Headers in INBOX/h1\n; $headers = imap_headers ($mbox); if ($headers == false) { echo Call failedbr\n; } else { while (list ($key,$val) = each ($headers)) { echo $key. -. $val.br\n; $msg_struct = imap_fetchstructure($mbox, $key+1); if( $msg_struct-type == TYPETEXT ) { $email_dump = imap_body( $mbox, $key+1 ); echo $email_dump. br; } } } What must I do to ensure the message looks like the orginal version (long lines) rather than the second version? Is there some method to modify the line length of the emails? Convert crlf characters? encoding method? Thanks, Jeff. -- Jeff D. Hamann Hamann, Donald Associates, Inc. PO Box 1421 Corvallis, Oregon USA 97339-1421 Bus. 541-753-7333 Cell. 541-740-5988 [EMAIL PROTECTED] www.hamanndonald.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] reports and reporting options?
I've got a project that requires lots of goofy reports. These reports are more than a simple html table (which would be nice) that the client wants to print out on standard 8.5x11 paper. Crystal Reports type of reports. I need to be able to produce these from PHP scripts and I'm looking for a solution. What are people using to accomplish this? -- Jeff D. Hamann Hamann, Donald Associates, Inc. PO Box 1421 Corvallis, Oregon USA 97339-1421 Bus. 541-753-7333 Cell. 541-740-5988 [EMAIL PROTECTED] www.hamanndonald.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] excel COM code example won't work....
I've been trying to get the follwing example to work and it just doesn't seem to be able to handle php variables in some of the excel com function args, like: /* start entering data into the cells */ for( $i = 0; $i 10; $i++ ) { $var_i = new Variant($i,VT_I4); echo $i. br; echo $var_i-value. br; $cell = $sheet-Cells( $i, 1 ); /* this gags, but */ $cell = $sheet-Cells( 1, 1 ); /* this works fine */ $cell-Activate(); $cell-Value = $i; /* this works */ } Is there something I'm missing or is this really touchy like trying to do automation a few years ago? Jeff. -- Jeff D. Hamann Hamann, Donald Associates, Inc. PO Box 1421 Corvallis, Oregon USA 97339-1421 Bus. 541-753-7333 Cell. 541-740-5988 [EMAIL PROTECTED] www.hamanndonald.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] array of checkboxes?
I'm trying to apply/update a database using a form on a previous page that uses checkboxes instead of edit fields, and I'm having trouble getting the correct values from the checkboxes. My form: printf( TD align='center' ); if( $row[approved] == 1 ) { printf( INPUT type='checkbox' name='approved[]' value='ON' checked ); } else { printf( INPUT type='checkbox' name='approved[]' ); } printf( /TD ); then calls a php file which contains: /* process the periods and update */ $num_rows = count( $id ); for( $i = 0; $i $num_rows; $i++ ) { if( $approved[$i] == 'ON' ) { $appr = 1; } else { $appr = 0; } /* run the sql statement here */ $sql_str = update . allotee_approval . set . pct_ownership = $pct_ownership[$i], . approved = $appr . where . log_unit = $form_log_unit and . scale_unit = $form_scale_unit and . id = '$id[$i]' ; Jeff. -- Jeff D. Hamann Hamann, Donald Associates, Inc. PO Box 1421 Corvallis, Oregon USA 97339-1421 Bus. 541-753-7333 Cell. 541-740-5988 [EMAIL PROTECTED] www.hamanndonald.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] no mod_dbase on FreeBSD?
PHP Group: I'm having a devil of a time adding additional modules to php using the ports method. Since I'm a little new to FreeBSD, I thought thew ports method would be the easiest. I attempt to do a Make install (cleanly) and get the box that comes up asking which modules to install, I select the Dbase on (as well as the others MySQL, etc) and it seems to only add the follwing modules: openssl, mysql, gd, zlib, apache, pcre, posix, sockets, session, but no dbase! Is there something I'm missing. I'm sure there is. This is the mod_php4 (4.0.6) on FreeBSD 4.4. Is there a way for me to get the latest and greatest (using the ports?) Thanks, Jeff. -- Jeff D. Hamann Hamann, Donald Associates, Inc. PO Box 1421 Corvallis, Oregon USA 97339-1421 Bus. 541-753-7333 [EMAIL PROTECTED] www.hamanndonald.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] cvs tags (version?)
I'm trying to find a way to insert the cvs version into a footer of my php files so I can simple ask the client to tell me the version number at the bottom of the page. I can then send an update or even better have the browser request an update for the file. -- Jeff D. Hamann Hamann, Donald Associates, Inc. PO Box 1421 Corvallis, Oregon USA 97339-1421 Bus. 541-753-7333 Cell. 541-740-5988 [EMAIL PROTECTED] www.hamanndonald.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] exec/system on FreeBSD help?
I've been trying to figure out why a command like exec()/system() works fine under windows and it doens't seem to run on FreeBSD. I've got a script that generates a latex file, runs pdflatex, and then moves the pdf file into a reports with a link on the generating page. Works fine on Win2k but when I try to run it on the BSD machine, it doesn't look like the commands are getting issued, or that I can't run the commands because of file permissions. I've chmod'd the dir for the website and that didn't seem to help. I tried some small script like exec(ls -la) and that worked. I then tried system( /usr/local/bin/pdflatex temp/report_file ); to try and diagnose the problem, and got Fatal Error occured, I can't write on file 'report_file.log', suggesting that there might still be some permissions problems. Maybe this is a apache thing? Any ideas? -- Jeff D. Hamann Hamann, Donald Associates, Inc. PO Box 1421 Corvallis, Oregon USA 97339-1421 Bus. 541-753-7333 Cell. 541-740-5988 [EMAIL PROTECTED] www.hamanndonald.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] exec/system on FreeBSD help?
so then I tried system( /usr/local/bin/pdflatex /usr/local/www/html/project_x/temp/report_file ); i think this is a write premission thing. yes, it's where I think it is Miguel Cruz [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... On Mon, 1 Apr 2002, Jeff D. Hamann wrote: I tried some small script like exec(ls -la) and that worked. I then tried system( /usr/local/bin/pdflatex temp/report_file ); to try and diagnose the problem, and got Fatal Error occured, I can't write on file 'report_file.log', suggesting that there might still be some permissions problems. Are you sure temp/report_file is where you think it is? May be safer to use an absolute path. miguel -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] exec/system on FreeBSD help?
got it figured out. permissions. Miguel Cruz [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... On Mon, 1 Apr 2002, Jeff D. Hamann wrote: I tried some small script like exec(ls -la) and that worked. I then tried system( /usr/local/bin/pdflatex temp/report_file ); to try and diagnose the problem, and got Fatal Error occured, I can't write on file 'report_file.log', suggesting that there might still be some permissions problems. Are you sure temp/report_file is where you think it is? May be safer to use an absolute path. miguel -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] building dynamic pdf files?
I'm currently working on a web based application (in php) and saw the power of being able edit fields in the pdf document. I can see how to build the pdf file by hand, but I have a few dozen forms (multiple pages of course) that I wish I could scan in and have a rough pdf file to start working with. I've been generating html code using php, and would like to directly generate pdf files as they look much better. Is there software out there that I can import an html file into, or excel, or word and spit out the pdf code, or something usable? Thanks, Jeff. -- Jeff D. Hamann Hamann, Donald Associates, Inc. PO Box 1421 Corvallis, Oregon USA 97339-1421 Bus. 541-753-7333 Cell. 541-740-5988 [EMAIL PROTECTED] www.hamanndonald.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] force refresh?
i'll give it a try... jeff. Sam Masiello [EMAIL PROTECTED] wrote in message 002001c1affa$9aa56560$6300fa0a@dev">news:002001c1affa$9aa56560$6300fa0a@dev... You can force the browser to refresh using a meta tag: meta HTTP-EQUIV=Refresh content=180 This will cause the page to refresh every 180 seconds. HTH Sam Masiello Software Quality Assurance Engineer Synacor (716) 853-1362 X289 [EMAIL PROTECTED] - Original Message - From: Chris Wright [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, February 07, 2002 11:34 AM Subject: RE: [PHP] force refresh? Probably only by writing javascript to the window using php. --- Christopher Wright 303 447 2496 x 107 www.netinfra.com We'll take care of it. Net Infrastructure has definitely helped our company, even though we're not in the US, Net Infrastructure has been a key part in the success of our business. Juan Carlos Saravia -Original Message- From: Jeff D. Hamann [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 07, 2002 9:02 AM To: [EMAIL PROTECTED] Subject: [PHP] force refresh? can i force a browser to refresh using php. jeff. -- Jeff D. Hamann Hamann, Donald Associates, Inc. PO Box 1421 Corvallis, Oregon USA 97339-1421 Bus. 541-753-7333 Cell. 541-740-5988 [EMAIL PROTECTED] www.hamanndonald.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 General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] force refresh?
can i force a browser to refresh using php. jeff. -- Jeff D. Hamann Hamann, Donald Associates, Inc. PO Box 1421 Corvallis, Oregon USA 97339-1421 Bus. 541-753-7333 Cell. 541-740-5988 [EMAIL PROTECTED] www.hamanndonald.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] command line are -c doesn't work on win2k?
nope. no difference. jeff. Mike Cullerton [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... on 1/18/02 12:00 AM, Jeff D. Hamann at [EMAIL PROTECTED] wrote: I've been trying to figure out what was wrong with my script... ? mail([EMAIL PROTECTED], Subject, command line mail() test); ? from the command line, php mail_test.php and getting, X-Powered-By: PHP/4.0.6 Content-type: text/html attempting to deliver the mailbr bWarning/b: Unknown error in bmail_test.php/b on line b3/bbr didn't notice any other responses, and this is just a guess here, but how about taking the '()' out of the body of the message. ie, command line mail test -- mike cullerton michaelc at cullerton dot com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: [PHP-WIN] command line are -c doesn't work on win2k?
the path to php is already in the PATH variable... I'm not doing anything different that http://bugs.php.net/bug.php?id=6742 ,but for some reason the -c doesn't make a difference... Jeff. Dl Neil [EMAIL PROTECTED] wrote in message 0d4f01c1a00e$87036ee0$2916100a@jrbrown">news:0d4f01c1a00e$87036ee0$2916100a@jrbrown... Jeff, The following batch files works for me (WinNTWS 4.0 SP6a):- cd c:\program files\php php.exe -q c:\.path.\w.php c:\.path.\webute.log NB the first line reflects my PHP config - your mileage may vary! Of course the other possibility is to add the PHP folder into the PATH environment variable... Regards, =dn - Original Message - From: Jeff D. Hamann [EMAIL PROTECTED] To: ; [EMAIL PROTECTED] Sent: 18 January 2002 07:00 Subject: [PHP-WIN] command line are -c doesn't work on win2k? I've been trying to figure out what was wrong with my script... ? mail([EMAIL PROTECTED], Subject, command line mail() test); ? from the command line, php mail_test.php and getting, X-Powered-By: PHP/4.0.6 Content-type: text/html attempting to deliver the mailbr bWarning/b: Unknown error in bmail_test.php/b on line b3/bbr Then I found a solution at http://bugs.php.net/bug.php?id=6742 , [22 Nov 2000 5:21am] [EMAIL PROTECTED] After a few emails this really got solved. Adding -c/path/to/phpini/ (command line) was the solution. --Jani but, when I tried it, php -c c:\php mail_test.php, Again, the results were, X-Powered-By: PHP/4.0.6Content-type: text/html attempting to deliver the mail brbWarning/b: Unknown error in bmail_test.php/b on line b3/bbr So, I tried a gazillion permitations on -c, -c /php, -c c:/php -c:\php\php.ini, etc, etc, etc, to no avail... I finally moved the script into the same dir as php.exe and it worked fine. The problem is that I need to run the script from the normal path and not from c:\php... Does the -c switch actually work? How can I run this script from another dir? Is this a bug? Thanks, Jeff. -- Jeff D. Hamann Hamann, Donald Associates, Inc. PO Box 1421 Corvallis, Oregon USA 97339-1421 Bus. 541-753-7333 Cell. 541-740-5988 [EMAIL PROTECTED] www.hamanndonald.com -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] command line are -c doesn't work on win2k?
This will work from the dir that contains php.exe.. ? mail( [EMAIL PROTECTED], subject, test ); ? here are the php.ini smtp lines... [mail function] ; For Win32 only. ;SMTP = stimpy - this works fine as does SMTP = 192.168.0.2 ; For Win32 only. sendmail_from = [EMAIL PROTECTED] I don't see how this could be a config problem. The emails I have been sending state that the script works *fine* from the same dir as php.exe. The problem arises when I attempt to run the script from another directory... Jeff. - Original Message - From: DL Neil [EMAIL PROTECTED] To: mike cullerton [EMAIL PROTECTED]; Jeff D. Hamann [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Friday, January 18, 2002 9:09 AM Subject: Re: [PHP] command line are -c doesn't work on win2k? Mike and Jeff, what about the [EMAIL PROTECTED]? is it failing on a 'bad' email address? or maybe putting everything in variables and trying mail($to,$subject,$message); =there's a difference between the way PHP talks to an SMTP server (using mail()) on Win32 compared to *nix - which can make advice on the forum 'tricky'. On Windows the email msg is shunted out of PHP and thrown at the SMTP server with no ceremony - and no 'backwards' communication eg a confirmatory msg got it thanks. Whereas *nix systems allow for some discussion between PHP and sendmail (for example). =thus under Windows the quality of the email address is almost irrelevant (to PHP at least). However the email lines from PHP.INI will be of interest. Can you post them please Jeff? =Regards, =dn on 1/18/02 9:14 AM, Jeff D. Hamann at [EMAIL PROTECTED] wrote: nope. no difference. jeff. Mike Cullerton [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... on 1/18/02 12:00 AM, Jeff D. Hamann at [EMAIL PROTECTED] wrote: I've been trying to figure out what was wrong with my script... ? mail([EMAIL PROTECTED], Subject, command line mail() test); ? from the command line, php mail_test.php and getting, X-Powered-By: PHP/4.0.6 Content-type: text/html attempting to deliver the mailbr bWarning/b: Unknown error in bmail_test.php/b on line b3/bbr didn't notice any other responses, and this is just a guess here, but how about taking the '()' out of the body of the message. ie, command line mail test -- mike cullerton michaelc at cullerton dot com -- mike cullerton michaelc at cullerton dot com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] command line are -c doesn't work on win2k?
No, but you're getting close. The .ini is in the same dir as the .exe and I'm guessing you guys aren't trying to diagnose this on a windows machine since we're covering all the simple things first. I don't mean to sound like a jerk, but I've covered all the possibilties I can think of. back-slashes, forward slashes, case sensitivity, spaces in the path c:\program files\apache group\apache... I'm guessing the -c (not the -C) switch isn't working on the win32 version. If I move the ini file into the path where I run the script, then the script works fine. so that... C:\Program Files\Apache Group\Apache\htdocs\new_spokanephp -c c:\program files\apache group\apache\htdocs\new_spokane mail_test.php and when i move the mail_test.php script into a dir one level higher and type C:\Program Files\Apache Group\Apache\htdocs\new_spokanephp -c c:\program files\apache group\apache\htdocs\new_spokane mail_test.php the script fails which the error C:\Program Files\Apache Group\Apache\htdocsphp -c c:\program files\apache group\apache\htdocs\new_spokane mail_test.php X-Powered-By: PHP/4.0.6 Content-type: text/html br bWarning/b: Unknown error in bmail_test.php/b on line b2/bbr C:\Program Files\Apache Group\Apache\htdocs Hope this helps... Jeff. - Original Message - From: DL Neil [EMAIL PROTECTED] To: Jeff D. Hamann [EMAIL PROTECTED]; mike cullerton [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Friday, January 18, 2002 9:53 AM Subject: Re: [PHP] command line are -c doesn't work on win2k? Jeff, If mail is working, then agree with your point about config. Appendix B. Using PHP from the command line Usage: php [-q] [-h] [-s [-v] [-i] [-f file] | {file [args...]} -q Quiet-mode. Suppress HTTP Header output. -C Do not chdir to the script's directory -c path Look for php.ini file in this directory PHP is case sensitive (whereas Windows is not). Where is the .ini file? (not the PHP.exe file) Does this help? =dn - Original Message - From: Jeff D. Hamann [EMAIL PROTECTED] To: DL Neil [EMAIL PROTECTED]; mike cullerton [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: 18 January 2002 17:25 Subject: Re: [PHP] command line are -c doesn't work on win2k? This will work from the dir that contains php.exe.. ? mail( [EMAIL PROTECTED], subject, test ); ? here are the php.ini smtp lines... [mail function] ; For Win32 only. ;SMTP = stimpy - this works fine as does SMTP = 192.168.0.2 ; For Win32 only. sendmail_from = [EMAIL PROTECTED] I don't see how this could be a config problem. The emails I have been sending state that the script works *fine* from the same dir as php.exe. The problem arises when I attempt to run the script from another directory... Jeff. - Original Message - From: DL Neil [EMAIL PROTECTED] To: mike cullerton [EMAIL PROTECTED]; Jeff D. Hamann [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Friday, January 18, 2002 9:09 AM Subject: Re: [PHP] command line are -c doesn't work on win2k? Mike and Jeff, what about the [EMAIL PROTECTED]? is it failing on a 'bad' email address? or maybe putting everything in variables and trying mail($to,$subject,$message); =there's a difference between the way PHP talks to an SMTP server (using mail()) on Win32 compared to *nix - which can make advice on the forum 'tricky'. On Windows the email msg is shunted out of PHP and thrown at the SMTP server with no ceremony - and no 'backwards' communication eg a confirmatory msg got it thanks. Whereas *nix systems allow for some discussion between PHP and sendmail (for example). =thus under Windows the quality of the email address is almost irrelevant (to PHP at least). However the email lines from PHP.INI will be of interest. Can you post them please Jeff? =Regards, =dn on 1/18/02 9:14 AM, Jeff D. Hamann at [EMAIL PROTECTED] wrote: nope. no difference. jeff. Mike Cullerton [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... on 1/18/02 12:00 AM, Jeff D. Hamann at [EMAIL PROTECTED] wrote: I've been trying to figure out what was wrong with my script... ? mail([EMAIL PROTECTED], Subject, command line mail() test); ? from the command line, php mail_test.php and getting, X-Powered-By: PHP/4.0.6 Content-type: text/html attempting to deliver the mailbr bWarning/b: Unknown error in bmail_test.php/b on line b3/bbr didn't notice any other responses, and this is just a guess here, but how about taking the '()' out of the body of the message. ie, command line mail test -- mike cullerton michaelc at cullerton dot com -- mike cullerton michaelc at cullerton dot com --
Re: [PHP] command line are -c doesn't work on win2k?
do you have an ini, not the exe, file in c:\winnt\system32 ? jeff. - Original Message - From: DL Neil [EMAIL PROTECTED] To: Jeff D. Hamann [EMAIL PROTECTED]; mike cullerton [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Friday, January 18, 2002 9:53 AM Subject: Re: [PHP] command line are -c doesn't work on win2k? Jeff, If mail is working, then agree with your point about config. Appendix B. Using PHP from the command line Usage: php [-q] [-h] [-s [-v] [-i] [-f file] | {file [args...]} -q Quiet-mode. Suppress HTTP Header output. -C Do not chdir to the script's directory -c path Look for php.ini file in this directory PHP is case sensitive (whereas Windows is not). Where is the .ini file? (not the PHP.exe file) Does this help? =dn - Original Message - From: Jeff D. Hamann [EMAIL PROTECTED] To: DL Neil [EMAIL PROTECTED]; mike cullerton [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: 18 January 2002 17:25 Subject: Re: [PHP] command line are -c doesn't work on win2k? This will work from the dir that contains php.exe.. ? mail( [EMAIL PROTECTED], subject, test ); ? here are the php.ini smtp lines... [mail function] ; For Win32 only. ;SMTP = stimpy - this works fine as does SMTP = 192.168.0.2 ; For Win32 only. sendmail_from = [EMAIL PROTECTED] I don't see how this could be a config problem. The emails I have been sending state that the script works *fine* from the same dir as php.exe. The problem arises when I attempt to run the script from another directory... Jeff. - Original Message - From: DL Neil [EMAIL PROTECTED] To: mike cullerton [EMAIL PROTECTED]; Jeff D. Hamann [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Friday, January 18, 2002 9:09 AM Subject: Re: [PHP] command line are -c doesn't work on win2k? Mike and Jeff, what about the [EMAIL PROTECTED]? is it failing on a 'bad' email address? or maybe putting everything in variables and trying mail($to,$subject,$message); =there's a difference between the way PHP talks to an SMTP server (using mail()) on Win32 compared to *nix - which can make advice on the forum 'tricky'. On Windows the email msg is shunted out of PHP and thrown at the SMTP server with no ceremony - and no 'backwards' communication eg a confirmatory msg got it thanks. Whereas *nix systems allow for some discussion between PHP and sendmail (for example). =thus under Windows the quality of the email address is almost irrelevant (to PHP at least). However the email lines from PHP.INI will be of interest. Can you post them please Jeff? =Regards, =dn on 1/18/02 9:14 AM, Jeff D. Hamann at [EMAIL PROTECTED] wrote: nope. no difference. jeff. Mike Cullerton [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... on 1/18/02 12:00 AM, Jeff D. Hamann at [EMAIL PROTECTED] wrote: I've been trying to figure out what was wrong with my script... ? mail([EMAIL PROTECTED], Subject, command line mail() test); ? from the command line, php mail_test.php and getting, X-Powered-By: PHP/4.0.6 Content-type: text/html attempting to deliver the mailbr bWarning/b: Unknown error in bmail_test.php/b on line b3/bbr didn't notice any other responses, and this is just a guess here, but how about taking the '()' out of the body of the message. ie, command line mail test -- mike cullerton michaelc at cullerton dot com -- mike cullerton michaelc at cullerton dot com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] command line are -c doesn't work on win2k?
I've been trying to figure out what was wrong with my script... ? mail([EMAIL PROTECTED], Subject, command line mail() test); ? from the command line, php mail_test.php and getting, X-Powered-By: PHP/4.0.6 Content-type: text/html attempting to deliver the mailbr bWarning/b: Unknown error in bmail_test.php/b on line b3/bbr Then I found a solution at http://bugs.php.net/bug.php?id=6742 , [22 Nov 2000 5:21am] [EMAIL PROTECTED] After a few emails this really got solved. Adding -c/path/to/phpini/ (command line) was the solution. --Jani but, when I tried it, php -c c:\php mail_test.php, Again, the results were, X-Powered-By: PHP/4.0.6Content-type: text/html attempting to deliver the mail brbWarning/b: Unknown error in bmail_test.php/b on line b3/bbr So, I tried a gazillion permitations on -c, -c /php, -c c:/php -c:\php\php.ini, etc, etc, etc, to no avail... I finally moved the script into the same dir as php.exe and it worked fine. The problem is that I need to run the script from the normal path and not from c:\php... Does the -c switch actually work? How can I run this script from another dir? Is this a bug? Thanks, Jeff. -- Jeff D. Hamann Hamann, Donald Associates, Inc. PO Box 1421 Corvallis, Oregon USA 97339-1421 Bus. 541-753-7333 Cell. 541-740-5988 [EMAIL PROTECTED] www.hamanndonald.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]