php-general Digest 7 Aug 2007 17:44:56 -0000 Issue 4948

Topics (messages 260263 through 260294):

Re: import Excel file into PostgreSQL
        260263 by: Chris

need mysql_ping when using mysql_pconnect?
        260264 by: lists.dwsasia.com

Re: Thoughts about music library
        260265 by: Colin Guthrie

Object reference into variable?
        260266 by: Sándor Tamás (GMail)
        260267 by: Hamza Saglam
        260269 by: Sándor Tamás (GMail)
        260270 by: Hamza Saglam
        260274 by: Larry Garfield

Re: How to implement a plugin system?
        260268 by: Hamza Saglam
        260273 by: Guillaume Theoret

Re: mail problem - deadline!!!!!
        260271 by: Tijnema

Articles or News Management Systems
        260272 by: Sancar Saran

OT A public apology to Larry Garfield
        260275 by: tedd
        260276 by: Robert Cummings
        260277 by: Daniel Brown
        260278 by: tedd
        260279 by: tedd
        260280 by: David Giragosian
        260281 by: Robert Cummings
        260283 by: Borokov Smith
        260284 by: Daniel Brown
        260286 by: Robert Cummings
        260287 by: Daniel Brown
        260288 by: Robert Cummings
        260290 by: Daniel Brown

Empty super globals
        260282 by: Brian Dunning
        260285 by: Zoltán Németh

Why do I always come up with the hard stuff?
        260289 by: Jason Pruim
        260291 by: Stut
        260292 by: Daniel Brown
        260293 by: Mark Summers
        260294 by: Jason Pruim

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 ---
Alain Roger wrote:
HI,

I would like to know the best and fastest way how to import some colums
contents from Excel file to PostgreSQL database.
how can i do that ?

I mean some columns of Excel should be imported into a particular table and
some others into another table.

If it's a proper excel file, try something like:

http://sourceforge.net/projects/phpexcelreader

If it's a CSV file, try http://www.php.net/fgetcsv

--
Postgresql & php tutorials
http://www.designmagick.com/

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

Just becasue you create a persistent connection it can still go down, can't it? So therefore using mysql_ping inside of scripts with plenty of idle time is useful?

/Peter

--- End Message ---
--- Begin Message ---
Børge Holen wrote:
> On Monday 06 August 2007 23:39, Colin Guthrie wrote:
>> Børge Holen wrote:
>>> I'm building an web interface for my music collection.
>> I'd have a quick look at mp3act. It does pretty much what you want I think.
> 
> yes, but where is the fun in that? ;D
> and if something irritate me, it simple to fix it when I built it

Indeed :p

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

I have a question (what a surprise :-) )

I browsed the archives, but didn't find what I'm looking for.
I have an object instance stored in some variable (like $myobject). I want to save this instance into another variable (like $tempobject). I thought, this will be the way:
 $myobject = new MyObject();
 $tempobject = $myobject;
(or I tried this too:
 $tempobject = &$myobject)

None of them worked, like I cannot access methods in the object:
 $tempobject->Foo()
gives me an error: calling to method on a non-object variable.

How can I tell PHP that $tempobject is a class instance of MyObject, and that I can use it's methods?

Thanks,
SanTa

--- End Message ---
--- Begin Message ---
You may find the following article interesting. It talks about object 
cloning, which I think what you are after...

http://www.phpfreaks.com/phpmanual/page/language.oop5.cloning.html


Regards,
Hamza.


""Sándor Tamás (GMail)"" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
> Hello,
>
> I have a question (what a surprise :-) )
>
> I browsed the archives, but didn't find what I'm looking for.
> I have an object instance stored in some variable (like $myobject). I want 
> to save this instance into another variable (like $tempobject). I thought, 
> this will be the way:
>  $myobject = new MyObject();
>  $tempobject = $myobject;
> (or I tried this too:
>  $tempobject = &$myobject)
>
> None of them worked, like I cannot access methods in the object:
>  $tempobject->Foo()
> gives me an error: calling to method on a non-object variable.
>
> How can I tell PHP that $tempobject is a class instance of MyObject, and 
> that I can use it's methods?
>
> Thanks,
> SanTa 

--- End Message ---
--- Begin Message ---
I forgot to tell you that I have to use PHP4.2 because of my web provider.
Anything besides of _clone?

SanTa

  ----- Original Message ----- 
  From: Hamza Saglam 
  To: "Sándor Tamás (GMail)" 
  Sent: Tuesday, August 07, 2007 10:49 AM
  Subject: Re: Object reference into variable?


  You may find the following article interesting. It talks about object 
  cloning, which I think what you are after...

  http://www.phpfreaks.com/phpmanual/page/language.oop5.cloning.html


  Regards,
  Hamza.


  ""Sándor Tamás (GMail)"" <[EMAIL PROTECTED]> wrote in message 
  news:[EMAIL PROTECTED]
  > Hello,
  >
  > I have a question (what a surprise :-) )
  >
  > I browsed the archives, but didn't find what I'm looking for.
  > I have an object instance stored in some variable (like $myobject). I want 
  > to save this instance into another variable (like $tempobject). I thought, 
  > this will be the way:
  >  $myobject = new MyObject();
  >  $tempobject = $myobject;
  > (or I tried this too:
  >  $tempobject = &$myobject)
  >
  > None of them worked, like I cannot access methods in the object:
  >  $tempobject->Foo()
  > gives me an error: calling to method on a non-object variable.
  >
  > How can I tell PHP that $tempobject is a class instance of MyObject, and 
  > that I can use it's methods?
  >
  > Thanks,
  > SanTa 



