php-windows Digest 12 Jan 2005 14:57:26 -0000 Issue 2532

Topics (messages 25287 through 25296):

Re: PHP and MS Access
        25287 by: Nadim Attari

help in understanding string / integer concatenation
        25288 by: Raymond Still
        25290 by: Michael Purdy
        25292 by: Davide
        25296 by: Raymond Still

weird problem php mssql
        25289 by: Davide

Re:[PHP-WIN] help in understanding string / integer concatenation
        25291 by: Mihai Frisan

Re: php 5.0.3
        25293 by: David Elliott

Re: Failed to connect to mailserver with IIS
        25294 by: forenpw
        25295 by: Zouari Fourat

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 ---
"Dale Attree" <[EMAIL PROTECTED]> a �crit dans le message de
news:[EMAIL PROTECTED]
> Anyone able to help me,
>
> I'm having to port a MySQL system to MS Access, but some of the SQL is not
> working on MS Access.
>
> MySQL statement : select * from po limit 0,20

Try this

"select * from po top 20"

>
> When I execute that sql statement using odbc_exec, it says there is a
synta
> error in the "FROM" clause.
>
> Please help. It is urgent.
>
> Thanx
> Dale

--- End Message ---
--- Begin Message ---
Hello all;
 I am a new PHP user. (But not new at programing.) I'm
running Win XP, Apache, PHP 5.0.3 (and PostgreSQL 8,
not that that should make a difference).

I'm trying to use PHP to generate drop down lists of
arbitrary length in a form (<select> and <option>)

I've come across something strange, to me, in using the
concatenation (.) operator. A simplified piece of code
follows. My question is, why is the output different
between the two versions?
apologies if I've missed something in the list archives.
Thanks in advance.
Ray
 
<html>
<head>
<title>Untitled</title>
</head>
<body>
<?PHP
$i=4;
$str = 'hello "' . $i+1 . '"';
echo $str;

?>
</body>
</html>


output:
--------------------

1"


or, version 2, same as above except break 

$str = 'hello "' . $i+1 . '"';

into 


$str = 'hello "'; 
$str .= $i+1 . '"';

output becomes:
--------------------
hello "5"  (this is what I want to see)

IE vs. netscape makes no difference.

--- End Message ---
--- Begin Message ---
Raymond

This produces what I think you want:

$str = 'hello' . ($i+1);

Mike


----- Original Message ----- 
From: "Raymond Still" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Wednesday, January 12, 2005 4:50 PM
Subject: [PHP-WIN] help in understanding string / integer concatenation


> Hello all;
>  I am a new PHP user. (But not new at programing.) I'm
> running Win XP, Apache, PHP 5.0.3 (and PostgreSQL 8,
> not that that should make a difference).
> 
> I'm trying to use PHP to generate drop down lists of
> arbitrary length in a form (<select> and <option>)
> 
> I've come across something strange, to me, in using the
> concatenation (.) operator. A simplified piece of code
> follows. My question is, why is the output different
> between the two versions?
> apologies if I've missed something in the list archives.
> Thanks in advance.
> Ray
>  
> <html>
> <head>
> <title>Untitled</title>
> </head>
> <body>
> <?PHP
> $i=4;
> $str = 'hello "' . $i+1 . '"';
> echo $str;
> 
> ?>
> </body>
> </html>
> 
> 
> output:
> --------------------
> 
> 1"
> 
> 
> or, version 2, same as above except break 
> 
> $str = 'hello "' . $i+1 . '"';
> 
> into 
> 
> 
> $str = 'hello "'; 
> $str .= $i+1 . '"';
> 
> output becomes:
> --------------------
> hello "5"  (this is what I want to see)
> 
> IE vs. netscape makes no difference.
> 
> -- 
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 

--- End Message ---
--- Begin Message ---
To understand how it works see at 'Operator precedence' item in the manual.
Regards.

--- End Message ---
--- Begin Message ---
Hello,
Thanks to Mike, Davide and Mihai!
Makes sense now!
Ray


On Wed, 12 Jan 2005 08:27:47 +0100, Davide wrote:

> 
> To understand how it works see at 'Operator
precedence'
> item in the manual.
> Regards.
> 
> -- 
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php

--- End Message ---
--- Begin Message --- Hi,
I've strange problem with a blob field in a mssql db containing a ms word document:


