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:不送花的理由.
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:
[EMAIL PROTECTED]
To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]
To post to the list, e-mail:
[EMAIL PROTECTED]
----------------------------------------------------------------------
--- Begin Message ---
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酺z 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
--- End Message ---
--- Begin Message ---
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
>
--- End Message ---
--- Begin Message ---
Hi Mike,
Try using phpMyAdmin, but sorry I forgot the site :( try google.
Regards,
Firman
----- Original Message -----
From: "Mike Mapsnac" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
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
>
>
--- End Message ---
--- Begin Message ---
On Sat, 13 Mar 2004 [EMAIL PROTECTED] 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
--- End Message ---
--- Begin Message ---
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
--- End Message ---
--- Begin Message ---
> >
> >不送花的理由
> >
> >朋友讀美術系的女友問:
> >「我的生日耶!你怎麼都不送花給我?」
> >「什麼?」讀園藝系的某某竟然說:
> >「你不知道花是植物的生殖器嗎?!我們為什麼要將人家的生殖器割下來,然
> >[EMAIL PROTECTED]
> >
> >這男人真是狠角色......
> >竟然講到那女孩子慚愧地低下頭來.........』
> >
> >所以....................
> >1.有些女生會比較誰收到的生殖器比較多、比較大....
> >2.有經驗的女生,會認為未割過包皮的生殖器(含苞的)可以較持久....
> >3.女生們會[EMAIL PROTECTED]
的
> >笑容
> >
--- End Message ---
--- Begin Message ---
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
--- End Message ---
--- Begin Message ---
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
--- End Message ---
--- Begin Message ---
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
--- End Message ---
--- Begin Message ---
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
--- End Message ---
--- Begin Message ---
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
--- End Message ---
--- Begin Message ---
>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
--- End Message ---
--- Begin Message ---
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%"> </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>
--- End Message ---
--- Begin Message ---
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 <[EMAIL PROTECTED]>
--- End Message ---
--- Begin Message ---
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.
--- End Message ---
--- Begin Message ---
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!
--- End Message ---
--- Begin Message ---
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.
--- End Message ---
--- Begin Message ---
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.
--- End Message ---
--- Begin Message ---
On Sun, 14 Mar 2004 01:15:32 +0100, Norbert Pfeiffer <[EMAIL PROTECTED]>
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.
--- End Message ---
--- Begin Message ---
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" <[EMAIL PROTECTED]> skrev i meddelandet
news:[EMAIL PROTECTED]
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.
--- End Message ---
--- Begin Message ---
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)
--- End Message ---
--- Begin Message ---
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
>
>
>
--- End Message ---
--- Begin Message ---
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
--- End Message ---
--- Begin Message ---
I like this tutorial about session:
http://www.phpfreaks.com/tutorials/41/0.php
From: "Michael T. Peterson" <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
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
--- End Message ---
--- Begin Message ---
Anybody knows a good on line tutorial for objects & classes on PHP.
Thanks.
Vamp
--- End Message ---
--- Begin Message ---
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
--- End Message ---
--- Begin Message ---
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)
--- End Message ---
--- Begin Message ---
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 [EMAIL
PROTECTED] immediately
and destroy all copies of this message and any attachments.
--- End Message ---