php-windows Digest 19 Apr 2001 22:47:55 -0000 Issue 553

Topics (messages 6863 through 6901):

Re: Xitami Config
        6863 by: Wolfgang Schneider

Select statement not working
        6864 by: Nick Allen
        6865 by: Gregory_Griffiths.cargill.com

Newbie back for more
        6866 by: r.gelstharp
        6869 by: Johannes Janson

Re: Php3
        6867 by: Manesh

Debugging in php4 ?
        6868 by: FX Liagre
        6876 by: Yasuo Ohgaki

Re: mssql and php4
        6870 by: Svensson, B.A.T.
        6873 by: Svensson, B.A.T.
        6874 by: Mr. Adam ALLEN.

Multi-threaded pages in PHP??
        6871 by: Todd Johnson
        6875 by: Rasmus Lerdorf

Re: newbie needs help setting up PHP4 with win98 SE and PWS
        6872 by: Phil Driscoll

Warnings w/ !$var
        6877 by: Nicholas Pappas

Re: MSSQL varchar fields truncation revisited
        6878 by: Svensson, B.A.T.
        6881 by: Svensson, B.A.T.

mail server with php
        6879 by: oifik
        6880 by: Flint Doungchak

MSSQL text  fields truncation
        6882 by: Kelvin Luck
        6883 by: Flint Doungchak
        6890 by: Frank M. Kromann

PHP4 on Win problem
        6884 by: GArlington
        6886 by: Phil Driscoll

While not working
        6885 by: Danilo Meles

Error message configuration
        6887 by: Olivier Botineau

xml with php
        6888 by: steve lee
        6889 by: James Moore

Dynamic Pulldown lists
        6891 by: Robert Trembath
        6894 by: Frank M. Kromann
        6897 by: Svensson, B.A.T.

mysql
        6892 by: Manesh
        6893 by: Mr. Adam ALLEN.
        6896 by: Manesh
        6899 by: Mr. Adam ALLEN.
        6900 by: Manesh

dynamic pulldowns from DB
        6895 by: Robert Trembath

Re: [PHP-DEV] RE: [PHP-WIN] Dynamic Pulldown lists
        6898 by: Derick Rethans

imap_fetchbody parts problem
        6901 by: Ketan

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]


----------------------------------------------------------------------


Hi,

I haven't followed this thread, but just now came across it and wanted
to mention my setup which works very well for the use of PHP with
Xitami.

Xitami installed in c:\xitami
PHP installed in c:\php

In the default.cfg file in the \xitami folder, there is a section on
[server] which tells xitami which pages to serve ... it reads here:

[Server]
    Default1=index.php3
    Default2=index.php
    Default3=index.phtml
    Default4=index.html

The various "domains" I have defined as "virutal hosts" and for each
one there is a cfg file such as "domain01.cfg". In that cfg file there
are these sections which may be relevant::

[Filter]
    .php=c:\php\php.exe
    .php3=c:\php\php.exe
    .phtml=c:\php\php.exe

[Mime]
    Php=application/x-httpd-php3
    Php3=application/x-httpd-php3
    Phtml=application/x-httpd-php3

[Accesslog]
    Filename=domain01.log

[Security]
    Admin=0
    Filename=domain01.aut

[Server]
    Default1=index.php3
    Default2=index.php
    Default3=index.html
    Cgi-bin=cgi-bin
    Webpages=c:\websites\domain01.de

Actually, you can run the Xitami administration from within your
browser and set up virtual hosts and enter these different variables in
these sections via the browser as well ....following step by step
through the different administrative sections.

Hope this helps a bit ...


God bless you with His grace and peace 
Wolfgang Schneider

Looking for Biblical information? COME AND SEE! Check it out NOW!
-- BibelCenter: http://www.bibelcenter.de 
-- Bookstore: http://www.worthy.net/BibelCenter/ - "Great offers! Check it out!"
-- Christian eBooks: http://www.christian-ebooks.de







Can't seem to troubleshoot this one...

WinNT4.0
PHP4.0.3 cgi
Apache (latest)

Code queries an Access database via ODBC and returns an empty dataset
although there are definately records in there. Connection is fine - no
errors and a valid connection handle is returned.

echoing the query string to the page and then copying/pasting that directly
into the sql edit section of the query builder in MSAccess works fine.

Query is so simple it hurts:

SELECT txtIntCategory FROM tblIntCategory;

yet it returns *NOTHING*!!

Identical Access query returns 8 string values.

Any ideas or known bugs?

TIA.

Nick.







Please cna you post the rest of your PHP code so we can have a look at 
it.

> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: 19 April 2001 13:13
> To: [EMAIL PROTECTED]
> Cc: [EMAIL PROTECTED]
> Subject: [PHP-WIN] Select statement not working
> 
> 
> Can't seem to troubleshoot this one...
> 
> WinNT4.0
> PHP4.0.3 cgi
> Apache (latest)
> 
> Code queries an Access database via ODBC and returns an empty dataset
> although there are definately records in there. Connection is 
> fine - no
> errors and a valid connection handle is returned.
> 
> echoing the query string to the page and then copying/pasting 
> that directly
> into the sql edit section of the query builder in MSAccess works fine.
> 
> Query is so simple it hurts:
> 
> SELECT txtIntCategory FROM tblIntCategory;
> 
> yet it returns *NOTHING*!!
> 
> Identical Access query returns 8 string values.
> 
> Any ideas or known bugs?
> 
> TIA.
> 
> Nick.
> 
> 
> 
> 
> -- 
> 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]
> 
> 





