php-general Digest 19 Oct 2001 07:36:27 -0000 Issue 943

Topics (messages 71522 through 71553):

mysql transactions/rollback
        71522 by: Job Miller
        71528 by: CC Zona
        71531 by: Job Miller

Re: Auto-Stretch and the BACK - FORWARD buttons -- HELP!
        71523 by: Ben Holt
        71527 by: CC Zona

getting data from form...
        71524 by: Teqila MAN
        71525 by: Intruder
        71526 by: Thomas Deliduka

FIXED -- !
        71529 by: Jason Caldwell

Problem with socket reading
        71530 by: R'twick Niceorgaw

php + pgp (gnupg)
        71532 by: Kasper
        71542 by: Evan Nemerson
        71543 by: Joseph Blythe

cURL Reporting to Apache Error Log
        71533 by: Jonathan Hilgeman

Re: How-to put something at bottom of page
        71534 by: Lucas Chan
        71535 by: Mark

GD 2.0
        71536 by: Chris Aitken
        71537 by: Rasmus Lerdorf

PHP with Java
        71538 by: Aku
        71539 by: Chris Bailey

Re: MySQL query
        71540 by: Curt A. Gilman

Re: remembering variables between pages when using forms ...
        71541 by: Julio Nobrega

InterBase transaction ...
        71544 by: Yoel Benitez Fonseca
        71551 by: Christopher William Wesley
        71552 by: Kal Amry

PHP 4.0.6 Compile Problem (RH 7.1)
        71545 by: Ryan Hill

Stopping the browser from continuing to load
        71546 by: Adam.Whitehead.compsm.com.au
        71547 by: Jason Murray
        71548 by: Lucas Chan
        71550 by: Christopher William Wesley

Server performance
        71549 by: Michael Bonfert

PHP4 doesnīt work with apache_1.3.22-win32-no_src.msi
        71553 by: Carsten Bernstein

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]


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


without save points and rollback what is the best way
to replace all records for a user that might have been
edited with their new values.

I have read the mySQL manual about this.

Update is out of the question (as the manual
suggests).  I can't track which ones changed, because
they could have been reordered or overwritten.

my approach which I know sucks is this:

insert all the new records with a flag attached to
each one.

if insert goes ok, delete all the ones without the
flag that belong to that user and turn flag off the
newly inserted ones.

this way if something happens in the insert, i still
have the old data in there. as opposed to delete, than
insert, and if insert fails, rollback before delete.

I know there must be a common good solution to this. 
can someone please fill me in?

TIA,

Job



__________________________________________________
Do You Yahoo!?
Make a great connection at Yahoo! Personals.
http://personals.yahoo.com




In article <[EMAIL PROTECTED]>,
 [EMAIL PROTECTED] (Job Miller) wrote:

> without save points and rollback what is the best way
> to replace all records for a user that might have been
> edited with their new values.

To clarify: are you aware that MySQL does have transaction support 
available, or is using it not an option for you here?

-- 
CC




yes, thank you though.
not in MyISAM tables, which is what mine are, and
again according the manual, you slow things down
significantly for transaction support.

is it worth it? instead of my previously suggested
method of handling it? or is there something better?

--- CC Zona <[EMAIL PROTECTED]> wrote:
> In article
>
<[EMAIL PROTECTED]>,
>  [EMAIL PROTECTED] (Job Miller) wrote:
> 
> > without save points and rollback what is the best
> way
> > to replace all records for a user that might have
> been
> > edited with their new values.
> 
> To clarify: are you aware that MySQL does have
> transaction support 
> available, or is using it not an option for you
> here?
> 
> -- 
> CC
> 
> -- 
> PHP General 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]
> 


__________________________________________________
Do You Yahoo!?
Make a great connection at Yahoo! Personals.
http://personals.yahoo.com




 
> My BODY tag reads as follows:
> <body width="800" bgcolor="#FFFFFF" text="#000000" leftmargin="0"
> topmargin="0" marginwidth="0" marginheight="0">
> 
> Any tips on how I can correct this?  It needs to be flush irregardless if
> the user presses the BACK button or not.
> 


