OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
php-general Digest 14 Mar 2004 07:06:00 -0000 Issue 2645

php-general-digest-helplists.php.net
Date: Sun Mar 14 2004 - 01:06:00 CST


php-general Digest 14 Mar 2004 07:06:00 -0000 Issue 2645

Topics (messages 180351 through 180378):

Re: MySQL Writes Exception for PHP in License
        180351 by: Red Wingate
        180354 by: Rasmus Lerdorf

Re: Create table .. script[via LSMTP - see www.lsoft.com]
        180352 by: Firman Wandayandi

Re: PHP and Apache 2
        180353 by: Rasmus Lerdorf
        180374 by: trlists.clayst.com

fw:¤£°eªáªº²z¥Ñ.
        180355 by: ©÷­ô

gd installation problem
        180356 by: QT

HTML Utilities
        180357 by: Jeff Oien
        180358 by: Red Wingate
        180359 by: Red Wingate

Safari download problems
        180360 by: Brian Dunning
        180370 by: Michal Migurski

selecting text from a database and displaying it in a html form
        180361 by: Bernie McKeown
        180362 by: Brian V Bonini

objects in session
        180363 by: marc serra

Web based php development tool
        180364 by: Joseph Ross Lee

servers in php
        180365 by: Comex
        180366 by: Norbert Pfeiffer
        180367 by: Comex
        180371 by: DvDmanDT

Re: [PERL] Excel sheet reading
        180368 by: Raditha Dissanayake

Re: [PHP-WIN] servers in php
        180369 by: Robert Twitty

[Q] Session management when WEB site is based on template
        180372 by: Michael T. Peterson
        180373 by: Mike Mapsnac

Classes & Objects.
        180375 by: Elliot J. Balanza

how to convert array into integer
        180376 by: Kenneth
        180377 by: Raditha Dissanayake

Regarding PHP Installation on linux
        180378 by: balaji.ankem.wipro.com

Administrivia:

To subscribe to the digest, e-mail:
        php-general-digest-subscribelists.php.net

To unsubscribe from the digest, e-mail:
        php-general-digest-unsubscribelists.php.net

To post to the list, e-mail:
        php-generallists.php.net

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

attached mail follows:


When you compile PHP --with-mysql=/path/to/mysql you will use the
libs from the installed MySQL dist , when using the bundled MySQL
libs by compiling --with-mysql you can use MySQL feature even if
you haven't installed on your maschine.

Am Samstag, 13. März 2004 19:24 schrieb Karl Timmermann:
> So I guess PHP 5 can now include the MySQL libraries.
>
> Anyone know if they will include them with the first release of PHP 5,
> or have plans to?
>
> What difference will this make? I ask, because I read that just
> configuring with "--with-mysql=/usr" allows you to use MySQL with PHP
> 5. THis is how I always compiled with PHP 4, so I guess I don't really
> get how they included them before, and what the differences were/are
> going to be without the libraries?
>
>
> Thanks!
> Karl

attached mail follows:


No, there are no plans to bundle the client library with PHP5. We are
bundling SQlite instead. That of course doesn't mean any less support for
MySQL. The MySQL extension, 2 of them in fact in PHP5, will still be
there and you simply build it against your own copy of the MySQL client
library.

-Rasmus

On Sat, 13 Mar 2004, Karl Timmermann wrote:

> So I guess PHP 5 can now include the MySQL libraries.
>
> Anyone know if they will include them with the first release of PHP 5,
> or have plans to?
>
> What difference will this make? I ask, because I read that just
> configuring with "--with-mysql=/usr" allows you to use MySQL with PHP
> 5. THis is how I always compiled with PHP 4, so I guess I don't really
> get how they included them before, and what the differences were/are
> going to be without the libraries?
>
>
> Thanks!
> Karl
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

attached mail follows:


Hi Mike,

