php-general Digest 31 Jan 2004 20:07:11 -0000 Issue 2563

Topics (messages 176448 through 176468):

Re: Turck MMcache - still continuing or dead?
        176448 by: Binay
        176449 by: Jason Wong
        176452 by: Adrian Teasdale
        176453 by: Raditha Dissanayake
        176455 by: Binay
        176460 by: Dan McCullough

Re: Logging on to a web based application
        176450 by: Jason Wong

Re: array block
        176451 by: Jason Wong
        176462 by: Brian V Bonini
        176463 by: Shawn McKenzie

Re: Please help me with this. (Retriving info from mySQL database and then put it in 
combo box)
        176454 by: Raditha Dissanayake

Create a new directory on server.
        176456 by: francesco.automationsoft.biz
        176457 by: Stuart
        176458 by: Burhan Khalid
        176461 by: John Nichel

Re: parsing variables inside a variable?
        176459 by: jimbo

Re: How do you guys do this?
        176464 by: Michal Migurski
        176467 by: Adam Bregenzer
        176468 by: Ryan A

Re: exec cURL to pass custom MIME headers
        176465 by: Manuel Lemos

formated text after Submit in MySQL/PHP
        176466 by: Matt Hedges

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

I looked at the discussion goin on located at sourceforge. But then i m
still not able to make up my mind whether to use it or not in my production
server. What do u suggest? Is there any problem with the current version of
MMcache? Please suggest me.