What is that width setting doing in your body tag?  Is a width setting 
even recognized in a body tag?  Assuming it is (and I have my doubts), 
if someone comes to your site with a browser window width higher or 
lower than 800 the browser will have to chose between your width setting 
and your margin settings.  One of them will have to take priority 
because you can't have a width of 800 and a margin of 0 if the viewer's 
browser window is 1200 px wide... or 640 or any size other than 800 for 
that matter.

- Ben







In article <[EMAIL PROTECTED]>,
 [EMAIL PROTECTED] (Jason Caldwell) wrote:

> My tables autostretch *with* the browser...
<snip>
> However, when I press my browsers BACK button, then FORWARD button the page
> is no longer *flush* on the right hand side
<snip>
> My BODY tag reads as follows:
> <body width="800" bgcolor="#FFFFFF" text="#000000" leftmargin="0"
> topmargin="0" marginwidth="0" marginheight="0">

A) Get rid of that width attribute in the body tag. 
B) Set your table's width using percentages (e.g. "100%"), not a fixed 
pixel size (by the time you factor in variance in monitor size, screen 
resolution, browser chrome, personal preferences, etc...individual users' 
window sizes are practically like snowflakes--no two alike). 
C) If it's still not "flush" right/left, set the table's cellpadding, 
cellspacing, and border attributes all to 0.

D) If you're still having trouble after that, followup with an HTML 
newsgroup, tutorial, or reference.

-- 
CC




I have file .....

index.php3.... a form in it ...

<input type=checkbox name=Steak value="15.25">
<input type=checkbox name=XYZ value="10.25">
<input type=checkbox name=CHIPs value="5.25">

