php-windows Digest 20 Apr 2001 23:40:55 -0000 Issue 555

Topics (messages 6917 through 6940):

Managing SQL errors in php pages
        6917 by: Olivier Botineau
        6918 by: Matt Hopkins

Re: Help on installing something
        6919 by: Svensson, B.A.T.

Re: Select statement not working
        6920 by: Martin Kemp

What does an @ sign before a VARIABLE do?
        6921 by: Mike Flynn
        6922 by: Schulz, Evan
        6923 by: Mattias Segerdahl
        6924 by: Rasmus Lerdorf
        6925 by: Mike Flynn

InterBase
        6926 by: Daniel Sichta

Neat program to learn PHP
        6927 by: John Henckel

php on Win2000 / IIS 5.0
        6928 by: M.Kissel

Problem with procedures in MSSQL
        6929 by: Hugo Alexandre Almeida Soares Dias
        6930 by: Svensson, B.A.T.

For Newbies - Setting up PHP4 wihn win 98 and  PWS
        6931 by: RJ

include
        6932 by: Olivier Botineau
        6934 by: Toby Miller

url call with a php string
        6933 by: Vlad Bejenaru aka BJ

Poll
        6935 by: Manesh

Errors I get
        6936 by: Manesh
        6939 by: Frank M. Kromann
        6940 by: Manesh

Mapping perl
        6937 by: Manesh

PHP.exe chrashes on WIN95 / WIN98SE
        6938 by: Rainer Gross

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

is there a way to get control when an error occurs
executing sql querry? I mean to have a detailled
message like in phpMyAdmin.

