php-general Digest 15 Apr 2005 17:59:02 -0000 Issue 3399

Topics (messages 213127 through 213152):

Re: Any experience with multi-language PHP sites?
        213127 by: Kim Madsen

general
        213128 by: Balwant Singh

php and linux shell script
        213129 by: Balwant Singh
        213141 by: Rory Browne

Levels of Site Protection
        213130 by: R. Van Tassel
        213131 by: Petar Nedyalkov

Re: Reverse plural forms to singular for search
        213132 by: Mark Rees

diffence between two numbers...
        213133 by: Tristan.Pretty.risk.sungard.com
        213134 by: Petar Nedyalkov
        213148 by: Chris W. Parker
        213149 by: Petar Nedyalkov

Re: pixels per character
        213135 by: Marek Kilimajer

Re: Tomcat and php in Suse 9.2
        213136 by: Dan Rossi

How to unset a post variable
        213137 by: Mario de Frutos Dieguez
        213143 by: Nieko Maatjes
        213144 by: Mark Rees
        213146 by: Angelo Zanetti

cant get data
        213138 by: kyriacos sakkas

Re: cant get data - Solved
        213139 by: kyriacos sakkas
        213140 by: kyriacos sakkas

Barcodes
        213142 by: Mike Smith
        213147 by: Mike Smith

configure problem on solaris 2
        213145 by: Heim, Stefan

Amazon/eBay API
        213150 by: Brian Dunning

Magpie with a db cache?
        213151 by: Brian Dunning

PHP, SDL and OpenGL
        213152 by: Reynier Perez Mira

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:
        php-general@lists.php.net


----------------------------------------------------------------------
--- Begin Message ---
> -----Original Message-----
> From: Richard Davey [mailto:[EMAIL PROTECTED]
> Sent: Thursday, April 14, 2005 4:26 PM

> KM> Look in the archives, it´s less than 2 weeks since this was
> KM> discussed (again :-)
> 
> If you're referring to the subject "Multilingual Web application - how
> to?" (the only multi-language thread in this mailing list since the
> start of April - I checked before posting) then I'm afraid it didn't
> even come close to covering any of the issues raised, it was simply
> one post with one specific reply.

Nops, not that thread. Look for the subject "language files", the mail was sent 
around 7/4-2005

--
Med venlig hilsen / best regards
ComX Networks A/S
Kim Madsen
Systemudvikler/Systemdeveloper

--- End Message ---
--- Begin Message ---
hi and greetings from India to all of you...

my name is balwant, i m from Noida, India.  

hope there are many from India....... through this email, i request all
of you, who are from India to send me your contact details like email,
address and phone numbers so that we can be in touch whenever needed and
also to discuss the scope of PHP in India.

with best wishes
balwant singh
[EMAIL PROTECTED]
0091-120-2568472

--- End Message ---
--- Begin Message ---
hello, 

1) first of all i would like to inform you that i have made a PHP script which 
also have some amount of 
linux shell script in it for converting emails from EVOLUTION to MOZILA 
THUNDERBIRD just by executing
this script.  if anybody need it, do let me know, i will send the same.

2) i am also exploring possibilities of using linux dialog boxes (used in shell 
scripting) 
with PHP. has anybody tried it, may please advise me how to call dialog boxes 
through PHP in CLI.
also please share with me if u have information on how to use PHP with Shell 
Scripting.

thx


with best wishes
balwant singh
[EMAIL PROTECTED]
0091-120-2568472

--- End Message ---
--- Begin Message ---
I don't think you'll find anything in PHP as simple as the shell
script version of dialog, but you may be able to bang something
together like that using ncurses.

Probably handier if your time is more important than the machines, to
just use the shell version using one of the Program Executions
functions.

Personally I suggest passthru:
<?php

function yesno($str){
  $tmpvar = 0; // to avoid E_NOTICE
  passthru("dialog --yesno " . escapeshellarg($str) . " 200 10", $tmpvar);
  return $tmpvar;
}

