php-general Digest 2 Mar 2003 16:43:34 -0000 Issue 1914
Topics (messages 137753 through 137785):
Re: PHP scripts and the GPL/other licenses
137753 by: Jason Sheets
137754 by: Jeff Lewis
137756 by: Leif K-Brooks
Re: php.ini
137755 by: Anthony Ritter
Date question
137757 by: Sebastian
137759 by: John W. Holmes
137762 by: Sebastian
137764 by: Tom Rogers
Re: 2 questions !
137758 by: Vincent M.
What ?
137760 by: Vincent M.
authentication question...
137761 by: Sunfire
137771 by: Ernest E Vogelsinger
Re: [PHP-I18N] addslashes(): Is it multi-byte safe?
137763 by: Jean-Christian Imbeault
File problem - PHP Quest
137765 by: Monil Chheda
PHP SQL Code
137766 by: Philip J. Newman
137770 by: Tim Ward
137783 by: John W. Holmes
Just to ask knowledgable ppl
137767 by: Jason Paschal
137782 by: John W. Holmes
Re: mysql replication + mysql_pconnect
137768 by: Dan Rossi
137769 by: Dan Rossi
browser uploading
137772 by: joe
137773 by: Ernest E Vogelsinger
Re: IMAP error while compiling PHP-4.3.0
137774 by: Patrick Teague
Where to publish extension?
137775 by: Niels Andersen
137776 by: Adrian Portsmouth
Arrays and MySQL
137777 by: Beauford.2002
137778 by: Marek Kilimajer
137785 by: Beauford.2002
html parsing question
137779 by: Jos Elkink
Php and JavaScript
137780 by: Valentin
137781 by: Vincent M.
Php and JScript
137784 by: Valentin
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 ---
I generally use the BSD license for my code and PHP scripts, in some
cases I have used the GPL but IMHO the GPL is too restricting so I live
what I preach and release my code under the BSD License.
As far as people stealing code and renaming it I've seen several
commercial programs that are simply an open source or free software app
with spyware renamed, not a whole lot you can do without taking legal
action.
Jason
On Sat, 2003-03-01 at 21:26, Jeff Lewis wrote:
> I am wondering if anyone out there has some really good references in
> regards to scripts distributed as open source using the GPL. In the last
> three years that I have worked on open source projects I have seen several
> people "steal" a program, change the name and then try to distribute it as
> something else.
>
> So I am wondering what people here prefer to use for a license, is there
> anyway to combat these kinds of people, etc.
>
> Why do I ask now? Because it has happened again, only this time, the person
> is actively marketing this "new" script.
>
> Jeff
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
And they aren't, that is our main issue...
So with the GPL, someone can change say...10 lines and rename the scripts
and distribute it as their own?
Jeff
----- Original Message -----
From: "Leif K-Brooks" <[EMAIL PROTECTED]>
To: "Jeff Lewis" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Saturday, March 01, 2003 11:33 PM
Subject: Re: [PHP] PHP scripts and the GPL/other licenses
> They're doing nothing wrong as long as they distribute the source under
> the GPL.
>
> Jeff Lewis wrote:
>
> >I am wondering if anyone out there has some really good references in
> >regards to scripts distributed as open source using the GPL. In the last
> >three years that I have worked on open source projects I have seen
several
> >people "steal" a program, change the name and then try to distribute it
as
> >something else.
> >
> >So I am wondering what people here prefer to use for a license, is there
> >anyway to combat these kinds of people, etc.
> >
> >Why do I ask now? Because it has happened again, only this time, the
person
> >is actively marketing this "new" script.
> >
> >Jeff
> >
> >
> >
> >
> >
>
> --
> The above message is encrypted with double rot13 encoding. Any
unauthorized attempt to decrypt it will be prosecuted to the full extent of
the law.
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>
>
--- End Message ---
--- Begin Message ---
Yes. Just look at Linux, and its many distributions. Most have changed
more than 10 lines, but I don't believe the GPL says how much must be
changed.
Jeff Lewis wrote:
So with the GPL, someone can change say...10 lines and rename the scripts
and distribute it as their own?
--
The above message is encrypted with double rot13 encoding. Any unauthorized attempt
to decrypt it will be prosecuted to the full extent of the law.
--- End Message ---
--- Begin Message ---
Rich,
I've got five screenshots at this URL:
www.gonefishingguideservice.com/php1.htm
If you get a chance please take a look.
I got php_gd2.dll from the zipfile (see photo) and the "extensions"
sub-directory was not there when I installed.
Many thanks,
TR
.............................................................
Rich Gray:
> You said in your earlier post that in your php.ini your extension_dir is
set
> to "C:\PHP\" - this is wrong it should be c:/php/extensions
> If the extensions directory was not there and you had to create it
manually
> then where did you get the php_gd2.dll from?
> The extensions sub-directory should be there for a normal installation -
did
> you install from zip?
>
> Rich
---
[This E-mail scanned for viruses by gonefishingguideservice.com]
--- End Message ---
--- Begin Message ---
Greetings all.
I have used strtotime() function in the past, and done this:
if($time >= strtotime('24 hours ago')) {
$new = "new!";
}
with it being in UNIX time stamp .. But now I have a different client where
the time stamp in mysql is formatted like:
2002-08-29 10:53:09
what function would I use in this case, date() ? If so, how would I do the
same exact thing?
thanks.
warm regards,
Sebastian - [BBR] Gaming Clan
http://www.broadbandreports.com
--- End Message ---
--- Begin Message ---
> I have used strtotime() function in the past, and done this:
>
> if($time >= strtotime('24 hours ago')) {
> $new = "new!";
> }
>
> with it being in UNIX time stamp .. But now I have a different client
> where
> the time stamp in mysql is formatted like:
> 2002-08-29 10:53:09
>
> what function would I use in this case, date() ? If so, how would I do
the
> same exact thing?
SELECT column - INTERVAL 24 HOUR FROM your_table WHERE ...
---John W. Holmes...
PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/
--- End Message ---
--- Begin Message ---
sorry, I do not see how that will work. I need a function that will know if
"2002-08-29 10:53:09" was 24 hours ago, and if true, "new" will appear.
warm regards,
Sebastian - [BBR] Gaming Clan
http://www.broadbandreports.com
----- Original Message -----
From: "John W. Holmes" <[EMAIL PROTECTED]>
To: "'Sebastian'" <[EMAIL PROTECTED]>; "'php list'"
<[EMAIL PROTECTED]>
Sent: Sunday, March 02, 2003 12:40 AM
Subject: RE: [PHP] Date question
|
| SELECT column - INTERVAL 24 HOUR FROM your_table WHERE ...
|
| ---John W. Holmes...
----- Original Message -----
From: "John W. Holmes" <[EMAIL PROTECTED]>
To: "'Sebastian'" <[EMAIL PROTECTED]>; "'php list'"
<[EMAIL PROTECTED]>
Sent: Sunday, March 02, 2003 12:40 AM
Subject: RE: [PHP] Date question
| > I have used strtotime() function in the past, and done this:
| >
| > if($time >= strtotime('24 hours ago')) {
| > $new = "new!";
| > }
| >
| > with it being in UNIX time stamp .. But now I have a different client
| > where
| > the time stamp in mysql is formatted like:
| > 2002-08-29 10:53:09
| >
| > what function would I use in this case, date() ? If so, how would I do
| the
| > same exact thing?
--- End Message ---
--- Begin Message ---
Hi,
Sunday, March 2, 2003, 3:39:37 PM, you wrote:
S> Greetings all.
S> I have used strtotime() function in the past, and done this:
if($time >>= strtotime('24 hours ago')) {
S> $new = "new!";
S> }
S> with it being in UNIX time stamp .. But now I have a different client where
S> the time stamp in mysql is formatted like:
S> 2002-08-29 10:53:09
S> what function would I use in this case, date() ? If so, how would I do the
S> same exact thing?
S> thanks.
S> warm regards,
S> Sebastian - [BBR] Gaming Clan
S> http://www.broadbandreports.com
you can do if(strtotime($mysq_timestamp) >= strtotime('24 hours ago')) {
strtotime can take a mysql timestamp directly I think
--
regards,
Tom
--- End Message ---
--- Begin Message ---
Greg Beaver wrote:
"Vincent M." <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
Hello,
I didn't find in the doc how to:
- Know the full path of the current directory. Like /var/www/to/the/path
try using dirname(__FILE__) or dirname($_SERVER['PATH_TRANSLATED'])
dirname($_SERVER['PATH_TRANSLATED'])is good for me.
How can I know all these variables, for example, now I need to know the
upload_max_filesize ! And later, for sure, I will have to know another
config option of the server...wich can be access by such variable.
How to know all these variable ?
Thanks.
--- End Message ---
--- Begin Message ---
Hello,
I am the bus stop boy. The business I was talking about is an php
gallery editor. You can see mine in action here:
My photos of Montreal:
http://www.siova.net/photos/index.php?type=mtl&img=mtl_0000&diapo=0&pref_size=512&version=2
My photos of Toulouse, the city I was born in:
http://www.siova.net/photos/index.php?type=tse&img=tse_0000&diapo=0&pref_size=512&version=2
Translation for better browsing:
"Voir l'image suivante" -> "See the next image"
"Voir l'image précédante" -> "See the forward image"
"Chargement de l'image en cours...Veuillez patienter" -> "Loading image
in progress...Please wait"
Have you ever seen such a good gallere browser ?
And look at my future concurent:
http://www.photopost.com/
See photopost in action:
http://www.fordf150.net/photopost
Another future concurent:
http://www.imagefolio.com
That's it at this time.
SeeYa,
Vincent.
--- End Message ---
--- Begin Message ---
hi
basic question about www-authenticate header...(least i hop its simple)
i have the code:
<?php
header("WWW-Authenticate: basic realm='a realm'");
header("HTTP/1.0 402 Unauthorized");//dont understand
//what this line does
echo "you didnt login yet\n"; //understand it but want
//something else like a header sent out...
dont understand what the second line is for and was wondering if that third
line that someone gets when you hit cancel can be turned into another
header? or is there a way to force a header block even if output has already
been put on the screen?
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.458 / Virus Database: 257 - Release Date: 2/24/2003
--- End Message ---
--- Begin Message ---
At 07:02 02.03.2003, Sunfire said:
--------------------[snip]--------------------
>basic question about www-authenticate header...(least i hop its simple)
>i have the code:
><?php
>header("WWW-Authenticate: basic realm='a realm'");
>header("HTTP/1.0 402 Unauthorized");//dont understand
>//what this line does
>echo "you didnt login yet\n"; //understand it but want
>//something else like a header sent out...
>dont understand what the second line is for and was wondering if that third
>line that someone gets when you hit cancel can be turned into another
>header? or is there a way to force a header block even if output has already
>been put on the screen?
--------------------[snip]--------------------
To understand the header lines you need to have some basic knowledge of the
HTTP protocol. Start eating tht HTTP RFC:
http://www.w3.org/Protocols/rfc2616/rfc2616
This will also enlighten yo about the fact that a header cannot be senz
after content has been pushed out.
This said you can use output buffering
(http://www.php.net/manual/en/function.ob-start.php) to avoid output being
sent before the headers:
Example:
ob_start();
echo "some stuff";
// we decide to redirect the client
ob_end_clean(); // clear the output buffer
header('Location: http://somewhere.com');
HTH,
--
>O Ernest E. Vogelsinger
(\) ICQ #13394035
^ http://www.vogelsinger.at/
--- End Message ---
--- Begin Message ---
From an email. Reposting to to list for thos who might have the same
question later on :)
Moriyoshi Koizumi wrote:
>
> Oops, I should have said mbstring.encoding_translation=on actually :)
Ok. Turning that on.
>>In which case I am safe :) But then again anyone who would want to try
>>an SQL injection attack might try and send some SJIS ... better safe
>>than sorry :)
>
>
> It took some minutes to sort out what you're saying here.. By the word
> "clients" I meant browsers and there I was trying to mention a case that
> some browsers that have certain settings try to send GET queries in
UTF-8
> while such queries are basically supposed to be encoded in the same
> encoding as that the page is written in.
Sorry if my intentions were not clear but I am trying to protect myself
from SQL injection attacks by using addslashes() to user provided
information. I cannot assume anything about the incoming data (not even
the encoding) since anyone trying to hack my machine by using such a
technique could pretty much send whatever they wanted using a telnet
session or what not ...
> Anyway, Shift_JIS is not a great choice for PHP scripting.
Tell me about it. I have the hardest time getting the people who
actually make the HTML page to use EUC instead of SJIS. Of course they
all use MS platforms to create the HTML content so they can't understand
why SJIS causes me pain when I try and edit it in *NIX box or parse it
in PHP ...
Thanks for the info!
Jc
--- End Message ---
--- Begin Message ---
Hi,
I have a problem in grabbing data from a file.
I need to fetch data from raw log files and display it
in a proper tabular manner.
The log file contains:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
AWSTATS DATA FILE 5.0 (build 1.345)
# If you remove this file, all statistics for date
2002-12 will be lost/reset.
# Position (offset in bytes) in this file of beginning
of each section
# for direct I/O access. If you made changes somewhere
in this file, you
# should also remove completely the MAP section
(AWStats will rewrite it
# at next update).
BEGIN_MAP 23
POS_GENERAL 1602
POS_PAGEREFS 4060
POS_SEARCHWORDS 5537
POS_KEYWORDS 5769
POS_ERRORS 5916
POS_SIDER_404 6040
POS_EMAILSENDER
POS_EMAILRECEIVER
END_MAP
BEGIN_GENERAL 8
LastLine 20030101041055
FirstTime 20021201004812
LastTime 20021231204118
LastUpdate 20030101044540 392 0 391 0 1
TotalVisits 279
TotalUnique 221
MonthHostsKnown 0
MonthHostsUnknown 258
END_GENERAL
~~~~~~~~~~~~~~~~~~~~~~~~~~
I need the contents between BEGIN_MAP and END_MAP to
be displayed on the browser.
But I need each word seperate in a tabular form. For
Example on the browser it should display:
LOG DETAILS No.Of.Results.
POS_SEARCHWORDS 5537
POS_KEYWORDS 5769
------------------------------------------
I am using the following script: But it doesnot work.
Kindly help me.
<?php
if(!($myfile = fopen("test.txt","r")))
{
echo "File $myfile could not be opened";
exit;
}
else
{
echo "$myfile Opened";
exit;
}
while (!foef($myfile))
{
if(eregi("BEGIN_KEYWORDS"))
{
while(eregi("END_KEYWORDS"))
{
$myline = fgets($myfile,255);
echo $myline;
}
}
}
?>
Thank you.
Best Regards,
Monil Chheda
============================
+91-22-5699 1887
+91-22-2820 4125
+09821405705
http://www.eliteral.com
http://order.eliteral.com
http://domains.eliteral.com
http://services.eliteral.com
============================
=====
Best Regards,
Monil Chheda(INDIA)
http://domains.eliteral.com
===========================
===========================
__________________________________________________
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, more
http://taxes.yahoo.com/
--- End Message ---
--- Begin Message ---
I would like yo show the users in a list that have a date that is more than
60 days old.
$sql = "SELECT * FROM stompers WHERE sUpdated <
from_unixtime(unix_timestamp(now())-(15760*60)) AND sActive = 'Y' ORDER BY
sUpdated DESC";
This don't quite work ..
Any suggestions?
------
Philip J. Newman.
Head Developer
[EMAIL PROTECTED]
+64 (9) 576 9491
+64 021-048-3999
------
Friends are like stars
You can't allways see them,
but they are always there.
------
Websites:
PhilipNZ.com - Design.
http://www.philipnz.com/
[EMAIL PROTECTED]
Philip's Domain // Internet Project.
http://www.philipsdomain.com/
[EMAIL PROTECTED]
Vital Kiwi / NEWMAN.NET.NZ.
http://www.newman.net.nz/
[EMAIL PROTECTED]
--- End Message ---
--- Begin Message ---
I'd use ...
WHERE UNIX_TIMESTAMP(NOW()) - UNIX_TIMESTAMP(sUpdated) > 60*60*24*60
but I'm sure someone will come up with something more efficient.
Tim Ward
http://www.chessish.com
mailto:[EMAIL PROTECTED]
----- Original Message -----
From: Philip J. Newman <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, March 02, 2003 7:46 AM
Subject: [PHP] PHP SQL Code
> I would like yo show the users in a list that have a date that is more
than
> 60 days old.
>
>
> $sql = "SELECT * FROM stompers WHERE sUpdated <
> from_unixtime(unix_timestamp(now())-(15760*60)) AND sActive = 'Y' ORDER BY
> sUpdated DESC";
>
> This don't quite work ..
>
> Any suggestions?
>
>
> ------
> Philip J. Newman.
> Head Developer
> [EMAIL PROTECTED]
>
> +64 (9) 576 9491
> +64 021-048-3999
>
> ------
> Friends are like stars
> You can't allways see them,
> but they are always there.
>
> ------
> Websites:
>
> PhilipNZ.com - Design.
> http://www.philipnz.com/
> [EMAIL PROTECTED]
>
> Philip's Domain // Internet Project.
> http://www.philipsdomain.com/
> [EMAIL PROTECTED]
>
> Vital Kiwi / NEWMAN.NET.NZ.
> http://www.newman.net.nz/
> [EMAIL PROTECTED]
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--- End Message ---
--- Begin Message ---
> I would like yo show the users in a list that have a date that is more
> than
> 60 days old.
$sql = "SELECT * FROM stompers WHERE sUpdated < CUR_DATE() - INTERVAL 60
DAY AND sActive = 'Y' ORDER BY sUpdated DESC";
---John W. Holmes...
PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/
--- End Message ---
--- Begin Message ---
Not directly PHP related, but I'm building a site in PHP at the moment, so
I've been doing a bit of research...
I've been on the net for years, coding and surfing and coding. And not
always in that order. ;) But only recently have I heard about web beacons,
or single-pixel gifs. Seems every site with these beacons mentions them in
their privacy policy. Shows you how much I pay to attention to them. I was
just curious as to how they work. Is it just a matter of viewing server
reports to see how often that image has been accessed?
_________________________________________________________________
Add photos to your e-mail with MSN 8. Get 2 months FREE*.
http://join.msn.com/?page=features/featuredemail
--- End Message ---
--- Begin Message ---
> Not directly PHP related, but I'm building a site in PHP at the
moment, so
> I've been doing a bit of research...
> I've been on the net for years, coding and surfing and coding. And
not
> always in that order. ;) But only recently have I heard about web
> beacons,
> or single-pixel gifs. Seems every site with these beacons mentions
them
> in
> their privacy policy. Shows you how much I pay to attention to them.
I
> was
> just curious as to how they work. Is it just a matter of viewing
server
> reports to see how often that image has been accessed?
I'm sure you could do a number of things with them. It could even be a
PHP script that does some logging of it's own with sessions or cookies
or whatever and then outputs the data for a single pixel gif. So you
could have a plain HTML page that'll still access a .php page when it's
loaded to track what users are doing.
---John W. Holmes...
PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/
--- End Message ---
--- Begin Message ---
i'll explain
i need a fallbak method where if the master server is down it will goto the
slave i assumed the connection could do this automatically but it doesnt
therefore requires it setup in the php connection script ,
part of my db class $this->connection = @mysql_pconnect($host,$user,$pass);
say host is localhost:3308 it will still connect to the master on 3306 , or
even localhost:3307 which is the slave it will still get the master server ,
i turn off the master server and i get this localhost:3307Can't connect to
local MySQL server through socket
'/usr/local/etc/mysqlmaster/tmp/mysql.sock' (2) where 3307 is the slave ,
one thing though , i have this in my php configure
'--with-mysql=/usr/local/etc/mysqlmaster' ' is that a problem ?
-----Original Message-----
From: Rich Gray [mailto:[EMAIL PROTECTED]
Sent: Sunday, March 02, 2003 12:34 PM
To: electroteque; [EMAIL PROTECTED]
Subject: RE: [PHP] mysql replication + mysql_pconnect
> hi there i am setting up a test replication slave server as a mysql db
> master backup if it fails , i would like to know how to
> dynamically connect
> to the slave if the master fails , something really strange i have set the
> host like localhost:3307 for the slave but is still connecting to
> the master
> , and if i shut down the master it wont goto the slave :|
>
>
Not sure I understand ... are you saying that
mysql_connect('localhost:3307','user','password') connects to the master
server? Can you describe the problem in more detail?
Rich
--- End Message ---
--- Begin Message ---
i have worked out the issue , here is my dynamic connection to the slave ,
port does not work i suggest this is a bug ?
localhost:/usr/local/etc/mysqlslave/tmp/mysql.sock this connected to the
slave on 3307 fine
-----Original Message-----
From: Rich Gray [mailto:[EMAIL PROTECTED]
Sent: Sunday, March 02, 2003 12:34 PM
To: electroteque; [EMAIL PROTECTED]
Subject: RE: [PHP] mysql replication + mysql_pconnect
> hi there i am setting up a test replication slave server as a mysql db
> master backup if it fails , i would like to know how to
> dynamically connect
> to the slave if the master fails , something really strange i have set the
> host like localhost:3307 for the slave but is still connecting to
> the master
> , and if i shut down the master it wont goto the slave :|
>
>
Not sure I understand ... are you saying that
mysql_connect('localhost:3307','user','password') connects to the master
server? Can you describe the problem in more detail?
Rich
--- End Message ---
--- Begin Message ---
i am operating on safe mode and i need to figure out, how to upload files
with php through your browser. copy() is disabled for sure, im not
absolutsely sure about other functions. i have heard that it is actually
possible but so far i haven't been able to figure out how..
any ideas would be most helpful
thank you
--- End Message ---
--- Begin Message ---
At 12:35 02.03.2003, joe said:
--------------------[snip]--------------------
>i am operating on safe mode and i need to figure out, how to upload files
>with php through your browser. copy() is disabled for sure, im not
>absolutsely sure about other functions. i have heard that it is actually
>possible but so far i haven't been able to figure out how..
--------------------[snip]--------------------
check out move_uploaded_file():
http://www.php.net/manual/en/function.move-uploaded-file.php
safe_mode is covered in the docs, too.
--
>O Ernest E. Vogelsinger
(\) ICQ #13394035
^ http://www.vogelsinger.at/
--- End Message ---
--- Begin Message ---
I saw somewhere that if you don't have the kerberos stuff installed you'll
have problems compiling with imap, so as far as I can figure I have all the
rpms I need installed for imap support -
imap-2001a-9mdk
imap-devel-2001a-9mdk
krb5-devel-1.2.5-1mdk
krb5-libs-1.2.5-1mdk
Patrick
----- Original Message -----
From: "Jason Wong" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, March 01, 2003 1:42 AM
Subject: Re: [PHP] IMAP error while compiling PHP-4.3.0
> On Saturday 01 March 2003 06:30, Patrick Teague wrote:
> > I'm trying to compile php on Mandrake 9, but this latest error during
> > compile has me stumped as I've installed all the imap-devel type rpms.
> >
> > .....
> > checking for IMAP support... yes
> > checking for pam_start in -lpam... yes
> > checking for crypt in -lcrypt... (cached) yes
> > configure: error: Cannot find imap library (libc-client.a). Please check
> > your IMAP installation
> >
> > any ideas? I checked the php.net faq on building, but I haven't found
any
> > info about this. I've searched the imap rpms I have & even searched the
> > whole system, but it couldn't find 'libc-client.a' anywhere.
>
> Are you using RPMs? On a RH system that file is provided by the IMAP-devel
> package. I suppose it's similar for MDK. In general you need to install
the
> devel packages of any libraries that you wish to use.
>
> --
> Jason Wong -> Gremlins Associates -> www.gremlins.biz
> Open Source Software Systems Integrators
> * Web Design & Hosting * Internet & Intranet Applications Development *
> ------------------------------------------
> Search the list archives before you post
> http://marc.theaimsgroup.com/?l=php-general
> ------------------------------------------
> /*
> Hanson's Treatment of Time:
> There are never enough hours in a day, but always too many days
> before Saturday.
> */
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>
>
--- End Message ---
--- Begin Message ---
Hello!
I have made a really great (or at least that is what I think) extension,
which I think everybody should use :))
Where should I publish it?
Is there any chance that it will make its way into a future distro?
--- End Message ---
--- Begin Message ---
Hi There,
Not sure how you define an extension, but you could take a look at my
web site www.phpscriptsearch.com and see if it applies to listing it
there. But like I said, it depends what you mean by extension.
As far as getting it into the next distro, not sure, I have put in a lot
of effort trying to contact various people within the PHP group without
any success at all.
HTH
Adrian
www.phpscriptsearch.com
-----Original Message-----
From: Niels Andersen [mailto:[EMAIL PROTECTED]
Sent: 02 March 2003 13:31
To: [EMAIL PROTECTED]
Subject: [PHP] Where to publish extension?
Hello!
I have made a really great (or at least that is what I think) extension,
which I think everybody should use :))
Where should I publish it?
Is there any chance that it will make its way into a future distro?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
Hi,
I have an array which I am trying to total but having some problems. Any
help is appreciated.
Example: This is a hockey team and there are 20 players - I am selecting
the goals, assists, and points from each player and then want to have a
grand total of all goals, assists, and points.
$query = "select goals, assists, points from roster";
while ($line = mysql_fetch_row($result)) {
$totals[] = $line;
}
I want to total $totals[0][4] through $totals[19][4], $totals[0][5] through
$totals[19][5], etc. for each stat. I thought of putting them in a for loop
and just adding them, but this seemed kind of messy and the long way around
Thanks
--- End Message ---
--- Begin Message ---
Cannot you just make MaSQL count it?
$query = "select sum(goals), sum(assists), sum(points) from roster";
Beauford.2002 wrote:
Hi,
I have an array which I am trying to total but having some problems. Any
help is appreciated.
Example: This is a hockey team and there are 20 players - I am selecting
the goals, assists, and points from each player and then want to have a
grand total of all goals, assists, and points.
$query = "select goals, assists, points from roster";
while ($line = mysql_fetch_row($result)) {
$totals[] = $line;
}
I want to total $totals[0][4] through $totals[19][4], $totals[0][5] through
$totals[19][5], etc. for each stat. I thought of putting them in a for loop
and just adding them, but this seemed kind of messy and the long way around
Thanks
--- End Message ---
--- Begin Message ---
It gets a little more complicated than this. There are several teams (each
with 20 players) and then there is the team owner and then there is the
player position, etc. So to do this I would have to do some kind of a join
and so on - and to date haven't been able to figure this out with sums. I
would also have to do a second query (I am already doing one to get the
points for each player), so I might as well just use it and through the
results in an array and then total it from there - and thus my question of
how I total the array....
----- Original Message -----
From: "Marek Kilimajer" <[EMAIL PROTECTED]>
To: "Beauford.2002" <[EMAIL PROTECTED]>
Cc: "PHP General" <[EMAIL PROTECTED]>
Sent: Sunday, March 02, 2003 11:10 AM
Subject: Re: [PHP] Arrays and MySQL
> Cannot you just make MaSQL count it?
>
> $query = "select sum(goals), sum(assists), sum(points) from roster";
>
>
>
>
> Beauford.2002 wrote:
>
> >Hi,
> >
> >I have an array which I am trying to total but having some problems. Any
> >help is appreciated.
> >
> >Example: This is a hockey team and there are 20 players - I am selecting
> >the goals, assists, and points from each player and then want to have a
> >grand total of all goals, assists, and points.
> >
> >$query = "select goals, assists, points from roster";
> >
> >while ($line = mysql_fetch_row($result)) {
> >
> >$totals[] = $line;
> >
> >}
> >
> >I want to total $totals[0][4] through $totals[19][4], $totals[0][5]
through
> >$totals[19][5], etc. for each stat. I thought of putting them in a for
loop
> >and just adding them, but this seemed kind of messy and the long way
around
> >
> >Thanks
> >
> >
> >
> >
> >
> >
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--- End Message ---
--- Begin Message ---
Hello,
I've got a little question. I am writing a page where I would like to
parse my own invented HTML-looking tags (but want to keep the real HTML
tags intact). I use a buffer for the output, and just before the end use
ob_get_contents() to get the whole buffer which I want to check for
those tags.
(Something like:
$tag->content = ob_get_contents();
$output = $tag->interpret();
ob_end_clean();
echo "$output";
)
Now my question is, what is the fastest way to search and replace
through this file, whereby the interpretation of the tag can be somewhat
complicated?
I first just had a loop running character by character through this
text, looking for tags, but that is obviously way too slow.
Now I have something like:
preg_replace_callback ("/<(.+)>/", array($this, 'tag_callback'),
$this->content);
But then I don't know how to interpret different tags differently. Any
suggestions?
(A tag looks like: <CANTR REPLACE NAME=text> where then the whole tag
has to be replaced by something called 'text' that has to be looked up
in a table. So, <CANTR REPLACE NAME=text> has to be replaced with
something else than <CANTR REPLACE NAME=main> - well, you get the idea.)
Thanks in advance for any help!
Jos
--
Jos Elkink
Game Administration Council
Cantr II http://www.cantr.net
--- End Message ---
--- Begin Message ---
Hi,
Is any way to write JavaScript code into PHP function or to send PHP's
variables values to the JScript variables?
Thanks,
--- End Message ---
--- Begin Message ---
Valentin wrote:
Hi,
Is any way to write JavaScript code into PHP function or to send PHP's
variables values to the JScript variables?
Thanks,
Of course, you can create dynamicaly javascript via php, ie:
echo "
<script language=\"JavaScript\">
var yourvar = $onephpvar ;
</script>" ;
Is that what you were asking for ?
Vincent.
--- End Message ---
--- Begin Message ---
Hi,
Is any way to write JavaScript code into PHP function or to send PHP's
variables values to the JScript variables?
Thanks,
--- End Message ---