I think I'm a little too close to the problem to see it properly, but
there's something wrong with my SQL syntax in this query I'm trying to
create.

Readers of Julie Meroni's PHP Essentials will recognise it.

<?php
$sql = "CREATE TABLE $table_name (";

for ($i = 0; $i < count($field_name); $i++)
   {
 $sql .= "$field_name[$i] $field_type[$i]";

 if ($field_length[$i] != "")
    {
     $sql .= " ($field_length[$i]),";
    }//end if
 else
    {
     $sql .= ",";
    }//end else
   }//end for

$sql = substr($sql, 0, -1);

$sql .= ");";

It gives me this error

You have an error in your SQL syntax near '(50),product_price float
(10),product_category text (50),product_picture text (5' at line 1

Is there like an upper limit on the number of characters you can have in a
SQL statement?

All help is greatly appreciated!






Hi,

for TEXT you don't specify a length.
TINYTEXT
A BLOB or TEXT column with a maximum length of 255 (2^8 - 1) characters.

TEXT
A BLOB or TEXT column with a maximum length of 65535 (2^16 - 1) characters.

MEDIUMTEXT
A BLOB or TEXT column with a maximum length of 16777215 (2^24 - 1)
characters.

LONGTEXT
A BLOB or TEXT column with a maximum length of 4294967295 (2^32 - 1)
characters.

If the problem still occurs, output the whole query and post it.

Johannes


""r.gelstharp"" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
9bmks1$7re$[EMAIL PROTECTED]">news:9bmks1$7re$[EMAIL PROTECTED]...
> I think I'm a little too close to the problem to see it properly, but
> there's something wrong with my SQL syntax in this query I'm trying to
> create.
>
> Readers of Julie Meroni's PHP Essentials will recognise it.
>
> <?php
> $sql = "CREATE TABLE $table_name (";
>
> for ($i = 0; $i < count($field_name); $i++)
>    {
>  $sql .= "$field_name[$i] $field_type[$i]";
>
>  if ($field_length[$i] != "")
>     {
>      $sql .= " ($field_length[$i]),";
>     }//end if
>  else
>     {
>      $sql .= ",";
>     }//end else
>    }//end for
>
> $sql = substr($sql, 0, -1);
>
> $sql .= ");";
>
> It gives me this error
>
> You have an error in your SQL syntax near '(50),product_price float
> (10),product_category text (50),product_picture text (5' at line 1
>
> Is there like an upper limit on the number of characters you can have in a
> SQL statement?
>
> All help is greatly appreciated!
>
>
>
> --
> 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]
>






where do i add that. I am IIS5 (i think, i have win2k)

-----Original Message-----
From: rjones [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 18, 2001 11:42 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP-WIN] Php3


Manesh,
Are you trying to run php version 3 or scripts with a php3 extension?
If the latter you need to add php3 to your AddType application/x-httpd-php
.phtml .php

rwj

----- Original Message -----
From: "Manesh" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, April 18, 2001 9:33 PM
Subject: [PHP-WIN] Php3


> i have php4 and when i use .php its works, but php3 don't work
>
> plz help!
>
> --
> 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 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]





Hi all,

I'm evaluating PHPCoder (R2PR3), which seems to be a very intersting IDE (I
use Apache 1.3.14 php4.0.4pl1 win32 (NT4)

But what is the most interesting feature for me - I mean step by step
debugging - seems not to work, despite my modification of php.ini (debugger
section).

What do I miss ? And in a more general way, can anybody help me about
debugging php4 code in a win32 environment (even not with this tool
(PHPCoder), but with others).

Any help greatly appreciated...

TIA

FX Liagre






http://www.php.net/manual/en/debugger.php Unfortunately, PHP4 does not support it. -- Yasuo Ohgaki ""FX Liagre"" <[EMAIL PROTECTED]> wrote in message 9bmldr$d8e$[EMAIL PROTECTED]">news:9bmldr$d8e$[EMAIL PROTECTED]... > Hi all, > > I'm evaluating PHPCoder (R2PR3), which seems to be a very intersting IDE (I > use Apache 1.3.14 php4.0.4pl1 win32 (NT4) > > But what is the most interesting feature for me - I mean step by step > debugging - seems not to work, despite my modification of php.ini (debugger > section). > > What do I miss ? And in a more general way, can anybody help me about > debugging php4 code in a win32 environment (even not with this tool > (PHPCoder), but with others). > > Any help greatly appreciated... > > TIA > > FX Liagre > > > > -- > 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] >





>-----Original Message-----
>From: Tomasz Abramowicz [mailto:[EMAIL PROTECTED]]

>hihi, mssql = sux

Well, that's a very intelligent and elaborated statment indeed.

Regards,

        Anders






>-----Original Message-----
>From: Tomasz Abramowicz [mailto:[EMAIL PROTECTED]]

[...]

>check out www.mysql.com
>(or you maybe a really big bubu in your DB structure)

Cutted from "www.mysql.com"

"Why use MySQL? 
MySQL is very fast, reliable, and easy to use.
If that is what you are looking for, you should give it a try. "


The case against MySQL:

If you want to develop data independent applications,
and do information hiding within you applications,
then MySQL is not the choice.