?>


On 15 Apr 2005 12:22:05 +0530, Balwant Singh <[EMAIL PROTECTED]> wrote:
> hello,
> 
> 1) first of all i would like to inform you that i have made a PHP script 
> which also have some amount of
> linux shell script in it for converting emails from EVOLUTION to MOZILA 
> THUNDERBIRD just by executing
> this script.  if anybody need it, do let me know, i will send the same.
> 
> 2) i am also exploring possibilities of using linux dialog boxes (used in 
> shell scripting)
> with PHP. has anybody tried it, may please advise me how to call dialog boxes 
> through PHP in CLI.
> also please share with me if u have information on how to use PHP with Shell 
> Scripting.
> 
> thx
> 
> with best wishes
> balwant singh
> [EMAIL PROTECTED]
> 0091-120-2568472
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
>

--- End Message ---
--- Begin Message ---
I'm working on a website for a musical outfit where different levels of
access are required depending on the specific section.

Writers will have access to a section of the site where they can listen to
an entire album (for review).

Radio personnel will have access to a section of the site where they can
download radio-quality mp3 versions of singles.

Can anyone suggest how to approach this?

Is the easiest way to set up a table of username and passwords associated
with an id which would let me know what level of access they have and direct
them accordingly?

Thanks in advance...

-R. Van Tassel

--- End Message ---
--- Begin Message ---
On Friday 15 April 2005 10:37, R. Van Tassel wrote:
> I'm working on a website for a musical outfit where different levels of
> access are required depending on the specific section.
>
> Writers will have access to a section of the site where they can listen to
> an entire album (for review).
>
> Radio personnel will have access to a section of the site where they can
> download radio-quality mp3 versions of singles.
>
> Can anyone suggest how to approach this?

You can make a list of all actions that can be performed in your system, and 
then map subsets of these actions to roles. Then each actor (user of the 
system) gets a role and you can easily check if he can do a certain action.

>
> Is the easiest way to set up a table of username and passwords associated
> with an id which would let me know what level of access they have and
> direct them accordingly?
>
> Thanks in advance...
>
> -R. Van Tassel

-- 

Cyberly yours,
Petar Nedyalkov
Devoted Orbitel Fan :-)

PGP ID: 7AE45436
PGP Public Key: http://bu.orbitel.bg/pgp/bu.asc
PGP Fingerprint: 7923 8D52 B145 02E8 6F63 8BDA 2D3F 7C0B 7AE4 5436

Attachment: pgpFGIQEgRDxd.pgp
Description: PGP signature


--- End Message ---
--- Begin Message ---
Eugene, your reply-to address is set

-----Original Message-----
From: Mark Rees 
Sent: 15 April 2005 09:08
To: 'Eugene Voznesensky'
Subject: RE: [PHP] Reverse plural forms to singular for search


That sounds like a nightmare! Assuming you are talking about English,
you might be able to make some progress by removing trailing s or es for
words. This would trim words down to their stem. You could do this with
a regular expression, which will need to do something like look for es
or s with no preceding s  at the end of words (to avoid trimming words
like glass).

It will not catch forms like medium/media and thesis/theses. You could
think about trying to trim words like that down to their stem (med in
this case). In fact, would just trimming off the last two letters and
searching for that do for you? It depends on the range of words you are
searching for. 

Good luck

Mark