Thanks
Binay
----- Original Message -----
From: "Adrian Teasdale" <[EMAIL PROTECTED]>
To: "'Raditha Dissanayake'" <[EMAIL PROTECTED]>; "'Binay'"
<[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Saturday, January 31, 2004 12:36 PM
Subject: RE: [PHP] Turck MMcache - still continuing or dead?


> That's not strictly true. Open source projects do sometimes die if
> nobody steps up to bat when the original developer decides not to
> continue it - SourceForge has many projects like this.  In this
> particular instance mmCache is not dead (yet). The original developer
> has moved to work with Zend and is no longer able to work on mmCache.
> If you read the forums located here:
> http://sourceforge.net/forum/?group_id=69426 you will see that there is
> much discussion on this topic. At this moment it looks like some people
> have said they will help with the continuing development, so there is
> hope for it yet.  It is a fantastic cache and deserves to continue.
>
> Ade
>
> > -----Original Message-----
> > From: Raditha Dissanayake [mailto:[EMAIL PROTECTED]
> > Sent: 31 January 2004 05:54
> > To: Binay
> > Cc: [EMAIL PROTECTED]
> > Subject: Re: [PHP] Turck MMcache - still continuing or dead?
> >
> >
> > Hi,
> >
> > This topic has also been discussed in the past. Open source projects
> > never die. When the original developer moves away what
> > generally happens
> > is that someone else takes his place.
> >
> >
> > Binay wrote:
> >
> > >Hi all,
> > >
> > >I am planning to use Turck MMcache in my production environment and
> > >hence searching in the archives for its response and efficiency. It
> > >seems people who've used it are quite happy but suddenly I
> > saw a post
> > >saying Turck MMcache is dead i.e its no longer supported by
> > the person
> > >who originally developed it. I don know the fact/reality and
> > in dilemma
> > >whether to use it in my production server or not?? What do u guys
> > >suggest?
> > >
> > >Thanks
> > >Binay
> > >
> > >
> > >
> >
> >
> > --
> > Raditha Dissanayake.
> > --------------------------------------------------------------
> > ----------
> > http://www.radinks.com/sftp/         |
> > http://www.raditha.com/megaupload
> > Lean and mean Secure FTP
> > applet with | Mega Upload - PHP file uploader Graphical User
> > Inteface. Just 150 KB | with progress bar.
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >

--- End Message ---
--- Begin Message ---
On Saturday 31 January 2004 13:57, Binay wrote:

> So u mean i can go ahead with MMcache?? 

Why not? There's nothing to stop you. The code still works, even though 
development has been (hopefully) temporarily  suspended.

-- 
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
------------------------------------------
/*
I live the way I type; fast, with a lot of mistakes.
*/

--- End Message ---
--- Begin Message ---
> Hi Adrian
> 
> I looked at the discussion goin on located at sourceforge. 
> But then i m still not able to make up my mind whether to use 
> it or not in my production server. What do u suggest? Is 
> there any problem with the current version of MMcache? Please 
> suggest me.
> 
> Thanks
> Binay

As far as I can tell there are no problems using it (at the moment) on a
production server. We use it on ours with great benefits. The issue is
whether the project continues and the best way to ensure it does, is
ultimately to get involved - this is an open source project after all!
:)

Ade

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

True that there are countless thousands of projets at sourceforge that can be called dead. But these are mostly projects that never had many downloads even at the peak. or the platforms they ran on are no longer popular etc. Thankfully the same cannot be said of MMCache.



Adrian Teasdale wrote:

That's not strictly true. Open source projects do sometimes die if
nobody steps up to bat when the original developer decides not to
continue it - SourceForge has many projects like this.  In this
particular instance mmCache is not dead (yet). The original developer
has moved to work with Zend and is no longer able to work on mmCache.
If you read the forums located here:
http://sourceforge.net/forum/?group_id=69426 you will see that there is
much discussion on this topic. At this moment it looks like some people
have said they will help with the continuing development, so there is
hope for it yet.  It is a fantastic cache and deserves to continue.

Ade



-----Original Message-----
From: Raditha Dissanayake [mailto:[EMAIL PROTECTED] Sent: 31 January 2004 05:54
To: Binay
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] Turck MMcache - still continuing or dead?


Hi,

This topic has also been discussed in the past. Open source projects never die. When the original developer moves away what


-- Raditha Dissanayake. ------------------------------------------------------------------------ http://www.radinks.com/sftp/ | http://www.raditha.com/megaupload Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader Graphical User Inteface. Just 150 KB | with progress bar.

--- End Message ---
--- Begin Message ---
Thanks alottttttttttt

Finally have decided to go with MMcache only.

Thanks all for clearing my doubts  once again

Binay
----- Original Message -----
From: "Adrian Teasdale" <[EMAIL PROTECTED]>
To: "'Binay'" <[EMAIL PROTECTED]>; "'Raditha Dissanayake'"
<[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Saturday, January 31, 2004 2:20 PM
Subject: RE: [PHP] Turck MMcache - still continuing or dead?


>
> > Hi Adrian
> >
> > I looked at the discussion goin on located at sourceforge.
> > But then i m still not able to make up my mind whether to use
> > it or not in my production server. What do u suggest? Is
> > there any problem with the current version of MMcache? Please
> > suggest me.
> >
> > Thanks
> > Binay
>
> As far as I can tell there are no problems using it (at the moment) on a
> production server. We use it on ours with great benefits. The issue is
> whether the project continues and the best way to ensure it does, is
> ultimately to get involved - this is an open source project after all!
> :)
>
> Ade

--- End Message ---
--- Begin Message ---
I'm jumping in kinda late, and I have been using it on two small production
site, and countless small projects.  While I do not use the full array of
its features, even the base features make it a great product.  Never had any
problems

-----Original Message-----
From: Binay [mailto:[EMAIL PROTECTED]
Sent: Saturday, January 31, 2004 4:42 AM
To: [EMAIL PROTECTED]; 'Raditha Dissanayake'
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] Turck MMcache - still continuing or dead?


Thanks alottttttttttt

Finally have decided to go with MMcache only.

Thanks all for clearing my doubts  once again

Binay
----- Original Message -----
From: "Adrian Teasdale" <[EMAIL PROTECTED]>
To: "'Binay'" <[EMAIL PROTECTED]>; "'Raditha Dissanayake'"
<[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Saturday, January 31, 2004 2:20 PM
Subject: RE: [PHP] Turck MMcache - still continuing or dead?


>
> > Hi Adrian
> >
> > I looked at the discussion goin on located at sourceforge.
> > But then i m still not able to make up my mind whether to use
> > it or not in my production server. What do u suggest? Is
> > there any problem with the current version of MMcache? Please
> > suggest me.
> >
> > Thanks
> > Binay
>
> As far as I can tell there are no problems using it (at the moment) on a
> production server. We use it on ours with great benefits. The issue is
> whether the project continues and the best way to ensure it does, is
> ultimately to get involved - this is an open source project after all!
> :)
>
> Ade

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

--- End Message ---
--- Begin Message ---
On Saturday 31 January 2004 13:10, Robert Sossomon wrote:
> Yuck!!

Indeed. Please trim your posts!

-- 
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
------------------------------------------
/*
Odets, where is thy sting?
                -- George S. Kaufman
*/

--- End Message ---
--- Begin Message ---
On Saturday 31 January 2004 11:48, Shawn McKenzie wrote:
> You would need to give an example of what you mean by change dynamically,
> because if you can't predict the key indexes then how can you know which
> ones to use in your anchor tag?

foreach ($arr as $key => $value) {
        echo "Key: $key; Value: $value<br>\n";
}

-- 
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
------------------------------------------
/*
If your attack is going really well, it's an ambush
                -- Murphy's Military Laws n47
*/

--- End Message ---
--- Begin Message ---
On Fri, 2004-01-30 at 22:48, Shawn McKenzie wrote:
> You would need to give an example of what you mean by change dynamically,
> because if you can't predict the key indexes then how can you know which
> ones to use in your anchor tag?

say this:

$menu = array (
        'link1' => array(
                'url' => 'foo',
                'title' => 'bar'
                ),
        'link2' => array(
                'url' => 'foo',
                'title' => 'bar'
                )
);

were to dynamically change to this:

$menu = array (
        'link1' => array(
                'url' => 'foo',
                'title' => 'bar'
                'style' => 'dolor'
                ),
        'link2' => array(
                'url' => 'foo',
                'title' => 'bar'
                'style' => 'amet'
                )
);

I'm stretching here, have no practical use for it, and can think of much
better ways to handle it but am still curious. Obviously you need to
traverse the inner array which is not an issue, but I get stumped with
trying to format it as in the previous examples.



-- 
Brian        GnuPG -> KeyID: 0x04A4F0DC | URL: www.gfx-design.com/keys
                                          Key Server: pgp.mit.edu
======================================================================
gpg --keyserver pgp.mit.edu --recv-keys 04A4F0DC
GnuPG: http://gnupg.org
http://www.biglumber.com/x/web?qs=0x2C35011004A4F0DC
Linux Registered User #339825 at http://counter.li.org

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


--- End Message ---
--- Begin Message ---
If you have an array like this (change the url to href):

$menu = array (
        'link1' => array(
                'url' => 'foo',
                'title' => 'bar'
                    'style' => 'dolor'
                ),
        'link2' => array(
                'url' => 'foo',
                'title' => 'bar'
                    'style' => 'amet'
                )
);

Then something like this, or the general idea should work:

$menu = array (
        'link1' => array(
                'href' => 'foo',
                'title' => 'bar',
                    'style' => 'dolor'
                ),
        'link2' => array(
                'href' => 'foo',
                'title' => 'bar',
                            'style' => 'amet'
                )
);

foreach ($menu as $array) {
        $tag = "<a";
        
        foreach ($array as $k => $v) {
                $tag .= " $k=\"$v\"";
        }
        $tag .= ">$menu</a>\n";
        echo $tag;
                
}

There are better ways to do it I'm sure, but this is just following the
previous example.

-Shawn

-----Original Message-----
From: Brian V Bonini [mailto:[EMAIL PROTECTED] 
Sent: Saturday, January 31, 2004 8:56 AM
To: Shawn McKenzie
Cc: PHP Lists
Subject: Re: [PHP] Re: array block

On Fri, 2004-01-30 at 22:48, Shawn McKenzie wrote:
> You would need to give an example of what you mean by change dynamically,
> because if you can't predict the key indexes then how can you know which
> ones to use in your anchor tag?

say this:

$menu = array (
        'link1' => array(
                'url' => 'foo',
                'title' => 'bar'
                ),
        'link2' => array(
                'url' => 'foo',
                'title' => 'bar'
                )
);

were to dynamically change to this:

$menu = array (
        'link1' => array(
                'url' => 'foo',
                'title' => 'bar'
                'style' => 'dolor'
                ),
        'link2' => array(
                'url' => 'foo',
                'title' => 'bar'
                'style' => 'amet'
                )
);

I'm stretching here, have no practical use for it, and can think of much
better ways to handle it but am still curious. Obviously you need to
traverse the inner array which is not an issue, but I get stumped with
trying to format it as in the previous examples.



-- 
Brian        GnuPG -> KeyID: 0x04A4F0DC | URL: www.gfx-design.com/keys
                                          Key Server: pgp.mit.edu
======================================================================
gpg --keyserver pgp.mit.edu --recv-keys 04A4F0DC
GnuPG: http://gnupg.org
http://www.biglumber.com/x/web?qs=0x2C35011004A4F0DC
Linux Registered User #339825 at http://counter.li.org

--- End Message ---
--- Begin Message ---
Hello
This is a PHP list not an activex list.


Radwan Aladdin wrote:

Hi all..

I have in my database the fields :"CourseTitle, Language1, Language2, Language3, Language4, Language5, Language6...Etc.."

Now what I want to make is : By using an ActiveX Control I want to retrive the values for these fields from the database.. so for example there are many rows there(In the database).. :

MS Word XP English French Arabic....

MS PowerPoint XP Chinese French Arabic.....Etc

MS Access XP Chinese Japanese English.....Etc

I want to retrive these rows and put them in two combo boxes (CourseTitle and CourseLanguage).. the CourseTitle combo box contains the "CourseTitle values from the database. For example : MS Word XP, MS PowerPoint XP, MS Access XP...Etc " and the CourseLanguage combo box contains the "CourseLanguage values from the database for every CourseTitle. For example : MS Word XP has Englsih,French and Arabic languages.. so if the user chose MS Word XP then the CourseLanguage will show the languages for that Course.."

I hope you got my meaning..

So what I want is to import from the database then split these info into items inside the Combo box..

Best Regards..





--
Raditha Dissanayake.
------------------------------------------------------------------------
http://www.radinks.com/sftp/         | http://www.raditha.com/megaupload
Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader
Graphical User Inteface. Just 150 KB | with progress bar.

--- End Message ---
--- Begin Message ---
Hi all,
is there in PHP a function that create a new directory on server?
Regards,
Frank
www.automationsoft.biz
 

--- End Message ---
--- Begin Message --- [EMAIL PROTECTED] wrote:
is there in PHP a function that create a new directory on server?

RTFM - http://php.net/mkdir

--
Stuart

--- End Message ---
--- Begin Message ---
[EMAIL PROTECTED] wrote:
> Hi all,
> is there in PHP a function that create a new directory on server?
> Regards,
> Frank
> www.automationsoft.biz

Don't send your messages high priority. They are not high-priority.

-- 
Burhan Khalid
phplist[at]meidomus[dot]com

--- End Message ---
--- Begin Message --- [EMAIL PROTECTED] wrote:

Hi all,
is there in PHP a function that create a new directory on server?
Regards,
Frank
www.automationsoft.biz

Wow, who would have thought that one could find the answer to a php question in the php manual...

http://us2.php.net/manual/en/function.mkdir.php

--
By-Tor.com
It's all about the Rush
http://www.by-tor.com

--- End Message ---
--- Begin Message ---
Yes when I checked out the manual page for eval() it did occur to me that it
did open up significant potential for abuse.  As it happens I am passing
user supplied values into these variables, but I validate all my input
anyway to prevent people from modifying my queries etc..  I have observed
that PHP doesn't seem to be very naturally defensive but I guess no Server
Side scripting language is, except maybe JSP.

Cheers,
James

--
--------------------------------------------------------
www.jholt.co.uk : affordable business website solutions
www.htpshareware.com : software for the disorganized
--------------------------------------------------------

"You don't needs eyes to see, you need vision" - Maxi Jazz

"Mike Ford" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> On 30 January 2004 12:35, jimbo wrote:
>
> > Great - thanks v. much Mike.  I don't know why there was no mention of
> > eval() in the section of the manual on Variable Parsing.
>
> Possibly because they didn't want to get into the security issues
involved.
> It sounds like you're ok there, as you only intend putting very controlled
> values into the database.
>
> The problem comes if you're potentially eval()-ing user-supplied values
that
> have been insufficiently validated.  Just suppose, for example, that it
was
> possible for a user to somehow get a value such as 'system("rm
> /etc/passwds")' inserted into the database in a field that you then
> eval()...
>
> Cheers!
>
> Mike
>
> ---------------------------------------------------------------------
> Mike Ford,  Electronic Information Services Adviser,
> Learning Support Services, Learning & Information Services,
> JG125, James Graham Building, Leeds Metropolitan University,
> Beckett Park, LEEDS,  LS6 3QS,  United Kingdom
> Email: [EMAIL PROTECTED]
> Tel: +44 113 283 2600 extn 4730      Fax:  +44 113 283 3211

--- End Message ---
--- Begin Message ---
>> users uploading two identically named files at the same time (not all
>> /that/ unlikely), and you are using a database table to track
>
>Really? You don't think it's that uncommon? Please give an example as I
>can't think of any. Not like that's saying much. :)

I'd say that any time you have an application written for some specific
industry or audience, there's a good chance people will be uploading
assets with similar names -- we did one for an automotive company's design
department, and there were a lot of instances of people posting many
images named "headlights.jpg", for example. The application was visual,
the frontend was flash, and they were more interested in the image than
the filename.

I used microtime() to differentiate them, but in retrospect it should have
been a no-brainer to use the database primary id to help differentiate
these, since the DB already did all the heavy lifting involved in ensuring
uniqueness.

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

--- End Message ---
--- Begin Message ---
On Sat, 2004-01-31 at 12:57, Michal Migurski wrote:
> >> users uploading two identically named files at the same time (not all
> >> /that/ unlikely), and you are using a database table to track
> >
> >Really? You don't think it's that uncommon? Please give an example as I
> >can't think of any. Not like that's saying much. :)
> 
> I used microtime() to differentiate them, but in retrospect it should have
> been a no-brainer to use the database primary id to help differentiate
> these, since the DB already did all the heavy lifting involved in ensuring
> uniqueness.