and how to make it that form.php3 will read all the data that was submitted
(i'm mean the name and the value)








Teqilaman





TM> I have file .....

TM> index.php3.... a form in it ...

TM> <input type=checkbox name=Steak value="15.25">
TM> <input type=checkbox name=XYZ value="10.25">
TM> <input type=checkbox name=CHIPs value="5.25">

TM> and how to make it that form.php3 will read all the data that was submitted
TM> (i'm mean the name and the value)


do you mean :

reset($HTTP_POST_VARS);
while (list ($name, $value) = each($HTTP_POST_VARS)) {
  proceed with them....
  e.g.
  if ($name=="Steak") {
    echo "Variable name: ".$name." equals to ".$value;
  };
  if ($name=="XYZ") {
    echo "Variable name : ".$name." and it's value is ".$value;
  };
  ...........
};

Put this code whereever you want to process your submited form
Note that you haven't <input type="submit"> on your form, but in most cases it's
necessaey to have it (exept some JavaScript was added).






Well the form has to submit to the other file. Normally with default PHP
configurations it will automatically make the variables $Steak, $XYZ, and
$CHIPs with the corresponding values IF the checkboxes are checked. If it's
not checked nothing is set.

So you can do this on the receiving page:

If (!isset($Steak)) $Steak = 0;
If (!isset($XYZ)) $XYZ = 0;
If (!isset($CHIPs)) $CHIPs = 0;

Remember that variable names are case sensative.

On 10/18/2001 4:48 PM this was written:

> I have file .....
> 
> index.php3.... a form in it ...
> 
> <input type=checkbox name=Steak value="15.25">
> <input type=checkbox name=XYZ value="10.25">
> <input type=checkbox name=CHIPs value="5.25">
> 
> and how to make it that form.php3 will read all the data that was submitted
> (i'm mean the name and the value)

-- 

Thomas Deliduka
IT Manager
     -------------------------
New Eve Media
The Solution To Your Internet Angst
http://www.neweve.com/






Ahh -- it seems IE has it's own set of MARGIN parameters...

RIGHTMARGIN
LEFTMARGIN
TOPMARGIN
BOTTOMMARGIN

Hence:  This BODY tag will work for both IE and Netscape.
leftmargin="0" rightmargin="0" topmargin="0" bottommargin="0"
marginwidth="0" marginheight="0"

I was just using (previously):
leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"

Everything was working fine in Netscape (and seemingly in IE, only when I
pressed the BACK or FORWARD buttons would it act-up.)

Thanks
Jason


"Ben Holt" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>
> > My BODY tag reads as follows:
> > <body width="800" bgcolor="#FFFFFF" text="#000000" leftmargin="0"
> > topmargin="0" marginwidth="0" marginheight="0">
> >
> > Any tips on how I can correct this?  It needs to be flush irregardless
if
> > the user presses the BACK button or not.
> >
>
>
> What is that width setting doing in your body tag?  Is a width setting
> even recognized in a body tag?  Assuming it is (and I have my doubts),
> if someone comes to your site with a browser window width higher or
> lower than 800 the browser will have to chose between your width setting
> and your margin settings.  One of them will have to take priority
> because you can't have a width of 800 and a margin of 0 if the viewer's
> browser window is 1200 px wide... or 640 or any size other than 800 for
> that matter.
>
> - Ben
>
>
>






Hi All,
I'm a newbie to PHP. Just started to use it for a week and I just subscribed
to this mailing list.

I have a problem with socket reading using fread.

What I'm doing is ..
calling fsockopen to open a socket. Then call fwrite to send my data and
then call fread for 4 bytes. My Server is supposed to send me the length of
actual data in those 4 bytes and then I do another freadto get the actual
data. It's working fine but, sometimes, I'm closing the socket before
receiving any data. On the server side I'm getting an error like "peer
terminated connection can not send data". I called socket_get_status to see
if it's timing out but its not. However, I set the timeout period to 10
seconds in the call to fsockopen function. Still no avail.

Is there any way I can check if there's any error with fread ?

Thanks in advance for any help

cheers
R'twick


My code is below :
<<<<<<<<<<<<<<  CODE >>>>>>>>>>>>>>>>>

$socket = fsockopen($Host, $Port,$result,$errstr,10);
if ($result != 0) {
 $ErrorMsg  = "can not connect to Host. Reason: ($result) " .
strerror($result);
 $ErrorMsg .= ". Please Contact SysAdmin";
}
else {
     $result = fwrite ($socket, $msg, strlen ($msg));
     $fp = fopen("log/nma_".date("Y-m-d").".log","a");
     if ($result < 0 ) {
          $ErrorMsg  = "can not send request to Host. Reason: ($result) " .
strerror($result);
          $ErrorMsg .= ". Please Contact SysAdmin";
     }
     else {
          $ResponseLine=fread($socket, 4);
          $socketstatus=socket_get_status($socket);
          if ($socketstatus["eof"] | $socketstatus["timed_out"])
          {
                $ErrorMsg = "Host Timed Out".
           }
       }
      $RespLength=ord($ResponseLine[2])*256+ord($ResponseLine[3]);
      $Response .= $ResponseLine;
      $ResponseLine=fread($socket, $RespLength-4);
      $Response .= $ResponseLine;
 }
 $socketstatus=socket_get_status($socket);
 if ( $socketstatus["timed_out"])
 {
         $ErrorMsg = "Host Timed Out".
  }

 fclose($socket);

 }







Can i decrypt files with pgp (gnupg) with php scripts?

If i can, does anybody have an example or 2?

Thanx
/Kasper






Yes. Use backticks, system(), exec(), etc.

For help on command line w/ GnuPG, try "gpg --help".

I don't have examples, but there are probably some @ hotscripts.com



-- 
Looking for a parallel, three-dimensional explicit Eulerian grid code for 
astrophysical magnetohydrodynamics? Of course you are! Everyone is!
http://lca.ncsa.uiuc.edu/lca_intro_zeusmp.html




ive done this b4 but havn't got the scripts here they at home (can't
remember the exact command line, but from memory was a little fiddly), if
you have any problems send a email to [EMAIL PROTECTED] over the weekend
and i will gladly try and dig up an example for you.

regards

joseph

-----Original Message-----
From: Kasper [mailto:[EMAIL PROTECTED]]
Sent: Friday, 19 October 2001 8:30 AM
To: [EMAIL PROTECTED]
Subject: [PHP] php + pgp (gnupg)


Can i decrypt files with pgp (gnupg) with php scripts?

If i can, does anybody have an example or 2?

Thanx
/Kasper



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





The title says it all. Any secure transactions I send through cURL get
logged in Apache's standard log file. How can I keep this from happening?

- Jonathan






This thread is off topic, but anyway.

I would highly recommend not using tables to do this.  You'll find that in
some browsers it will cause scroll-bars to become active when they clearly
don't need to be.

Very ugly indeed.

Regards,

[ lucas ]




"Richard Baskett" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> You can do this with html, just make your page a table with height="100%",
> and then have your footer in it's own row at the bottom with
valign="bottom"
> and make sure your table cell with your main content is valign="top".
Since
> I can not see what you're doing I cant give you specifics, but I think
from
> what I wrote you'll be able to figure out what you want to do :)
>
> I try to stay away from frames.  I am not sure if I am in the minority, I
do
> use frames, but when don't have to.. I dont.
>
> Rick
>
> > I'm not sure if this is a PHP or HTML question but can anyone tell me of
a
> > way to place an image or text at the bottom of a browser window?
> >
> > I have some pages that have only a bit of text and when I place my
footer on
> > that page I would like it to line up nicely with the bottom of the
browser
> > window. Right now my footer appears wherever the text on my page
finished
> > ...
> >
> > Thanks!
> >
> > Jc
> >
> > _________________________________________________________________
> > Get your FREE download of MSN Explorer at
http://explorer.msn.com/intl.asp
> >
> >
> > --
> > PHP General 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]
> >
>






