[PHP-DB] Truncated data retrieved from MSSQL Server

2001-07-14 Thread Thomas Merlin

Hello,

I'm trying to retrieve data from a table sitting on a MSSQL Server Database
but the query result is always truncated over 255 characters...

PHP 4.05 is running on a Linux box

The column is a varchar 5000

Thanks for any help.

Thomas.



-- 
PHP Database 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-DB] Oracle TNS Connection Errors Resolved : Linux : PHP : Oracle : Apache

2001-07-14 Thread Robert M. Keene

Folks,

For whatever it's worth, here is how I resolved my Oracle TNS Connection
errors...
Everyone may have figured this out by now, but I'm a Linux/Apache/PHP newbie
and this was a major road block for me this past week.

Environment:
1. Linux 6.2 (Zoot)
2. Oracle 8.1.7
3. Apache 1.3.20  (./configure --with-layout=RedHat --enable-module=so)
4. PHP 4.0.5

(./configure --apxs=/usr/sbin/apxs --with-oci8=/app/oracle/product/8.1.7 --w
ith-oracle=/app/oracle/product/8.1.7 --enable-track-vars)

Problem:
When trying to connect to Oracle using ora_logon or ocilogon I would receive
an Oracle error to the tune of "TNS dropped connection SERVICE_NAME not
found," or something like that.  In fact there were several error messages
that occurred, but in essence they were all TNS errors.  I forget the exact
error message(s) and I don't wish to f-up my configuration to find out.

I tried all the voodoo that I could find in this group as well as some other
tricks found elsewhere.  All failed except for the brilliant $db =
"(description=(address_list=(address=(protocol=tcp)(host=localhost)(port=152
1)))(connect_data=(service_name=)))" and then calling
$con=ocilogon("scott","tiger",$db).  That brilliant temporary fix is
provided by Pat O'Neill.

Basically what I discovered in my particular situation was that setting the
Oracle init.ora parameter db_domain = .k12.pa.us (or whatever) was the
culprit.  Once a database is created with this db_domain parameter PHP4.0.5
seems to wig out.  Everything Oracle works just great.  You can sqlplus
connect to Oracle from Linux.  You can connect to Oracle via any Windows
tool (in my case PL/SQL Developer). However when you try to connect via a
PHP script, forget-about-it, boom!  It doesn't work.

Resolution:
1. I commented out my db_domain parameter in
/app/oracle/admin/prams/pfile/init.ora
2. I deleted and rebuilt my Oracle database.
3. Use the exact name (prams=(description=address_list=...) in your
tnsnames.ora file, prams in my case, as the $db var in your PHP script
[$db="prams"; $c1=ocilogon("scott","tiger",$db)].  If you change your
tnsnames.ora name reference, for example to prams.xxx.k12.pa.us then change
your $db var in your PHP script accordingly.
4. Note: I do not have the user nobody added to my dba or oinstall group and
the only environment variables that I have set in my httpd startup script
are ORACLE_HOME=/app/oracle/product/8.1.7, LD_LIBRARY_PATH=$ORACLE_HOME/lib,
and LD_PRELOAD=libclntsh.so.8.0.

Viola!  For me this works.

I have no idea why this works, however.  It appears as if PHP is not really
connecting internally to Oracle in an Oracle-proper manner.  This is not to
say however that an "Oracle-proper manner" is a normal-proper manner.

Note: For those not able to rebuild their entire database with the db_domain
init.ora parameter disabled then Pat O'Neill's brilliant work-around is a
very good solution.

-
Robert M. Keene, OCP Certified DBA
Database Administrator/Developer




-- 
PHP Database 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-DB] Autocommit=0 & mySQL

2001-07-14 Thread Malcolm Read

Now that mySQL supports transactions via AUTOCOMMIT=0, BEGIN, ROLLBACK,
COMMIT etc., are there any plans to add these functions to PHP?
If so any idea of when they may be available?

Malcolm


-- 
PHP Database 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-DB] Re: Interbase/PHP/Apache implimentation

2001-07-14 Thread John Lim

Hi Jordan
I have been trying to use interbase with the IIS sapi unsuccessfully (PHP
4.0.6). I suspect that it is not thread-safe as CGI works fine.
It really is up to someone who can debug the php_ibase.dll source to fix
this as it apparently not an apache specific problem.

Regards, john

"Jordan" <[EMAIL PROTECTED]> wrote in message
00fe01c10bc4$b6470dd0$0a01a8c0@cu">news:00fe01c10bc4$b6470dd0$0a01a8c0@cu...
> Okay...
> ..I have been trying (and failing) to get Interbase to work with PHP,
served up by Apache on a
> Win2K machine.  Through a lot of headache and the process of elimination,
I have succeeded in
> getting an SQL response from PHP, after eliminating any instructions for
Apache to load the PHP
> module - using only the CGI interface.
>
> So, if I understand things, my problem has been that I've been attempting
to get Interbase support
> from the PHP module for Apache, which won't work for one reason or
another.
> If true, this comes as great relief, because I was beating my head against
the wall trying to figure
> out where my php.ini file was misconfigured
>
> So my question is this:  Can DBMS support be enabled using the
extension=php_interbase.dll directive
> in the php.ini file (as opposed to MySQL, where support is built in) ONLY
while in CGI mode?  Will
> the distribution version of php4apache.dll not look at the php.ini file,
to enable Interbase
> support?
>
> If that is the case, is there anywhere one might find a version of the
php4apache.dll file which
> enables Interbase support?
> I will use CGI if I must, but my preference is to use the Apache
Module
>
> Thanks in advance,
>
> --Jordan
>



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