Even though it seems incredibly unlikely, isn't is safer to just not
worry about it and use unique ids instead?  Why take the risk when you
can use an autonumber from a database or md5(uniqid(rand(), true)), or
even: time() .  md5(uniqid(rand(), true)) if you want to be really
paranoid?

-- 
Adam Bregenzer
[EMAIL PROTECTED]

--- End Message ---
--- Begin Message ---
Hey,
Nice solution, I think i'll use it.
Thanks.
-Ryan

On 1/31/2004 8:56:02 PM, [EMAIL PROTECTED] wrote:
> Ryan A wrote:
> > Hey all,
> > I needed to make a simple upload script so users could upload their
> > images but had a small extra requirment, after searching google,
> > hotscripts and all the other usual places and downloading code, i
> > realized its better to write the whole damn thing myself, so i did.
> >
> > Now that the little history lesson is over.....I have run into a
> > problem which i am sure you guys must have too, when you take the
> > uploaded pic of the user...how do you save it?
> > I dont mean saving onto disk, i can do that, i mean the name of the
> > file...I am having all the pics upload to one common directory
> > (member_pics) so what do you suggest I name the pictures?
> > eg:
> > username.jpg?
> > first_last_name.jpg?
> > <random_number>_username.jpg?
> > etc etc
> > (for this example i wrote only jpg, i will be having png and gif too)
> >
> > The reason I didnt want to use the
> user's username as his pic name is
> > coz then if someone wanted to break into his account they already
> > know the username and they could try to bruteforce the password...
> > if i use first and last name...there is  a _small_ possibility of 2
> > members

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