On Fri, 19 Oct 2001 09:15:57 +1000, Lucas Chan wrote:
>This thread is off topic, but anyway.

true.

>I would highly recommend not using tables to do this.  You'll find
>that in some browsers it will cause scroll-bars to become active
>when they clearly don't need to be.
>
>Very ugly indeed.

also, height is not a legal attribute of table so netscape won't know
what to do with it. thats not because netscape sucks, it's because
it's not supposed to do anything.

you're better off trying to position it w/ css:
<div style= "position: absolute; bottom: 0px">footer text</div>

NN4 will choke on this too, but IE5+ and NN6 should all get it right

>"Richard Baskett" <[EMAIL PROTECTED]> wrote in message
>[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>> You can do this with html, just make your page a table with
>>height="100%",
>> and then have your footer in it's own row at the bottom with
>valign="bottom"
>> and make sure your table cell with your main content is
>>valign="top".
>Since
>> I can not see what you're doing I cant give you specifics, but I
>>think
>from
>> what I wrote you'll be able to figure out what you want to do :)
>>
>> I try to stay away from frames.  I am not sure if I am in the
>>minority, I
>do
>> use frames, but when don't have to.. I dont.
>>
>> Rick
>>
>> > I'm not sure if this is a PHP or HTML question but can anyone
>>tell me of
>a
>> > way to place an image or text at the bottom of a browser window?
>> >
>> > I have some pages that have only a bit of text and when I place
>>my
>footer on
>> > that page I would like it to line up nicely with the bottom of
>>the
>browser
>> > window. Right now my footer appears wherever the text on my page
>finished
>> > ...
>> >
>> > Thanks!
>> >
>> > Jc
>> >
>> > _________________________________________________________________

>> > Get your FREE download of MSN Explorer at
>http://explorer.msn.com/intl.asp
>> >
>> >
>> > --
>> > PHP General 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: php-list-
>>[EMAIL PROTECTED]
>> >
>>






Just wondering if anyone has managed to install GD 2 on their system. I
have been trying to play with image manipulation on my FreeBSD4.3 box
using PHP, and it tells me that I need GD 2 installed to use image
resampling, but even after ive updated my ports tree, it still only had GD
1.8


I cannot seem to get to the actual GD site so im not sure whats up there,
but has anyone else installed GD 2 and if so, any suggestions on whats the
best way to go about it would be appreciated.


Cheers


Chris



--
     Chris Aitken - Administration/Database Designer - IDEAL Internet
  email: [EMAIL PROTECTED]  phone: +61 2 4628 8888  fax: +61 2 4628 8890
              __-----------------------------------------__
                      # ln -s /dev/null /bin/laden
          If you don't like my typing, all flames to /bin/laden





See http://www.php.net/~rasmus/gd.html for tips on building from source.
Just stick the gd2 filename you see there into google to find it
somewhere.  Boutell's site seems a tad unstable.

-Rasmus

On Fri, 19 Oct 2001, Chris Aitken wrote:

> Just wondering if anyone has managed to install GD 2 on their system. I
> have been trying to play with image manipulation on my FreeBSD4.3 box
> using PHP, and it tells me that I need GD 2 installed to use image
> resampling, but even after ive updated my ports tree, it still only had GD
> 1.8
>
>
> I cannot seem to get to the actual GD site so im not sure whats up there,
> but has anyone else installed GD 2 and if so, any suggestions on whats the
> best way to go about it would be appreciated.
>
>
> Cheers
>
>
> Chris
>
>
>
> --
>      Chris Aitken - Administration/Database Designer - IDEAL Internet
>   email: [EMAIL PROTECTED]  phone: +61 2 4628 8888  fax: +61 2 4628 8890
>               __-----------------------------------------__
>                       # ln -s /dev/null /bin/laden
>           If you don't like my typing, all flames to /bin/laden
>
>
>





Hi,

I learn PHP with Java and I try PHP script from help, like below;

<?
 $system = new Java("java.lang.System");
 print "Java version=".$system->getProperty("java.version")." <br>\n";
 print "Java vendor=".$system->getProperty("java.vendor")." <p>\n\n";
 print "OS=".$system->getProperty("os.name")." ".
             $system->getProperty("os.version")." on ".
             $system->getProperty("os.arch")." <br>\n";
 $formatter = new Java("java.text.SimpleDateFormat","EEEE, MMMM dd, yyyy 'at' h:mm:ss 
a zzzz");
 print $formatter->format(new Java("java.util.Date"))."\n";
?>

error like;
Fatal error: Unable to create Java Virtual Machine in c:\new\java\ex01.php on line 2

Thanks for help.

Hotma MS
[EMAIL PROTECTED]
(sorry about my english)




Did you enable the java extension?  In your php.ini file, you need to enable
the extension, and then also enable/properly set all the stuff in the [Java]
section.  This will tell PHP where your JDK is, etc.

-----Original Message-----
From: Aku [mailto:[EMAIL PROTECTED]]
Sent: Thursday, October 18, 2001 6:15 PM
To: [EMAIL PROTECTED]
Subject: [PHP] PHP with Java


Hi,

I learn PHP with Java and I try PHP script from help, like below;

<?
 $system = new Java("java.lang.System");
 print "Java version=".$system->getProperty("java.version")." <br>\n";
 print "Java vendor=".$system->getProperty("java.vendor")." <p>\n\n";
 print "OS=".$system->getProperty("os.name")." ".
             $system->getProperty("os.version")." on ".
             $system->getProperty("os.arch")." <br>\n";
 $formatter = new Java("java.text.SimpleDateFormat","EEEE, MMMM dd, yyyy
'at' h:mm:ss a zzzz");
 print $formatter->format(new Java("java.util.Date"))."\n";
?>

error like;
Fatal error: Unable to create Java Virtual Machine in c:\new\java\ex01.php
on line 2

Thanks for help.

Hotma MS
[EMAIL PROTECTED]
(sorry about my english)





Try using a LEFT JOIN against the second table, returning only records with
no match.

Something like:

SELECT DISTINCT A.username
FROM user A LEFT JOIN task_assignment B
     ON (A.username = B.username)
WHERE B.username IS NULL;

See JOIN syntax in MySQL documentation for more information:
http://www.mysql.com/doc/J/O/JOIN.html

Good luck!
__________
Curt A. Gilman
Richmond, Virginia, USA
[EMAIL PROTECTED]

"Srinivasan Ramakrishnan" <[EMAIL PROTECTED]> wrote in message
002001c157ee$c9bfaea0$[EMAIL PROTECTED]">news:002001c157ee$c9bfaea0$[EMAIL PROTECTED]...
> Hi all,
>
> I'm looking at the following scenario: I have MySQL two tables with
> usernames in both of them, I need to get usernames(A) - usernames(B)
>
> In Oracle I would use:
> SELECT username FROM user
> MINUS
> SELECT username FROM task_assignment
>
> Since MySQL does not support MINUS, I tried using the following
>
> SELECT DISTINCT A.username FROM user A
> WHERE A.username
> NOT IN(SELECT B.username FROM task_assignment B);
>
> Here's what I get from MySQL:
>
> mysql> SELECT DISTINCT A.username FROM user A WHERE
> A.username NOT IN(SELECT B.username FROM task_assignment B);
> ERROR 1064: You have an error in your SQL syntax near 'SELECT B.username
> FROM ta
> sk_assignment B)' at line 1
>
> It appears to me that MySQL's NOT IN cannot handle recordsets, so as a fix
> I'm currently doing like so, which works, but I'd really like to get it as
a
> single MySQL statement.
>
> $query = "SELECT DISTINCT username FROM task_assignment";
> $db_result = mysql_query($query);
> $data = mysql_fetch_array($db_result);
> $not_in = $data[0];
> while($data = mysql_fetch_array($db_result)){
>  $not_in .= ', ' . $data[0];
> }
>
> $query = "SELECT DISTINCT username FROM user";
> $query .= "WHERE username NOT IN($not_in)";
>
> Any help will be appreciated.
>
> Cheers,
> -Srini
> --
> http://www.symonds.net/~sriniram
>






  Are you inserting the php on the hidden's value attribute?

  Something like:

<input type="hidden" name="city" value="<?php echo $city; ?>">

  Also, this hidden input must be on a form... If you don't have a 'submit'
button on the second page (I understood only the first and third pages are
forms), you either could put an 'onunload' javascript event on the <body>
tag to submit the form or register it on a session, to later retreive it
anywhere you would like (i.e, the third page)

--


  Julio Nobrega.

Um dia eu chego lá:
http://sourceforge.net/projects/toca

"Baker Downloads" <[EMAIL PROTECTED]> wrote in message
000401c157ef$cf9f2c00$[EMAIL PROTECTED]">news:000401c157ef$cf9f2c00$[EMAIL PROTECTED]...
> i hope i can make my question understood ...
>
> i've input a value $city in my form, and i can retrieve it on the
following
> page (the page which was the "action" of the form)  ... but then, when i
try
> to use a "hidden" type to move it to my next page (which is a form), i
lose
> the value ... i cannot access it from a page within the form ...
>
> does that make sense?  if so, can anyone help?
>
> thanks in advance.
>
> ken
>
>
>






Hi!

Someone can explain me (or give me an example or more) about the function:
ibase_commit()

I am using PHP 4 and InterBase 6.0 over IIS 5.0, in the version of the
manual that I have the following description appears:

int ibase_commit ([int link_identifier, int trans_number])

but when I use it in my script, for example:

ibase_commit($myDB, $myTrans);

I receive the following error:

. Wrong parameter count for ibase_commit () in.

thank you in advance, Yoel.





Just use one argument or the other ... not both.

 ibase_commit($myTrans);
        OR
 ibase_commit($myDB);

        g.luck,
        ~Chris                           /"\
                                         \ /     September 11, 2001
                                          X      We Are All New Yorkers
                                         / \     rm -rf /bin/laden

On Fri, 19 Oct 2001, Yoel Benitez Fonseca wrote:

> Hi!
>
> Someone can explain me (or give me an example or more) about the function:
> ibase_commit()
>
> I am using PHP 4 and InterBase 6.0 over IIS 5.0, in the version of the
> manual that I have the following description appears:
>
> int ibase_commit ([int link_identifier, int trans_number])
>
> but when I use it in my script, for example:
>
> ibase_commit($myDB, $myTrans);
>
> I receive the following error:
>
> . Wrong parameter count for ibase_commit () in.
>
> thank you in advance, Yoel.
>
>
> --
> PHP General 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]
>
>





For future reference, the [] in the parameter are means either or (it list
the options you have)




"Yoel Benitez Fonseca" <[EMAIL PROTECTED]> wrote in message
00a601c1585d$7fb33ba0$[EMAIL PROTECTED]">news:00a601c1585d$7fb33ba0$[EMAIL PROTECTED]...
> Hi!
>
> Someone can explain me (or give me an example or more) about the function:
> ibase_commit()
>
> I am using PHP 4 and InterBase 6.0 over IIS 5.0, in the version of the
> manual that I have the following description appears:
>
> int ibase_commit ([int link_identifier, int trans_number])
>
> but when I use it in my script, for example:
>
> ibase_commit($myDB, $myTrans);
>
> I receive the following error:
>
> . Wrong parameter count for ibase_commit () in.
>
> thank you in advance, Yoel.
>






All,

Apologies if this has been covered recently, I'm having a problem getting
configure to complete when running with the --with-mysql= option.  The error
I keep slamming into is:

checking for MySQL support... yes
configure: error: Cannot find header files under /usr/include/mysql

I'm currently running MySQL 3.23.42, and it was installed using the binary
rpm packages from mysql.com.  The MySQL-devel-3.24.42-1 is installed, and as
far as I can tell, the header files are located in the path located in the
error message above.  The install system is RH 7.1.

I've tried looking through configure for a specific file it might be looking
for or more information about the error, but am coming up with nothing right
now.

Can anyone point me in the right direction?

Thanks in advance,
PHP Newbie

Ryan Hill, MCSE 
Network & Systems Engineer
Corporate Information Systems
Telecommunication Systems, Inc. (TCS) - http://www.telecomsys.com
<http://www.telecomsys.com> 
v: 206.792.2276 - f: 206.792.2001
pgp: 0x17CE70AB





Hi All-

I have a script in which I use ignore_user_abort() to perform some
extensive processing that
can take a few hours which there is no need for users to wait for.

I display a message saying their submission is complete and continue to run
the PHP script
in the background. It doesn't matter if they close their browser or
whatever, as the script continues
to run.

My problem is, I want the browser to stop waiting for more output from the
script. It confuses people
when it says you may now close the browser when the icon in the top right
is still moving and the progress
bar is still moving.

Is there any way in PHP (or even Javascript) that I can tell the browser to
close the connection
(ie. the equivalent of hitting the stop button).

Apparently "window.stop()" in javascript works in Netscape Navigator but
not in IE. I really need this to
work in IE (and it only need be IE!).

Any ideas?

PS/ Not really keen on running a cron job to do the same thing when it
would be easier just to stop
the browser from loading.

-Adam





What if you were to trigger a hit to the script that actually does 
the processing in the background with cURL, and give it a 2 second
timeout?

PHP tells cURL to hit the processing PHP script, cURL hits the 
processing PHP script, cURL returns 2 seconds later but cURL's abort 
is ignored by the processing PHP script.

Hey presto, zombie script running and the PHP script hit by the browser
can stop loading.

Of course, I dunno if that'll work. :)

Jason

-- 
Jason Murray
[EMAIL PROTECTED]
Web Developer, Melbourne IT
"Work now, freak later!"

> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED]]
> Sent: Friday, October 19, 2001 3:38 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Stopping the browser from continuing to load
> 
> 
> Hi All-
> 
> I have a script in which I use ignore_user_abort() to perform some
> extensive processing that
> can take a few hours which there is no need for users to wait for.
> 
> I display a message saying their submission is complete and 
> continue to run
> the PHP script
> in the background. It doesn't matter if they close their browser or
> whatever, as the script continues
> to run.
> 
> My problem is, I want the browser to stop waiting for more 
> output from the
> script. It confuses people
> when it says you may now close the browser when the icon in 
> the top right
> is still moving and the progress
> bar is still moving.
> 
> Is there any way in PHP (or even Javascript) that I can tell 
> the browser to
> close the connection
> (ie. the equivalent of hitting the stop button).
> 
> Apparently "window.stop()" in javascript works in Netscape 
> Navigator but
> not in IE. I really need this to
> work in IE (and it only need be IE!).
> 
> Any ideas?
> 
> PS/ Not really keen on running a cron job to do the same thing when it
> would be easier just to stop
> the browser from loading.
> 
> -Adam
> 
> 
> -- 
> PHP General 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]
> 