--- End Message ---
--- Begin Message ---
I strongly suggest you put some pressure on you web provider to at least 
upgrade it to the 4.4.7, as 4.2 is way too old to be secure :)

Unfortunately I don't know how this could be accomplished in PHP4, but a 
quick google query returned these:

http://www.hat.net/geeky/php_tricks_-_php_5_clone_in_php4
http://www.dgx.cz/trine/item/how-to-emulate-php5-object-model-in-php4

Someone with more experience might shed some light into this..


Regards,
Hamza.


""Sándor Tamás (GMail)"" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
I forgot to tell you that I have to use PHP4.2 because of my web provider.
Anything besides of _clone?

SanTa

  ----- Original Message ----- 
  From: Hamza Saglam
  To: "Sándor Tamás (GMail)"
  Sent: Tuesday, August 07, 2007 10:49 AM
  Subject: Re: Object reference into variable?


  You may find the following article interesting. It talks about object
  cloning, which I think what you are after...

  http://www.phpfreaks.com/phpmanual/page/language.oop5.cloning.html


  Regards,
  Hamza.


  ""Sándor Tamás (GMail)"" <[EMAIL PROTECTED]> wrote in message
  news:[EMAIL PROTECTED]
  > Hello,
  >
  > I have a question (what a surprise :-) )
  >
  > I browsed the archives, but didn't find what I'm looking for.
  > I have an object instance stored in some variable (like $myobject). I 
want
  > to save this instance into another variable (like $tempobject). I 
thought,
  > this will be the way:
  >  $myobject = new MyObject();
  >  $tempobject = $myobject;
  > (or I tried this too:
  >  $tempobject = &$myobject)
  >
  > None of them worked, like I cannot access methods in the object:
  >  $tempobject->Foo()
  > gives me an error: calling to method on a non-object variable.
  >
  > How can I tell PHP that $tempobject is a class instance of MyObject, and
  > that I can use it's methods?
  >
  > Thanks,
  > SanTa

--- End Message ---
--- Begin Message ---
Get a new web host that offers PHP 5.2.  Anything older than that is a dead 
end that is about to be retired[1].  There's a nice big list of 5.2-ready web 
hosts available, too[2].

[1] http://www.php.net/index.php#2007-07-13-1
[2] http://gophp5.org/

On Tuesday 07 August 2007, Sándor Tamás wrote:
> I forgot to tell you that I have to use PHP4.2 because of my web provider.
> Anything besides of _clone?
>
> SanTa
>
>   ----- Original Message -----
>   From: Hamza Saglam
>   To: "Sándor Tamás (GMail)"
>   Sent: Tuesday, August 07, 2007 10:49 AM
>   Subject: Re: Object reference into variable?
>
>
>   You may find the following article interesting. It talks about object
>   cloning, which I think what you are after...
>
>   http://www.phpfreaks.com/phpmanual/page/language.oop5.cloning.html
>
>
>   Regards,
>   Hamza.
>
>
>   ""Sándor Tamás (GMail)"" <[EMAIL PROTECTED]> wrote in message
>   news:[EMAIL PROTECTED]
>
>   > Hello,
>   >
>   > I have a question (what a surprise :-) )
>   >
>   > I browsed the archives, but didn't find what I'm looking for.
>   > I have an object instance stored in some variable (like $myobject). I
>   > want to save this instance into another variable (like $tempobject). I
>   > thought, this will be the way:
>   >  $myobject = new MyObject();
>   >  $tempobject = $myobject;
>   > (or I tried this too:
>   >  $tempobject = &$myobject)
>   >
>   > None of them worked, like I cannot access methods in the object:
>   >  $tempobject->Foo()
>   > gives me an error: calling to method on a non-object variable.
>   >
>   > How can I tell PHP that $tempobject is a class instance of MyObject,
>   > and that I can use it's methods?
>   >
>   > Thanks,
>   > SanTa


-- 
Larry Garfield                  AIM: LOLG42
[EMAIL PROTECTED]               ICQ: 6817012

"If nature has made any one thing less susceptible than all others of 
exclusive property, it is the action of the thinking power called an idea, 
which an individual may exclusively possess as long as he keeps it to 
himself; but the moment it is divulged, it forces itself into the possession 
of every one, and the receiver cannot dispossess himself of it."  -- Thomas 
Jefferson