Personally will not hesitate a second to trade performance in
speed if I can achieve a higher maintenance goal. It is a well
know fact that the development and installation cost is just
a fraction of the total life time cost of a system.

Any responsible developer has to take these fact in account,
when they choice the platform for their database system.

Also there does NOT exists "a right way" to do things.
A good design is a relative thing, since one has to know
what is said in the requirement specification of the system.

For example in a real-time system I would not hesitate is some
cases to trade clarity in favor of speed, but on the other hand,
in some other cases I might very well trade speed against clarity.

Any one who claims that this or that system is "the best" without
being able to telling from with point of view it is "the best",
does not know what they are talking about or are trying to humbug
you.




The most powerfull argument for me using MySQL is it's popularity amongst
UNIX hosts, along with Apache- and MySQL ports exist for a great many hosts.

Personally I'm trying to move away from MS software which ties you into it's
operating system, after using NT servers for a few years I'm finding it
incredibly hard to have an open-mind to other operating systems.

It's all down to the application of the database for which server you would
choose, budget may be a big factor for going along with MySQL, and then
choose your server.
I actually learnt SQL on Oracle, and found the transition to MySQL a little
daunting, but I'm happy with the speed and administration of MySQL, so I
guess that's what matters.

Yours
Mr. Adam ALLEN.
[EMAIL PROTECTED]
http://www.dynamicinteraction.co.uk


> -----Original Message-----
> From: Svensson, B.A.T. [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, April 19, 2001 2:37 PM
> To: Tomasz Abramowicz; [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject: RE: [PHP-WIN] mssql and php4
>
>
>
>
> >-----Original Message-----
> >From: Tomasz Abramowicz [mailto:[EMAIL PROTECTED]]
>
> [...]
>
> >check out www.mysql.com
> >(or you maybe a really big bubu in your DB structure)
>
> Cutted from "www.mysql.com"
>
> "Why use MySQL?
> MySQL is very fast, reliable, and easy to use.
> If that is what you are looking for, you should give it a try. "
>
>
> The case against MySQL:
>
> If you want to develop data independent applications,
> and do information hiding within you applications,
> then MySQL is not the choice.
>
> Personally will not hesitate a second to trade performance in
> speed if I can achieve a higher maintenance goal. It is a well
> know fact that the development and installation cost is just
> a fraction of the total life time cost of a system.
>
> Any responsible developer has to take these fact in account,
> when they choice the platform for their database system.
>
> Also there does NOT exists "a right way" to do things.
> A good design is a relative thing, since one has to know
> what is said in the requirement specification of the system.
>
> For example in a real-time system I would not hesitate is some
> cases to trade clarity in favor of speed, but on the other hand,
> in some other cases I might very well trade speed against clarity.
>
> Any one who claims that this or that system is "the best" without
> being able to telling from with point of view it is "the best",
> does not know what they are talking about or are trying to humbug
> you.
>
> --
> 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]
>





Hey is there a way to spin off a thread in PHP to do some large amount of
work that can communicate with the program via Session Variables??

Thanks
todd






> Hey is there a way to spin off a thread in PHP to do some large amount of
> work that can communicate with the program via Session Variables??

No, the closest you have is a feature called ticks.  Here is an example:

    function foo($str) {
        static $i = 0;

        print "$str: $i<br>\n";
        $i++;
    }

    register_tick_function("foo", "count");

    declare (ticks = 6) {

        for($i=0; $i<20; $i++) {
            echo "$i<br>\n";
        }

    }

The magic is in the declare { ... } block of code.  You stick whatever you
want to periodically interrupt inside the declare block.  In this example
every 6 ticks the for loop inside the declare block will be interrupted
and the registered tick function (foo) will be called.  A tick can loosely
thought of as a simple PHP expression.  So, this for loop goes through 2
ticks for every iteration.  1 tick is the for() expression and 1 tick is
the echo expression.

The resulting output from the above program (try it) is then:

        0
        1
        2
        count: 0
        3
        4
        5
        count: 1
        6
        7
        8
        count: 2
        9
        10
        11
        count: 3
        12
        13
        14
        count: 4
        15
        16
        17
        count: 5
        18
        19
        count: 6

It's not multithreading, but it is a way to go and check on some
long-running non-blocking process every now and then.

-Rasmus





>Here are the specifics, AFAIK, of my situation.
>
>- OS  is win98 SE
>- PHP version 4
>- installed MS PWS via the NT 4 option pack

To the best of my knowledge the NT4 option pack installs IIS on NT server,
and cut down version of IIS which they call PWS on NT workstation. On
windows 98, I've no idea what it will install but it will not be the same
PWS as you would normally install on Win 9x which is based on the old IIS3.
The IIS from the option pack does not use the registry for its configuration
so all your attempts there will come to nothing.

You should install a proper win9x version of PWS or better yet, install
Apache or Xitami.

Cheers
--
Phil Driscoll
Dial Solutions
+44 (0)113 294 5112
http://www.dialsolutions.com
http://www.dtonline.org





        I recently installed PHP on a Windows 2000 server and brought over a few 
general PHP scripts (used on a Linux box), but have found a very 
annoying difference that I am wondering if I can get rid of.
        I us many checks in my programs with a simple !$var check -- which works 
find in Linux, but I get a Warning message out of Windows whenever it 
comes to this (but it does continue with the execution correctly).

        Is there a way I can tell PHP to not print out those Warning messages for 
!$var cases?

        I relize there is the isset($var) option, but this is not an option in 
some cases.

        Thanks for any help!

        Nick





A related problem with the query Analyzer and MS SQL server 7.0:

255 character column width is the default value used by the Query Analyzer.

There exists an option in the menu "Query->Current Connection Options"
select this, and then select the tab "Advanced", there you will find the
field "Maximum characters per column", this adjust the, yes you got it, the
maximum output length of each column.

Regards,

        /Anders

>-----Original Message-----
>From: Andrian Pervazov
>Sent: Wednesday, April 18, 2001 3:46 PM
>To: Dan Cleveland
>Cc: Josh Seward; Daniel Furse; [EMAIL PROTECTED]
>Subject: [PHP-WIN] MSSQL varchar fields truncation revisited
>
>
>I'm still using 3.0.16 and when you have to display a varchar field in a
>MSSQL table everything over 255 characters gets truncated (this affects
>only selects, not inserts). I know that a workaround would be to
>transform the fieldtype from varchar to text, but this isn't very
>practical in the particular case. So, does anybody know if the problem
>still exists in later versions of PHP or has been fixed? Other
>suggestions and workarounds will be appreciated as well.




>i was under the impression that varchar fields in mysql had a 
>limit of 255 characters.  

I believe they were talking about the M$ SQL server? In version 6.5 the
varchar were limited to 255 bytes, but with version 7.0 the length can be
extended to 8000 bytes... and also Stored Procedures can now be, hmm, 128MB
in size.
This change happened due to developers complaints of the former limit of
64kb in version 6.5 - I guess they put the limit to 128MB just to keep the
mouth shout for ever within the community of database developers. ;)

