php-windows Digest 31 Oct 2003 09:57:15 -0000 Issue 1979

Topics (messages 21930 through 21942):

Re: wddx problem
        21930 by: Helke Schröder
        21933 by: Helke Schröder

Re: PHP not outputting HTML
        21931 by: Norbert Grüttner
        21932 by: Steve Sobol
        21934 by: Tao Z
        21935 by: Steve Sobol
        21936 by: Tao Z
        21937 by: Steve Sobol

Trouble connecting to ms sql with ODBC on Windows
        21938 by: Stoner, David M.
        21939 by: Gerardo Rojas
        21941 by: Gerardo Rojas

PHP 5.0.0 Beta 2 released!
        21940 by: Andi Gutmans

CGI-ERROR BUG
        21942 by: Huib Bakker

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 ---
Hello again,

now I tried
    print  htmlentities(wddx_serialize_value("PHP to WDDX packet example",
"PHP packet"));
and this looks okay
but when I call a method on a java object
    $honda->setArray($htmlpacket);
it comes up with
    character not allowed in ....

So I think it means the "<" and ">" characters but how is it going then?

Thanks in advance, Helke

--- End Message ---
--- Begin Message ---
ok, got it working

--- End Message ---
--- Begin Message ---
The script will work if either
 a) PHP.INI is changed to allow short tags <?
or
b) you change the code to <?php phpinfo() ...

Best regards
  Norbert

,
"Steve Sobol" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
news:[EMAIL PROTECTED]
> IIS 5, Windows 2000, PHP 4.3.3 ISAPI (manually installed) - but I'm not
> sure the ISAPI module is being called because when I go to
> http://fci.es.temp.roisupply.com/x.php  - which contains a single call
> to phpinfo() - my browser tries to download the file and the mime type
> is apparently not being sent...
>
>
> Help... please :>
>
> --
> JustThe.net Internet & New Media Services
> 22674 Motnocab Road * Apple Valley, CA 92307-1950
> Steve Sobol, Proprietor
> 888.480.4NET (4638) * 248.724.4NET * [EMAIL PROTECTED]

--- End Message ---
--- Begin Message --- Norbert GrXttner wrote:
The script will work if either
 a) PHP.INI is changed to allow short tags <?

Already does. I have it in c:\winnt\php.ini - is that the right location for the file? (Win2000 Terminal Server)


short_open_tag=On

plus when I change to <?php the problem still occurs.

If I view the page with IE, it does not show the proper MIME type for the file, so I think the problem runs a little bit deeper than this...



--
JustThe.net Internet & New Media Services
22674 Motnocab Road * Apple Valley, CA 92307-1950
Steve Sobol, Proprietor
888.480.4NET (4638) * 248.724.4NET * [EMAIL PROTECTED]

--- End Message ---
--- Begin Message ---
Seems like it's not sending the correct header.
You can try add
header("Content-type: text/html");

at the begining of your script.
There is probably an option in the ini file you can change..

hope this helps.

Steve Sobol wrote:

Norbert GrXttner wrote:

The script will work if either
 a) PHP.INI is changed to allow short tags <?


Already does. I have it in c:\winnt\php.ini - is that the right location for the file? (Win2000 Terminal Server)

short_open_tag=On

plus when I change to <?php the problem still occurs.

If I view the page with IE, it does not show the proper MIME type for the file, so I think the problem runs a little bit deeper than this...




--- End Message ---
--- Begin Message --- Tao Z wrote:
Seems like it's not sending the correct header.
You can try add
header("Content-type: text/html");

at the begining of your script.
There is probably an option in the ini file you can change..

I'm not supposed to have to do that, I didn't have to do that on the last Windows installation I did, and I have _never_ had to do it with Linux and Apache.


Besides, the file isn't being executed as a PHP script, so adding
PHP commands won't help. Try going to http://fci.es.temp.roisupply.com/x.php - tell it you want to save the
file; open up the file on your hard drive and you'll see it's the source code, not the output the script is supposed to display.



-- JustThe.net Internet & New Media Services 22674 Motnocab Road * Apple Valley, CA 92307-1950 Steve Sobol, Proprietor 888.480.4NET (4638) * 248.724.4NET * [EMAIL PROTECTED]

--- End Message ---
--- Begin Message --- you probably need to check your server configuration, then. make sure it knows what to do with php files.

Steve Sobol wrote:

Tao Z wrote:

Seems like it's not sending the correct header.
You can try add
header("Content-type: text/html");

at the begining of your script.
There is probably an option in the ini file you can change..


I'm not supposed to have to do that, I didn't have to do that on the last Windows installation I did, and I have _never_ had to do it with Linux and Apache.