--- End Message ---
--- Begin Message ---
""Nathan Nobbe"" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
> On 8/6/07, Stut <[EMAIL PROTECTED]> wrote:
>>
>> Hamza Saglam wrote:
>> > Thanks for your response. However I am looking for something a bit more
>> > comprehensive :)
>> >
>> > I could do it as you suggested if I had only a few plugins. As I am
>> going to
>> > add loads of plugins over the time, rather than adding all the plugins
>> one
>> > by one, could something like a 'loader' class be implemented? What I
>> mean by
>> > that is, it will take the requested plugin names (with their own
>> parameters
>> > necessary) and load/initialise them.
>> >
>> > In semi-psuedo-code, it would be something like:
>> >
>> >  foreach plugin suplied as the argument
>> >    include the plugin
>> >    initialise it
>> >  end
>> >
>> > Perhaps I should change the question to: "Do you think something like
>> this
>> > would be efficient and useable? If not what sort of pattern would you
>> > follow?"
>>
>> What you're describing is the Factory pattern, and yes that's the most
>> efficient way to implement plugins. You should never load classes unless
>> you need them - it's a complete waste of time, and definitely not
>> recommended if you're going to have a lot of plugins.
>>
>> I would suggest you name your plugins X_plugin, Y_plugin and Z_plugin
>> (where plugin could be anything) because that adds a level of security.
>> Otherwise you could open yourself up to security issues because the user
>> could instantiate any class in your system.
>>
>> -Stut
>>
>> --
>> http://stut.net/
>>
>> > "Borokov Smith" <[EMAIL PROTECTED]> wrote in message
>> > news:[EMAIL PROTECTED]
>> >> Hey Hamza,
>> >>
>> >> require_once($chosenPlugin . '.class.php');
>> >>
>> >> $obj = new $chosenPlugin();
>> >> return $obj;
>> >>
>> >> And you can start from there.
>> >>
>> >> hth,
>> >>
>> >> boro
>> >>
>> >>
>> >>
>> >> Hamza Saglam schreef:
>> >>> Hello all,
>> >>>
>> >>> I am working on a project which needs to have some sort of plugins
>> >>> architecture and I am kinda stuck. Basically I want to give a list of
>> >>> items to the user, and according to his/her selection, I want to load
>> >>> relevant functionality into my application.
>> >>>
>> >>>
>> >>> I was thinking of having an abstract plugin class, and have the
>> >>> plugins implement that but then how would I actually load the 
>> >>> plugins?
>> >>> Say for instance I want to load plugins X,Y,Z (and lets say i
>> >>> implemented them as [X|Y|Z].class.php) , should I just 'include' (or
>> >>> require) them? Or should I initialize all possible plugins and just
>> >>> pick the ones user has chosen (which sounds a bit pointless as it
>> >>> would load unnecessary stuff)?
>> >>>
>> >>>
>> >>> How would you go about doing something like this?
>> >>>
>> >>>
>> >>> Thanks.
>> >>>
>> >>>
>> >
>>
>> --
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
>>
> allow me to elaborate.  you want to aim for composition as a flexible
> alternative to sub-classing to extend behavior.
> Namely what you want is the Strategy pattern.  Strategy allows you to
> compose objects at run time dynamically, thereby changing
> behavior in your system on-the-fly.  The components are made similar by a
> common interface, which can be either the PHP
> *interface* or the PHP *abstract class*.
>
> these components each encapsulate a different algorithm or module as you
> would call it.  and the interface makes the system simple
> to extend.  to create a new module you simply implement the interface and 
> it
> is interchangeable with the other modules in the system.
> the factory method pattern is sort of complex.  it is used to encapsulate
> object creation.  it is typically used to instantiate objects in a 
> *family*
> *of products* which is defined by a common interface, ie the strategy
> pattern.  the factory method is used to create products in a standard way.
> factory method pattern goes further, in typical implementations, by using
> template method in a parent class.   this controls the boundaries
> of the modules in the system.
>
> the template method invokes the a factory method on a subclass  to get a
> concrete object.  it then operates on the the concrete object in a
> predefined sequence.  the abstract base class can define different types 
> of
> methods. the base class may specify methods that must be
> implemented by concrete subclasses.  it can also expose hook methods, with 
> a
> default implementation.  these methods can be optionally
> implemented in the subclasses.
> after invoking the factory method to get a concrete object the factorys
> template method will invoke the remaining methods, mandatory, hook
> or otherwise on the newly created concrete object in a predefined sequence
> before handing the new object to the client code that called it.
>
> http://www.phppatterns.com/docs/design/strategy_pattern
> http://www.phppatterns.com/docs/design/the_factory_method
>
> -nathan
>

Hi Nathan,

That all sounds quite interesting. I'll try to apply it when I'm coding my 
prototype :)


Thanks a lot,
Hamza. 

--- End Message ---
--- Begin Message ---
A couple of months ago I asked pretty much the same question on this
list because I was doing the same thing. This is how we implemented
our system.

For starters, we rolled our own MVC framework. It's pretty much a
standard MVC framework, very rails inspired but much more lightweight
than Cake and with very strong support for ajax because we do a lot of
it.

We also decided to develop a large part of our functionality as
plugins. For example pagination is a plugin. You can just develop your
page and then paginate it pretty much as an afterthought by simply
including a plugin to which you pass your array of objects (we have an
ORM layer so we always deal with objects, not SQL) and the total
number.

Plugins are simply a folder in the plugins directory. This way the
framework can autoload them easily. If you have a Poll plugin you need
a PollPlugin class in the plugin/poll/classes directory. We also use
the savant3 template engine so from here you probably also want a few
templates to render your poll according to certain details. To display
a poll on a page all I have to do in the controller is this:

$poll = PollMapper::get()->findRandomBySite($ma->site());
$member = AFramework::framework()->user();
$poll_plugin = Plugin::load("poll",$poll, $member);
$ma->view()->assignRef("poll_plugin",$poll_plugin);

