php-windows Digest 5 Jul 2003 15:21:58 -0000 Issue 1810

Topics (messages 20689 through 20691):

Re: Fatal error with 'DB.php'
        20689 by: H Marc Bower

Length question
        20690 by: Harpreet
        20691 by: Svensson, B.A.T. (HKG)

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 ---
----- Original Message -----
From: "jsWalter" <[EMAIL PROTECTED]>
> I am trying to use DB.php, but I am getting htis error...
>
> Fatal error: main(): Failed opening required 'DB.php'
> (include_path='.;c:\php4\pear')
>
> I can't find this path defined *anywhere*

I have no idea where it gets this, but it seems to be a default of some kind
as it comes up with any failed include or require, I think.

> I don't have PHP installed thee.
>
> How can I "fix" this include path issue.

Try putting your DB.php file in the same directory as the calling page -
that's always worked for me.  You might want to also do a very simple test
to ensure you can include and require from a set directory and none of your
other code is getting in the way.

> DB.php is in the dir as php.exe

Normally the directory where you have php installed can't be accessed by the
inet user (I don't know what server software you're using, but it seems you
are on a windows machine at the least).  All of your include files should be
able to be reached from a web browser, unless you want to specifically give
the internet user account more rights than it should have.  Try putting
db.php in the same directory as your calling script and reference it as
follows:  require_once("DB.php");

Good Luck,

Marc



--- End Message ---
--- Begin Message ---
Dear group members,

I have a field of type varchar[1000] in a sql server database. I use the
below syntax to get it from the database.The length of the string is 288 in
this case.

When i do the selection and store the value in a variable. On printing the
variable it only outputs 255 characters. Is there a limit to the amount of
data a variable can store ?? If yes then how can i use a string longer then
255 in my database??

$sql="select sql from report_tbl where report_id = '".$id."'";
$result=mssql_query($sql);
$row=mssql_fetch_array($result);
echo $row["sql"];

$row["sql"] outputs 255 characters as opposed to 288 which is the actual
length of the sql stirng.

Please help.

Thanks,

Regards,
Harpreet Kaur


--- End Message ---
--- Begin Message ---
This question was just answered like two-three days before.

Please, check privious comments.


-----Original Message-----
From: Harpreet
To: [EMAIL PROTECTED]
Sent: 5-7-03 7:22
Subject: [PHP-WIN] Length question

Dear group members,

I have a field of type varchar[1000] in a sql server database. I use the
below syntax to get it from the database.The length of the string is 288
in this case.

When i do the selection and store the value in a variable. On printing
the variable it only outputs 255 characters. Is there a limit to the amount
of data a variable can store ?? If yes then how can i use a string longer
then 255 in my database??

$sql="select sql from report_tbl where report_id = '".$id."'";
$result=mssql_query($sql);
$row=mssql_fetch_array($result);
echo $row["sql"];

$row["sql"] outputs 255 characters as opposed to 288 which is the actual
length of the sql stirng.

Please help.

Thanks,

Regards,
Harpreet Kaur


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

--- End Message ---

Reply via email to