I base this on what I heard at a conference I did attend some years ago in
Gothenburg/Sweden. At that time Microsoft had a presentation of "The Sphinx"
(== SQL Server 7.0 beta) they actually stressed the storing capacity of 128
MB, and said "We believe this will be enough for you..." (WHO did once
proclaimed that 1MB will be enough for a computer system... :)

About the 64kb sp memeory limitation in version 6.5. Microsoft claims a sp
can be as big as 64kb in version 6.5, but actually they can only be about
54kb - I knew this because I used to run into this limit quite often - and
wouldn't really had minded that few extra kb's. ;) Fortunately I haven't
explored the limitation of 128MB in MS SQL Server 7.0 - at least not yet...
:)

Regards,

        /Anders




first sorry for my english
Then i have a little matter i wand to write a script which allow managing
mails (account, read,write...) and i need to use some function as imap_open.
For this i need to use some librairis which not include with the basic php's
program. Do you know what and how i can doing?
Thanks





Oifik,

http://www.php.net/manual/en/ref.imap.php

You'll want to look at the URL above and check out the imap functions. You
can activate the imap functions by uncommenting the imap functions in your
php.ini file. I think the php_imap.dll is included in the 4.04pl1 release.
If not, go to 

http://www.php4win.de and download the latest there. 

I hope that helps.

-Flint

-----Original Message-----
From: oifik [mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 19, 2001 9:38 AM
To: Php-Windows
Subject: [PHP-WIN] mail server with php


first sorry for my english
Then i have a little matter i wand to write a script which allow managing
mails (account, read,write...) and i need to use some function as imap_open.
For this i need to use some librairis which not include with the basic php's
program. Do you know what and how i can doing?
Thanks


-- 
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]




Hi,
I've got a new problem to do with how long things can be! This time it is
from a text field so I would expect there to be no limit. But my text is
being cut off after 4096 characters. I am selecting with a mssql_query and
then using mssql_fetch_array to get the results. Has anyone run into this
problem before,
Thanks,
Kelvin.

-----Original Message-----
From: Svensson, B.A.T. [mailto:[EMAIL PROTECTED]]
Sent: 19 April 2001 17:48
To: Dan Cleveland; [EMAIL PROTECTED]
Subject: RE: [PHP-WIN] Re: MSSQL varchar fields truncation revisited


>i was under the impression that varchar fields in mysql had a
>limit of 255 characters.

I believe they were talking about the M$ SQL server? In version 6.5 the
varchar were limited to 255 bytes, but with version 7.0 the length can be
extended to 8000 bytes... and also Stored Procedures can now be, hmm, 128MB
in size.
This change happened due to developers complaints of the former limit of
64kb in version 6.5 - I guess they put the limit to 128MB just to keep the
mouth shout for ever within the community of database developers. ;)

I base this on what I heard at a conference I did attend some years ago in
Gothenburg/Sweden. At that time Microsoft had a presentation of "The Sphinx"
(== SQL Server 7.0 beta) they actually stressed the storing capacity of 128
MB, and said "We believe this will be enough for you..." (WHO did once
proclaimed that 1MB will be enough for a computer system... :)

About the 64kb sp memeory limitation in version 6.5. Microsoft claims a sp
can be as big as 64kb in version 6.5, but actually they can only be about
54kb - I knew this because I used to run into this limit quite often - and
wouldn't really had minded that few extra kb's. ;) Fortunately I haven't
explored the limitation of 128MB in MS SQL Server 7.0 - at least not yet...
:)

Regards,

        /Anders

--
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]





Kevin,

If you are using 4.0.4pl1 or recent version (4.0.x) of PHP, there is a
php.ini directive for MSSQL, for you to set this.

; Valid range 0 - 2147483647.  Default = 4096.
;mssql.textlimit = 4096

