php-windows Digest 7 Jun 2003 08:50:56 -0000 Issue 1765

Topics (messages 20221 through 20238):

Re: doing $mc=new myclass();  or  $mc= &new myclass();  ?
        20221 by: Peter Misun
        20223 by: Per Lundberg
        20224 by: Peter Misun
        20226 by: Luis Moreira
        20227 by: Peter Misun

Re: Variable Problems
        20222 by: George Nicolae

Re: install PHP 431 on Windows 2003 server
        20225 by: Peter Misun
        20229 by: The.Wiz

Recommendation of Windows Clients
        20228 by: Guillermo Scharffenorth

Re: Display  new Page after Form is processed
        20230 by: The.Wiz
        20231 by: Cristian MARIN
        20233 by: Stephen
        20234 by: Cristian MARIN
        20235 by: Per Lundberg

Re: PHP, ODBC, Unable to Connect
        20232 by: Joseph McDonald

Re: Deleting users from htpasswd
        20236 by: Max Graham

How to display GIF image
        20237 by: William Cheung
        20238 by: Luis Ferro

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

Sven Schnitzke wrote:

> This is conceptual. If you want to know if &new() is 'cheaper'
> than new() you might want to ask the developers list or take
> a look at execution time for 10000 [&]new()s or so.

yes, this is what I want to know
I'll ask in php.dev developers list forum

5o



--- End Message ---
--- Begin Message ---
On Fri, 2003-06-06 at 11:23, Peter Misun wrote:
> need help:
> what do you suggest to use:
> 
>   $mc = new myclass();
> or
>   $mc = &new myclass();

The first form will copy the object.  If you don't want this, use the
second form.
--
Best regards,

Per Lundberg / Capio ApS
Phone: +46-18-4186040
Fax: +46-18-4186049
Web: http://www.nobolt.com

Attachment: signature.asc
Description: This is a digitally signed message part


--- End Message ---
--- Begin Message ---
but I couldn't find case, in which is better to use the first form

why should I have copy, if there is an original where I'm not having control over it 
?!?

5o


Per Lundberg wrote:

> On Fri, 2003-06-06 at 11:23, Peter Misun wrote:
> > need help:
> > what do you suggest to use:
> >
> >   $mc = new myclass();
> > or
> >   $mc = &new myclass();
>
> The first form will copy the object.  If you don't want this, use the
> second form.
> --
> Best regards,
>
> Per Lundberg / Capio ApS
> Phone: +46-18-4186040
> Fax: +46-18-4186049
> Web: http://www.nobolt.com
>
>                                                   
> -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>                        Name: signature.asc
>    signature.asc       Type: application/pgp-signature
>                    Encoding: 7bit
>                 Description: This is a digitally signed message part

--

Mgr. Peter Misun
MicroStep-MIS, Ilkovicova 3, 841 04 Bratislava, Slovakia
tel: +421/ 2/ 602 00 127, 111,  fax: +421/ 2/ 602 00 180



--- End Message ---
--- Begin Message ---
It all depends on what you want to do.

The first syntax creates a copy of the object, since it calls "new" by value
The second creates a "link" since it uses "&" before "new", thus calling it
"by reference".

In the first form, you have a copy, that you can use leaving the original
object intact.
In the second, you don't

----- Original Message -----
From: "Peter Misun" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; "Per Lundberg" <[EMAIL PROTECTED]>
Sent: Friday, June 06, 2003 1:17 PM
Subject: Re: [PHP-WIN] doing $mc=new myclass(); or $mc= &new myclass(); ?



but I couldn't find case, in which is better to use the first form

why should I have copy, if there is an original where I'm not having control
over it ?!?

5o


Per Lundberg wrote:

> On Fri, 2003-06-06 at 11:23, Peter Misun wrote:
> > need help:
> > what do you suggest to use:
> >
> >   $mc = new myclass();
> > or
> >   $mc = &new myclass();
>
> The first form will copy the object.  If you don't want this, use the
> second form.
> --
> Best regards,
>
> Per Lundberg / Capio ApS
> Phone: +46-18-4186040
> Fax: +46-18-4186049
> Web: http://www.nobolt.com
>
>                                                   ------------------------
----------------------------------------------------------------------------
----------------------------------------------------------------------------
----------------------------------------------------------------------------
----------------------------------------------------------------------------
----------------------------------------------------------------------------
----------------------------------------------------------------------------
----------------------------------------------------------------------------
----------------------------------------------------------------------------
----------------------------------------------------------------------------
----------------------------------------------------------------------------
----------------------------------------------------------------------------
---------------------------------------
>                        Name: signature.asc
>    signature.asc       Type: application/pgp-signature
>                    Encoding: 7bit
>                 Description: This is a digitally signed message part