On 01/30/2004 05:31 PM, Kristopher Spencer-Yates wrote:
Normally I wouldn't do this but the cURL list seems to be in severe hibernation, ie. no activity. I'm in a bit of a jam w/ this and so here goes....

How do I get cURL to pass headers properly? It is ignoring my -H headers and sending its own default or whatever set of headers. One example, it submits as x-www-urlencoded-form or whatever but I want it to just send -H "my headers!". Can anyone point me in the right direction? I know I probably just need to change something simple here.. see below:

<?
$mime_headers="POST /AUTHORIZE HTTP/1.0\nMIME-Version: 1.0\nContent-type: application/X1";

$xml_content="{some XML - use your imagination here}";

exec("/usr/local/bin/curl -m 120 -H \"$mime_headers\" -d \"$xml_content\"
$merchant_URL:$merchant_PORT -L", $return_message_array, $return_number);
?>

You do not need to call cURL external program to send an HTTP request. You can use fsockopen connections.

You may want to try this HTTP client class. It actually uses curl extension but only for secure connections (SSL/HTTPS). For normal HTTP connections it uses fsockopen. It can send POST requests including those tha need to send XML data like SOAP requests. So you can do what you want with this class:

http://www.phpclasses.org/httpclient

--

Regards,
Manuel Lemos

Free ready to use OOP components written in PHP
http://www.phpclasses.org/

MetaL - XML based meta-programming language
http://www.meta-language.net/

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

I have a page where users can enter in information about themselves...  I
want it to maintain its format instead of all running together, that is,
when they enter a space the space is maintained via MySQL and displayed in
their webpage (instead of having to ask them to type <P>)....

is this possible?

thanks,
Matt

--- End Message ---

Reply via email to