php-windows Digest 10 Jan 2001 02:09:50 -0000 Issue 388

Topics (messages 4884 through 4895):

PHP 3.0.18 for Windows
        4884 by: Wenz Christian
        4889 by: phobo
        4890 by: Wenz Christian
        4893 by: Frank M. Kromann

Problem after install of PHP4 - Newbie
        4885 by: Tim Hines
        4886 by: Phil Driscoll
        4887 by: Emore, Emmanuel

Warning: Undefined offset....?
        4888 by: Corn Vollney-R7019C

Need help with bugs in my classes
        4891 by: IThelp
        4895 by: alain samoun

Header function on IIS vs. Apache
        4892 by: Emily Witcher

Re: Sorry, answered too quick [waas: SET in MSSQL-query]
        4894 by: Frank M. Kromann

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]


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


Hello,

any chances that v3.0.18 will come out as Win32 binaries?

Regards
Christian





----- Original Message -----
From: "Wenz Christian" <[EMAIL PROTECTED]>
To: "Php-Windows (E-Mail)" <[EMAIL PROTECTED]>
Sent: Wednesday, January 10, 2001 2:42 AM
Subject: [PHP-WIN] PHP 3.0.18 for Windows


> Hello,
>
> any chances that v3.0.18 will come out as Win32 binaries?
>
> Regards
> Christian
>
> --

3.0.18 ?! 3.0.17 is available from http://www.php.net/download-php3.php
You should really move to PHP4 if you are going to upgrade, its increased
performance and functionality (eg sessionsupport) make it far better than
PHP3. Especially on Win32 where its only a 30 second ordeal to upgrade, no
compiling etc. The latest Win32 binaries even have install programs and set
up the relationship with your Webserver so there is basically no work to be
done.

Siggy





 
I know, I know, and I am already using PHP 4 on many sites. However one
special application is not ready to be upgraded yet, and sticks to PHP 3. As
you may now know, the source code of 3.0.18 is available for some time now,
but no binaries yet ...


> 3.0.18 ?! 3.0.17 is available from http://www.php.net/download-php3.php
> You should really move to PHP4 if you are going to upgrade, its
[...]





I have the binaries on my maschine. Do you need other files than php.exe ?

- Frank

> 
>I know, I know, and I am already using PHP 4 on many sites. However one
>special application is not ready to be upgraded yet, and sticks to PHP 3. As
>you may now know, the source code of 3.0.18 is available for some time now,
>but no binaries yet ...
>
>
>> 3.0.18 ?! 3.0.17 is available from http://www.php.net/download-php3.php
>> You should really move to PHP4 if you are going to upgrade, its
>[...]
>
>
>-- 
>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 am running PHP4, NT4.0, and PWS.

I get an error running my first script after installing.

Script=

<html>
        <head>
                <title>Example</title>
        </head>
        <body>

                <?php
                echo "Hi, I'm a PHP script!";
                ?>

        <body>
</html>

Error Message:

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





>I am running PHP4, NT4.0, and PWS.
>
>I get an error running my first script after installing.
>

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

The message means that the script caused no output.
This is usually because the script doesn't exist - maybe you typed the wrong
url into your browser - or the anonymous web user did not have permission to
read the php file.

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







If you use Notepad in editing the file, check to make sure that it is not
adding a .txt to the end of the file name.