-----Original Message-----
From: Eugene Voznesensky [mailto:[EMAIL PROTECTED] 
Sent: 14 April 2005 17:22
To: php-general@lists.php.net
Subject: [PHP] Reverse plural forms to singular for search


I'm trying to reverse plural forms to singular ones
and use the result for search [in database].

Is there any third party product to integrate with
PHP, or some reliable algorithm?

Thank you,

Eu.

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

Gamma Global : Suppliers of IBM, Compaq, Cisco, Sun Microsystems, 3Com and HP 
Products.

GAMMA GLOBAL (UK) LTD IS A RECOGNISED 'INVESTOR IN PEOPLE' AND AN 'ISO 9001 
2000' REGISTERED COMPANY

**********************************************************************

CONFIDENTIALITY NOTICE:

This Email is confidential and may also be privileged. If you are not the
intended recipient, please notify the sender IMMEDIATELY; you should not
copy the email or use it for any purpose or disclose its contents to any
other person.

GENERAL STATEMENT:

Any statements made, or intentions expressed in this communication may not
necessarily reflect the view of Gamma Global (UK) Ltd. Be advised that no 
content
herein may be held binding upon Gamma Global (UK) Ltd or any associated company
unless confirmed by the issuance of a formal contractual document or
Purchase Order,  subject to our Terms and Conditions available from 
http://www.gammaglobal.com

E&OE

**********************************************************************
**********************************************************************


--- End Message ---
--- Begin Message ---
I need to know the difference between two numbers...
eg:

$a = 7;
$b = 27;
somefunction($a, $b)
// outputs "20"

$a = 10;
$b = 12;
somefunction($a, $b)
// outputs "2"

etc...
does that exist?

--- End Message ---
--- Begin Message ---
On Friday 15 April 2005 13:35, [EMAIL PROTECTED] wrote:
> I need to know the difference between two numbers...
> eg:
>
> $a = 7;
> $b = 27;
> somefunction($a, $b)
> // outputs "20"
>
> $a = 10;
> $b = 12;
> somefunction($a, $b)
> // outputs "2"

function difference ($a, $b) {

        return (max($a, $b) - min($a, $b));

}

> 
> etc...
> does that exist?

-- 

Cyberly yours,
Petar Nedyalkov
Devoted Orbitel Fan :-)

PGP ID: 7AE45436
PGP Public Key: http://bu.orbitel.bg/pgp/bu.asc
PGP Fingerprint: 7923 8D52 B145 02E8 6F63 8BDA 2D3F 7C0B 7AE4 5436

Attachment: pgpWa8SvVkRO3.pgp
Description: PGP signature


--- End Message ---
--- Begin Message ---
[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
    on Friday, April 15, 2005 3:35 AM said:

> $a = 7;
> $b = 27;
> somefunction($a, $b)
> // outputs "20"

> etc...
> does that exist?

function difference($a, $b)
{
        return abs($a-$b);
}



Chris.

--- End Message ---
--- Begin Message ---
On Friday 15 April 2005 19:01, Chris W. Parker wrote:
> [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
>
>     on Friday, April 15, 2005 3:35 AM said:
> > $a = 7;
> > $b = 27;
> > somefunction($a, $b)
> > // outputs "20"
> >
> > etc...
> > does that exist?
>
> function difference($a, $b)
> {
>       return abs($a-$b);
> }

Yep, I was wrong. Nice remark.

>
>
>
> Chris.

-- 

Cyberly yours,
Petar Nedyalkov
Devoted Orbitel Fan :-)

PGP ID: 7AE45436
PGP Public Key: http://bu.orbitel.bg/pgp/bu.asc
PGP Fingerprint: 7923 8D52 B145 02E8 6F63 8BDA 2D3F 7C0B 7AE4 5436

Attachment: pgp47SCc5o2Gr.pgp
Description: PGP signature


--- End Message ---
--- Begin Message --- Christian Calloway wrote:
Hey all,

trying to dynamically size cell widths; what I need is a formula to measure pixels per character for an arbitrary font (in this case 10pt verdana). A simple function f(x) = strlen(x) * SOMECONSTANT just doesn't seem to cut it, as returned widths are to small are long. Any ideas?

Try imagettfbbox().
--- End Message ---
--- Begin Message --- I noticed you never had a reply for this, its probably because this is non standard, or totally not heard of. What I would do, (even though I have yet to try this), is run php standard as a module in apache, but then run the tomcat connector jk or jk2 into apache, so it will run seamlessly. There is prob alot of settings to configure to do it though. Tomcat has a nice easy to understand xml descriptor, i actually prefer them than .conf files ;)