<?php
$conn = mssql_connect('hostname','xxxxx','yyyyy');
mssql_select_db ('docs');
$i_result=mssql_query('Select * from documenti_file where file_esercizio_doc = 2004 and file_id_doc = 200');
$ar_row = mssql_fetch_array ( $i_result);
echo $ar_row[7];
$file = fopen('test.doc','wb');
fwrite($file,$ar_row[7]);
fclose($file);
mssql_free_result($i_result);
echo "<br>". strlen($ar_row[7]);
?>
works ok using my box as server (apache 1.3.29 and php 4.3.4 - win xp) and I can read the written file with ms-word; now the strange thing:
running same script on another server (apache 1.3.28 and php 4.3.4 win nt) I got the same result on the screen (echo), but the file written is corrupt and it shows weird things when opened with ms-word. It seems like data got corrupted in the write() task. File size is exactely the same. Database used is the same and resides on a third box. I've the same mssql client dll on the two boxes (ntwdblib.dll ver. 2000.80.194.0)
Any idea ?

--- End Message ---
--- Begin Message ---
 that's what you need:

$str = 'hello "' . ($i+1) . '"';

you must  put $i+i  in brachets in order to evaluate first the expresion 
$i+1 and then concatenates it to the string

best regards
mihai

i'm not young enough to know everything

Hello all;
 I am a new PHP user. (But not new at programing.) I'm
running Win XP, Apache, PHP 5.0.3 (and PostgreSQL 8,
not that that should make a difference).

I'm trying to use PHP to generate drop down lists of
arbitrary length in a form (<select> and <option>)

I've come across something strange, to me, in using the
concatenation (.) operator. A simplified piece of code
follows. My question is, why is the output different
between the two versions?
apologies if I've missed something in the list archives.
Thanks in advance.
Ray
 
<html>
<head>
<title>Untitled</title>
</head>
<body>
<?PHP
$i=4;
$str = 'hello "' . $i+1 . '"';
echo $str;

?>
</body>
</html>


output:
--------------------

1"


or, version 2, same as above except break 

$str = 'hello "' . $i+1 . '"';

into 


$str = 'hello "'; 
$str .= $i+1 . '"';

output becomes:
--------------------
hello "5"  (this is what I want to see)

IE vs. netscape makes no difference.

-- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: 
http://www.php.net/unsub.php

--- End Message ---
--- Begin Message ---
Dear jamie,

On 12 January 2005, at 01:51:05 +0100 (which was 00:50 where I live)
Jamie Murray thoughtfully wrote the following

>> Anybody running this on winxp IIS5.(using isapi)
>> 5.0.2 ran with no problems, but since I have moved to 5.0.3 I can't even
>> view a page.
>> Thoughts ,or comments appreciated.

> Sorry I didn't list my error.  http 500 internal server error not much help,
> but that's it. Like I said exact same config for 5.0.2 works just fine.

A small tip. IIS and IE can hide errors so switch off 'Show friendly HTTP
error messages'

-- 
 Cheers,                   _______________________________________________
  David                   |    David  Elliott   |    Software  Engineer   |
 _________________________| [EMAIL PROTECTED] |  PGP Key ID 0x650F4534  |
| SGT Schultz of Borg - "I assimilate nawwthing... nawwwwwthhh-thiiing!"  |

--- End Message ---
--- Begin Message ---
I could solve the problem!
It was the antivirus, who blocked php!!!
Good to know! :-)

pw

"Forenpw" <[EMAIL PROTECTED]> schrieb im Newsbeitrag 
news:[EMAIL PROTECTED]
> Hello,
>
> I installed PHP4.3.10 on IIS/win2000!
> The settings in php.ini is correct, I use the same smtp for my e-Mail 
> dddresse in Outlook-Express and it work fine without authentification.
> So, the problem must be a PHP-Problem.
>
> Do anybody know the solution of this problem?
> Is there a way to get a better error message then this:
> Warning: mail(): Failed to connect to mailserver at "smtp.freesurf.ch" 
> port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use 
> ini_set() in E:\test_mailtest.php on line 9
>
> Thanks
>
> pw 

--- End Message ---
--- Begin Message ---
what about the virtual smtp server of IIS ?
u should connect to that vs after configuring it to relay on an
external smtp server, as i know u cant connect directly to an external
smtp, u should pass by the vs (take a look at smart host and relay
options in the vvs of IIS)


On Wed, 12 Jan 2005 09:52:14 +0100, forenpw <[EMAIL PROTECTED]> wrote:
> I could solve the problem!
> It was the antivirus, who blocked php!!!
> Good to know! :-)
> 
> pw
> 
> "Forenpw" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
> news:[EMAIL PROTECTED]
> > Hello,
> >
> > I installed PHP4.3.10 on IIS/win2000!
> > The settings in php.ini is correct, I use the same smtp for my e-Mail
> > dddresse in Outlook-Express and it work fine without authentification.
> > So, the problem must be a PHP-Problem.
> >
> > Do anybody know the solution of this problem?
> > Is there a way to get a better error message then this:
> > Warning: mail(): Failed to connect to mailserver at "smtp.freesurf.ch"
> > port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use
> > ini_set() in E:\test_mailtest.php on line 9
> >
> > Thanks
> >
> > pw
> 
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
>

--- End Message ---

Reply via email to