--

Mgr. Peter Misun
MicroStep-MIS, Ilkovicova 3, 841 04 Bratislava, Slovakia
tel: +421/ 2/ 602 00 127, 111,  fax: +421/ 2/ 602 00 180



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


--- End Message ---
--- Begin Message ---
here is answer I was waiting for:


Per Lundberg wrote:

> On Fri, 2003-06-06 at 14:17, Peter Misun wrote:
>
> > but I couldn't find case, in which is better to use the first form
> > why should I have copy, if there is an original where I'm not having
> > control over it ?!?
>
> You shouldn't.  This situation comes from the fact that = by default in
> PHP4 does object copying.  This is very bad, yes, and it is going to be
> changed in PHP5.  In other words, in PHP5, $mc = new myclass() will be
> equal to $mc = &new myclass();  Until PHP5 is released, we will have to
> implicitly specify that we want to create a reference and not a copy of
> the object.

5o




Peter Misun wrote:

> need help:
> what do you suggest to use:
>
>   $mc = new myclass();
> or
>   $mc = &new myclass();
>
> because in any tutorial I can see the first form, but on page "what references do" 
> in PHP manual I found out the second form
>
> so?
>
> 5o

--

Mgr. Peter Misun
MicroStep-MIS, Ilkovicova 3, 841 04 Bratislava, Slovakia
tel: +421/ 2/ 602 00 127, 111,  fax: +421/ 2/ 602 00 180



--- End Message ---
--- Begin Message ---
In the name.php file try to
echo "Hello ".$_GET["name"];

If it works mean that you have register_globals = off in your php.ini file.
Make the register_globals = on and the echo "Hello $name" will work but I
advive you to not make the register_globals = on due to some security
issues.

--


Best regards,
George Nicolae
IT Manager
___________________
PaginiWeb.com  - Professional Web Design
www.PaginiWeb.com