On 14/04/2005, at 7:30 PM, Andreas Persson wrote:

I have installed tomcat and added php-support with help of the php-servlet
but it seem like php cant find any of the extensions installed. Like
mysql. I have the php4-mysql package installed.

If i run php -i from the commandline its telling me that I have
mysql-support and a small php-script runned from the commandline verifies
this.

But if i run phpinfo() from a php-page under tomcat there is no support
for mysql (or anyother extension). It tells me that its using /etc/php.ini
and I have enabled the mysql extension in it.

Anyone who knows why tomcat failes to find the php-extensions?

/Andreas

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


--- End Message ---
--- Begin Message ---
Hi!

I have another little question hehe :D, i have a page with a form where the user insert data and can click in a new,edit or delete button. I've make that when a button is clicked the page refresh and in the head of the page i have conditions like this: if ($_POSt["buttonNew"]!="") { insert commands.. } , etc

My question is, how can i unset $_POST["buttonNew"] or leave it empty because when the user refresh the page make insert commans again because the $_POST["buttonNew"] arent empty.

Thx in advance for all *^_^*

--
Mario de Frutos Dieguez

División de Ingeniería del Software
y Comunicaciones

CARTIF -Parque Tecnológico Boecillo
--- End Message ---
--- Begin Message --- On Fri, 15 Apr 2005 14:08:36 +0200, Mario de Frutos Dieguez <[EMAIL PROTECTED]> wrote:
My question is, how can i unset $_POST["buttonNew"] or leave it empty because when the user refresh the page make insert commans again because the $_POST["buttonNew"] arent empty.

The browser sends $_POST, you can't just tell PHP to accept it the one time, and not the other, unless you use sessions of course. You might also try to refresh using a "302"-header I think, but I forgot how it worked exactly. It makes the browser refresh so that next time the user presses F5 or something the POST-data doesn't get sent.

--
Nieko Maatjes
http://www.nieko.net/

--- End Message ---
--- Begin Message ---
Your best bet is to check that the data has not already been inserted
rather than try to fiddle with the post:

Don't know what db you are using but something like

IF NOT EXISTS (SELECT X FROM Y WHERE Z=1)
INSERT INTO Y VALUES X

Cheers

Mark