Try using phpMyAdmin, but sorry I forgot the site :( try google.

Regards,
    Firman

----- Original Message -----
From: "Mike Mapsnac" <mikerh9hotmail.com>
To: <php-generallists.php.net>
Sent: Saturday, March 13, 2004 11:24 PM
Subject: [PHP] Create table .. script

> Hello
>
> When I need to create table I have to login into mysql and run the query.
Is
> there a way to create some sort of scipt that can create all my tables?.So
> If I need create a table in new database I just run the script.
>
> I know that I can do mysql_query("QUERY OF TABLE");
> But is there another way of doing this?
>
> Thanks
>
> _________________________________________________________________
> One-click access to Hotmail from any Web page - download MSN Toolbar now!
> http://clk.atdmt.com/AVE/go/onm00200413ave/direct/01/
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

attached mail follows:


On Sat, 13 Mar 2004 trlistsclayst.com wrote:

> > So the current situation is that Apache2-prefork+PHP is a decent solution
> > but it hasn't been tested a whole lot.
>
> I am currently moving my app to an Apache 2 server. I did not build
> the server (not my area of expertise) and don't know how how it was
> built, but I can talk to the folks who did it and find out. It was
> their choice to go to Apache 2, but I still have time to get them to go
> back if need be. I'd like to understand the recommendations more
> clearly.
>
> Are there configurations of Apache 2 that are OK with PHP? The above
> suggests prefork hasn't been tested but the remainder of your message
> suggests multithreading (which is different from prefork as I read the
> Apache docs -- right?) is even more problematic. It sounds like this
> is what's behind the recommendation at
> http://us2.php.net/install.apache2 which says "Do not use Apache 2.0
> and PHP in a production environment neither on Unix nor on Windows."
> But the same page says "The following versions of PHP are known to work
> with the most recent version of Apache 2.0:", so I'm not quite clear on
> what's being recommended.

I think that is pretty clear. It says that it works but we do not
consider it production quality.

As for whether your particular install will work? I have no idea. Maybe,
maybe not. And if weird things happen chances are we won't be able to
help you fix it. That's the essence of our reccomendation to stick with
the Apache1 codebase we know well until such a time that Apache2 actually
delivers substantial enough features to warrant the effort it is going to
take to hammer it into a production-quality environment.

-Rasmus

attached mail follows:


On 13 Mar 2004 Rasmus Lerdorf wrote:

> I think that is pretty clear. It says that it works but we do not
> consider it production quality.

OK, thanks. That is what I thought it meant but I wanted to be sure.

> As for whether your particular install will work? I have no idea. Maybe,
> maybe not. And if weird things happen chances are we won't be able to
> help you fix it. That's the essence of our reccomendation to stick with
> the Apache1 codebase we know well until such a time that Apache2 actually
> delivers substantial enough features to warrant the effort it is going to
> take to hammer it into a production-quality environment.

Thanks. I wasn't asking if it would work, just what the
recommendations were. That's very clear.

--
Tom

attached mail follows:


> >
> >¤£°eªáªº²z¥Ñ
> >
> >ªB¤ÍŪ¬ü³N¨tªº¤k¤Í°Ý¡G
> >¡u§Úªº¥Í¤é­C¡I§A«ç»ò³£¤£°eªáµ¹§Ú¡H¡v
> >¡u¤°»ò¡H¡vŪ¶éÃÀ¨tªº¬Y¬Y³ºµM»¡¡G
> >¡u§A¤£ª¾¹Dªá¬O´Óª«ªº¥Í´Þ¾¹¶Ü¡H¡I§Ú­Ì¬°¤°»ò­n±N¤H®aªº¥Í´Þ¾¹³Î¤U¨Ó¡AµM
> >«á±·µÛ¤¤j§âªº¥Í´Þ¾¹¦b¤â¤W¡H¡v
> >
> >³o¨k¤H¯u¬O¬½¨¤¦â......
> >³ºµMÁ¿¨ì¨º¤k«Ä¤lºF·\¦a§C¤UÀY¨Ó.........¡z
> >
> >©Ò¥H....................
> >1.¦³¨Ç¤k¥Í·|¤ñ¸û½Ö¦¬¨ìªº¥Í´Þ¾¹¤ñ¸û¦h¡B¤ñ¸û¤j....
> >2.¦³¸gÅ窺¤k¥Í¡A·|»{¬°¥¼³Î¹L¥]¥Öªº¥Í´Þ¾¹(§t­cªº)¥i¥H¸û«ù¤[....
> >3.¤k¥Í­Ì·|¤¦¬¨ì¥Í´Þ¾¹®É¡A«K­¢¤£¤Î«Ýªº²r»D¥Í´Þ¾¹ªº¨ý¹D¡A¨ÃÅS¥Xº¡¨¬
ªº
> >¯º®e
> >

 

attached mail follows:


dear Sirs,

I did what says in
http://www.php.net/manual/en/install.windows.php#Installation of Windows
extensions

but still I can not run php_gd2.dll extensions on win2000

where can I find more solutions about this

attached mail follows:


Are there any ready made utilities out there for adding HTML
tags to lists? For example if I have:

This Thing
That Thing
The Other Thing
Lot More Things etc.

I would like to have something that would either add <br>
<li></li> (including <ul></ul> at beginning and end) or
<p></p>. If there's nothing out there I'll try to do it myself
but then I'll have to bother you people with questions. :)
Jeff Oien

attached mail follows:


How about this:

<?php

function toList ( $array ) {
     $temp = '';

     foreach ( $array AS $item ) {
         if ( is_array ( $item ) ) {
             $temp .= '<ul>'.toList ( $array ).'</ul>';
         } else {
            $temp .= '<li>'.$item.'</li>';
         }
     }

     return $temp ;
}

$array = array ( 10 , 20 , array ( 30 , 40 ) );

echo toList ( $array ) ;

?>

Haven't testet it but i think this should work out quite nice :)

Jeff Oien wrote:
> Are there any ready made utilities out there for adding HTML
> tags to lists? For example if I have:
>
> This Thing
> That Thing
> The Other Thing
> Lot More Things etc.
>
> I would like to have something that would either add <br>
> <li></li> (including <ul></ul> at beginning and end) or
> <p></p>. If there's nothing out there I'll try to do it myself
> but then I'll have to bother you people with questions. :)
> Jeff Oien
>

attached mail follows:


woops :-)

<?php

function toList ( $array ) {
   $temp = '';

   foreach ( $array AS $item ) {
     if ( is_array ( $item ) ) {
       $temp .= '<li>'.toList ( $array ).'</li>';
     } else {
       $temp .= '<li>'.$item.'</li>';
     }
   }

   return '<ul>'.$temp.'</ul>' ;
}

$array = array ( 10 , 20 , array ( 30 , 40 ) );

echo toList ( $array ) ;

?>

This should now be well formated :-)