and in the view I simply class $this->poll_plugin->display(); and it
displays correctly at that location.

The interesting part there is the Plugin loader. Basically it's a
pseudo constructor. You give it a plugin name that you want to load
and any extra parameters (as many as you want) will be passed along to
the class' load method which serves as the pseudo constructor.

Since a poll object and a member object were passed to the poll
plugin, I can check whether this member has voted before of not. If
not, display() is going to return the p_poll_options template,
otherwise it will return the p_poll_results template. That's really
just some barebones html (a couple of divs with widths) that have a
default styling you can include (in the plugin's css folder) or that
you can override in the template that you're including's css.

I just mentioned that each plugin can have its own css but it can also
have its own images and javascript.

Anyway, this method has been working out extremely well for us. It
gives a lot of flexibility when you can just develop a self contained
piece of functionality and then just include it anywhere on any page.
If you make your plugins generic enough to handle anything (like
update lists that can take arrays of arbitrary object and just display
them correctly as a paginated list) you'll find this method works very
well.

On 8/7/07, Hamza Saglam <[EMAIL PROTECTED]> wrote:
> ""Nathan Nobbe"" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> > On 8/6/07, Stut <[EMAIL PROTECTED]> wrote:
> >>
> >> Hamza Saglam wrote:
> >> > Thanks for your response. However I am looking for something a bit more
> >> > comprehensive :)
> >> >
> >> > I could do it as you suggested if I had only a few plugins. As I am
> >> going to
> >> > add loads of plugins over the time, rather than adding all the plugins
> >> one
> >> > by one, could something like a 'loader' class be implemented? What I
> >> mean by
> >> > that is, it will take the requested plugin names (with their own
> >> parameters
> >> > necessary) and load/initialise them.
> >> >
> >> > In semi-psuedo-code, it would be something like:
> >> >
> >> >  foreach plugin suplied as the argument
> >> >    include the plugin
> >> >    initialise it
> >> >  end
> >> >
> >> > Perhaps I should change the question to: "Do you think something like
> >> this
> >> > would be efficient and useable? If not what sort of pattern would you
> >> > follow?"
> >>
> >> What you're describing is the Factory pattern, and yes that's the most
> >> efficient way to implement plugins. You should never load classes unless
> >> you need them - it's a complete waste of time, and definitely not
> >> recommended if you're going to have a lot of plugins.
> >>
> >> I would suggest you name your plugins X_plugin, Y_plugin and Z_plugin
> >> (where plugin could be anything) because that adds a level of security.
> >> Otherwise you could open yourself up to security issues because the user
> >> could instantiate any class in your system.
> >>
> >> -Stut
> >>
> >> --
> >> http://stut.net/
> >>
> >> > "Borokov Smith" <[EMAIL PROTECTED]> wrote in message
> >> > news:[EMAIL PROTECTED]
> >> >> Hey Hamza,
> >> >>
> >> >> require_once($chosenPlugin . '.class.php');
> >> >>
> >> >> $obj = new $chosenPlugin();
> >> >> return $obj;
> >> >>
> >> >> And you can start from there.
> >> >>
> >> >> hth,
> >> >>
> >> >> boro
> >> >>
> >> >>
> >> >>
> >> >> Hamza Saglam schreef:
> >> >>> Hello all,
> >> >>>
> >> >>> I am working on a project which needs to have some sort of plugins
> >> >>> architecture and I am kinda stuck. Basically I want to give a list of
> >> >>> items to the user, and according to his/her selection, I want to load
> >> >>> relevant functionality into my application.
> >> >>>
> >> >>>
> >> >>> I was thinking of having an abstract plugin class, and have the
> >> >>> plugins implement that but then how would I actually load the
> >> >>> plugins?
> >> >>> Say for instance I want to load plugins X,Y,Z (and lets say i
> >> >>> implemented them as [X|Y|Z].class.php) , should I just 'include' (or
> >> >>> require) them? Or should I initialize all possible plugins and just
> >> >>> pick the ones user has chosen (which sounds a bit pointless as it
> >> >>> would load unnecessary stuff)?
> >> >>>
> >> >>>
> >> >>> How would you go about doing something like this?
> >> >>>
> >> >>>
> >> >>> Thanks.
> >> >>>
> >> >>>
> >> >
> >>
> >> --
> >> PHP General Mailing List (http://www.php.net/)
> >> To unsubscribe, visit: http://www.php.net/unsub.php
> >>
> >>
> > allow me to elaborate.  you want to aim for composition as a flexible
> > alternative to sub-classing to extend behavior.
> > Namely what you want is the Strategy pattern.  Strategy allows you to
> > compose objects at run time dynamically, thereby changing
> > behavior in your system on-the-fly.  The components are made similar by a
> > common interface, which can be either the PHP
> > *interface* or the PHP *abstract class*.
> >
> > these components each encapsulate a different algorithm or module as you
> > would call it.  and the interface makes the system simple
> > to extend.  to create a new module you simply implement the interface and
> > it
> > is interchangeable with the other modules in the system.
> > the factory method pattern is sort of complex.  it is used to encapsulate
> > object creation.  it is typically used to instantiate objects in a
> > *family*
> > *of products* which is defined by a common interface, ie the strategy
> > pattern.  the factory method is used to create products in a standard way.
> > factory method pattern goes further, in typical implementations, by using
> > template method in a parent class.   this controls the boundaries
> > of the modules in the system.
> >
> > the template method invokes the a factory method on a subclass  to get a
> > concrete object.  it then operates on the the concrete object in a
> > predefined sequence.  the abstract base class can define different types
> > of
> > methods. the base class may specify methods that must be
> > implemented by concrete subclasses.  it can also expose hook methods, with
> > a
> > default implementation.  these methods can be optionally
> > implemented in the subclasses.
> > after invoking the factory method to get a concrete object the factorys
> > template method will invoke the remaining methods, mandatory, hook
> > or otherwise on the newly created concrete object in a predefined sequence
> > before handing the new object to the client code that called it.
> >
> > http://www.phppatterns.com/docs/design/strategy_pattern
> > http://www.phppatterns.com/docs/design/the_factory_method
> >
> > -nathan
> >
>
> Hi Nathan,
>
> That all sounds quite interesting. I'll try to apply it when I'm coding my
> prototype :)
>
>
> Thanks a lot,
> Hamza.
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