; Valid range 0 - 2147483647.  Default = 4096.
;mssql.textsize = 4096

Uncomment and set the directives as you wish. If you running 3.0.x I think
you're screwed. I'm not sure though. Frank will be able to answer this
better but I think one of his recent posting seemed to indicate that. I
never got it to work in 3.0.x.

Take care,

-Flint


-----Original Message-----
From: Kelvin Luck [mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 19, 2001 10:46 AM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] MSSQL text fields truncation


Hi,
I've got a new problem to do with how long things can be! This time it is
from a text field so I would expect there to be no limit. But my text is
being cut off after 4096 characters. I am selecting with a mssql_query and
then using mssql_fetch_array to get the results. Has anyone run into this
problem before,
Thanks,
Kelvin.

-----Original Message-----
From: Svensson, B.A.T. [mailto:[EMAIL PROTECTED]]
Sent: 19 April 2001 17:48
To: Dan Cleveland; [EMAIL PROTECTED]
Subject: RE: [PHP-WIN] Re: MSSQL varchar fields truncation revisited


>i was under the impression that varchar fields in mysql had a
>limit of 255 characters.

I believe they were talking about the M$ SQL server? In version 6.5 the
varchar were limited to 255 bytes, but with version 7.0 the length can be
extended to 8000 bytes... and also Stored Procedures can now be, hmm, 128MB
in size.
This change happened due to developers complaints of the former limit of
64kb in version 6.5 - I guess they put the limit to 128MB just to keep the
mouth shout for ever within the community of database developers. ;)

I base this on what I heard at a conference I did attend some years ago in
Gothenburg/Sweden. At that time Microsoft had a presentation of "The Sphinx"
(== SQL Server 7.0 beta) they actually stressed the storing capacity of 128
MB, and said "We believe this will be enough for you..." (WHO did once
proclaimed that 1MB will be enough for a computer system... :)

About the 64kb sp memeory limitation in version 6.5. Microsoft claims a sp
can be as big as 64kb in version 6.5, but actually they can only be about
54kb - I knew this because I used to run into this limit quite often - and
wouldn't really had minded that few extra kb's. ;) Fortunately I haven't
explored the limitation of 128MB in MS SQL Server 7.0 - at least not yet...
:)

Regards,

        /Anders

--
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 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]




You can set the limits in php.ini using these settings:

; Valid range 0 - 2147483647.  Default = 4096.
;mssql.textlimit = 4096

; Valid range 0 - 2147483647.  Default = 4096.
;mssql.textsize = 4096

- Frank

> Hi,
> I've got a new problem to do with how long things can be! This time it is
> from a text field so I would expect there to be no limit. But my text is
> being cut off after 4096 characters. I am selecting with a mssql_query and
> then using mssql_fetch_array to get the results. Has anyone run into this
> problem before,
> Thanks,
> Kelvin.
> 
> -----Original Message-----
> From: Svensson, B.A.T. [mailto:[EMAIL PROTECTED]]
> Sent: 19 April 2001 17:48
> To: Dan Cleveland; [EMAIL PROTECTED]
> Subject: RE: [PHP-WIN] Re: MSSQL varchar fields truncation revisited
> 
> 
> >i was under the impression that varchar fields in mysql had a
> >limit of 255 characters.
> 
> I believe they were talking about the M$ SQL server? In version 6.5 the
> varchar were limited to 255 bytes, but with version 7.0 the length can be
> extended to 8000 bytes... and also Stored Procedures can now be, hmm, 128MB
> in size.
> This change happened due to developers complaints of the former limit of
> 64kb in version 6.5 - I guess they put the limit to 128MB just to keep the
> mouth shout for ever within the community of database developers. ;)
> 
> I base this on what I heard at a conference I did attend some years ago in
> Gothenburg/Sweden. At that time Microsoft had a presentation of "The Sphinx"
> (== SQL Server 7.0 beta) they actually stressed the storing capacity of 128
> MB, and said "We believe this will be enough for you..." (WHO did once
> proclaimed that 1MB will be enough for a computer system... :)
> 
> About the 64kb sp memeory limitation in version 6.5. Microsoft claims a sp
> can be as big as 64kb in version 6.5, but actually they can only be about
> 54kb - I knew this because I used to run into this limit quite often - and
> wouldn't really had minded that few extra kb's. ;) Fortunately I haven't
> explored the limitation of 128MB in MS SQL Server 7.0 - at least not yet...
> :)
> 
> Regards,
> 
>       /Anders
> 
> --
> 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 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]
> 
> 
> 







Pls, help.
I installed PHP4 on my test machine (runs Win98, Apache...) and now when I
try to call php page download pops-up then dos window opens for fraction of
a second so I can not see what it displays and that is it. Something
happens, but I have no idea what?
Maybe somebody can help.

Thanks.
G.A.






You've almost certainly not set up your httpd.conf correctly.
Double check what you've done against the php installation instructions.

Cheers
-- 
Phil Driscoll
Dial Solutions
+44 (0)113 294 5112
http://www.dialsolutions.com
http://www.dtonline.org





Hy There;

I'm trying to get a string from one table in my db. I'm using while to get
get this data. But it's not working:

Please see the following code , In the while tag I'm trying to get the
USER_ID from my table, but it returns zero instead.
What I'm doing wrong???

Thanks for a while !!

Danilo Meles