-----Original Message-----
From: Phil Driscoll [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 09, 2001 1:36 PM
To: [EMAIL PROTECTED]; Tim Hines
Subject: Re: [PHP-WIN] Problem after install of PHP4 - Newbie


>I am running PHP4, NT4.0, and PWS.
>
>I get an error running my first script after installing.
>

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

The message means that the script caused no output.
This is usually because the script doesn't exist - maybe you typed the wrong
url into your browser - or the anonymous web user did not have permission to
read the php file.

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




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




Et All:

I am trying to set up the Lucid Calendar App that can be found on
Freshmeat.com. Everything works but I keep getting this error message at the
top of the calendar table:

Warning: Undefined offset: 1 in ./api/cal.api on line 534

Actually there are 34 of them. This is what is at line 534:

 for( $i=0 ; $i < $num_of_rows*7 ; $i++ ){
      if( $i==0 ){
        echo "<tr>\n";

What is an Undefined Offset? 

Voll Corn
Site Admin/Developer Ur.mot.com
Global University Relations, Motorola
Austin, Tx





The following is a sample php file that is using the class section, class
box, that are in the file Print.inc

I get numerous undefined variables errors I put one example of it in my
code.

Here is the testing.php file that uses Print.inc

Fatal error: Internal pdflib error: Couldn't write output (disk full?) in
Print.inc on line 0
//I have over 15 Gigs left plus I have IUSER_COmputer Name  full control
over all directories in my server

<?    //testing.php
        include "Print.inc";

        $fp = fopen("testing.pdf", "w");
        $pdf = pdf_open($fp);
        pdf_begin_page($pdf, 576, 772);
        pdf_add_outline($pdf, "Page 1");

        pdf_set_font($pdf, "Times-Roman", 10, "host");
        pdf_set_value($pdf, "textrendering", 1);

        $usersection = new section( 576, 4, 36, 40);

        $usersection->addabox("testing", "nothing", 0);

        if(($usersection->output(650, $pdf))==1){
             echo("It seems to work");
             echo("<a href=\"testing.pdf\" target=\"_blank\">PDf test</a>");

        }


?>


The following file is Print.inc

<?
#Print.inc

class section{

      var $columns;  //number of columns       //most cases need an even
number title :: info
      var $pagewidth;  //width in pixels  portrait is 576 w x 772 l
landscape is 772 w x 576 l
      var $margin;    //size of margins
      var $columnheight;
      var $arrayofboxes=array();  //array of boxes to be displayed in this
section
      var $zarrayofboxes; //what index is arrayofboxesat
      var $abnormalboxesarray=array();//array of boxes that are special in
some way
      var $zabnormalboxesarray;     //index for above
      var $picboxesarray=array();  //array of boxes with pics in them
      var $zpicboxesarray;         //index for above
      var $sectionheight;
      var $standardboxheight;


      //pass in the page width
      function section($widthin, $columnsin, $marginsin, $boxheight){
               $this->$columns=$columnsin;
************************************I get an Warning: Undefined variable:
columns in Print.inc on line 22

               $this->$pagewidth=$widthin;
               $this->$margin=$marginsin;
               $this->$arrayofboxes;
               $this->$zarrayofboxes=0;
               $this->$abnormalboxesarray;
               $this->$zabnormalboxesarray=0;
               $this->$picboxesarray;
               $this->$zpicboxesarray=0;
               $this->$standardboxheight=$boxheight;

      }

      function addabox($title, $info, $whatisthis){
               if($whatisthis==1){
                   $userbox = new box($title, $info, $whatisthis);
                   $this->$arrayofboxes[$zarrayofboxes]=$userbox;
                   $this->$zarrayofboxes++;
                   return 1;
               }
               else if($whatisthis==0){
                    $user2box = new box($title, $info, $whatisthis);

$this->$abnormalboxesarray[$zabnormalboxesarray]=$user2box;
                    $this->$zabnormalboxesarray++;
                    return 1;
               }
               else if($whatisthis==2){
                    $user3box = new box($title, $info, $whatisthis);
                    $this->$picboxesarray[$zpicboxesarray]=$user3box;
                    $this->$zpicboxesarray++;
                    return 1;
               }
               else {
                    return 0;
               }
      }

      function output($top, $pdf){

               $totalmargin = $this->$margin * 2;************************
Fatal error: Unsupported operand types in Print.inc on line 61
                                                        //how can a simple multiply 
command  not be supported

               $realwidth= $pagewidth - $totalmargin;
               $columnwidth= $realwidth/$this->$columns;

               $y=$top-($this->$standardboxheight);

               $tempbox=$this->$arrayofboxes[0];

               pdf_show_boxed($pdf, $tempbox->getthetitle(), $margin, $y,
$columnwidth, $this->$standardboxheight, "left");

               return 1;


      }


}

class box{

      var $title;
      var $info;
      var $standardornot; //1=standard 0=notstandardtext 2=pic

      function box($titlein, $infoin, $whatisthis){
               $this->$title=$titlein;
               $this->$info=$infoin;
               $this->$standardornot=$whatisthis;
      }

      function getthetitle(){
               return $this->$title;
      }

      function gettheinfo(){
               return $this->$info;
      }

      function getstandardornot(){
               return $this->$standardornot;
      }

}

The help is appreciated thanks

Ryan





I don't see $pdf as global var in your class???

Alain

IThelp wrote:
> 
> The following is a sample php file that is using the class section, class
> box, that are in the file Print.inc
> 
> I get numerous undefined variables errors I put one example of it in my
> code.
> 
> Here is the testing.php file that uses Print.inc
> 
> Fatal error: Internal pdflib error: Couldn't write output (disk full?) in
> Print.inc on line 0
> //I have over 15 Gigs left plus I have IUSER_COmputer Name  full control
> over all directories in my server
> 
> <?    //testing.php
>         include "Print.inc";
> 
>         $fp = fopen("testing.pdf", "w");
>         $pdf = pdf_open($fp);
>         pdf_begin_page($pdf, 576, 772);
>         pdf_add_outline($pdf, "Page 1");
> 
>         pdf_set_font($pdf, "Times-Roman", 10, "host");
>         pdf_set_value($pdf, "textrendering", 1);
> 
>         $usersection = new section( 576, 4, 36, 40);
> 
>         $usersection->addabox("testing", "nothing", 0);
> 
>         if(($usersection->output(650, $pdf))==1){
>              echo("It seems to work");
>              echo("<a href=\"testing.pdf\" target=\"_blank\">PDf test</a>");
> 
>         }
> 
> ?>
> 
> The following file is Print.inc
> 
> <?
> #Print.inc
> 
> class section{
> 
>       var $columns;  //number of columns       //most cases need an even
> number title :: info
>       var $pagewidth;  //width in pixels  portrait is 576 w x 772 l
> landscape is 772 w x 576 l
>       var $margin;    //size of margins
>       var $columnheight;
>       var $arrayofboxes=array();  //array of boxes to be displayed in this
> section
>       var $zarrayofboxes; //what index is arrayofboxesat
>       var $abnormalboxesarray=array();//array of boxes that are special in
> some way
>       var $zabnormalboxesarray;     //index for above
>       var $picboxesarray=array();  //array of boxes with pics in them
>       var $zpicboxesarray;         //index for above
>       var $sectionheight;
>       var $standardboxheight;
> 
>       //pass in the page width
>       function section($widthin, $columnsin, $marginsin, $boxheight){
>                $this->$columns=$columnsin;
> ************************************I get an Warning: Undefined variable:
> columns in Print.inc on line 22
> 
>                $this->$pagewidth=$widthin;
>                $this->$margin=$marginsin;
>                $this->$arrayofboxes;
>                $this->$zarrayofboxes=0;
>                $this->$abnormalboxesarray;
>                $this->$zabnormalboxesarray=0;
>                $this->$picboxesarray;
>                $this->$zpicboxesarray=0;
>                $this->$standardboxheight=$boxheight;
> 
>       }
> 
>       function addabox($title, $info, $whatisthis){
>                if($whatisthis==1){
>                    $userbox = new box($title, $info, $whatisthis);
>                    $this->$arrayofboxes[$zarrayofboxes]=$userbox;
>                    $this->$zarrayofboxes++;
>                    return 1;
>                }
>                else if($whatisthis==0){
>                     $user2box = new box($title, $info, $whatisthis);
> 
> $this->$abnormalboxesarray[$zabnormalboxesarray]=$user2box;
>                     $this->$zabnormalboxesarray++;
>                     return 1;
>                }
>                else if($whatisthis==2){
>                     $user3box = new box($title, $info, $whatisthis);
>                     $this->$picboxesarray[$zpicboxesarray]=$user3box;
>                     $this->$zpicboxesarray++;
>                     return 1;
>                }
>                else {
>                     return 0;
>                }
>       }
> 
>       function output($top, $pdf){
> 
>                $totalmargin = $this->$margin * 2;************************
> Fatal error: Unsupported operand types in Print.inc on line 61
>                                                         //how can a simple multiply 
>command  not be supported
> 
>                $realwidth= $pagewidth - $totalmargin;
>                $columnwidth= $realwidth/$this->$columns;
> 
>                $y=$top-($this->$standardboxheight);
> 
>                $tempbox=$this->$arrayofboxes[0];
> 
>                pdf_show_boxed($pdf, $tempbox->getthetitle(), $margin, $y,
> $columnwidth, $this->$standardboxheight, "left");
> 
>                return 1;
> 
>       }
> 
> }
> 
> class box{
> 
>       var $title;
>       var $info;
>       var $standardornot; //1=standard 0=notstandardtext 2=pic
> 
>       function box($titlein, $infoin, $whatisthis){
>                $this->$title=$titlein;
>                $this->$info=$infoin;
>                $this->$standardornot=$whatisthis;
>       }
> 
>       function getthetitle(){
>                return $this->$title;
>       }
> 
>       function gettheinfo(){
>                return $this->$info;
>       }
> 
>       function getstandardornot(){
>                return $this->$standardornot;
>       }
> 
> }
> 
> The help is appreciated thanks
> 
> Ryan
> 
> --
> 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 am tweaking a PHP web app developed on Apache/Linux/PHP3 to work on
IIS/Win2k/PHP4. I have encountered an unusual situation with the header()
function in PHP. When a user submits a form, depending on the results they
are redirected to a certain URL using the Header function (usually something
like /folder/TheFile.php3?this=that). This works on the Apache/Linux/PHP3
setup but not on the latter - it generates one of those unhelpful 502 CGI
Errors (The specified CGI application misbehaved by not returning a complete
set of HTTP headers. The headers it did return are:). In some cases just
refreshing the page will cause it to load properly; in other cases, not.

I know a code sample should follow but the application is just too complex
(for me) to summarize. However, if anyone has any pointers (something in
php.ini?) I would appreciate any clues. Thanks!


Emily Witcher





Textsize and textlimit are connected. Textsize can be set to any value from 0 to 
textlimit and text limit can be any value from 0 to 2Gb (on 32 bit API)

By default textsize and textlimit are set according to your server and library 
settings but if you have textlimit = 8192 in php.ini you will not be able to use a 
higher value.

Textlimit can not be set with a SET command, you have to configure the value in 
php.ini or setting the value on the server.

The next version of php_mssql70.dll includes a new function mssql_setopt() allowing 
you to set this an 17 other options from the script.

- Frank

>Hello Flint,
>
>Sorry for the previous reply, it was too fast. I'll try again the SET and SELECT in 
>one query.
>
>Thanks again,
>Thomas
>
>
>Flint Doungchak wrote:
>
>> Thomas,
>>
>> There has been some recent discussion on the list on this topic so my
>> information may be dated. However, the latest (or the last few) release of
>> the php_mssql70.dll module allows you to set the textsize in the php.ini
>> file.
>>
>> The sample ini file released with php4 shows an example of the syntax.
>>
>> -Flint
>>
>> -----Original Message-----
>> From: Thomas [mailto:[EMAIL PROTECTED]]
>> Sent: Monday, January 08, 2001 5:58 AM
>> To: [EMAIL PROTECTED]
>> Subject: [PHP-WIN] SET in MSSQL-query
>>
>> Hello!
>>
>> If I want to change e.g. the textsize  with SET TEXTSIZE 16384, it is no
>> problem in the qury-analyzer.
>>
>> If I want to do it in script with
>> mssql_query( "SET TEXTSIZE 16384", $db );
>>
>> and check it in the query- analizer with:
>> SELECT @@TEXTSIZE
>>
>> it has still the old value.
>>
>> What do I wrong?
>>
>> 2nd questiion: How can I get the result of "SELECT @@TEXTSIZE" in a
>> php-script?
>>
>> Many thanks,
>> Thomas
>>
>> --
>> 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]
>
>
>





Reply via email to