--- End Message ---
--- Begin Message ---
On 8/7/07, Luc <[EMAIL PROTECTED]> wrote:
>  Good evening list,
>
>  i'm having a strange mail problem:
>
>  i have 2 contact-forms on a site, where 1 get's send to the e-mail
>  account and the other doesn't. I've tested them both on my remote
>  server and they work, but when i upload them to the clients' server,
>  1 doesn't arrive in the mailbox and the other one does.
>
>  Code for the troublesome form:
>
<code snip>
> --
> Best regards,
>  Luc

Hello Luc:

Your code is really large, you should try narrow the problem down to a
specific piece of code that doesn't work.
You can start with setting error_reporting to E_ALL and see if it
generates any warnings, fix them if so.
If that didn't help, try to remove piece of code and see when it
works, when it works again, add pieces of code 1 by 1 and see which
one is causing trouble.
Then take a deeper look at that part, and see if you can find the
problem, if not, then you can come back to this list with that small
piece of code.

Tijnema
-- 
Vote for PHP Color Coding in Gmail! -> http://gpcc.tijnema.info

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

I'm going to add some kind of articles system into my cms.

General aim of this articles system have unlimited branches (or sub 
categories), each branch may own editors or writers.

I'm looking for current imlementations of this kind of systems.

Does anyone suggest a system to have good abilities about this issue

also I'm looking for any standats about this issue.

It seems there where  JSR-170 spesification about content reposity. I do not 
find anything than RFC (which is beyond my understandability). Is there any 
other documentation (php implementation(it seems there where phpcr.org and I 
cannot connect it))

And Or is here any suggestion or wish list about this kind of system...

Regars

Sancar

--- End Message ---
--- Begin Message ---
Hi gang:

In the long winded debate over copyright infringement vs thievery, I made an unkind and untrue inference re Larry Garfield.

So, as a matter of public apology, I hereby apologize to Larry publicly for my heated remark. I'm sorry Larry.

As a point of notice, Larry has graciously accepted my apology off-list.

I consider the matter settled unless someone wants to argue about my apology. :-)

Cheers,

tedd
--
-------
http://sperling.com  http://ancientstones.com  http://earthstones.com

--- End Message ---
--- Begin Message ---
On Tue, 2007-08-07 at 10:23 -0400, tedd wrote:
> Hi gang:
> 
> In the long winded debate over copyright infringement vs thievery, I 
> made an unkind and untrue inference re Larry Garfield.
> 
> So, as a matter of public apology, I hereby apologize to Larry 
> publicly for my heated remark. I'm sorry Larry.
> 
> As a point of notice, Larry has graciously accepted my apology off-list.
> 
> I consider the matter settled unless someone wants to argue about my 
> apology. :-)

Could you refresh our memories?

>:)

Cheers,
Rob.
-- 
...........................................................
SwarmBuy.com - http://www.swarmbuy.com

    Leveraging the buying power of the masses!
...........................................................

--- End Message ---
--- Begin Message ---
On 8/7/07, Robert Cummings <[EMAIL PROTECTED]> wrote:
> On Tue, 2007-08-07 at 10:23 -0400, tedd wrote:
> > Hi gang:
> >
> > In the long winded debate over copyright infringement vs thievery, I
> > made an unkind and untrue inference re Larry Garfield.
> >
> > So, as a matter of public apology, I hereby apologize to Larry
> > publicly for my heated remark. I'm sorry Larry.
> >
> > As a point of notice, Larry has graciously accepted my apology off-list.
> >
> > I consider the matter settled unless someone wants to argue about my
> > apology. :-)
>
> Could you refresh our memories?
>
> >:)
>
> Cheers,
> Rob.
> --
> ...........................................................
> SwarmBuy.com - http://www.swarmbuy.com
>
>     Leveraging the buying power of the masses!
> ...........................................................
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

    As a matter of public record, I hereby move that we reject Tedd's
formal apology due to grammatical errors in construct.  ;-P

-- 
Daniel P. Brown
[office] (570-) 587-7080 Ext. 272
[mobile] (570-) 766-8107

Hey, PHP-General list.... to give something back to everyone, you guys
can have 50% off every month on hosting plans of $10/mo. or more (list
price) at http://www.pilotpig.net/.
Use the coupon code phpgeneralaug07