<?
//conexão com o Banco
include ("db.php");
//Selecao do db
mysql_select_db("$DB") or die("Db não encontrado");
//Querys do programa
$quser= "SELECT id_User, login, senha FROM user Where login ='$usuario'";

$qinsuser = "insert into user (login, senha) values ('$usuario', '$senha')";

$qbaseuser = "INSERT INTO AddressUser (Id_AddUser, UrlUser, IndiceUser)
SELECT Id_User, Url, Indice FROM address";

$qveruser = "SELECT id_User, login, senha FROM user Where login =
'$usuario'";

$qupuser = "UPDATE AddressUser SET Id_AddUser = '$id' WHERE Id_AddUser
='5'";

//verificação da caixa postal
$mbox = @imap_open ("{paraisonet.com.br:143}INBOX", "$usuario", "$senha");
if (!$mbox):
echo "Ooopsss !!!<br><br> Por favor se você é assinante da ParaisoNet, tente
novamente. <br><br> Caso contrário clique aqui.";
exit;
endif;
// pesquisa se usuario existe
$queryuser = mysql_query("$quser")or die("a pesquisa de usuario falhou");
$Num = mysql_num_rows($queryuser);
 if (!$Num):
 //inserção de novo usuario
 $queryinsuser = mysql_query("$qinsuser")or die("a inserção falhou falhou");
// copia de registros de uma tabela para outra
 $querybaseuser = mysql_query("$qbaseuser")or die("a inserçao da base
falhou");

// here is the while command. But the $id variable get zero (0) , and it
should get the ID_USER from my db. What I'm doing wrong??
 while ($dados = mysql_fetch_array($queryuser)):
 $id = $dados[id_User];
 endwhile;


 // atualização do id do usuario
 $queryupsuser = mysql_query("$qupuser")or die("A atualização falhou");
 if ($queryupsuser):
 echo "deu ceto";
 echo "$id foda";
 else:
 echo "deu errado";
 endif;
else:
 echo "usuario existente ";
endif;

?>





Hello

Is there anyway to configure PHP and/or mySQl and/or Apache
that a detailled message appears when an error occurs
executing a query like in phpMyAdmin 2.1.0?

* mysql-3.23.36-win
* apache_1.3.19-win32
* php-4.0.4pl1-Win32

Olivier.

NB about sub-select on this morning I save myself without
adding and adding and adding substring in while instruction making :

SELECT t_effet.lib_effet
FROM t_effet, tr_scene_effet, t_scene 
WHERE t_effet.num_effet = tr_scene_effet.num_effet AND tr_scene_effet.num_scene = 3 
AND tr_scene_effet.num_scene = t_scene.num_scene

or

SELECT DISTINCT t_effet.lib_effet
FROM t_effet, tr_scene_effet 
WHERE t_effet.num_effet = tr_scene_effet.num_effet AND tr_scene_effet.num_scene = 3

Thats not easy without sub-select for non " produit cartesien " friend !





Please can you guide me, I want to use php to update
the following xml with the values the user fills in.
for example add value="" in the "input type text" line
and add checked to the Radio button line. Is there any
functions in php that can be used to step through a
xml and just update the form object lines(e.g. Text,
Radio, Check...) 

<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="app.xsl"?>
<?cocoon-process type="xslt"?>
<Form>
 <Text  LABEL="NAME" SIZE="24" NAME="Name"/>
 <Radio LABEL="10" NAME="AGE" VALUE="10"/>
 <Radio LABEL="20" NAME="AGE" VALUE="20"/>
 <Check LABEL="stamps" NAME="hobby" VALUE="stamps"/>
</Form>

Any guidance would be greatly appreciated,

Thank,
Steve


__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/




> Any guidance would be greatly appreciated,

Please dont cross post like this these questions should be sent to
php-general. I just got three copies of this in my mailbox which isnt really
necessary now is it?

- James





A little help from anyone please.

I know this was discussed before but I can't find it now that I need it. I
want to dynamically populate a pulldown list from a mysql query based on
what is selected from another pulldown list populated by a query from mysql.
If the first choice is changed a different list of option is populated in
the second. Please help!

Robert





You can do this by reloading the page when the first list is changed or by applying 
all the different values for the second list in JavaScript arrays and have some 
JavaScript code to populate the second list.

- Frank

> A little help from anyone please.
> 
> I know this was discussed before but I can't find it now that I need it. I
> want to dynamically populate a pulldown list from a mysql query based on
> what is selected from another pulldown list populated by a query from mysql.
> If the first choice is changed a different list of option is populated in
> the second. Please help!
> 
> Robert
> 
> 
> -- 
> 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]
> 
> 
> 








>-----Original Message-----
>From: Robert Trembath [mailto:[EMAIL PROTECTED]]
>Sent: Thursday, April 19, 2001 10:10 PM
>To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
>Subject: [PHP-WIN] Dynamic Pulldown lists
>
>
>A little help from anyone please.
>
>I know this was discussed before but I can't find it now that I need it. I
>want to dynamically populate a pulldown list from a mysql query based on
>what is selected from another pulldown list populated by a query from
mysql.
>If the first choice is changed a different list of option is populated in
>the second. Please help!

In meta code:

DO DBQUERY <fetch [list] with argument [which list] from the previuos form>

DO WRITE   "<FORM ... etc, etc>"
DO WRITE   "  <SELECT ... etc, etc, blaha, blaha>
DO WHILE <not end of the [list]> 
  DO WRITE "     <OPTION VALUE=" + <your value for this [list].[element] +
