This is a discussion on Subarray within the alt.comp.lang.php forums, part of the PHP Programming Forums category; Hi, the following scenario: $lang = $_SESSION['lang']; $sql = "SELECT name, $lang FROM table_lang"; $result = mssql_query($sql); while(list($...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Hi,
the following scenario: $lang = $_SESSION['lang']; $sql = "SELECT name, $lang FROM table_lang"; $result = mssql_query($sql); while(list($name, $val) = mssql_fetch_row($result)) { $common[$name] = $val; } This works in Windows2000 and IIS5, but not in Windows Server 2003 and IIS6. Has anyone an idea?? greets chris |
|
|||
|
"Christian Weber" <avbc.def@ghi.de> wrote in message news:ceks74$bh7$1@papyrus.erlm.siemens.de... > Hi, > the following scenario: > > $lang = $_SESSION['lang']; > $sql = "SELECT name, $lang FROM table_lang"; > $result = mssql_query($sql); > while(list($name, $val) = mssql_fetch_row($result)) { > $common[$name] = $val; > } > > This works in Windows2000 and IIS5, but not in Windows Server 2003 and IIS6. > > Has anyone an idea?? > > greets > > chris > > try echoing $lang and see if it is a session thing. If it is, you may need to edit your php.ini file. Compare session info in php.ini between the 2 setup's RG |
|
|||
|
Hello,
all defined vars are available, i have checked. The vars "$name" and "$val" are present with their values, but "$common[$name] = $val" does not work in Windows Server 2003, but it works in Windows2000. greets chris "容d Eye Media - Richard Grove" <info崁edeyemedia.co.uk> wrote in message news:410df81f$0$41791$65c69314@mercury.nildram.net ... > > "Christian Weber" <avbc.def@ghi.de> wrote in message > news:ceks74$bh7$1@papyrus.erlm.siemens.de... > > Hi, > > the following scenario: > > > > $lang = $_SESSION['lang']; > > $sql = "SELECT name, $lang FROM table_lang"; > > $result = mssql_query($sql); > > while(list($name, $val) = mssql_fetch_row($result)) { > > $common[$name] = $val; > > } > > > > This works in Windows2000 and IIS5, but not in Windows Server 2003 and > IIS6. > > > > Has anyone an idea?? > > > > greets > > > > chris > > > > > > try echoing $lang and see if it is a session thing. > If it is, you may need to edit your php.ini file. > Compare session info in php.ini between the 2 setup's > RG > > > |
|
|||
|
"Christian Weber" <avbc.def@ghi.de> wrote in message news:cekuqv$fo5$1@papyrus.erlm.siemens.de... > Hello, > all defined vars are available, i have checked. > > The vars "$name" and "$val" are present with their values, > but "$common[$name] = $val" does not work in Windows Server 2003, but it > works in Windows2000. > > greets chris > > "容d Eye Media - Richard Grove" <info崁edeyemedia.co.uk> wrote in message > news:410df81f$0$41791$65c69314@mercury.nildram.net ... > > > > "Christian Weber" <avbc.def@ghi.de> wrote in message > > news:ceks74$bh7$1@papyrus.erlm.siemens.de... > > > Hi, > > > the following scenario: > > > > > > $lang = $_SESSION['lang']; > > > $sql = "SELECT name, $lang FROM table_lang"; > > > $result = mssql_query($sql); > > > while(list($name, $val) = mssql_fetch_row($result)) { > > > $common[$name] = $val; > > > } > > > > > > This works in Windows2000 and IIS5, but not in Windows Server 2003 and > > IIS6. > > > > > > Has anyone an idea?? > > > > > > greets > > > > > > chris > > > > > > > > > > try echoing $lang and see if it is a session thing. > > If it is, you may need to edit your php.ini file. > > Compare session info in php.ini between the 2 setup's > > RG > > > > > > > > I can't see $common[$name] mentioned anywhere is your script. Why would this be available? RG |
|
|||
|
Hi,
the line "$common[$name] = $val;" within the while loop works in Windows2000. I can locate entries in the array like $common["string"]. greets chris > > > > $lang = $_SESSION['lang']; > > > > $sql = "SELECT name, $lang FROM table_lang"; > > > > $result = mssql_query($sql); > > > > while(list($name, $val) = mssql_fetch_row($result)) { > > > > $common[$name] = $val; > > > > } > > > > > > > > > > > I can't see $common[$name] mentioned anywhere is your script. > Why would this be available? > RG > > > |
|
|||
|
On Mon, 2 Aug 2004 10:43:10 +0200, "Christian Weber" <avbc.def@ghi.de>
wrote: >Hello, >all defined vars are available, i have checked. > >The vars "$name" and "$val" are present with their values, >but "$common[$name] = $val" does not work in Windows Server 2003, but it >works in Windows2000. > >greets chris > <snip> >> > while(list($name, $val) = mssql_fetch_row($result)) { >> > $common[$name] = $val; >> > } <snip> Ah, good ol'M$ and their, "If it ain't broke, break it," philosophy. Just kidding. ;) Anyways, seriously now, try this (little bit) longer solution: while ($row = mysql_fetch_row($result)) { $results = $row; } foreach ($results as $name => $val) { $common[$name] = $val; } Hope this helps. I have no other idea, as I don't use IIS. |
|
|||
|
Hello,
thanks for your reply! This solution does also NOT work...:-( greets chris > Ah, good ol'M$ and their, "If it ain't broke, break it," philosophy. > Just kidding. ;) > > Anyways, seriously now, try this (little bit) longer solution: > > while ($row = mysql_fetch_row($result)) { > $results = $row; > } > > foreach ($results as $name => $val) { > $common[$name] = $val; > } > > Hope this helps. I have no other idea, as I don't use IIS. |
![]() |
| Thread Tools | |
| Display Modes | |
|
|