--- End Message ---
--- Begin Message ---
At 10:31 AM -0400 8/7/07, Robert Cummings wrote:
On Tue, 2007-08-07 at 10:23 -0400, tedd wrote:
 Hi gang:

 In the long winded debate over copyright infringement vs thievery, I
 made an unkind and untrue inference re Larry Garfield.

 So, as a matter of public apology, I hereby apologize to Larry
 publicly for my heated remark. I'm sorry Larry.

 As a point of notice, Larry has graciously accepted my apology off-list.

 I consider the matter settled unless someone wants to argue about my
 apology. :-)

Could you refresh our memories?

 >:)

No -- then I would have to apologize again. If you want to know what low-life thing I said about Larry, then look it up in the archives. :-)

Please understand that this was an all inclusive apology to Larry. It covered everything I have said, or done, since I was born till now.

Cheers,

tedd
--
-------
http://sperling.com  http://ancientstones.com  http://earthstones.com

--- End Message ---
--- Begin Message ---
At 10:36 AM -0400 8/7/07, Daniel Brown wrote:

    As a matter of public record, I hereby move that we reject Tedd's
formal apology due to grammatical errors in construct.  ;-P

--
Daniel P. Brown

You know you guys are going to keep this up until I have to apologize to everyone for the things I'm going to say. :-)

What "grammatical errors in construct" did I commit?

Cheers,

tedd

--
-------
http://sperling.com  http://ancientstones.com  http://earthstones.com

--- End Message ---
--- Begin Message ---
On 8/7/07, tedd <[EMAIL PROTECTED]> wrote:
>
> At 10:36 AM -0400 8/7/07, Daniel Brown wrote:
> >
> >     As a matter of public record, I hereby move that we reject Tedd's
> >formal apology due to grammatical errors in construct.  ;-P
> >
> >--
> >Daniel P. Brown
>
> You know you guys are going to keep this up until I have to apologize
> to everyone for the things I'm going to say.  :-)
>
> What "grammatical errors in construct" did I commit?
>
> Cheers,
>
> tedd


Aw, hell.  Here we go again. Another thread into the trash...

David

--- End Message ---
--- Begin Message ---
On Tue, 2007-08-07 at 10:50 -0400, tedd wrote:
> At 10:31 AM -0400 8/7/07, Robert Cummings wrote:
> >On Tue, 2007-08-07 at 10:23 -0400, tedd wrote:
> >>  Hi gang:
> >>
> >>  In the long winded debate over copyright infringement vs thievery, I
> >>  made an unkind and untrue inference re Larry Garfield.
> >>
> >>  So, as a matter of public apology, I hereby apologize to Larry
> >>  publicly for my heated remark. I'm sorry Larry.
> >>
> >>  As a point of notice, Larry has graciously accepted my apology off-list.
> >>
> >>  I consider the matter settled unless someone wants to argue about my
> >>  apology. :-)
> >
> >Could you refresh our memories?
> >
> >  >:)
> 
> No -- then I would have to apologize again. If you want to know what 
> low-life thing I said about Larry, then look it up in the archives. 
> :-)

But, but, but there's like 5 GAAAAAAZILLION posts to dig through! That's
a ginormous task!!

Baaaah, I'm gonna go listen to some crunk instead.

Cheers,
Rob.
-- 
...........................................................
SwarmBuy.com - http://www.swarmbuy.com

    Leveraging the buying power of the masses!
...........................................................

--- End Message ---
--- Begin Message --- Personally, I think Garfield is the worst comic in existence no matter how Larry Garfield feels about it !

greetz,

boro

tedd schreef:
Hi gang:

In the long winded debate over copyright infringement vs thievery, I made an unkind and untrue inference re Larry Garfield.

So, as a matter of public apology, I hereby apologize to Larry publicly for my heated remark. I'm sorry Larry.

As a point of notice, Larry has graciously accepted my apology off-list.

I consider the matter settled unless someone wants to argue about my apology. :-)

Cheers,

tedd

--- End Message ---
--- Begin Message ---
On 8/7/07, tedd <[EMAIL PROTECTED]> wrote:
> Hi gang:
There should be a comma prior to the addressee(s).

>
> In the long winded debate over copyright infringement vs thievery, I
> made an unkind and untrue inference re Larry Garfield.
You forgot to hyphenate "long-winded"; "Copyright" is a title and
should thus be capitalized; "vs" is not a word, but rather an
abbreviation of the word "versus", and as such it should be marked as
"vs."; see the previous statement about the usage of abbreviations and
apply to "re".

>
> So, as a matter of public apology, I hereby apologize to Larry
> publicly for my heated remark. I'm sorry Larry.
Who is "Larry publicly"?  Not only is this sentence redundant, but it
should be reworded to note that you "hereby publicly apologize to
Larry for...."

    Bah.... just busting your balls anyway, old man!  ;-P

-- 
Daniel P. Brown
[office] (570-) 587-7080 Ext. 272
[mobile] (570-) 766-8107

Hey, PHP-General list.... to give something back to everyone, you guys
can have 50% off every month on hosting plans of $10/mo. or more (list
price) at http://www.pilotpig.net/.
Use the coupon code phpgeneralaug07

--- End Message ---
--- Begin Message ---
On Tue, 2007-08-07 at 11:15 -0400, Daniel Brown wrote:
>
>     Bah.... just busting your balls anyway, old man!  ;-P
> 

