php-windows Digest 23 Jul 2004 20:22:08 -0000 Issue 2331

Topics (messages 24255 through 24259):

PHP4 AND PHP5 on the same server by WAMP5
        24255 by: romain bourdon
        24257 by: Jason Barnett

Re: CGI error on IIS
        24256 by: Jason Barnett

PHP en espa�ol - RE: [PHP-WIN] Re: Enviar Attach via PHP
        24258 by: Gryffyn, Trevor

Re: PHP and RedBack COM objects
        24259 by: Brian E

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 ---
Hi,

WAMP5 has now add-ons which enable new functionnalities on your server. The
main is the PHP4 add-on. It installs PHP4.3.8 on your WAMP5 (so you'll have
PHP5 and PHP4) and creates a new command in the WAMP5 menu (manager).
This command allows you to change from PHP5 to PHP4 (and inverse).
Chaging from PHP5 to PHP4 is automatic and takes just a few secondes.
You can have a special conf for each PHP since there are two php.ini files.

http://www.wampserver.com (french)

http://www.en.wampserver.com (english)

Romain

--- End Message ---
--- Begin Message ---
http://www.wampserver.com (french)

http://www.en.wampserver.com (english)

Romain

Very cool Romain! Will check this out.

--- End Message ---
--- Begin Message --- Odd Egil H. Selnes wrote:
Hi.

When I use: header("Location: ".$_SERVER["PHP_SELF"]."?page=something");
I get a strange CGI error on IIS. This error occurs about 4 out of 10 times
i access the page.

My guess is you need to encode the GET variables (something) you're sending through your request.

--- End Message ---
--- Begin Message ---
Try Babelfish, also.
Intento Babelfish tambi�n.

http://babelfish.altavista.com/




> -----Original Message-----
> From: Jason Barnett [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, July 22, 2004 10:03 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP-WIN] Re: Enviar Attach via PHP
> 
> 
> Hola,
> 
> Por favor perdoname mi espanol - hace tres anos que hable.  
> Primero debe 
> escribir a la lista espanol (hay mucha gente alli que hablen espanol):
> 
> php.general.es
> 
> 
> Gast�N Quiroga wrote:
> 
> > Hola,
> >     es la primera vez que escribo a la lista, pero desde 
> hace rato soy
> >     participante. La consulta es la siguiente.
> > 
> >     Yo estoy usando una class para enviar mails (con/sin 
> attachments) via PHP que funciona
> >     perfecto cuando no env�o attachs o cuando en la linea 
> de attach pongo
> >     "ruta/nombre" del archivo ej:
> > 
> >     $m->Attach( "c:/foo.txt", "text/plain", "foo.txt" );
> > 
> >     pero cuando quiero que tome la variable de archivo 
> desde un formulario POST no me lo
> >     env�a: ej:
> > 
> 
> Segundo, creo que su problema sea esto:
> 
> >     $m->Attach ("$_POST['arhchiv']","text/plain", "foo.txt");
> 
> Para $_POST debe usar {} o eliminar ".  Por ejemplo:
>        $m->Attach ($_POST['archiv'], 'text/plain', 'foo.txt');
>        $m->Attach("{$_POST['archiv']}", 'text/plain', 'foo.txt');
> 
> Es lo mismo para $_FILES.  Buena suerte!
> 
> -- 
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 

--- End Message ---
--- Begin Message ---
I got it to work finally...

The trick is that yes they are Variants.
But very odd ones..

the extract function I rewrote to work more efficiently and the properties must be accessed through:

$COMObject["property"]->Value

Looks Greek to me but that's what must get done and it works great in PHP.

Chalk up another thing for what PHP CAN do. (I prefer it over ASP any day.)

Brian

Jason Barnett wrote:
I checked it out a bit last night, since I don't own a license for RedBack (no offense :)) I tried checking the online manuals. Didn't see too much that looked useful. AFAIK the objects were supposed to be returning strings for the Value call, but I'm thinking that I somehow missed something and Value is just returning objects instead. Not sure what kind (again, I don't have a library to test) but my best guess is they're VARIANTs.

When you do figure out the answer to your problem, please post it here. There aren't many PHPers that use RedBack, but your solution may really help those in need.


Brian E wrote:

Please note.. some debugging code does exist. Also the server maybe just misconfigured... it comes with no documentation of where to put the .ini file that pairs with the COM object.

Here you go:

<?
//Response.Expires = 0
ini_set("max_execution_time","0");
error_reporting(0);
//' This function demonstrates how to extract values from a multivalued field
function ExtractMultiValues($redField)
{
$strValue = "";
echo $redFiled->Count . " ";


minor typo:
      echo $redField->Count . " ";

if ($redField->Count > 1){
for($count=1;$count <= $redField->Count;$count++)
{
if (strlen(trim($strValue)) > 0)
$strValue = $strValue . $redField->Value($count-1) .


test Value here and see if it's an object that you get. All of your strings below are sent through this function so this *has* to be the problem.

"<br>";
            else
                $strValue = $redField->Value($count-1) . "<br>";
            }
        }
    else
        $strValue = $redField->Value(0);


it would also be interesting to test this and make sure this gives you what you want as well (string?)

    return $strValue;
}


--- End Message ---

Reply via email to