">"
  DO WRITE "       [list].[element]"
  DO WRITE "     </OPTION>"
END WHILE
DO WRITE   "   </SELECT>"
DO WRITE   "</FORM>"

And at last and most important:

WHILE (NOT <understand HTML>)
  GOTO http://www.w3.org/MarkUp/Guide/
END WHILE
IF (<still wants to learn more>)
  GOTO http://www.w3.org/MarkUp/Guide/Advanced.html
ELSE IF (<wants to read core specification>)
  GOTO http://www.w3.org/TR/html401/
ELSE IF NOT (<know how to program something>)
  <read Knut's handbook>
ELSE IF (NOT <problem still solved>)
  <then ask for help>
END IF




when i open phpMyAdmini get this error





Warning: MySQL Connection Failed: Can't connect to MySQL server on
'localhost' (10061) in lib.inc.php3 on line 255
Error
MySQL said:
Back


i installed the right version i think, can someone gimme a link to a file
that i can use with a win2k PC? this is for mysql

thx!





Have you changed the options in config.lib.php3 for your server

$cfgServers[1]['host'] = 'localhost';           // MySQL hostname
$cfgServers[1]['user'] = 'asduk';                // MySQL user (only needed
with basic auth)
$cfgServers[1]['password'] = 'a different password';                // MySQL
password (only needed


Yours
Mr. Adam ALLEN.
[EMAIL PROTECTED]
http://www.dynamicinteraction.co.uk



> -----Original Message-----
> From: Manesh [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, April 19, 2001 9:13 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP-WIN] mysql
>
>
> when i open phpMyAdmini get this error
>
>
>
>
>
> Warning: MySQL Connection Failed: Can't connect to MySQL server on
> 'localhost' (10061) in lib.inc.php3 on line 255
> Error
> MySQL said:
> Back
>
>
> i installed the right version i think, can someone gimme a link to a file
> that i can use with a win2k PC? this is for mysql
>
> thx!
>
>
> --
> 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]
>





i did a find file for it, and could not find it!

-----Original Message-----
From: Mr. Adam ALLEN. [mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 19, 2001 4:21 PM
To: Manesh; [EMAIL PROTECTED]
Subject: RE: [PHP-WIN] mysql


Have you changed the options in config.lib.php3 for your server

$cfgServers[1]['host'] = 'localhost';           // MySQL hostname
$cfgServers[1]['user'] = 'asduk';                // MySQL user (only needed
with basic auth)
$cfgServers[1]['password'] = 'a different password';                // MySQL
password (only needed


Yours
Mr. Adam ALLEN.
[EMAIL PROTECTED]
http://www.dynamicinteraction.co.uk



> -----Original Message-----
> From: Manesh [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, April 19, 2001 9:13 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP-WIN] mysql
>
>
> when i open phpMyAdmini get this error
>
>
>
>
>
> Warning: MySQL Connection Failed: Can't connect to MySQL server on
> 'localhost' (10061) in lib.inc.php3 on line 255
> Error
> MySQL said:
> Back
>
>
> i installed the right version i think, can someone gimme a link to a file
> that i can use with a win2k PC? this is for mysql
>
> thx!
>
>
> --
> 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 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]





in the phpMyAdmin directory, it's called config.inc.php3 (not
config.lib.php3), I was thinking through more than one thing when I wrote
back to you).

Yours
Mr. Adam ALLEN.
[EMAIL PROTECTED]
http://www.dynamicinteraction.co.uk