Try this:

header("Connection: close");

Or:

Register_ShutDown_Function();

Regards,

[ niveus ]




"Adam Whitehead" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi All-
>
> I have a script in which I use ignore_user_abort() to perform some
> extensive processing that
> can take a few hours which there is no need for users to wait for.
>
> I display a message saying their submission is complete and continue to
run
> the PHP script
> in the background. It doesn't matter if they close their browser or
> whatever, as the script continues
> to run.
>
> My problem is, I want the browser to stop waiting for more output from the
> script. It confuses people
> when it says you may now close the browser when the icon in the top right
> is still moving and the progress
> bar is still moving.
>
> Is there any way in PHP (or even Javascript) that I can tell the browser
to
> close the connection
> (ie. the equivalent of hitting the stop button).
>
> Apparently "window.stop()" in javascript works in Netscape Navigator but
> not in IE. I really need this to
> work in IE (and it only need be IE!).
>
> Any ideas?
>
> PS/ Not really keen on running a cron job to do the same thing when it
> would be easier just to stop
> the browser from loading.
>
> -Adam
>






For a process that takes a long time, I usually break the user interaction
& the processing apart.

For instance, when the user makes a submission from the browser interface,
the PHP takes the submitted data and stores it someplace on the file
system or in a database.  This being a quick operation, the user can be
safely notified that their submission is complete, and the user can go
about his/her business within the browser interface.  Then there is a
process that runs on the server, say every minute (asynchronously from
visitors triggering the PHP script), that is looking for new data in the
location the PHP script deposits the submitted data, and processes it.