An ellipsis should be comprised of 3 dots.

:B

Cheers,
Rob.
-- 
...........................................................
SwarmBuy.com - http://www.swarmbuy.com

    Leveraging the buying power of the masses!
...........................................................

--- End Message ---
--- Begin Message ---
On 8/7/07, Robert Cummings <[EMAIL PROTECTED]> wrote:
> On Tue, 2007-08-07 at 11:15 -0400, Daniel Brown wrote:
> >
> >     Bah.... just busting your balls anyway, old man!  ;-P
> >
>
> An ellipsis should be comprised of 3 dots.
>
> :B
>
> Cheers,
> Rob.
> --
> ...........................................................
> SwarmBuy.com - http://www.swarmbuy.com
>
>     Leveraging the buying power of the masses!
> ...........................................................
>

    It wasn't an ellipsis.... it was an indication of a verbal pause.

    (D'oh!)

-- 
Daniel P. Brown
[office] (570-) 587-7080 Ext. 272
[mobile] (570-) 766-8107

Hey, PHP-General list.... to give something back to everyone, you guys
can have 50% off every month on hosting plans of $10/mo. or more (list
price) at http://www.pilotpig.net/.
Use the coupon code phpgeneralaug07

--- End Message ---
--- Begin Message ---
On Tue, 2007-08-07 at 11:28 -0400, Daniel Brown wrote:
> On 8/7/07, Robert Cummings <[EMAIL PROTECTED]> wrote:
> > On Tue, 2007-08-07 at 11:15 -0400, Daniel Brown wrote:
> > >
> > >     Bah.... just busting your balls anyway, old man!  ;-P
> > >
> >
> > An ellipsis should be comprised of 3 dots.
> >
> 
>     It wasn't an ellipsis.... it was an indication of a verbal pause.

I tried Google and couldn't find anything referring to a grammatical
construct called a "verbal pause". Please enlighten me on the subject.

;)

Cheers,
Rob.
-- 
...........................................................
SwarmBuy.com - http://www.swarmbuy.com

    Leveraging the buying power of the masses!
...........................................................

--- End Message ---
--- Begin Message ---
On 8/7/07, Robert Cummings <[EMAIL PROTECTED]> wrote:
> On Tue, 2007-08-07 at 11:28 -0400, Daniel Brown wrote:
> > On 8/7/07, Robert Cummings <[EMAIL PROTECTED]> wrote:
> > > On Tue, 2007-08-07 at 11:15 -0400, Daniel Brown wrote:
> > > >
> > > >     Bah.... just busting your balls anyway, old man!  ;-P
> > > >
> > >
> > > An ellipsis should be comprised of 3 dots.
> > >
> >
> >     It wasn't an ellipsis.... it was an indication of a verbal pause.
>
> I tried Google and couldn't find anything referring to a grammatical
> construct called a "verbal pause". Please enlighten me on the subject.
>
> ;)

    And yet, "bah" is actually defined in the dictionary.  Go figure!


-- 
Daniel P. Brown
[office] (570-) 587-7080 Ext. 272
[mobile] (570-) 766-8107

Hey, PHP-General list.... to give something back to everyone, you guys
can have 50% off every month on hosting plans of $10/mo. or more (list
price) at http://www.pilotpig.net/.
Use the coupon code phpgeneralaug07

--- End Message ---
--- Begin Message ---
A friends asked me the following and I have no clue:

There are variables in php called the super globals. Specifically the
$_SERVER super globals are coming back as an empty array. The shopping
cart that pixami supplied to us requires the $_SERVER super globals.

--- End Message ---
--- Begin Message ---
2007. 08. 7, kedd keltezéssel 11.02-kor Brian Dunning ezt írta:
> A friends asked me the following and I have no clue:
> 
> > There are variables in php called the super globals. Specifically the
> > $_SERVER super globals are coming back as an empty array. The shopping
> > cart that pixami supplied to us requires the $_SERVER super globals.
> 

check out the variables_order ini directive
http://hu2.php.net/manual/en/ini.core.php

hope that helps
Zoltán Németh

--- End Message ---
--- Begin Message --- Yes I am hijacking a thread just to screw with all the people who use threaded e-mail viewers and because I'm mean like that :P

Figured since yall have to much time on your hands anyway I'd give you something else to gripe about... :)

Now... My question :)

<?php
$mysqli = new mysqli("localhost", "user", "password", "database");

/* check connection */
if (mysqli_connect_errno()) {
    printf("Connect failed: %s\n", mysqli_connect_error());
    exit();
}

printf("Host information: %s\n", $mysqli->host_info);

/* close connection */
$mysqli->close();
?>

[Tue Aug 7 11:19:20 2007] [error] PHP Fatal error: Trying to clone an uncloneable object of class mysqli in /Volumes/RAIDer/webserver/ Documents/tests/legion/mysqli.php on line 2


What is wrong with line 2? The login info is correct since I use it to connect with the old mysql_connect stuff and it works just fine... What am I missing?
--- End Message ---
--- Begin Message ---
Jason Pruim wrote:
Yes I am hijacking a thread just to screw with all the people who use threaded e-mail viewers and because I'm mean like that :P

Figured since yall have to much time on your hands anyway I'd give you something else to gripe about... :)