When I do in my php page ( table t_reffet doesn't exist, thats for the purpose ) :

$query_effet = "SELECT t_effet.lib_effet FROM t_reffet, tr_scene_effet, t_scene " .
                        "WHERE t_effet.num_effet = tr_scene_effet.num_effet " .
                        "AND tr_scene_effet.num_scene = $selScene ".
                        "AND tr_scene_effet.num_scene = t_scene.num_scene " .
                        "ORDER BY t_effet.lib_effet ASC ";
//print $query_effet;
$result_effet = mysql_db_query( $db, $query_effet );
while( $ligne_effet = mysql_fetch_array( $result_effet ) )
{
...

I get a warning:
Warning: Supplied argument is not a valid MySQL result resource in 
e:\wwwphp\test\3ds\download\download.php on line 102
Whereas in phpMyAdmin I get:

Error 
SQL-query: 
SELECT t_effet.lib_effet FROM t_reffet, tr_scene_effet, t_scene 
WHERE t_effet.num_effet = tr_scene_effet.num_effet 
AND tr_scene_effet.num_scene = 6
AND tr_scene_effet.num_scene = t_scene.num_scene 
ORDER BY t_effet.lib_effet ASC
MySQL said: Table 'db_web.t_reffet' doesn't exist





Olivier,

One way is simply to test for success and produce the appropriate error
message if it doesn't work;

$result = mysql_query ($query)
  or die ("appropriate error message");

Matt


-----Original Message-----
From: Olivier Botineau [mailto:[EMAIL PROTECTED]]
Sent: 20 April 2001 13:46
To: PHP Windows list (Adresse de messagerie)
Subject: [PHP-WIN] Managing SQL errors in php pages


hi

is there a way to get control when an error occurs
executing sql querry? I mean to have a detailled
message like in phpMyAdmin.

When I do in my php page ( table t_reffet doesn't exist, thats for the
purpose ) :

$query_effet = "SELECT t_effet.lib_effet FROM t_reffet, tr_scene_effet,
t_scene " .
                        "WHERE t_effet.num_effet = tr_scene_effet.num_effet " .
                        "AND tr_scene_effet.num_scene = $selScene ".
                        "AND tr_scene_effet.num_scene = t_scene.num_scene " .
                        "ORDER BY t_effet.lib_effet ASC ";
//print $query_effet;
$result_effet = mysql_db_query( $db, $query_effet );
while( $ligne_effet = mysql_fetch_array( $result_effet ) )
{
...

I get a warning:
Warning: Supplied argument is not a valid MySQL result resource in
e:\wwwphp\test\3ds\download\download.php on line 102
Whereas in phpMyAdmin I get:

Error
SQL-query:
SELECT t_effet.lib_effet FROM t_reffet, tr_scene_effet, t_scene
WHERE t_effet.num_effet = tr_scene_effet.num_effet
AND tr_scene_effet.num_scene = 6
AND tr_scene_effet.num_scene = t_scene.num_scene
ORDER BY t_effet.lib_effet ASC
MySQL said: Table 'db_web.t_reffet' doesn't exist


--
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: Manesh
>Sent: Friday, April 20, 2001 1:40 AM
>
>ok, i have mysql working, i need a really good tutorial for me 
>newbie! like exactly how to make a database and stuff like that!

Then you need to read "Fundamentals of Database Systems" written
by Elmasri & Navathe...




I'm glad I'm not alone in this. It's strange that it only occurs in certain
situations, but ours are quite different (I'm using Windows Networking). The
main similarities seem to be:

win32 platform
php4.0.x (CGI)
using access over odbc and shared drive

I remember trying all sorts of changes to the query, I made it as basic as
possible, and it still only returned a few of the results. I think I'll have
to try querying a different table and see if that makes a difference.

Just a thought: did your mdb file have a password protected .mdw file with
it? That's the main difference I can think of mine in the working vs
non-working versions.

Basically I have two machines, one (machine d) is the database server, the
other is the web server (machine w).

Php runs on w and queries the database on w for normal web operation.

the database on w is updated with a script that runs on w, synchronising
data between d and w (I have two DSNs, one to connect to the main database
on d and the other to the web database on w). the update script is run by
the windows scheduler from php on the command line and works (but only when
a user is logged on; if no user is logged on then the script runs, but it
can only delete fields, it won't insert new ones - but that's another bug I
have yet to trace).

What I had tried to do (and this is the bit that doesn't work properly) was
connect directly to the database on d from php running on w. and it was this
bit that wouldn't report all the results. I wonder if it may be user
permissions on the web server, but why make the results sparse, rather than
just stop it from working completely?






Hey all,

In the PHOBUILDER tutorial on sessions the sample code has a @ sign before 
some of the variable names.. like:
if (@$userid && @$password) {
   $res = @mysql_query("SELECT userid FROM users WHERE userid='$userid' AND 
password='$password'");
   if(@mysql_num_rows($res) != 0) {
     $verified_user = $userid;
     session_register("verified_user");
   }
}
I've never seen that before and am curious what it does.  I've seen it 
before function calls, but never before variables.

Thanks!
-Mike


            -=- Mike Flynn - Burlington, VT -=-
[EMAIL PROTECTED]  http://www.mikeflynn.net/  * Give blood *





Mike,

If you have your error reporting set to ALL in php.ini, you will get
warnings that variables aren't set.  The @ before it will ignore the
warnings.  At least, this is one use of the @ before variables that I can
think of...

Evan

-----Original Message-----
From: Mike Flynn [mailto:[EMAIL PROTECTED]]
Sent: Friday, April 20, 2001 9:23 AM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] What does an @ sign before a VARIABLE do?


Hey all,

In the PHOBUILDER tutorial on sessions the sample code has a @ sign before 
some of the variable names.. like:
if (@$userid && @$password) {
   $res = @mysql_query("SELECT userid FROM users WHERE userid='$userid' AND 
password='$password'");
   if(@mysql_num_rows($res) != 0) {
     $verified_user = $userid;
     session_register("verified_user");
   }
}
I've never seen that before and am curious what it does.  I've seen it 
before function calls, but never before variables.

Thanks!
-Mike


            -=- Mike Flynn - Burlington, VT -=-
[EMAIL PROTECTED]  http://www.mikeflynn.net/  * Give blood *


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




It removes all error msg's that might come from the particular function... Iow, if it 
dosn't work, don't complain!


----- Original Message ----- 
From: "Mike Flynn" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, April 20, 2001 4:23 PM
Subject: [PHP-WIN] What does an @ sign before a VARIABLE do?


> Hey all,
> 
> In the PHOBUILDER tutorial on sessions the sample code has a @ sign before 
> some of the variable names.. like:
> if (@$userid && @$password) {
>    $res = @mysql_query("SELECT userid FROM users WHERE userid='$userid' AND 
> password='$password'");
>    if(@mysql_num_rows($res) != 0) {
>      $verified_user = $userid;
>      session_register("verified_user");
>    }
> }
> I've never seen that before and am curious what it does.  I've seen it 
> before function calls, but never before variables.
> 
> Thanks!
> -Mike
> 
> 
>             -=- Mike Flynn - Burlington, VT -=-
> [EMAIL PROTECTED]  http://www.mikeflynn.net/  * Give blood *
> 
> 
> -- 
> 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 PHOBUILDER tutorial on sessions the sample code has a @ sign before
> some of the variable names.. like:
> if (@$userid && @$password) {
>    $res = @mysql_query("SELECT userid FROM users WHERE userid='$userid' AND
> password='$password'");
>    if(@mysql_num_rows($res) != 0) {
>      $verified_user = $userid;
>      session_register("verified_user");
>    }
> }
> I've never seen that before and am curious what it does.  I've seen it
> before function calls, but never before variables.

It doesn't do anything.  Whoever wrote that tutorial was confused.

-Rasmus







Thanks everyone for clearing it up.  It looks like the author of the 
tutorial may have had all PHP error reporting turned on and put the @ there 
in case the variables weren't set, which was after all what that if 
statement was checking.. or just got into the habit of putting it on any 
variable that may or may not be set.

-Mike





Hi there !!

IIS + php 4.0.5
I'm getting error message
Warning: Unable to load dynamic library
'c:/script/php405/extensions/php_interbase.dll' -
I have IB server on different PC. What I'm doing wrong ?

Ing. Daniel Šichta
CUSTOM.web s.r.o.
Hodžova 13
01001 Žilina, SLOVAKIA
++421 89 564 3474
mobile ++421 905 839 334
www.customweb.sk <http://www.customweb.sk>
[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
ICQ: 84700861

---
Odchádzajúca správa neobsahuje vírusy.
Skontrolované antivírusovým systémom AVG (http://www.grisoft.cz).
Verzia: 6.0.241 / Vírusová databáza: 117 - dátum vydania: 27. 3. 2001





Here is a PHP interpreter on a web page.  I wrote it to help me learn PHP 
and it was very helpful.  Just copy the code below to a web page, like 
"eval.php".

WARNING!  If you put this code on a public server, you should change the 
hardcoded password (BULLDOG) to something non-obvious, otherwise a hacker 
could use it to mess with your server.

--------------- cut here ----------------
<?php

echo "<body onload='window.f.expr.select()'>";
echo "<ul><li>Type a PHP expression.<li>Do not use single quotes.";
echo "<li>Multiple statements can be separated with semicolon.";
echo "<li>The value of \$r will be displayed.";
echo "<form name=f method=GET action=$PHP_SELF>";
if (isset($pw)) echo "<input name=pw type=hidden value='$pw'>";
else echo "Password <input name=pw size=10> &nbsp; <input type=submit><br>";
if (!isset($expr)) $expr='$r = $GLOBALS';
echo "<input name=expr size=60 value='".stripslashes($expr)."'>";
echo "</form><font face='lucida console' size=+1>";

if (isset($pw) and $pw=="BULLDOG" and isset($expr))
{
   $r = "not set";
   $ex = stripslashes($expr).";";
   echo "eval('<b> $ex </b>')<p>";
   eval($ex);
   if (gettype($r)=='array') {
     echo "\$r is an array... ";
     foreach ($r as $k => $i) echo "<br>$k = $i";
   } else echo "\$r is $r ";
}

?>
--------------- cut here ----------------


John Henckel          alt. mailto:[EMAIL PROTECTED]
Zumbro Falls, Minnesota, USA   (507) 753-2216

http://geocities.com/jdhenckel/





i get this error message:
PHP Warning: Unable to load dynamic library 'php_pdf.dll' - Das angegebene
Modul wurde nicht gefunden. in Unknown on line 0 PHP Warning: Unable to load
dynamic library 'C:\Php\EXTENSIONS/php_sybase_ct.dll' - Das angegebene Modul
wurde nicht gefunden. in Unknown on line 0 PHP Warning: Unable to load
dynamic library 'C:\Php\EXTENSIONS/php_ifx.dll' - Das angegebene Modul wurde
nicht gefunden. in Unknown on line 0
dies anyone know how to fix this ???

many thanx M.Kissel







I created a stored procedure in MSSQL like this:
CREATE PROCEDURE destaques_relacionados @codigo_doc int, @relacao
varchar(20) AS
SELECT     TOP 5 DN.cod, DN.titulo
FROM         dbo.Keywords_associacoes KA INNER JOIN
                      dbo.Destaques_noticias DN ON KA.documento = DN.cod
INNER JOIN
                      dbo.Associacoes A ON KA.associacao = A.cod
WHERE     (KA.keyword IN
                          (SELECT     keyword
                            FROM          keywords_associacoes ka2,
associacoes a2
                            WHERE      ka2.documento = @codigo_doc AND
ka2.associacao = a2.cod AND a2.tabela = @relacao)) AND (KA.documento !=
@codigo_doc) AND (A.tabela = 'Destaques')
GROUP BY KA.documento, DN.data, DN.cod, DN.titulo
ORDER BY COUNT(KA.keyword) DESC, DN.data DESC
GO

This procedure when i execute it in the SQL Analyzer runs instantaniously,
but in PHP hangs till timeout.
can anyone tell me what i must do to solve my problem?




Hugo Alexandre Dias
Eng. Sistemas Informática
[EMAIL PROTECTED]




First of all replace GO with RETURN(0) ....

Then try again....

>-----Original Message-----
>From: Hugo Alexandre Almeida Soares Dias [mailto:[EMAIL PROTECTED]]
>Sent: Friday, April 20, 2001 7:22 PM
>To: PHP-WIN
>Subject: [PHP-WIN] Problem with procedures in MSSQL
>
>
>
>I created a stored procedure in MSSQL like this:
>CREATE PROCEDURE destaques_relacionados @codigo_doc int, @relacao
>varchar(20) AS
>SELECT     TOP 5 DN.cod, DN.titulo
>FROM         dbo.Keywords_associacoes KA INNER JOIN
>                      dbo.Destaques_noticias DN ON 
>KA.documento = DN.cod
>INNER JOIN
>                      dbo.Associacoes A ON KA.associacao = A.cod
>WHERE     (KA.keyword IN
>                          (SELECT     keyword
>                            FROM          keywords_associacoes ka2,
>associacoes a2
>                            WHERE      ka2.documento = @codigo_doc AND
>ka2.associacao = a2.cod AND a2.tabela = @relacao)) AND (KA.documento !=
>@codigo_doc) AND (A.tabela = 'Destaques')
>GROUP BY KA.documento, DN.data, DN.cod, DN.titulo
>ORDER BY COUNT(KA.keyword) DESC, DN.data DESC
>GO
>
>This procedure when i execute it in the SQL Analyzer runs 
>instantaniously,
>but in PHP hangs till timeout.
>can anyone tell me what i must do to solve my problem?
>
>
>
>
>Hugo Alexandre Dias
>Eng. Sistemas Informática
>[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,
I downloaded Apache server and was about to go with it when i decided to
try this PWS thingy one more time.

I found this link which gives detailed step by step instructions on
setting up PHP4 with win98 and PWS. The document also is useful for
setting up Perl.

http://www.faqts.com/knowledge_base/view.phtml/aid/5495/fid/336

Please note that the document points to an automated php installer for
windows users. But my ADVICE is to go with it manually, you really learn
stuff that way -- PLEASE Backup your registry if you are not confident
enough.

Also, the PHP install notes are not that informative as you will find out
:)

Regards
RJ





Good evening all,
do you know if its possible to give an absolute path instead of a relative path for 
include:
include( '../../menu.php' );            is OK
incude( '/inculde/menu.php' );          is Not OK

Depend where im in tree directory i have to change '../', then relative path
is not usefull in that case.
(ASP allows this in include directive with VIRTUAL parameter, so I suppose
PHP too?)
Olivier.




This is extremely unfortunate as I don't know of a way to do this either. I
do however have a workaround that's not too tedious.

Insert the following code into the very top of all of your documents:

$GLOBALS["DOCUMENT_ROOT"] =
preg_replace("/wwwroot.*$/i","wwwroot",$PATH_TRANSLATED);

This assumes that your root web folder is wwwroot. Change this as necessary.
This enables you to include files like so:

include_once($DOCUMENT_ROOT."/includes/main_header.inc.php");

By the way, $DOCUMENT_ROOT is an Apache environment variable so if you
happen to be running Apache instead of IIS just leave out the preg_replace
call because $DOCUMENT_ROOT will already be set for you.

--Toby



----- Original Message -----
From: "Olivier Botineau" <[EMAIL PROTECTED]>
To: "PHP Windows list (Adresse de messagerie)" <[EMAIL PROTECTED]>
Sent: Friday, April 20, 2001 6:05 PM
Subject: [PHP-WIN] include


> Good evening all,
> do you know if its possible to give an absolute path instead of a relative
path for include:
> include( '../../menu.php' ); is OK
> incude( '/inculde/menu.php' ); is Not OK
>
> Depend where im in tree directory i have to change '../', then relative
path
> is not usefull in that case.
> (ASP allows this in include directive with VIRTUAL parameter, so I suppose
> PHP too?)
> Olivier.
>
> --
> 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 which form is a available a code section like this

$string="downloads.php"
<a href="www.php.net/$string">useful dowloads of php</a>
====== this is a generic example ============
I need this because i want to submit two forms from the same querry_string
and the results to be shown in 2 different frames.

Is there another way to accomplish my problem?

pls help...tnx all

Vlad BEJENARU aka BJ
Home Page
ICQ: 113502358
----------------------------------------------------------------------------
----






Warning: Undefined variable: submit in c:\inetpub\wwwroot\poll.php on line
44

Warning: Supplied argument is not a valid MySQL result resource in
c:\inetpub\wwwroot\poll.php on line 74



i get error and inside my poll.php is this


<?php
//
//      Vendor Ratings System 1.0
//      Copyright (C) 2000, AtoZnet.com
//      Author: Clayton McGow
//      [EMAIL PROTECTED]
//
//      You may use and alter this code, but do
//      not distribute altered code without
//      adding a comment section similar to this
//      one stating the nature of the changes made
//      and do not remove anything above this line.
//
//      The purpose of this script is to rate
//      "items" on a scale from one to ten.
//      The result of each vote is counted,
//      tabulated, averaged, and displayed in
//      the resulting html code.
//      You must add an SQL database called
//      "vendors" with a Drop Table called
//      "RECORDS" having these fields (in order):
//      ID = int autoincrement primary key,
//      Name = varchar (32), Description =
//      varchar(255), VoteCount = int(11),
//      VoteTotal = int(11).
//      Now add some records to the database
//      for your surfers to "vote" on.
//
?>

<html>
<head>
<title>title</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body>

<FORM method="post" action="<?php echo $PHP_SELF?>">
<?php
$db = mysql_connect("localhost", "test","test");        // don't forget to
customize this line
mysql_select_db("vendors",$db);                                 // you must create the 
database called
"vendors"

if ($submit) {                                                          // if they 
have just voted,
                                                                                // 
process the new info from the form
while (list($name, $value) = each($HTTP_POST_VARS)){            // by stepping
through the all the args
if ($name!="submit"){                                                   // except the 
submit button.
        if ($value!=0){                                 // If they voted on a 
particular item,
                                                                // tally up the new 
total score
                                                                // and increment the 
number of
                                                                // votes counted for 
that item

                $theQuery=sprintf("%s%s\0","SELECT * FROM RECORDS where ID=", $name) ;
                $result= mysql_query($theQuery,$db);
                $myrow = mysql_fetch_row($result);
                $VoteCount=$myrow[3];
                $VoteCount++;
                $theQuery=sprintf("%s%d%s%d\0","UPDATE RECORDS SET 
VoteCount=",$VoteCount
," where ID=", $name);
                $result = mysql_query($theQuery,$db);
                $oldVoteTotal= $myrow[4];
                $newVoteTotal=$oldVoteTotal+$value;
                $theQuery=sprintf("%s%d%s%d\0","UPDATE RECORDS SET
VoteTotal=",$newVoteTotal ," where ID=", $name);
                $result = mysql_query($theQuery,$db);
                        } // end if value !=0
                } // end if $name!=submit
        } // end while list http_vars
} //end if submit




$result = mysql_query("SELECT * FROM RECORDS",$db);

while ($myrow = mysql_fetch_row($result)) {     // list all the data
                                                                // for every item in 
the "RECORDS" table

printf("<p>ID: <b>%d</B><br>Name: %s<br>Description: %s<br>VoteCount:
%s<br>VoteTotal: %s</p>\n", $myrow[0], $myrow[1], $myrow[2], $myrow[3],
$myrow[4]);
                                                                // the next line 
divides VoteTotal by VoteCount
                                                                // and shows is as a 
"floored" or rounded down int
                                                                // unless noone voted 
on it yet - avoid the
                                                                // division by zero 
condition
if ($myrow[3]!=0) printf("<p>The average score for this vendor is %d
</p>\n", $myrow[4]/$myrow[3]);
        else printf("<p>This vendor has not received any votes yet.</p>\n");

                                                                // the following html 
code offers a chance for
                                                                // the surfer to vote 
on each item in the database
                                                                // by presenting a row 
of radio buttons from one to ten.
                                                                // Each radio button 
is given the same name as the
                                                                // "ID" field of the 
item in question... in this case
                                                                // it'll be the same 
as the record number
?>


<p><b>Now <u>you</u> rate this vendor!</b></p>

  <table width="75%" border="0" cellspacing="0" cellpadding="0">
    <tr>
      <td width="8%">
        <div align="center">Worst </div>
      </td>
      <td width="8%">
        <div align="center">1
          <input type="radio" name="<?php echo($myrow[0]) ?>" value="1">
        </div>
      </td>
      <td width="8%">
        <div align="center">2
          <input type="radio" name="<?php echo($myrow[0]) ?>" value="2">
        </div>
      </td>
      <td width="8%">
        <div align="center">3
          <input type="radio" name="<?php echo($myrow[0]) ?>" value="3">
        </div>
      </td>
      <td width="8%">
        <div align="center">4
          <input type="radio" name="<?php echo($myrow[0]) ?>" value="4">
        </div>
      </td>
      <td width="8%">
        <div align="center">5
          <input type="radio" name="<?php echo($myrow[0]) ?>" value="5">
        </div>
      </td>
      <td width="8%">
        <div align="center">6
          <input type="radio" name="<?php echo($myrow[0]) ?>" value="6">
        </div>
      </td>
      <td width="8%">
        <div align="center">7
          <input type="radio" name="<?php echo($myrow[0]) ?>" value="7">
        </div>
      </td>
      <td width="8%">
        <div align="center">8
          <input type="radio" name="<?php echo($myrow[0]) ?>" value="8">
        </div>
      </td>
      <td width="10%">
        <div align="center">9
          <input type="radio" name="<?php echo($myrow[0]) ?>" value="9">
        </div>
      </td>
      <td width="8%"> 10
        <input type="radio" name="<?php echo($myrow[0]) ?>" value="10">
      </td>
      <td width="10%">
        <div align="center">Best </div>
      </td>
    </tr>
  </table>

<hr>



<?php                                                                           // now 
finish up the html form with
                                                                                // a 
"submit" button, and close the session

        } // end while (from up above the table html code)
echo ("<input type=\"submit\" name =\"submit\" value =\"submit\">\n");
echo ("</form>\n");
MYSQL_CLOSE();
?>



</body>
</html>





















PLEASE HELP!





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







i get that alot, is it beacuse i g=don't have perl?





PHP Does not need perl in any instances.

It seams you are trying to run the cgi version of php and it is unable to find a 
component, resulting in a core dump. You can test the php.exe from a command prompt. 
Just type php.exe -v and yoy will get the veriosn information, or perhaps an error 
message describing the problem.

- Frank

> CGI Error
> The specified CGI application misbehaved by not returning a complete set of
> HTTP headers. The headers it did return are:
> 
> 
> 
> 
> 
> 
> 
> i get that alot, is it beacuse i g=don't have perl?
> 
> 
> -- 
> 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]
> 
> 
> 







don't work!

-----Original Message-----
From: Frank M. Kromann [mailto:[EMAIL PROTECTED]]
Sent: Friday, April 20, 2001 6:45 PM
To: Manesh
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP-WIN] Errors I get


PHP Does not need perl in any instances.

It seams you are trying to run the cgi version of php and it is unable to
find a component, resulting in a core dump. You can test the php.exe from a
command prompt. Just type php.exe -v and yoy will get the veriosn
information, or perhaps an error message describing the problem.

- Frank

> CGI Error
> The specified CGI application misbehaved by not returning a complete set
of
> HTTP headers. The headers it did return are:
>
>
>
>
>
>
>
> i get that alot, is it beacuse i g=don't have perl?
>
>
> --
> 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]





how do i add it to IIS5 it is installed on c:/perl/

how do i do it?




Hi all the following code crahes on Win95 and Win98SE using the CGI inteface
with personal webserver.

The code now is full of stupid things to find an inexistent error since the
code works fine on a Linux PHP.

So do anyone have an idea about what is going on?




<?php
class xml
{
    var $parser;
    var $values;

    function xml()
    {
        $this->parser = xml_parser_create();
        $this->values[]='';
        xml_set_object($this->parser,$this);
        xml_set_element_handler($this->parser,"tag_open","tag_close");
        xml_set_character_data_handler($this->parser,"cdata");
    }

    function parse($data)
    {
        print("parse");
        xml_parse($this->parser,$data);
    }

    function tag_open($parser,$tag,$attributes)
    {
        print("tag_open");
        echo "\n<$tag";
        while (list ($key, $val) = each ($attributes))
        {
            echo " $key = \"$val\"";
            if ($key == 'NAME')
            {
                if (in_array($key, array_keys($this->values)))
                {
                    $buf = "jj";
                    $bufa = $val;
                    var_dump($this);
                    $buf = $this->values["$bufa"];
                    echo " value = \"$buf\" ";
                }
            }
        }
        echo ">";
    }

    function cdata($parser,$cdata)
    {
        print("cdata");

        $buf = trim($cdata);
        echo "$buf";
    }

    function tag_close($parser,$tag)
    {
        print("tag_close");

        echo "</$tag>";
    }

    function mi_set_value($k, $v)
    {
        print("set_value");

        $key2 = func_get_arg(0);
        $value2 = func_get_arg(1);
        var_dump($this);
        $this->values[$key2] = "fdss";
        var_dump($this->values[$key]);
    }



} // end of class xml

$xml_parser = new xml();

$fcontents = join (' ', file ('user.html'));
#var_dump($fcontents);

var_dump($xml_parser);
$xml_parser->mi_set_value('name', 'kjfdlkd');
var_dump($xml_parser);
print ("hier");
$xml_parser->parse($fcontents);

echo xml_error_string(xml_get_error_code($xml_parser->parser));


?>


The user.html read is:

<HTML><HEAD><TITLE></TITLE>
</HEAD>
<BODY>
<P>
<TABLE >
  <TBODY>
  <TR>
    <TD>Aqui va el menú</TD>
    <TD>
      <TABLE >
        <TBODY>
        <TR>
          <TD>
            <TABLE >
              <TBODY>
              <TR>
                <TD>Nombre:</TD>
                <TD><INPUT id="text1" name="text1" /></TD></TR>
              <TR>
                <TD>Apellido:</TD>
                <TD><INPUT id="text2" name="text2" /></TD></TR>
              <TR>
                <TD>Rut:</TD>
                <TD><INPUT id="text3" name="text3" /></TD></TR>
              <TR>
                <TD>Patron:</TD>
                <TD><INPUT id="text4"
name="text4"/></TD></TR></TBODY></TABLE>
            <P><INPUT id="submit1" name="submit1" type="submit"
value="Buscar"></P></TD></TR>
        <TR>
          <TD>
            <P>&nbsp;</P>
            <P><STRONG><FONT size=4>Resultado de la Busqueda</FONT></STRONG>
</P>
            <TABLE >
              <TBODY>
              <TR>
                <TD>Nombre</TD>
                <TD>Rut</TD>
                <TD>Apellido</TD>
                <TD>Editar</TD>
                <TD>Ver</TD>
                <TD>Eliminar</TD></TR>
              <TR>
                <TD align="middle"><FONT color="crimson">Data</FONT></TD>
                <TD align="middle">Data</TD>
                <TD align="middle">Data</TD>
                <TD align="middle"><A
href="http://www.sonda.com/">Data</A></TD>
                <TD align="middle"><A
href="http://www.sonda.com/">Data</A></TD>
                <TD align="middle"><A
href="http://www.sonda.com/">Data</A></TD></TR></TBODY></TABLE></TD></TR></T
BODY></TABLE></TD></TR></TBODY></TABLE></P></BODY></HTML>






Reply via email to