-----Original Message-----
From: Nieko Maatjes [mailto:[EMAIL PROTECTED] 
Sent: 15 April 2005 14:34
To: php-general@lists.php.net
Subject: [PHP] Re: How to unset a post variable


On Fri, 15 Apr 2005 14:08:36 +0200, Mario de Frutos Dieguez  
<[EMAIL PROTECTED]> wrote:
> My question is, how can i unset $_POST["buttonNew"] or leave it empty
> because when the user refresh the page make insert commans again
because  
> the $_POST["buttonNew"] arent empty.

The browser sends $_POST, you can't just tell PHP to accept it the one
time, and not the other, unless you use sessions of course. You might
also try to refresh using a "302"-header I think, but I forgot how it
worked exactly. It makes the browser refresh so that next time the user
presses F5 or something the POST-data doesn't get sent.

-- 
Nieko Maatjes
http://www.nieko.net/

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

Gamma Global : Suppliers of IBM, Compaq, Cisco, Sun Microsystems, 3Com and HP 
Products.

GAMMA GLOBAL (UK) LTD IS A RECOGNISED 'INVESTOR IN PEOPLE' AND AN 'ISO 9001 
2000' REGISTERED COMPANY

**********************************************************************

CONFIDENTIALITY NOTICE:

This Email is confidential and may also be privileged. If you are not the
intended recipient, please notify the sender IMMEDIATELY; you should not
copy the email or use it for any purpose or disclose its contents to any
other person.

GENERAL STATEMENT:

Any statements made, or intentions expressed in this communication may not
necessarily reflect the view of Gamma Global (UK) Ltd. Be advised that no 
content
herein may be held binding upon Gamma Global (UK) Ltd or any associated company
unless confirmed by the issuance of a formal contractual document or
Purchase Order,  subject to our Terms and Conditions available from 
http://www.gammaglobal.com

E&OE

**********************************************************************
**********************************************************************


--- End Message ---
--- Begin Message --- well this might help, you can see the referrer page from which the current one was accessed. this is javascript though but it might help depending on your situation.

cheers

Angelo Zanetti
Z Logic
[c] +27 72 441 3355
[t] +27 21 464 1363
[f] +27 21 464 1371
www.zlogic.co.za



Mario de Frutos Dieguez wrote:

Hi!

I have another little question hehe :D, i have a page with a form where the user insert data and can click in a new,edit or delete button. I've make that when a button is clicked the page refresh and in the head of the page i have conditions like this: if ($_POSt["buttonNew"]!="") { insert commands.. } , etc

My question is, how can i unset $_POST["buttonNew"] or leave it empty because when the user refresh the page make insert commans again because the $_POST["buttonNew"] arent empty.

Thx in advance for all *^_^*


--- End Message ---
--- Begin Message ---
Hi all,
        I have a problem getting the data from a post request. I have tried
$_POST and $HTTP_RAW_POST_DATA and they appear to be completely empty.
the always_populate_raw_post_data  directive is set to on.

Below is the incoming data as captured by ethereal:

POST /cyprus/reply.php HTTP/1.1
Host: 212.31.98.213
Connection: keep-alive, TE
X-External-Id: ef58e0602c7db247419ca535eb66e4d4
X-Recipient: 99527583:0:0
X-Sender: 4000
X-Status: done
TE: trailers
============================================

Any ideas ? I am at a loss here....

Thanks,
        Kyriacos

-- 
Kyriacos Sakkas  Netsmart Development Team
Tel: + 357 22 452565  Fax: + 357 22 452566
kyriacos(at)netsmart.com.cy http://www.netsmart.com.cy
Taking Business to a New Level!

--- End Message ---
--- Begin Message ---
Solved getallheaders() worked.

Kyriacos Sakkas wrote:
> Hi all,
>       I have a problem getting the data from a post request. I have tried
> $_POST and $HTTP_RAW_POST_DATA and they appear to be completely empty.
> the always_populate_raw_post_data  directive is set to on.
> 
> Below is the incoming data as captured by ethereal:
> 
> POST /cyprus/reply.php HTTP/1.1
> Host: 212.31.98.213
> Connection: keep-alive, TE
> X-External-Id: ef58e0602c7db247419ca535eb66e4d4
> X-Recipient: 99527583:0:0
> X-Sender: 4000
> X-Status: done
> TE: trailers
> ============================================
> 
> Any ideas ? I am at a loss here....
> 
> Thanks,
>       Kyriacos
> 


-- 
Kyriacos Sakkas  Netsmart Development Team
Tel: + 357 22 452565  Fax: + 357 22 452566
kyriacos(at)netsmart.com.cy http://www.netsmart.com.cy
Taking Business to a New Level!

--- End Message ---
--- Begin Message ---
Solved getallheaders() worked.

Kyriacos Sakkas wrote:
> Hi all,
>       I have a problem getting the data from a post request. I have tried
> $_POST and $HTTP_RAW_POST_DATA and they appear to be completely empty.
> the always_populate_raw_post_data  directive is set to on.
> 
> Below is the incoming data as captured by ethereal:
> 
> POST /cyprus/reply.php HTTP/1.1
> Host: 212.31.98.213
> Connection: keep-alive, TE
> X-External-Id: ef58e0602c7db247419ca535eb66e4d4
> X-Recipient: 99527583:0:0
> X-Sender: 4000
> X-Status: done
> TE: trailers
> ============================================
> 
> Any ideas ? I am at a loss here....
> 
> Thanks,
>       Kyriacos
> 


-- 
Kyriacos Sakkas  Netsmart Development Team
Tel: + 357 22 452565  Fax: + 357 22 452566
kyriacos(at)netsmart.com.cy http://www.netsmart.com.cy
Taking Business to a New Level!

--- End Message ---
--- Begin Message ---
I just ordered a CueCat from eBay to play with reading Barcodes. Of
course we'll use a Symbol or some other reader when we implement this
in production, but I thought this would be a start. There are several
classes at phpclasses.org
(http://www.google.com/custom?q=barcode&hl=en&lr=&ie=UTF-8&oe=ISO-8859-1&c2coff=1&client=pub-2951707118576741&cof=FORID:1%3BL:http://files.phpclasses.org/graphics/googlesearch.jpg%3BLH:50%3BLW:256%3BGL:1%3BBGC:A3C5CC%3BT:%23000000%3BLC:%230000ff%3BVLC:%23663399%3BALC:%230000ff%3BGALT:%23663399%3BGFNT:%230000ff%3BGIMP:%230000ff%3BDIV:%23222222%3BLBGC:A3C5CC%3BAH:center%3BS:http://www.phpclasses.org/search.html%3B&domains=www.phpclasses.org&sitesearch=www.phpclasses.org&start=10&sa=N)
for generating barcodes. At this point I'm assuming a form with a text
field with onchange="this.form.submit();" would handle reading the
barcode and submitting it. I'm assuming we would need to have all our
barcodes in a single format (codabar, code39, etc). Would I then need
to store barcode data. The barcodes will be generated from unique part
numbers so I'm thinking I can generate them (and compare them to
input) on the fly.

--
Thanks for any help,
Mike Smith

--- End Message ---
--- Begin Message ---
Thanks Jason,

I'll pass along any info I come across. I can generate barcodes easily
enough. I guess I'll wait until I get the CueCat and see what troubles
I run into. Our suppliers seem willing to cooperate in terms of
putting whatever barcode we tell them to.

Thanks,
Mike

--- End Message ---
--- Begin Message ---
Hello,
I'm having trouble installing php.4.3.11 ub Solaris8:
./configure
and it is this promt infinitely:
checking host system type...sparc-sun-solaris2.8

I see in  on ather window the following processes:

25263 pts/10   S  0:00 /bin/sh ./configure
 25323 pts/10   S  0:00 /bin/sh ./build/shtool echo -n -e %B
 25330 pts/10   S  0:00 sed -e
s/\([a-zA-Z0-9]\):\([^,]*\),*/opt_ALIAS_\2=\1;/g
 25332 pts/10   R  0:21 tr x- x_

Any ideas ?
thanks!


-- 
Dipl.-Ing. Stefan Heim
University of Ulm
Sektion Informatik i.d. Psychotherapie
Tel: +4973150025702
Fax: +4973150025662
[EMAIL PROTECTED]

--- End Message ---
--- Begin Message --- Does anyone know of any PHP classes for processing the Amazon or eBay XML feeds?

- Brian
--- End Message ---
--- Begin Message --- Anyone know if it's possible to use Magpie (or similar) using MySQL for the caching instead of text files? I couldn't find anything in their docs.

- Brian
--- End Message ---
--- Begin Message ---
Hi list:

I'm receive  a theme class call Computers Graphics in wich my and my friends 
programming making use of OpenGL library. Few day ago I have a brilliiant or an 
stupid idea to narrate to my teacher if I can make my final course project with 
PHP. They tell me that is possible always I use OpenGL. So, I investigate in 
Discussion Boards and they tell me that exists SDL library and I can use it to 
comunicate my application with OpenGL. Well Y have the phpSDL library and I 
made my fisrt things. But I have a problem and it's that I haven't more 
information to continue. If exists somebody in this list that this idea pass 
for his mind can help me? Or somebody know how obtain documentation about it?

Regards 

 

Reynier Pérez Mira

3ero. Ing. Informática

Entre más inteligente me siento, más me doy cuenta de lo ignorante que soy. 

 


--- End Message ---

Reply via email to