Now... My question :)

<?php
$mysqli = new mysqli("localhost", "user", "password", "database");

/* check connection */
if (mysqli_connect_errno()) {
    printf("Connect failed: %s\n", mysqli_connect_error());
    exit();
}

printf("Host information: %s\n", $mysqli->host_info);

/* close connection */
$mysqli->close();
?>

[Tue Aug 7 11:19:20 2007] [error] PHP Fatal error: Trying to clone an uncloneable object of class mysqli in /Volumes/RAIDer/webserver/Documents/tests/legion/mysqli.php on line 2


What is wrong with line 2? The login info is correct since I use it to connect with the old mysql_connect stuff and it works just fine... What am I missing?

Are you trying to use mysqli with PHP4? Either way you can probably get rid of the error by putting an & between the = and the new.

-Stut

--
http://stut.net/

--- End Message ---
--- Begin Message ---
On 8/7/07, Jason Pruim <[EMAIL PROTECTED]> wrote:
> Yes I am hijacking a thread just to screw with all the people who use
> threaded e-mail viewers and because I'm mean like that :P
>
> Figured since yall have to much time on your hands anyway I'd give
> you something else to gripe about... :)
>
> Now... My question :)
>
> <?php
> $mysqli = new mysqli("localhost", "user", "password", "database");
>
> /* check connection */
> if (mysqli_connect_errno()) {
>      printf("Connect failed: %s\n", mysqli_connect_error());
>      exit();
> }
>
> printf("Host information: %s\n", $mysqli->host_info);
>
> /* close connection */
> $mysqli->close();
> ?>
>
> [Tue Aug  7 11:19:20 2007] [error] PHP Fatal error:  Trying to clone
> an uncloneable object of class mysqli in /Volumes/RAIDer/webserver/
> Documents/tests/legion/mysqli.php on line 2
>
>
> What is wrong with line 2? The login info is correct since I use it
> to connect with the old mysql_connect stuff and it works just fine...
> What am I missing?
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

    As far as I know, J (and I could be wrong on this), this is
actually a problem with PHP5.  Some things that you could try,
however:

    In your php.ini file, set:
        zend.ze1_compatibility_mode = Off

    Check your MySQL configuration file (mysql.cnf, my.cnf, etc.) and
use the socket specified there. By default, mysqli will attempt to
connect through /tmp/mysql.sock. If your socket path is not
/tmp/mysql.sock, the connection will fail.


-- 
Daniel P. Brown
[office] (570-) 587-7080 Ext. 272
[mobile] (570-) 766-8107

Hey, PHP-General list.... to give something back to everyone, you guys
can have 50% off every month on hosting plans of $10/mo. or more (list
price) at http://www.pilotpig.net/.
Use the coupon code phpgeneralaug07

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

I suspect that you need to assign the new instance of mysqli to $mysqli
by reference to prevent the on-demand instance that is created by new
from being copied (cloned) at the point of assignment.

Mark

Jason Pruim wrote:
> Yes I am hijacking a thread just to screw with all the people who use
> threaded e-mail viewers and because I'm mean like that :P
>
> Figured since yall have to much time on your hands anyway I'd give you
> something else to gripe about... :)
>
> Now... My question :)
>
> <?php
> $mysqli = new mysqli("localhost", "user", "password", "database");
>
> /* check connection */
> if (mysqli_connect_errno()) {
>     printf("Connect failed: %s\n", mysqli_connect_error());
>     exit();
> }
>
> printf("Host information: %s\n", $mysqli->host_info);
>
> /* close connection */
> $mysqli->close();
> ?>
>
> [Tue Aug  7 11:19:20 2007] [error] PHP Fatal error:  Trying to clone
> an uncloneable object of class mysqli in
> /Volumes/RAIDer/webserver/Documents/tests/legion/mysqli.php on line 2
>
>
> What is wrong with line 2? The login info is correct since I use it to
> connect with the old mysql_connect stuff and it works just fine...
> What am I missing?
>
> --PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

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

On Aug 7, 2007, at 11:46 AM, Daniel Brown wrote:


    As far as I know, J (and I could be wrong on this), this is
actually a problem with PHP5.  Some things that you could try,
however:

    In your php.ini file, set:
        zend.ze1_compatibility_mode = Off

Hey Dan,

That did the trick on the connection problem, now I can connect! :)

But in true fashion, one bug fix leads to another bug...

while($row = mysqli_query($link, "SELECT * FROM current WHERE record='$Record'")) {


[Tue Aug 7 13:38:49 2007] [error] PHP Warning: mysqli_query() [<a href='function.mysqli-query'>function.mysqli-query</a>]: Couldn't fetch mysqli in /Volumes/RAIDer/webserver/Documents/tests/legion/ edit.php on line 12


I have tried all kinds of combinations to use that to display a single record from the database. Nothing is working. I could do this easily with the regular mysql... But I want to use a prepared statement for inserting into the database, and my understanding is I can't use prepared statements in the old mysql... Is that the case?

Anyone have any ideas? I'm drawing a blank... Even having issues with the stuff copied off the php website not working right....


--

Jason Pruim
Raoset Inc.
Technology Manager
MQC Specialist
3251 132nd ave
Holland, MI, 49424
www.raoset.com
[EMAIL PROTECTED]

--- End Message ---

Reply via email to