It's a bit more work than just making the PHP script execute for hours,
but it is far better use of the server's resources, and gives you much
more flexibility to alter the processing w/o affecting the user experience
(actually creating a better user experience).

        g.luck,
        ~Chris                           /"\
                                         \ /     September 11, 2001
                                          X      We Are All New Yorkers
                                         / \     rm -rf /bin/laden

On Fri, 19 Oct 2001 [EMAIL PROTECTED] wrote:

> Hi All-
>
> I have a script in which I use ignore_user_abort() to perform some
> extensive processing that
> can take a few hours which there is no need for users to wait for.
>
> I display a message saying their submission is complete and continue to run
> the PHP script
> in the background. It doesn't matter if they close their browser or
> whatever, as the script continues
> to run.
>
> My problem is, I want the browser to stop waiting for more output from the
> script. It confuses people
> when it says you may now close the browser when the icon in the top right
> is still moving and the progress
> bar is still moving.
>
> Is there any way in PHP (or even Javascript) that I can tell the browser to
> close the connection
> (ie. the equivalent of hitting the stop button).
>
> Apparently "window.stop()" in javascript works in Netscape Navigator but
> not in IE. I really need this to
> work in IE (and it only need be IE!).
>
> Any ideas?
>
> PS/ Not really keen on running a cron job to do the same thing when it
> would be easier just to stop
> the browser from loading.
>
> -Adam
>
>
> --
> PHP General 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]
>
>





We are using the LAMP configuration.
Frequently we get a high server load.
I am sure the server load is caused by a php script using mysql. We've a
lot of scripts running out there, so i can't locate the 'bad' script.
Is there any product that can track the cpu/mem usage of php scripts or
helps me locating a bad script?


Michael







No php4-support in this msi? Bah!

Or did I miss something?
Apache tells me that it canīt load the module php4apache.dll - no such
module.
Perhaps my LoadModule entry for php4 is wrong, though itīs  the same I used
for 1.3.20 (LoadModule php4_module C:\php\sapi\php4apache.dll)?

Or perhaps I need something for the AddModule-part as well? But what? I
donīt have a *php*.c-file on my disk, whatever this is.




Reply via email to