Red Wingate wrote:

> How about this:
>
> <?php
>
> function toList ( $array ) {
> $temp = '';
>
> foreach ( $array AS $item ) {
> if ( is_array ( $item ) ) {
> $temp .= '<ul>'.toList ( $array ).'</ul>';
> } else {
> $temp .= '<li>'.$item.'</li>';
> }
> }
>
> return $temp ;
> }
>
> $array = array ( 10 , 20 , array ( 30 , 40 ) );
>
> echo toList ( $array ) ;
>
> ?>
>
> Haven't testet it but i think this should work out quite nice :)
>
> Jeff Oien wrote:
>
>> Are there any ready made utilities out there for adding HTML
>> tags to lists? For example if I have:
>>
>> This Thing
>> That Thing
>> The Other Thing
>> Lot More Things etc.
>>
>> I would like to have something that would either add <br>
>> <li></li> (including <ul></ul> at beginning and end) or
>> <p></p>. If there's nothing out there I'll try to do it myself
>> but then I'll have to bother you people with questions. :)
>> Jeff Oien
>>
>

attached mail follows:


Hi all,

I have a script for downloading a file once it's been purchased. Works
fine with any browser except Safari, which only downloads the first
tiny portion of the file and then, of course, the user can't uncompress
the incomplete archive. Here is my code:

header('Content-type: '.$file_row['content_type']);
header('Content-Disposition: attachment;
filename="'.$file_row["filename"].'"');
readfile('../../store/files/'.$file_row['filename']);

Assume that filename = 'myarchive.hqx' and content_type is
'application/hqx'

Can anyone suggest a way to make this work for Safari users too?

Thanks,
-Brian

attached mail follows:


>I have a script for downloading a file once it's been purchased. Works
>fine with any browser except Safari, which only downloads the first tiny
>portion of the file and then, of course, the user can't uncompress the
>incomplete archive. Here is my code:
>
>header('Content-type: '.$file_row['content_type']);
>header('Content-Disposition: attachment;
>filename="'.$file_row["filename"].'"');
>readfile('../../store/files/'.$file_row['filename']);
>
>Assume that filename = 'myarchive.hqx' and content_type is
>'application/hqx'

Not sure if this will solve your problem, but try tossing in a
Content-Length header so the browser knows how long of a file to look for.
I do all my development and testing with Safari, so I know for a fact that
it can handle dynamically generated downloads of all the proper header
fields are provided.

---------------------------------------------------------------------
michal migurski- contact info and pgp key:
sf/ca http://mike.teczno.com/contact.html

attached mail follows:


I am using php for the first time and I am stuggling with something that is
simple to most people. I am using mysql and php to select text from a
database and display it in a html form but its not working, any ideas? Its
supposed to be a one line quiz site where the user is presented with a
question and 4 possible answers.
The output that I am getting is just a blank interface the questions and
answers are not coming from the database although I'm not getting any error
message.

<?php
session_start();
 ?>
<html>

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

<body bgcolor="#FFFFFF" text="#000000">
<?php
  $host="localhost";
  $user="root";

  $password="";
  $database="Quizmaster";
 $id=rand(0,5);
 $connection = mysql_connect($host,$user,$password) or die ("couldn't
connect to server");

   $db = mysql_select_db($database,$connection) or die ("Couldn't select
database");
 $query = "select * from questions where ID = '$id'";
 $result = mysql_query($query);
 $row = mysql_fetch_array($result,MYSQL_ASSOC);

 while ($row = mysql_fetch_array ($result))
 {
 extract($row);
 $_SESSION['id']=$id;

 $questext=$_POST["question"];
 $ans1=$_POST["answer1"];
 $ans2=$_POST["answer2"];
 $ans3=$_POST["answer3"];

 $ans4=$_POST["answer4"];
 $_SESSION['correctans']=$correctans; }
?>
<table width="68%" height="240">

  <tr>
    <td width="14%" height="28"><font face="Arial, Helvetica,
sans-serif"></font></td>
    <td colspan="2" height="28" bgcolor="#00CCFF">
      <div align="center">

     <? echo "$questext"; ?>
      </div>
      <div align="center"></div>
    <td width="0%">&nbsp;</td>

 <div align="center">
        <p><b><font face="Arial, Helvetica, sans-serif">
          <textarea name="question" cols="70"></textarea>
          </font></b></p>

        <p><b><font face="Arial, Helvetica, sans-serif"></font></b></p>
      </div>
    <td width="11%"></td>
  </tr>

<tr>
    <td width="14%" height="92"><font face="Arial, Helvetica,
sans-serif"></font></td>
    <td width="38%" height="92" bgcolor="#999999">
      <div align="center">

        <p><b><font face="Arial, Helvetica, sans-serif">
          <input type="radio" name="radiobutton" value="radiobutton">
          <? echo "$ans1"; ?> </font></b></p>
        <p><b><font face="Arial, Helvetica, sans-serif"> </font></b></p>

        </div>
    </td>
    <td width="37%" bgcolor="#999999" height="92">
      <div align="center">

<p><b><font face="Arial, Helvetica, sans-serif">
          <input type="radio" name="radiobutton" value="radiobutton">
          <? echo "$ans2";?> </font></b></p>
        <p><b><font face="Arial, Helvetica, sans-serif"> </font></b></p>

      </div>
    </td>
  </tr>
  <tr>

   <td width="14%" height="28"><font face="Arial, Helvetica,
sans-serif"></font></td>
    <td width="38%" bgcolor="#999999">
      <div align="center"><b><font face="Arial, Helvetica, sans-serif">
     <input type="radio" name="radiobutton" value="radiobutton">

        <? echo "$ans3"; ?>
        </font></b></div>
      <div align="center"></div>
    </td>

    <td width="37%" bgcolor="#999999">
      <div align="center">
        <p><b><font face="Arial, Helvetica, sans-serif">
<input type="radio" name="radiobutton" value="radiobutton">

          <? echo "$ans4"; ?>
          </font></b></p>
        <p><b><font face="Arial, Helvetica, sans-serif"> </font></b></p>
      </div>

    </td>
  </tr>
</table>
</body>

</html>

attached mail follows:


On Sat, 2004-03-13 at 13:20, Bernie McKeown wrote:
> I am using php for the first time and I am stuggling with something that is
> simple to most people. I am using mysql and php to select text from a
> database and display it in a html form but its not working, any ideas? Its
> supposed to be a one line quiz site where the user is presented with a
> question and 4 possible answers.

First thing is, where is your form? Unless I'm going blind I do not see
any form elements in this snippet.. Or is it just outside of what you
posted?

--
Brian V Bonini <b-boninicox.net>

attached mail follows:


Hi,

I got problem when i want to save object in session.

 

I got my first page when I create my object and save it to session:

 

<?php

Require 'test.inc.php';

Session_start();

 

            $test = new test();

            $test->Load($_Get['id']);

            $_SESSION['save'] = $test;

?>

 

In my second page I want to retrieve my object

<?php

 

Require 'test.inc.php';

Session_start();

echo get_class($_SESSION['test']);

?>

 

When I do get_class($_SESSION['test']); I got the message
"__PHP_Incomplete_Class" instead of "test"

 

Can you explain me where I can have made an error.

 

Thx,

 

Marc.

 

 

 

attached mail follows:


Anybody here who could recommend a web based php dev tool for editing php
sources online? Thanks! I'm having a hard time finding a nice one. Thanks in
advance guys!

attached mail follows:


I was wondering how to go about making a server in PHP that would accept
multiple connections..in windows, so I can't use forks. I'd need to call
the program from itself but I don't know how the listening works.

attached mail follows:


Hi Comex,

forget Win-PHP, it only scarcely to 60% of the
functions are supported. Everything which with
Sockets, Pipes or the like to do has, became
omitted.

m. b. G. Norbert
_____________________
normal: 02686-987103
Notruf: 0177-2363368
---------------------
e.o.m.

attached mail follows:


On Sun, 14 Mar 2004 01:15:32 +0100, Norbert Pfeiffer <norbertitbw.de>
wrote:

> Hi Comex,
>
> forget Win-PHP, it only scarcely to 60% of the
> functions are supported. Everything which with
> Sockets, Pipes or the like to do has, became
> omitted.
>
>
> m. b. G. Norbert
> _____________________
> normal: 02686-987103
> Notruf: 0177-2363368
> ---------------------
> e.o.m.

Sockets work fine..I just don't get how to accept multiple connections.

attached mail follows:


I was thinking about this a while ago accutually.. It does seem like you can
use ticks to get a multithreaded server, with multiple connections, but I
can't say for sure.. :p

--
// DvDmanDT
MSN: dvdmandt?hotmail.com
Mail: dvdmandt?telia.com
"Comex" <ngxemoc.cjb.net> skrev i meddelandet
news:opr4trxclr7u8yk2localhost...
I was wondering how to go about making a server in PHP that would accept
multiple connections..in windows, so I can't use forks. I'd need to call
the program from itself but I don't know how the listening works.

attached mail follows:


Hi,
I am sorry this is a PHP group. The DBI modules documentation will
tell you where you should post your question.

Sakitram wrote:

>Hello
>
>I can read values found in cell in Excel worksheet. But I can not read numeric value from it, always null string.
>
>I had done this work using DBI.
>
>How can I resolve this?
>
>R. Kumaran
>
>
>
>

--
Raditha Dissanayake.
---------------------------------------------------------------
http://www.radinks.com/upload/
Drag and Drop Upload thousands of files and folders in a single
transfer. (HTTP or FTP)

attached mail follows:


Take a look at the socket functions, with special attention to
socket_listen() and socket_accept(). AFAIK, this may be a bit beyond the
scope of PHP on windows. Even if you successfully call the program
from itself, you will not be able to pass the connection to the cloned
program. Your server may only be able to serve a single client. New
clients would then be back logged. This may not be a problem for very
short service times and low traffic.

-- bob

On Sat, 13 Mar 2004, Comex wrote:

> I was wondering how to go about making a server in PHP that would accept
> multiple connections..in windows, so I can't use forks. I'd need to call
> the program from itself but I don't know how the listening works.
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>

attached mail follows:


I'm having difficulty figuring out where/how to integrate PHP session
management into a web site whose pages are based on a template. Pointers to
docs and/or examples would be very helpful.

Cheers,

Michael

attached mail follows:


I like this tutorial about session:
http://www.phpfreaks.com/tutorials/41/0.php

>From: "Michael T. Peterson" <mtp1032comcast.net>
>To: php-generallists.php.net
>Subject: [PHP] [Q] Session management when WEB site is based on template
>Date: Sat, 13 Mar 2004 18:15:24 -0800
>
>I'm having difficulty figuring out where/how to integrate PHP session
>management into a web site whose pages are based on a template. Pointers
>to
>docs and/or examples would be very helpful.
>
>Cheers,
>
>Michael
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php
>

_________________________________________________________________
Get business advice and resources to improve your work life, from bCentral.
http://special.msn.com/bcentral/loudclear.armx

attached mail follows:


Anybody knows a good on line tutorial for objects & classes on PHP.

Thanks.

Vamp

attached mail follows:


To all,
I have an Array ( [0] => 2 [1] => . [2] => 2 [3] => 0 [4] => 8 )
but i want to convert it into integer 2.208 in order to use it to plot
graph....how can i convert it?
thx,
Kenneth

attached mail follows:


Kenneth wrote:

>To all,
>I have an Array ( [0] => 2 [1] => . [2] => 2 [3] => 0 [4] => 8 )
>but i want to convert it into integer 2.208 in order to use it to plot
>graph....how can i convert it?
>thx,
>Kenneth
>
>
>
Please refer to for loops and string concatenation '.' and type casting
(). I can show you the code it's only three lines but that would
inhibit your learning process.

--
Raditha Dissanayake.
---------------------------------------------------------------
http://www.radinks.com/upload/
Drag and Drop Upload thousands of files and folders in a single
transfer. (HTTP or FTP)

attached mail follows:


Hi,
 
I am installing php alone on linux system where apache is already
installed.
 
I couldn't find make command during installation.
 
Could anybody solve my problem.
 
thanks
Balaji

Confidentiality Notice

The information contained in this electronic message and any attachments to this message are intended
for the exclusive use of the addressee(s) and may contain confidential or privileged information. If
you are not the intended recipient, please notify the sender at Wipro or Mailadminwipro.com immediately
and destroy all copies of this message and any attachments.