Besides, the file isn't being executed as a PHP script, so adding
PHP commands won't help. Try going to http://fci.es.temp.roisupply.com/x.php - tell it you want to save the
file; open up the file on your hard drive and you'll see it's the source code, not the output the script is supposed to display.




--- End Message ---
--- Begin Message --- Tao Z wrote:
you probably need to check your server configuration, then. make sure it knows what to do with php files.

Duhhh... I figured it out.


Originally set the properties for the default website, NOT the master properties for the server, and *then* went back to the master properties and set up the application mapping but forgot to set up the ISAPI filter.

Everything's working now.

Sorry about that, and thanks to everyone who replied.


-- JustThe.net Internet & New Media Services 22674 Motnocab Road * Apple Valley, CA 92307-1950 Steve Sobol, Proprietor 888.480.4NET (4638) * 248.724.4NET * [EMAIL PROTECTED]

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

I'm new to this mailing list.

I'm using ODBC to connect to a database on a remote SQL Server from Windows
2000. I'm running PHP 4.3.3. with Apache 2, but I've also tried this with
Apache 1.3.


Here's the entire script (with dummy name, id and password):

<?php
if(function_exists("odbc_pconnect"))
        {
        $id =
odbc_pconnect("DataSourceName","MyId","MyPassword",SQL_CUR_USE_ODBC);
        if($id)
                {
                echo "connected\n";
                $resid = odbc_prepare($id,"select
strLastname,strFirstname,strUsername \nfrom dbo.tblPersons where
strPersonType = 'S' and strSchoolCode = 'MED' Order by
strLastname,strFirstname");
                $succ = odbc_execute($resid);
                if($succ)
                        {
                        odbc_result_all($resid);
                        odbc_close($id);
                        }
                }
        else
                echo "failed to connect\n";
        }
else
        {
        print "no such function\n";
        }
?>

This works just fine when I call it from the command line.   It connects and
retrieves just the data I expect.

But when I embed exactly the same script in a web page I get this:

Warning: odbc_connect(): SQL error: [Microsoft][ODBC SQL Server
Driver][Named Pipes]Specified SQL server not found., SQL state 08001 in
SQLConnect in c:\apachegroup\apache13\apache\users\dmstoner\odbctest.php on
line 13 failed to connect 

What am I doing wrong???

Any help much appreciated.

-David

--- End Message ---
--- Begin Message ---
You don't have to use ODBC to connect.  PHP supports connectivity to MS SQL Server!


--
Gerardo S. Rojas
mailto: [EMAIL PROTECTED]


-----Original Message-----
From: Stoner, David M. [mailto:[EMAIL PROTECTED]
Sent: Thursday, October 30, 2003 1:53 PM
To: '[EMAIL PROTECTED]'
Subject: [PHP-WIN] Trouble connecting to ms sql with ODBC on Windows




I'm new to this mailing list.

I'm using ODBC to connect to a database on a remote SQL Server from Windows
2000. I'm running PHP 4.3.3. with Apache 2, but I've also tried this with
Apache 1.3.


Here's the entire script (with dummy name, id and password):

<?php
if(function_exists("odbc_pconnect"))
        {
        $id =
odbc_pconnect("DataSourceName","MyId","MyPassword",SQL_CUR_USE_ODBC);
        if($id)
                {
                echo "connected\n";
                $resid = odbc_prepare($id,"select
strLastname,strFirstname,strUsername \nfrom dbo.tblPersons where
strPersonType = 'S' and strSchoolCode = 'MED' Order by
strLastname,strFirstname");
                $succ = odbc_execute($resid);
                if($succ)
                        {
                        odbc_result_all($resid);
                        odbc_close($id);
                        }
                }
        else
                echo "failed to connect\n";
        }
else
        {
        print "no such function\n";
        }
?>

This works just fine when I call it from the command line.   It connects and
retrieves just the data I expect.

But when I embed exactly the same script in a web page I get this:

Warning: odbc_connect(): SQL error: [Microsoft][ODBC SQL Server
Driver][Named Pipes]Specified SQL server not found., SQL state 08001 in
SQLConnect in c:\apachegroup\apache13\apache\users\dmstoner\odbctest.php on
line 13 failed to connect 

What am I doing wrong???

Any help much appreciated.

-David

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

--- End Message ---
--- Begin Message ---
you should already have that file if you have installed MS SQL server (Client Tools) 
on your pc.  If not, I can probably send you the file.  Nothing to do with PHP, so 
don't recompile.


--
Gerardo S. Rojas
mailto: [EMAIL PROTECTED]


-----Original Message-----
From: Stoner, David M. [mailto:[EMAIL PROTECTED]
Sent: Thursday, October 30, 2003 3:01 PM
To: Gerardo Rojas
Subject: RE: [PHP-WIN] Trouble connecting to ms sql with ODBC on Windows


OK, I'll do that.  I was just looking, and it says I need ntwdblib.dll.
Maybe I already have that.  I don't know if I need to recompile PHP
--with-mssql etc.

-----Original Message-----
From: Gerardo Rojas [mailto:[EMAIL PROTECTED] 
Sent: Thursday, October 30, 2003 2:58 PM
To: Stoner, David M.
Subject: RE: [PHP-WIN] Trouble connecting to ms sql with ODBC on Windows


you will need to uncomment the extension for MS SQL Server in your PHP.ini

extension=php_mssql.dll



--
Gerardo S. Rojas
mailto: [EMAIL PROTECTED]


-----Original Message-----
From: Stoner, David M. [mailto:[EMAIL PROTECTED]
Sent: Thursday, October 30, 2003 2:55 PM
To: Gerardo Rojas
Subject: RE: [PHP-WIN] Trouble connecting to ms sql with ODBC on Windows


OK, thanks, I'll try mssql functions next.  But ODBC works too, some of the
time!

-----Original Message-----
From: Gerardo Rojas [mailto:[EMAIL PROTECTED] 
Sent: Thursday, October 30, 2003 2:54 PM
To: Stoner, David M.; [EMAIL PROTECTED]
Subject: RE: [PHP-WIN] Trouble connecting to ms sql with ODBC on Windows


You don't have to use ODBC to connect.  PHP supports connectivity to MS SQL
Server!


--
Gerardo S. Rojas
mailto: [EMAIL PROTECTED]


-----Original Message-----
From: Stoner, David M. [mailto:[EMAIL PROTECTED]
Sent: Thursday, October 30, 2003 1:53 PM
To: '[EMAIL PROTECTED]'
Subject: [PHP-WIN] Trouble connecting to ms sql with ODBC on Windows




I'm new to this mailing list.

I'm using ODBC to connect to a database on a remote SQL Server from Windows
2000. I'm running PHP 4.3.3. with Apache 2, but I've also tried this with
Apache 1.3.


Here's the entire script (with dummy name, id and password):

<?php
if(function_exists("odbc_pconnect"))
        {
        $id =
odbc_pconnect("DataSourceName","MyId","MyPassword",SQL_CUR_USE_ODBC);
        if($id)
                {
                echo "connected\n";
                $resid = odbc_prepare($id,"select
strLastname,strFirstname,strUsername \nfrom dbo.tblPersons where
strPersonType = 'S' and strSchoolCode = 'MED' Order by
strLastname,strFirstname");
                $succ = odbc_execute($resid);
                if($succ)
                        {
                        odbc_result_all($resid);
                        odbc_close($id);
                        }
                }
        else
                echo "failed to connect\n";
        }
else
        {
        print "no such function\n";
        }
?>

This works just fine when I call it from the command line.   It connects and
retrieves just the data I expect.

But when I embed exactly the same script in a web page I get this:

Warning: odbc_connect(): SQL error: [Microsoft][ODBC SQL Server
Driver][Named Pipes]Specified SQL server not found., SQL state 08001 in
SQLConnect in c:\apachegroup\apache13\apache\users\dmstoner\odbctest.php on
line 13 failed to connect 

What am I doing wrong???

Any help much appreciated.

-David

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

--- End Message ---
--- Begin Message --- Dear PHP users,

PHP 5.0.0 Beta 2 has been released. This is the first feature complete version of PHP 5 except for work on extensions, and we recommend for PHP users to try it. PHP 5 is still not ready for production use!

Some of the more major changes include:
- PHP 5 features the Zend Engine 2.
- XML support has been completely redone in PHP 5, all extensions are now focused around the excellent libxml2 library (http://www.xmlsoft.org/).
- SQLite has been bundled with PHP. For more information on SQLite, please visit their · website.
- A new SimpleXML extension for easily accessing and manipulating XML as PHP objects. It can also interface with the DOM extension and vice-versa.
- Streams have been greatly improved, including the ability to access low-level socket operations on streams.


There have been lots and lots of other changes which we haven't mentioned here, and even the NEWS file which is pasted at the end of this message doesn't mention them all.
For developers who want to get an idea of the new language features (the Zend Engine 2), we suggest you look at the ZEND_CHANGES file in the Zend/ directory of the source tree.


Enjoy,

PHP Development Team.

NEWS file:
30 Oct 2003, PHP 5 Beta 2
- Lots and lots of changes in the Zend Engine 2 since beta 1:
  . Added Iterators
  . Improved memory manager
  . Added Reflection API
  . Removed the not so working namespaces support
  . Removed support for expressions within constant declerations.
  . You can read about most changes in ZEND_CHANGES under the Zend directory.
- Improved the DBX extension: (Marc)
  . Added DBX_RESULT_UNBUFFERED flag for dbx_query().
  . Added dbx_fetch_row()
  . Added SQLite support.
- Improved the Interbase extension: (Ard Biesheuvel)
  . Added support for multiple databases into ibase_trans()
  . Added support for CREATE DATABASE, SET TRANSACTION and EXECUTE PROCEDURE
    statements into ibase_query()
  . Added ibase_commit_ret() and ibase_rollback_ret()
  . Added ibase_drop_db()
  . Added ibase_gen_id()
  . Added ibase_name_result()
  . Added ibase_errcode()
  . Added ibase_affected_rows() and ibase_num_params()
  . Added ibase_param_info()
  . Added ibase_wait_event()
  . Added ibase_set_event_handler() and ibase_free_event_handler()
- Added new COM extension with integrated .Net support. (Wez)
- Added new functions:
  . setrawcookie(). (Brian)
  . pg_version(). (Marcus)
  . dbase_get_header_info(). (Zak)
  . snmp_read_mib(). (Jani)
  . http_build_query(). (Sara)
  . ftp_alloc(). (Sara)
  . array_udiff(). (Andrey)
  . array_udiff_assoc(). (Andrey)
  . array_udiff_uassoc(). (Andrey)
  . array_diff_uassoc(). (Andrey)
  . convert_uuencode(). (Ilia)
  . convert_uudecode(). (Ilia)
  . substr_compare(). (Ilia)
  . pcntl_wait(). (GeorgeS)
- Added "resume_pos" context option to "ftp://"; wrapper. (Sara)
- Added optional parameter to OCIWriteTemporaryLob() to specify the type of LOB
  (Patch by Novicky Marek <[EMAIL PROTECTED]>). (Thies)
- Added reflection API. (Andrei, George, Timm)
- Changed length parameter in fgetcsv() to be optional. (Moriyoshi)
- Fixed IPv6 support in MacOSX Panther. (Dan, Marko)
- Fixed fgetcsv() to correctly handle international (non-ascii) characters.
  (Moriyoshi)
- Fixed support for <![CDATA[]]> fields within XML documents in ext/xml.
  (Sterling)
- Fixed visibility of __construct and __clone. (Marcus)
- Fixed bug #26003 (fgetcsv() not binary-safe on null bytes). (Moriyoshi)
- Fixed bug #25756 (SimpleXML's validate_schema_file() broken). (Moriyoshi)
- Fixed bug #25581 (getimagesize() returns incorrect values on bitmap (os2)
  files). (Marcus)
- Fixed bug #25494 (array_merge*() allows non-arrays as argument). (Jay)
- Fixed bug #24766 (strange result array from unpack()). (Moriyoshi)
- Fixed bug #24729 ($obj = new $className; causes crash when $className is not
  set). (Marcus)
- Fixed bug #24565 (cannot read array elements received via $_REQUEST). (Zeev)
- Fixed bug #24445 (get_parent_class() returns different values).
  (Sterling, Stanislav)
- Fixed bug #24403 (preg_replace() problem: Using $this when not in object
  context). (Zeev)
- Fixed bug #24399 (PEAR DB isError crash [instanceof_function fault?]).
  (Sterling, Marcus)
- Fixed bug #24396 (foreach ($k=>$v), the key $k is missing). (Zeev)
- Fixed bug #24279 (__get() crash when no value is returned). (Ilia)
- Fixed bug #22367 (undefined variable has a value). (Zeev)
- Fixed bug #19859 (allow fast_call_user_function to support __call).
  (Stanislav)
- Fixed bug #17997 (Warning when switch() and reference are combined). (Zeev)
- Fixed bug #17988 (strtotime failed to parse postgresql timestamp). (Derick)

--- End Message ---
--- Begin Message ---
Hya All,

I had this CGI Error problem (random) see below. It happens at random and
when your refresh it works fine.

  -- Begin --
   CGI Error
   The specified CGI application misbehaved by not returning a complete
set of HTTP headers. The headers it did return are:
   --  End  --

To bypass this bug for IIS 5 or IIS 6 you can set the custom error (502) to
a file containing this:

<script>
 history.go(0);
</script>

It worked for me on IIS 5 and IIS 6 running win2000 advanced server and
win2003
Enterprise Edition

Greats Huib

--- End Message ---

Reply via email to