"Dylan Williams" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi all,
>
> I'm having trouble using variables.
>
> If I create a PHP file and define the variables within it (e.g. $name =
> "Bob";) and then ask the same file to ouput the variable as part of an
echo
> command (e.g. echo( "Hello, $name");  ), it works fine.
>
> The problem comes when I try to link to a PHP file from an HTML file (e.g.
> <A HREF="name.php?name=Bob"> I am Bob </A>.  Instead of displaying the
> sentence as defined in the PHP file (e.g. echo( "Hello, $name");  ), I get
> the following error message:
>
> Notice: Undefined variable: name in e:\xxx\name.php on line 43
>
> Does anyone know what the problem might be?  I've tried writing the code
in
> a number of different ways but with the same result.  Could it be that my
> PHP or IIS server settings are not quite right?
>
> Many thanks for any help!
> Dylan.
>
> --
> Dylan J. Williams
> Silent Films & Plug Music (HK) Limited
>
> GPO Box 8315,
> Central, Hong Kong SAR,
> China.
> Ph: +852 9641 2246 Fx; +852 2809 2550
> www.silent-films.org
>
>



--- End Message ---
--- Begin Message ---
i was installing 4.3.1 on W2000 server and received the same error before the end of 
installation - so I had to setup manually, but then everithing works fine till now

5o


S wrote:

> I can't install  PHP 4.3.1 on a Windows 2003 server.
> Return message for a missing OCX file.
>
> Simos Anagnostakis
> Dept. of Primary Education
> University of Crete
> Campus Rethymno 74100
> tel +302831077623 fax 77596

--

Mgr. Peter Misun
MicroStep-MIS, Ilkovicova 3, 841 04 Bratislava, Slovakia
tel: +421/ 2/ 602 00 127, 111,  fax: +421/ 2/ 602 00 180



--- End Message ---
--- Begin Message ---
Yes, do a manual install.

"Peter Misun" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>
> i was installing 4.3.1 on W2000 server and received the same error before
the end of installation - so I had to setup manually, but then everithing
works fine till now
>
> 5o
>
>
> S wrote:
>
> > I can't install  PHP 4.3.1 on a Windows 2003 server.
> > Return message for a missing OCX file.
> >
> > Simos Anagnostakis
> > Dept. of Primary Education
> > University of Crete
> > Campus Rethymno 74100
> > tel +302831077623 fax 77596
>
> --
>
> Mgr. Peter Misun
> MicroStep-MIS, Ilkovicova 3, 841 04 Bratislava, Slovakia
> tel: +421/ 2/ 602 00 127, 111,  fax: +421/ 2/ 602 00 180
>
>



--- End Message ---
--- Begin Message ---
Hello everyone,

I am a new PHP user working on winxp with apache and mysql.  I have tested
some php develpment environments, but none of them seem to really work well.
None of them, for example, are able to debug multiple scripts in sequence,
as,  for example, when there is a php or html form that requests a php
script.  I would like recommendations about what environment.

I have tried, Maguma, Zend, and PHPED.  Their trial, but according to the
manufacturers, completely functional versions.

Thanks,

Guillermo



--- End Message ---
--- Begin Message ---
I thought you couldn't use header(location:???) if its not listed first, as
in before the DB code. If this is the case you a redirect by using the meta
refresh option.

"Cristian Marin" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
Put header("Location: my_second_page.php"); after the script which enter the
data in the db


--
-------------------------------------------------
Cristian MARIN
InterAKT Online (www.interakt.ro)
+4021 411 2610
[EMAIL PROTECTED]

  "Oliver Steimer" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
  HI ,

  after pressing "submit" on my form page and puting the data in my database
i
  wish to display a new html page. How can i do this ?

  thanks for helping
  Oliver





--- End Message ---
--- Begin Message ---
This page work excellent even the location is at the end of the source.
If you don't send anything before you can used anywere in the page ... 
If you send anything before the user cannot see the page because it is redirected.

<?php
//Connection statement
require_once('Connections/gesundheit.php');

//include Kart files
require_once("includes/Kart/cart.inc.php");

//Start Kart Recordset
  $Recordset1 = 
getCartRecordset('Recordset1','id','name','quantity','cost','subtotal','total'); 
//End Kart Recordset

$totalRows_Recordset1 = $Recordset1->getNoRows();
         
//PHP ADODB document - made with PHAkt 2.4.9?>
<?php 
 $Recordset1->MoveFirst();
 $i=1;
 while(!$Recordset1->EOF){
  if($i == 1){
   $url_checkout="?";
  }else{
   $url_checkout.="&";   
  }
  $url_checkout .= 
"isbn".$i."=".$Recordset1->Fields('id')."&menge".$i."=".$Recordset1->Fields('quantity');
  $i++;
  $Recordset1->MoveNext();
 }
 $Recordset1->Close();
 unset($HTTP_SESSION_VARS['cart']);
 
 $url_checkout = "http://localhost/".$url_checkout;
 header("Location: ".$url_checkout);
?> 

-- 
-------------------------------------------------
Cristian MARIN
InterAKT Online (www.interakt.ro)
+4021 411 2610 
[EMAIL PROTECTED]

  "The.Wiz" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]
  I thought you couldn't use header(location:???) if its not listed first, as
  in before the DB code. If this is the case you a redirect by using the meta
  refresh option.

  "Cristian Marin" <[EMAIL PROTECTED]> wrote in message
  news:[EMAIL PROTECTED]
  Put header("Location: my_second_page.php"); after the script which enter the
  data in the db


  --
  -------------------------------------------------
  Cristian MARIN
  InterAKT Online (www.interakt.ro)
  +4021 411 2610
  [EMAIL PROTECTED]

    "Oliver Steimer" <[EMAIL PROTECTED]> wrote in message
  news:[EMAIL PROTECTED]
    HI ,

    after pressing "submit" on my form page and puting the data in my database
  i
    wish to display a new html page. How can i do this ?

    thanks for helping
    Oliver





--- End Message ---
--- Begin Message ---
No, you can. You can use header() at any time providing that absolutely
nothing has been output to the users browser. So, don't use any echo or
print functions and it should work fine

----- Original Message ----- 
From: "The.Wiz" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, June 06, 2003 3:42 PM
Subject: [PHP-WIN] Re: Display new Page after Form is processed


> I thought you couldn't use header(location:???) if its not listed first,
as
> in before the DB code. If this is the case you a redirect by using the
meta
> refresh option.
>
> "Cristian Marin" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> Put header("Location: my_second_page.php"); after the script which enter
the
> data in the db
>
>
> --
> -------------------------------------------------
> Cristian MARIN
> InterAKT Online (www.interakt.ro)
> +4021 411 2610
> [EMAIL PROTECTED]
>
>   "Oliver Steimer" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
>   HI ,
>
>   after pressing "submit" on my form page and puting the data in my
database
> i
>   wish to display a new html page. How can i do this ?
>
>   thanks for helping
>   Oliver
>
>
>
>
>
> -- 
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>



