php-windows Digest 2 Aug 2001 06:29:35 -0000 Issue 680 Topics (messages 8614 through 8621): Problem installing PHP4 on Linux 8614 by: Kevin Sayre Re: mail(); error 8615 by: Chris Burwell attach file problem. 8616 by: arthur 8617 by: Holm Puder 8618 by: Hugh Bothwell W2k + iPlanet + php4.0.6 8619 by: R. loading the test page 8620 by: Alex Shiu Re: fork?!?! 8621 by: k 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] ----------------------------------------------------------------------
Ok, here's a real stupid question, but I can't see what I did wrong. Basically, I'm trying to get PHP to run on a Red Hat Linux server, installed the RPM, verified that the httpd.conf file has the LoadModule for PHP in it, but still, it won't process the scripts, simply spits out the code. What'd I miss? Thanks. Kevin Sayre [EMAIL PROTECTED]
Thanks Everybody I didn't even think of the whloe smtp server thing on my own computer. Thanks for your help! "Chris Burwell" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > when i try to send an e-mail using the mail(); function i get the following > message: > > Warning: Failed to Connect in d:\Server\apache\htdocs\dev\inc\functions.inc > on line 26 > > Line 26 of the functions.inc file reads like this: > > $mailsend = mail("$email", "$subject", "$body", "From: > $from\r\nContent-type:text/plain"); > > Can someone help me out? > >
Hello, I'm using mail to attach a file but I'm having a problem. My script works really good but when I send an attachment the file goes currupt. I don't know if the problem is the encoded_attach or enything else. Hope someone can help me. Here goes a part of my script that I add the attachment. Thanks Arthur Franco if ($attach != "none") { $file = fopen($attach, "r"); $contents = fread($file, $attach_size); $encoded_attach = chunk_split(base64_encode($contents)); fclose($file); $Headers .= "MIME-version: 1.0\n"; $Headers .= "Content-type: multipart/mixed; "; $Headers .= "\nContent-Type:text/html"; $Headers .= "boundary=\"Message-Boundary\"\n"; $Headers .= "Content-transfer-encoding: 7BIT\n"; $Headers .= "X-attachments: $attach_name"; $Headers .= "Content-type: $attach_type; name=\"$attach_name\"\n"; $Headers .= "Content-Transfer-Encoding:base64_encode\n"; $Headers .= "Content-disposition: attachment; filename=\"$attach_name\"\n\n"; $Headers .= "$encoded_attach\n"; }
Try this: $Answer = fread ........ $MailText =" This is the Text"; $fileName = "your-name.htm"; $mail_header =""; // Send mail to customer /* Generiere einen Boundary */ $boundary = strtoupper(md5(uniqid(time()))); /* Mail-Header using MIME-Mail-Header */ /* (siehe http://www.php3-forum.de/mime_mail.htm) */ $mail_header .= "MIME-Version: 1.0"; $mail_header .= "\nfrom: [EMAIL PROTECTED]"; $mail_header .= "\nContent-Type: multipart/mixed; boundary=$boundary"; $mail_header .= "\n\nThis is a multi-part message in MIME format "; /* Mail-Text */ $mail_header .= "\n--$boundary"; $mail_header .= "\nContent-Type: text/plain"; $mail_header .= "\nContent-Transfer-Encoding: 8bit"; $mail_header .= "\n\n" . $MailText; /* Your File */ $mail_header .= "\n--$boundary"; $mail_header .= "\nContent-Type: text/html; name=\"$fileName\""; /* Read from Array $contenttypes the right MIME-Typ */ $mail_header .= "\nContent-Transfer-Encoding: 8Bit"; $mail_header .= "\n\n$Answer"; /* End */ $mail_header .= "\n--$boundary--"; ----------------------- CUT ---------- Holm
"Arthur" <[EMAIL PROTECTED]> wrote in message 048001c11a9d$387eb460$[EMAIL PROTECTED]">news:048001c11a9d$387eb460$[EMAIL PROTECTED]... > $Headers .= "MIME-version: 1.0\n"; > $Headers .= "Content-type: multipart/mixed; "; > $Headers .= "\nContent-Type:text/html"; > $Headers .= "boundary=\"Message-Boundary\"\n"; > $Headers .= "Content-transfer-encoding: 7BIT\n"; > $Headers .= "X-attachments: $attach_name"; > > $Headers .= "Content-type: $attach_type; name=\"$attach_name\"\n"; > $Headers .= "Content-Transfer-Encoding:base64_encode\n"; > $Headers .= "Content-disposition: attachment; filename=\"$attach_name\"\n\n"; > $Headers .= "$encoded_attach\n"; 1. You never start a block boundary 2. You give your message two global content-types 2. You never include a closing block boundary 3. You don't close your X-Attachments line, so Content-type will be run-on 4. You leave no spacing or separator between 'text/html' and 'boundary' 5. Your lines should end in \r\n (Windows systems may automatically expand \n, though). 6. If you are using mail(), you are mixing up what should be in the header vs. what should be in the body. 7. In theory it's possible to send several MIME messages and let them refer to sections of each other. Just to be correct, you should not use the same boundary in multiple messages - it should have a large randomized chunk. Try something like define("CRLF", "\r\n"); // may have to be "\n" only on Windows systems $bounds = makeRandBoundary(); // generate a randomized boundary text $headers = "MIME-Version: 1.0".CRLF ."Content-Type: multipart/mixed; boundary=\"$bounds\"".CRLF ; $msg = "This is a MIME-encoded message.".CRLF .CRLF ."--$bounds".CRLF ."Content-Type: text/html".CRLF ."Content-Transfer-Encoding: 7bit".CRLF .CRLF .$htmlMessage.CRLF ."".CRLF ."--$bounds".CRLF ."Content-Type: $attach_type; name=\"attach_name\"".CRLF ."Content-Transfer-Encoding: base64_encode".CRLF ."Content-Disposition: attachment; filename=\"$attach_name\"".CRLF .CRLF ."$encoded_attach".CRLF ."".CRLF ."--$bounds--".CRLF ; mail($to, $from, $msg, $headers); I don't guarantee any of this, it's just off the top of my head; if you want something to refer to, check your email client; it should have an option to let you read the raw text of a message. Send yourself an email with a small attachment, and see how it does it.
Can fine a proper way to install Php4 on an Netscape server 4.1. Try to install it like CGI (as explained here http://http://benoit.noss.free.fr/php/install-php.html ) But i got this error trying to GET /index.php, handle-processed reports: no way to service request for /index.php Anybody have a solution. I tried the SAPI solution but teh php crash each time it reads a file. R.
Hi all, I have some trouble getting the php test page to display, please help. I am running Apache 1.3.12 WinNT SP6 PHP 4.0.6 I already verified that apache is working. Then I installed PHP and added the necessary lines to httpd.conf Then I added <? phpinfo() ?> to a test.php file when i try to open http://localhost/test.php , IE always prompts me to open or save the file for some reason, does anyone know why? ~Alex
I have 4.0.6 running and I'm still getting the "Unable to fork" error that they say was fixed in 4.0.6. Maybe they don't have the latest Microsoft patches or something but this stinks. David "Arkegide" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hello, > > I've the same problem. > The php 4.0.6 version correct a problem with the exec (ie fork) function (I > see that in the 4.0.6 bug correction). > But when I install the 4.0.5 or 4.0.6 PHP version on windows NT they don't > want to work well. > And I must return to the 4.0.4 version to get something working well. > Try to install the 4.0.6 version and tell my if it works ! > > Jeff > > "G Schneider" <[EMAIL PROTECTED]> a écrit dans le message news: > [EMAIL PROTECTED] > > > > Hi all, > > > > I get this message when I try to delete a file using PHP: > > > > Warning: Unable to fork [del wmd_banner.png.temp.png] in > > c:\webspace\openhosting4\GB*******\webmastersdog.com\www\testfile.php on > > line 608 > > > > the code I'm using is the 'ole exec("del $file"); thingy you have to > > use on Windows servers (rather than the usual PHP unlink() function which > > only works on UNIX servers). > > > > So...... why am I getting this message? What setting is it that I need to > > switch on (or whatever)? > > > > Thanks all, > > Jefferrs > > > > > > ++++++++++++++++++++++++++++++++++++++++ > > http://www.webmastersdog.com > > where website owners go. and talk about stuff. > > ++++++++++++++++++++++++++++++++++++++++ > > > > > > > > > >