> -----Original Message-----
> From: Manesh [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, April 19, 2001 9:27 PM
> To: Mr. Adam ALLEN.
> Subject: RE: [PHP-WIN] mysql
>
>
> where is that?
>
> -----Original Message-----
> From: Mr. Adam ALLEN. [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, April 19, 2001 4:21 PM
> To: Manesh; [EMAIL PROTECTED]
> Subject: RE: [PHP-WIN] mysql
>
>
> Have you changed the options in config.lib.php3 for your server
>
> $cfgServers[1]['host'] = 'localhost';           // MySQL hostname
> $cfgServers[1]['user'] = 'asduk';                // MySQL user
> (only needed
> with basic auth)
> $cfgServers[1]['password'] = 'a different password';
>   // MySQL
> password (only needed
>
>
> Yours
> Mr. Adam ALLEN.
> [EMAIL PROTECTED]
> http://www.dynamicinteraction.co.uk
>
>
>
> > -----Original Message-----
> > From: Manesh [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, April 19, 2001 9:13 PM
> > To: [EMAIL PROTECTED]
> > Subject: [PHP-WIN] mysql
> >
> >
> > when i open phpMyAdmini get this error
> >
> >
> >
> >
> >
> > Warning: MySQL Connection Failed: Can't connect to MySQL server on
> > 'localhost' (10061) in lib.inc.php3 on line 255
> > Error
> > MySQL said:
> > Back
> >
> >
> > i installed the right version i think, can someone gimme a link
> to a file
> > that i can use with a win2k PC? this is for mysql
> >
> > thx!
> >
> >
> > --
> > 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 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]
>





still get this


Warning: MySQL Connection Failed: Can't connect to MySQL server on
'localhost' (10061) in lib.inc.php3 on line 255
Error
MySQL said:
Back


PLEASE GIMME A LINK TO A MYSQL VERSION FOR WINDOWZ (THE NEWST ONE)

-----Original Message-----
From: Mr. Adam ALLEN. [mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 19, 2001 5:11 PM
To: [EMAIL PROTECTED]
Subject: FW: [PHP-WIN] mysql


in the phpMyAdmin directory, it's called config.inc.php3 (not
config.lib.php3), I was thinking through more than one thing when I wrote
back to you).

Yours
Mr. Adam ALLEN.
[EMAIL PROTECTED]
http://www.dynamicinteraction.co.uk


> -----Original Message-----
> From: Manesh [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, April 19, 2001 9:27 PM
> To: Mr. Adam ALLEN.
> Subject: RE: [PHP-WIN] mysql
>
>
> where is that?
>
> -----Original Message-----
> From: Mr. Adam ALLEN. [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, April 19, 2001 4:21 PM
> To: Manesh; [EMAIL PROTECTED]
> Subject: RE: [PHP-WIN] mysql
>
>
> Have you changed the options in config.lib.php3 for your server
>
> $cfgServers[1]['host'] = 'localhost';           // MySQL hostname
> $cfgServers[1]['user'] = 'asduk';                // MySQL user
> (only needed
> with basic auth)
> $cfgServers[1]['password'] = 'a different password';
>   // MySQL
> password (only needed
>
>
> Yours
> Mr. Adam ALLEN.
> [EMAIL PROTECTED]
> http://www.dynamicinteraction.co.uk
>
>
>
> > -----Original Message-----
> > From: Manesh [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, April 19, 2001 9:13 PM
> > To: [EMAIL PROTECTED]
> > Subject: [PHP-WIN] mysql
> >
> >
> > when i open phpMyAdmini get this error
> >
> >
> >
> >
> >
> > Warning: MySQL Connection Failed: Can't connect to MySQL server on
> > 'localhost' (10061) in lib.inc.php3 on line 255
> > Error
> > MySQL said:
> > Back
> >
> >
> > i installed the right version i think, can someone gimme a link
> to a file
> > that i can use with a win2k PC? this is for mysql
> >
> > thx!
> >
> >
> > --
> > 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 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 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]





A little help from anyone please.

I know this was discussed before but I can't find it now that I need it. I
want to dynamically populate a pulldown list from a mysql query based on
what is selected from another pulldown list populated by a query from mysql.
If the first choice is changed a different list of option is populated in
the second. Please help!

Robert





Please stop crossposting this to php-dev@

Derick

On Thu, 19 Apr 2001, Svensson, B.A.T.  wrote:

>
> >-----Original Message-----
> >From: Robert Trembath [mailto:[EMAIL PROTECTED]]
> >Sent: Thursday, April 19, 2001 10:10 PM
> >To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> >Subject: [PHP-WIN] Dynamic Pulldown lists
> >
> >
> >A little help from anyone please.
> >
> >I know this was discussed before but I can't find it now that I need it. I
> >want to dynamically populate a pulldown list from a mysql query based on
> >what is selected from another pulldown list populated by a query from
> mysql.
> >If the first choice is changed a different list of option is populated in
> >the second. Please help!
>
> In meta code:
>
> DO DBQUERY <fetch [list] with argument [which list] from the previuos form>
>
> DO WRITE   "<FORM ... etc, etc>"
> DO WRITE   "  <SELECT ... etc, etc, blaha, blaha>
> DO WHILE <not end of the [list]>
>   DO WRITE "     <OPTION VALUE=" + <your value for this [list].[element] +
> ">"
>   DO WRITE "       [list].[element]"
>   DO WRITE "     </OPTION>"
> END WHILE
> DO WRITE   "   </SELECT>"
> DO WRITE   "</FORM>"
>
> And at last and most important:
>
> WHILE (NOT <understand HTML>)
>   GOTO http://www.w3.org/MarkUp/Guide/
> END WHILE
> IF (<still wants to learn more>)
>   GOTO http://www.w3.org/MarkUp/Guide/Advanced.html
> ELSE IF (<wants to read core specification>)
>   GOTO http://www.w3.org/TR/html401/
> ELSE IF NOT (<know how to program something>)
>   <read Knut's handbook>
> ELSE IF (NOT <problem still solved>)
>   <then ask for help>
> END IF
>
> --
> PHP Development 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]
>

Derick Rethans

---------------------------------------------------------------------
        PHP: Scripting the Web - www.php.net - [EMAIL PROTECTED]
             SRM: Site Resource Manager - www.vl-srm.net
---------------------------------------------------------------------
    JDI Media Solutions - www.jdimedia.nl - [EMAIL PROTECTED]
     Boulevard Heuvelink 102 - 6828 KT Arnhem - The Netherlands
---------------------------------------------------------------------





Hi all!
I have a problem with specification of parts of message in command imap_fetchbody.
About the last parametter is written:
"The section specification is a string of integers delimited by period which index 
into a body part list as per the IMAP4 specification." (PHP manual)

What is in fact "period" in this sentence?

There are no problems, if I want to fetch first, second... part of message.

!!!But the common e-mail with HTML formatted text contains
the first part as SUBTYPE: ALTERNATIVE
     in my example it contains 2 subparts: TEXT/PLAIN and TEXT/HTML
Can I use two separated imap_fetchbody commands to take two subparts (PLAINTEXT and 
HTML)?
If it is possible - how look the last parametters in imap_fetchbody commands?

Can somebody help me?

Thanks!

Ketan



Reply via email to