--- End Message ---
--- Begin Message ---
Yes,you can, I just did it. I don't know if it is because I use php4.3.2 or what is 
the cause 

-- 
-------------------------------------------------
Cristian MARIN
InterAKT Online (www.interakt.ro)
+4021 411 2610 
[EMAIL PROTECTED]

  "Stephen" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]
  No, you can. You can use header() at any time providing that absolutely
  nothing has been output to the users browser. So, don't use any echo or
  print functions and it should work fine

  ----- Original Message ----- 
  From: "The.Wiz" <[EMAIL PROTECTED]>
  To: <[EMAIL PROTECTED]>
  Sent: Friday, June 06, 2003 3:42 PM
  Subject: [PHP-WIN] Re: Display new Page after Form is processed


  > I thought you couldn't use header(location:???) if its not listed first,
  as
  > in before the DB code. If this is the case you a redirect by using the
  meta
  > refresh option.
  >
  > "Cristian Marin" <[EMAIL PROTECTED]> wrote in message
  > news:[EMAIL PROTECTED]
  > Put header("Location: my_second_page.php"); after the script which enter
  the
  > data in the db
  >
  >
  > --
  > -------------------------------------------------
  > Cristian MARIN
  > InterAKT Online (www.interakt.ro)
  > +4021 411 2610
  > [EMAIL PROTECTED]
  >
  >   "Oliver Steimer" <[EMAIL PROTECTED]> wrote in message
  > news:[EMAIL PROTECTED]
  >   HI ,
  >
  >   after pressing "submit" on my form page and puting the data in my
  database
  > i
  >   wish to display a new html page. How can i do this ?
  >
  >   thanks for helping
  >   Oliver
  >
  >
  >
  >
  >
  > -- 
  > PHP Windows Mailing List (http://www.php.net/)
  > To unsubscribe, visit: http://www.php.net/unsub.php
  >
  >



--- End Message ---
--- Begin Message ---
On Fri, 2003-06-06 at 18:19, Cristian MARIN wrote:
> Yes,you can, I just did it. I don't know if it is because I use
> php4.3.2 or what is the cause 

You probably have some form of output buffering enabled.
--
Best regards,

Per Lundberg / Capio ApS
Phone: +46-18-4186040
Fax: +46-18-4186049
Web: http://www.nobolt.com

Attachment: signature.asc
Description: This is a digitally signed message part


--- End Message ---
--- Begin Message ---
I have also tried this with just "SELECT * FROM ACCT"

ACCT holds all member account information.  I am trying to write a form
where someone here can create a CD on our core system, and then go to this
form and type in the account number and suffix of that CD and print out the
certificate of deposit terms and conditions form without having to input any
information, less human error factor.

Joe
"Luis Ferro" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I just got lost in the query string...
>
> Try to "echo $query;" and then see if there is any typo in the query
> itself... i work that way with php/mysql and most of the cases where i
> find such an error is some sort of typo in the query...
>
> Cheers...
> Luis Ferro
>
> Joseph McDonald wrote:
>
> >Here is the code (acct # blurred for obvious reason):
> >##begin paste##
> ><?php
> >$connect = odbc_connect("testcusa","","");
> >$query = "SELECT ACCT.DIVRATE, ACCT.BEG_DATE, ACCT.END_MATR,
ACCT.CDPY_COD,
> >ACCT.CDPMTRM, ACCT.CDFLTRM, ACCT.OCERTBAL, NAME.NAME, NAME.SSN,
> >ACCT.\"ACCT#\", ACCT.SFX FROM ACCT ACCT, NAME NAME WHERE
ACCT.\"ACCT#_JOIN\"
> >= NAME.\"ACCT#_JOIN\" AND ((ACCT.\"ACCT#\"=\'******\') AND (ACCT.SFX Like
> >\'M\'))";
> >$result = odbc_exec($connect, $query);
> >odbc_result_all($result);
> >?>
> >##end paste##
> >
> >Here is the result:
> >##being paste##
> >Warning: SQL error: [Simba Technologies Inc.][SimbaEngine C/S ODBC
> >Driver][SimbaClient][SimbaClient LNA]Client RPC error. Error = (103)
Error
> >sending message. Trap = (111) Error closing connection. Value = (533)
> >Endpoint in incorrect state. State = CLOSE_STATE. , SQL state 08S01 in
> >SQLConnect in C:\Program Files\Apache Group\Apache2\htdocs\CD\query.inc
on
> >line 5
> >
> >Warning: odbc_exec(): supplied argument is not a valid ODBC-Link resource
in
> >C:\Program Files\Apache Group\Apache2\htdocs\CD\query.inc on line 5
> >
> >Warning: odbc_result_all(): supplied argument is not a valid ODBC result
> >resource in C:\Program Files\Apache Group\Apache2\htdocs\CD\query.inc on
> >line 6
> >##end paste##
> >The server is a custom Simba database wrote to access cfam databases on a
> >RS/6000 box.   I can pull info from this database using ODBC Explorer,
MSQry
> >tool, and several others, but PHP just will not give me back any data.  I
> >keep getting this error message.  I have searched online and with no
evail.
> >If anyone can help me with this, I would greatly appreciate it.  I am
doing
> >my best to learn PHP & several database systems but this has put a bump
in
> >my road.  PHP's ODBC does work, I've connected using openlink and
progress
> >server on the same RS/6000 box to a diff database.
> >
> >Thanks in advance
> >
> >Joe
> >
> >I
> >
> >
> >
> >
> >
>
>



--- End Message ---
--- Begin Message ---
If you want a script that's premade that'll do it for you, I suggest
PHPAccess ...

http://www.krizleebear.de/phpaccess/dynamisch/

If nothing else, it'll give you some code to look at to see how it's done in
case you don't want to use this and would rather customize your own

Message-ID: <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
From: "Cristian MARIN" <[EMAIL PROTECTED]>
Date: Fri, 6 Jun 2003 12:54:06 +0300
MIME-Version: 1.0
Content-Type: multipart/alternative;
 boundary="----=_NextPart_000_005D_01C32C2A.B6E6E660"
Subject: Re: Deleting users from htpasswd

------=_NextPart_000_005D_01C32C2A.B6E6E660
Content-Type: text/plain;
 charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable

$user =3D "bubu";
$file_ht =3D fopen("path_to_the_htaccess","r+");
if ($file_ht){
    $content_file =3D fread($file_ht, filesize("path_to_the_htaccess"));
    fclose($file_ht);
    $content_file =3D preg_replace("/".$user.".*\n/","",$content_file);
    $file_ht=3Dfopen("path_to_the_htaccess","w+");
    if ($file_ht){
           fwrite($file_ht,$content_file);
           fclose($file_ht);
    }else{
        echo "Failed open for writing";
    }
}else{
     echo "failed open for reading";
}

You have to replace the user with the $user ( I don't know how do you =
take the user) and the path_to_the_htaccess

Hope it helps.

--=20
-------------------------------------------------
Cristian MARIN
InterAKT Online (www.interakt.ro)
+4021 411 2610=20
[EMAIL PROTECTED]

  "Guru P Chaturvedi" <[EMAIL PROTECTED]> wrote in message =
news:[EMAIL PROTECTED]
  Hi Cristian,

  Well that's right... i wanna do it thru PHP Scrip... but dunno what =
exactly
  i should use... any clues...?


  "Cristian Marin" <[EMAIL PROTECTED]> wrote in message
  news:[EMAIL PROTECTED]
  Remove the line of the user from the .htpasswd. You can do it manually =
or a
  php script can do it for you.



  --
  -------------------------------------------------
  Cristian MARIN
  InterAKT Online (www.interakt.ro)
  +4021 411 2610
  [EMAIL PROTECTED]

    "Guru P Chaturvedi" <[EMAIL PROTECTED]> wrote in message
  news:[EMAIL PROTECTED]
    Hi,
    i am storing all users for accessing apache resources in a file =
called
    my.users i am able to add/modify users and passwords using the =
htpasswd
    utility. But not able to remove a particular user... are there =
anyways of
    doing it? can u please help...

    with Warm Regards,
    Guru.
    ---------------------------------------
    Phone: (+91)9845290270
    URL: www.gangarasa.com
    Yahoo IM: guru4vedi
    MSN: [EMAIL PROTECTED]
    ---------------------------------------






------=_NextPart_000_005D_01C32C2A.B6E6E660--



--- End Message ---
--- Begin Message ---
How could I display GIF image in 4.3.2. I tried the example in "Image Functions" manual and showed nothing.
 

 

<<Clear Day Bkgrd.JPG>>


--- End Message ---
--- Begin Message --- Due to some patent entanglement of an unamed company, GIF support was dropped from the stock GD integrated in PHP.

To add GIF support, you will need to recompile both GD and PHP with it (at your own risk of course)!

I would sugest the use of the far superior png files as the problems of browser support for them is non-existing nowadays...

Cheers,
Luis Ferro

William Cheung wrote:

How could I display GIF image in 4.3.2. I tried the example in "Image Functions" manual and showed nothing.







--- End Message ---

Reply via email to