RE: [PHP] killing a process through php webservice

2008-02-07 Thread Per Jessen
Andrés Robinet wrote: > 2 - Write or find a daemon capable of doing what you are trying to do > (execute commands on demand) but using some authentication model, so > that you can communicate with the daemon using a local socket (and > don't open the backdoor through TCP/IP). I don't have any clue

RE: [PHP] killing a process through php webservice

2008-02-07 Thread Andrés Robinet
> -Original Message- > From: Chris [mailto:[EMAIL PROTECTED] > Sent: Friday, February 08, 2008 12:04 AM > To: Fahad javed > Cc: php-general@lists.php.net > Subject: Re: [PHP] killing a process through php webservice > > Fahad javed wrote: > > I am developing a webservice in PHP/Linux where

Re: [PHP] killing a process through php webservice

2008-02-07 Thread Chris
Fahad javed wrote: I am developing a webservice in PHP/Linux where I need to kill a process. I tried using exec("kill ".$pid); and exec("kill -KILL ".$pid); but the return value was always 1 and the process still remained. I wrote up a small shell script and have exec run that script. The scri

Re: [PHP] killing a process through php webservice

2008-02-07 Thread Paul Scott
On Fri, 2008-02-08 at 09:56 +0500, Fahad javed wrote: > I still think the problem is access rights. question is how to solve it. > > Any help will be greatly appreciated. > Yes it is access rights. You will probably have to add PHP to the root or wheel group as a user or something insane like t

[PHP] killing a process through php webservice

2008-02-07 Thread Fahad javed
I am developing a webservice in PHP/Linux where I need to kill a process. I tried using exec("kill ".$pid); and exec("kill -KILL ".$pid); but the return value was always 1 and the process still remained. I wrote up a small shell script and have exec run that script. The script worked fine if inv

RE: [PHP] PHP Source code protection

2008-02-07 Thread Andrés Robinet
> -Original Message- > From: Daniel Brown [mailto:[EMAIL PROTECTED] > Sent: Thursday, February 07, 2008 7:10 PM > To: Greg Donald > Cc: php-general@lists.php.net > Subject: Re: [PHP] PHP Source code protection > > On Feb 7, 2008 6:20 PM, Greg Donald <[EMAIL PROTECTED]> wrote: > > On 2/7/08

Re: [PHP] Profiling with register_tick_function / declare

2008-02-07 Thread Daniel Brown
On Feb 7, 2008 7:10 PM, Jochem Maas <[EMAIL PROTECTED]> wrote: > McNaught, Scott schreef: > > . Get profile results for novices without having to mess around > > installing php binaries such as APD / zend debugger etc > > I suppose that includes xdebug? If xdebug works as a local binar

Re: [PHP] How to parse this kind of XML

2008-02-07 Thread Nathan Nobbe
On Feb 7, 2008 6:51 PM, Daniel Brown <[EMAIL PROTECTED]> wrote: >I'm sure you're already aware of it, and that it's just a typo in > the email, but there's a space between the lt carat and the > event:sessionType node declaration. > that screwed me the last time i was posting on a simplexml n

Re: [PHP] Profiling with register_tick_function / declare

2008-02-07 Thread Jochem Maas
McNaught, Scott schreef: Hi there, Is it possible to make the declare(ticks=1) statement apply to *all* functions executed in a php script, regardless of scope? is the declare() pragma not a file scope wotsit? i.e. you'd have to do declare(ticks=1); at the top of each file. ... .

Re: [PHP] PHP Source code protection

2008-02-07 Thread Daniel Brown
On Feb 7, 2008 6:20 PM, Greg Donald <[EMAIL PROTECTED]> wrote: > On 2/7/08, Daniel Brown <[EMAIL PROTECTED]> wrote: > > Actually, Greg, I respectfully disagree. First, just because > > there may be ways to reverse-engineer things doesn't mean it's a bad > > idea to attempt to protect your code

Re: [PHP] urgently help required in integration of PHP and Geronimo

2008-02-07 Thread Chris
Fatal error: Call to undefined function mb_language() in /usr/puneet/geronimo-tomcat6-jee5-2.0.2/repository/default/collabo_gero/1202406746983/collabo_gero-1202406746983.war/sns/config.php on line 403 You need to add multibyte support to your php setup. http://www.php.net/manual/en/ref.mbstr

Re: [PHP] How to parse this kind of XML

2008-02-07 Thread Daniel Brown
On Feb 7, 2008 6:17 PM, VamVan <[EMAIL PROTECTED]> wrote: > Hi, > > How can I parse this kind of XML data? > > > > > < event:sessionType>9 > > marketingprograms > > 05/22/2008 09:00:00 > > 05/22/2008 10:00:00 > > 4 > > 60 > > > I am using SimpleXMLElement function but some cannot re

Re: [PHP] How to parse this kind of XML

2008-02-07 Thread VamVan
I cannot manipulate the response. this is the response I get from the web services. is there any other way to do it? On Feb 7, 2008 3:41 PM, Nathan Nobbe <[EMAIL PROTECTED]> wrote: > > On Feb 7, 2008 6:17 PM, VamVan <[EMAIL PROTECTED]> wrote: > > > > Hi, > > > > How can I parse this kind of XML da

Re: [PHP] How to parse this kind of XML

2008-02-07 Thread Nathan Nobbe
On Feb 7, 2008 6:17 PM, VamVan <[EMAIL PROTECTED]> wrote: > Hi, > > How can I parse this kind of XML data? > > > > > < event:sessionType>9 > > marketingprograms > > 05/22/2008 09:00:00 > > 05/22/2008 10:00:00 > > 4 > > 60 > > > I am using SimpleXMLElement function but some cannot retrieve

Re: [PHP] PHP Source code protection

2008-02-07 Thread Greg Donald
On 2/7/08, Daniel Brown <[EMAIL PROTECTED]> wrote: > Actually, Greg, I respectfully disagree. First, just because > there may be ways to reverse-engineer things doesn't mean it's a bad > idea to attempt to protect your code against such. Why would you encode to start with? The only reason I

[PHP] How to parse this kind of XML

2008-02-07 Thread VamVan
Hi, How can I parse this kind of XML data? < event:sessionType>9 marketingprograms 05/22/2008 09:00:00 05/22/2008 10:00:00 4 60 I am using SimpleXMLElement function but some cannot retrieve the nodes like timeZoneID for example Thanks -- PHP General Mailing List (http:/

Re: [PHP] date() and wrong timezone (or time)

2008-02-07 Thread Jochem Maas
Daniel Brown schreef: On Feb 7, 2008 8:34 AM, Jochem Maas <[EMAIL PROTECTED]> wrote: Martin Marques schreef: see what you have as the value for the date.timezone ini setting. I've already checked that, and it's not set. it should be set to something, so fix that. All other points being

Re: [PHP] Recommended ORM for PHP

2008-02-07 Thread Greg Donald
On 2/6/08, Nathan Nobbe <[EMAIL PROTECTED]> wrote: > ruby on rails as one of these obfusticators of fowlers original pattern; I don't see how code generation could ever be worse (slower) than runtime analysis. Sure you have to hit the database once to know what the fields are, but after that your

Re: [PHP] Re: Recommended ORM for PHP

2008-02-07 Thread Manuel Lemos
Hello, on 02/07/2008 01:52 PM Nathan Nobbe said the following: >> What happens is that Propel relies on fat base classes that the >> generated persistent object classes need to inherit to do the actual >> Object-relational mapping. > > this is so that there is a customizable layer that will not b

Re: [PHP] PHP Source code protection

2008-02-07 Thread Daniel Brown
On Feb 7, 2008 4:56 PM, Greg Donald <[EMAIL PROTECTED]> wrote: > On 2/7/08, Richard Heyes <[EMAIL PROTECTED]> wrote: > > > http://www.phprecovery.com/ > > > > Pointless? I think it is exactly the answer to the original persons > > question. > > Yup, it's the exact correct answer, to a pointless que

Re: [PHP] PHP program to download sites

2008-02-07 Thread Greg Donald
On 2/6/08, Leonard Burton <[EMAIL PROTECTED]> wrote: > Is there an OS program that will take a url and crawl/cache all the links on > it? `wget -m -np http://example.com` will mirror the url and anything under it. That's '-m' for mirror, and '-np' for no parent.. so you don't download the whole

Re: [PHP] PHP Source code protection

2008-02-07 Thread Greg Donald
On 2/7/08, Richard Heyes <[EMAIL PROTECTED]> wrote: > > http://www.phprecovery.com/ > > Pointless? I think it is exactly the answer to the original persons > question. Yup, it's the exact correct answer, to a pointless question. Even Zend knows it's pointless to encode PHP. When you type "decode

RE: [PHP] Re: Profiling with register_tick_function / declare

2008-02-07 Thread McNaught, Scott
Right I understand the problem I have been experiencing now. 1) Functions that return something do not work 2) APC and ticks do not mix - I needed to restart the web server to get it to work If you have apc installed, try making changes to your src. Ie - adding new calls to different functions. T

Re: [PHP] Re: Profiling with register_tick_function / declare

2008-02-07 Thread Shawn McKenzie
McNaught, Scott wrote: > Hi Shawn, > > Thanks for the reply. I am using php5+ only, so I'm quite sure that passing > the object by reference like that is done automatically. > > Aren't all objects are automatically passed by reference in php5, so > therefore & is deprecated? I tested your sugge

Re: [PHP] Re: Profiling with register_tick_function / declare

2008-02-07 Thread Shawn McKenzie
McNaught, Scott wrote: > Hi Shawn, > > Thanks for the reply. I am using php5+ only, so I'm quite sure that passing > the object by reference like that is done automatically. > > Aren't all objects are automatically passed by reference in php5, so > therefore & is deprecated? I tested your sugge

Re: [PHP] re: php file extension

2008-02-07 Thread Jason Pruim
Hi MaryAnn I would recommend if you are going to be sending these files out to be used on a server other then you own, such as a clients server, leave the file as .php other wise the system admin for the client server will have to reconfigure the server to also parse .php4 files. But, if

Re: [PHP] re: php file extension

2008-02-07 Thread Andrew Ballard
On Feb 7, 2008 2:49 PM, MaryAnn Woodall <[EMAIL PROTECTED]> wrote: > Just starting to use php on my webpages. If I save a file as .php > or .php4 are they the same file. For example is index.php the same as > index.php4? > > MaryAnn > No, they have different name and are different files. It would

[PHP] Re: php file extension

2008-02-07 Thread Shawn McKenzie
MaryAnn Woodall wrote: > Just starting to use php on my webpages. If I save a file as .php or > .php4 are they the same file. For example is index.php the same as > index.php4? > > MaryAnn Depends upon what your server is set to parse as PHP. AFAIK, the only portable extension would be .php. -

RE: [PHP] Re: Profiling with register_tick_function / declare

2008-02-07 Thread McNaught, Scott
Hi Shawn, Thanks for the reply. I am using php5+ only, so I'm quite sure that passing the object by reference like that is done automatically. Aren't all objects are automatically passed by reference in php5, so therefore & is deprecated? I tested your suggestion anyway, and it appeared to make

[PHP] re: php file extension

2008-02-07 Thread MaryAnn Woodall
Just starting to use php on my webpages. If I save a file as .php or .php4 are they the same file. For example is index.php the same as index.php4? MaryAnn -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Profiling with register_tick_function / declare

2008-02-07 Thread Shawn McKenzie
McNaught, Scott wrote: > Hi there, > > > > Is it possible to make the declare(ticks=1) statement apply to *all* > functions executed in a php script, regardless of scope? > > > > I wish to write a profiler script to basically dump all the function call > times through the execution of a scr

[PHP] urgently help required in integration of PHP and Geronimo

2008-02-07 Thread puneetjain
Hi, I am facing problem in integration of PHP with Geronimo. Environment: PHP 5.2.5 OS: Redhat Enterprise Linux 3.6.9 Geromino version geronimo-tomcat6-jee5-2.0.2\ JDK 1.6/1.5 Step Performed: == I have tried JavaBridge available on the sourgeforge. It working find for normal

[PHP] Profiling with register_tick_function / declare

2008-02-07 Thread McNaught, Scott
Hi there, Is it possible to make the declare(ticks=1) statement apply to *all* functions executed in a php script, regardless of scope? I wish to write a profiler script to basically dump all the function call times through the execution of a script. So far, I can only get it to work for f

Re: [PHP] Directory

2008-02-07 Thread Jim Lucas
Steve Marquez wrote: Greetings, Could someone please point me in the right direction? Turn left at the next light... I am trying to have PHP find out if a directory has files in it and then if it does, display Display what? The directory name, or the list of files? and include, What

Re: [PHP] PHP Source code protection

2008-02-07 Thread Casey
On Feb 7, 2008 1:50 AM, Richard Heyes <[EMAIL PROTECTED]> wrote: > Greg Donald wrote: > > On 2/6/08, Richard Heyes <[EMAIL PROTECTED]> wrote: > >> There's the Zend Encoder at www.zend.com. Though it may be called > >> something else now. > > > > Pointless. > > > > http://www.phprecovery.com/ > > Po

Re: [PHP] Directory

2008-02-07 Thread Paul Scott
On Thu, 2008-02-07 at 12:30 -0600, Steve Marquez wrote: > Could someone please point me in the right direction? I am trying to have > PHP find out if a directory has files in it and then if it does, display and > include, if it does not, then not display the include. oooh, goodie! You get to play

[PHP] Directory

2008-02-07 Thread Steve Marquez
Greetings, Could someone please point me in the right direction? I am trying to have PHP find out if a directory has files in it and then if it does, display and include, if it does not, then not display the include. I have looked at the Manual and did not really know where to look. Thanks, --

Re: [PHP] Multiple MySQL INSERT into loop

2008-02-07 Thread Jim Lucas
Rob G wrote: I'm working on this, and am not sure how the variable syntax needs to be here. This is what I have done manually. //BEGIN EXAMPLE mysql_query ("INSERT INTO testimonials (id, quote, name) VALUES ('$id_1', '$entry_1', '$name_1')"); mysql_query ("INSERT INTO testimonials (id, quote,

RE: [PHP] PHP/mySQL question about groups

2008-02-07 Thread Warren Vail
You are correct, but that is what I meant by all columns (all those in the query, and therefore subject to the distinct). At this point different database engines work differently, without an order by, some will use the primary sequence, some will scan table space (in other words, without an ord

Re: [PHP] date() and wrong timezone (or time)

2008-02-07 Thread Eric Butera
On Feb 6, 2008 6:13 AM, Martin Marques <[EMAIL PROTECTED]> wrote: > I got an update from tzdata on a Debian server due to a daylight saving > change here in Argentina. > > The problem is that, even when the system sees the correct time, php > keeps giving me the *old* hour. > > $ date > mié feb 6

Re: [PHP] problem with imagefontwidth function, It looks to be unavailable...

2008-02-07 Thread David Giragosian
On 2/7/08, Daniel Brown <[EMAIL PROTECTED]> wrote: > > On Feb 7, 2008 8:23 AM, Jochem Maas <[EMAIL PROTECTED]> wrote: > > Legolas wood schreef: > > > Hi > > > Thank you for reading my post > > > I am trying to run a php based application using php5 and apache. > > > but I receive an error like: > >

Re: [PHP] PHP setup

2008-02-07 Thread Robert Cummings
On Thu, 2008-02-07 at 09:52 -0500, Nathan Nobbe wrote: > On Feb 7, 2008 8:47 AM, Dare Williams <[EMAIL PROTECTED]> wrote: > > > WAMP means WINDOWS(os) - APACHE(webserver) - MYSQL(db) - PHP(platform). > > > you know if youre running iis and mysql or mssql, its actually called the > WIMP stack ;)

Re: [PHP] Re: Recommended ORM for PHP

2008-02-07 Thread Manuel Lemos
Hello on 02/07/2008 07:26 AM Zoltán Németh said the following: >>> When creating a LAMP app, I always start by writing ORM myself. >>> It's fun but it usually takes a long time. >>> Besides, that always results in a toy-system, >>> I mean, that has not so many features, not so efficient non-bug-f

Re: [PHP] Re: Recommended ORM for PHP

2008-02-07 Thread Nathan Nobbe
On Feb 7, 2008 10:15 AM, Manuel Lemos <[EMAIL PROTECTED]> wrote: > What happens is that Propel relies on fat base classes that the > generated persistent object classes need to inherit to do the actual > Object-relational mapping. this is so that there is a customizable layer that will not be im

Re: [PHP] shopping carts

2008-02-07 Thread Eric Butera
On Feb 7, 2008 9:59 AM, Nathan Nobbe <[EMAIL PROTECTED]> wrote: > On Feb 7, 2008 9:24 AM, Eric Butera <[EMAIL PROTECTED]> wrote: > > > While I agree that if the end user doesn't get it, then you don't get > > paid... but quality matters if you have to extend/maintain/secure it. > > Well, I guess no

Re: [PHP] date() and wrong timezone (or time)

2008-02-07 Thread David Giragosian
On 2/7/08, Daniel Brown <[EMAIL PROTECTED]> wrote: > > On Feb 7, 2008 8:34 AM, Jochem Maas <[EMAIL PROTECTED]> wrote: > > Martin Marques schreef: > > >> see what you have as the value for the date.timezone ini setting. > > > > > > I've already checked that, and it's not set. > > > > it should be se

Re: [PHP] shopping carts

2008-02-07 Thread Eric Butera
On Feb 7, 2008 10:04 AM, Daniel Brown <[EMAIL PROTECTED]> wrote: > Hey, I helped work on that, you bastard! ;-P Congratulations. :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] problem with imagefontwidth function, It looks to be unavailable...

2008-02-07 Thread Daniel Brown
On Feb 7, 2008 8:23 AM, Jochem Maas <[EMAIL PROTECTED]> wrote: > Legolas wood schreef: > > Hi > > Thank you for reading my post > > I am trying to run a php based application using php5 and apache. > > but I receive an error like: > > > > > > *Fatal error*: Call to undefined function imagefontwidt

Re: [PHP] PHP/mySQL question about groups

2008-02-07 Thread Andrew Ballard
On Feb 7, 2008 1:20 AM, Warren Vail <[EMAIL PROTECTED]> wrote: > I did some looking into performance issues many years ago at company that > developed and marketed another database server, comparing the query plan to > the actual code, and a query plan usually shows the processes that consume > the

Re: [PHP] date() and wrong timezone (or time)

2008-02-07 Thread Daniel Brown
On Feb 7, 2008 8:34 AM, Jochem Maas <[EMAIL PROTECTED]> wrote: > Martin Marques schreef: > >> see what you have as the value for the date.timezone ini setting. > > > > I've already checked that, and it's not set. > > it should be set to something, so fix that. All other points being valid, Joc

Re: [PHP] shopping carts

2008-02-07 Thread Daniel Brown
On Feb 7, 2008 9:24 AM, Eric Butera <[EMAIL PROTECTED]> wrote: > > > I might have put my foot in my mouth, but probably not. I've used it > > > a few years ago and it was just a horrible mess of code. All the > > > end-user interfaces were pretty nasty too. At the end of the day > > > though it

Re: [PHP] shopping carts

2008-02-07 Thread Nathan Nobbe
On Feb 7, 2008 9:24 AM, Eric Butera <[EMAIL PROTECTED]> wrote: > While I agree that if the end user doesn't get it, then you don't get > paid... but quality matters if you have to extend/maintain/secure it. > Well, I guess not. Look at how wildly popular MySpace is. im guessing most people who

Re: [PHP] PHP setup

2008-02-07 Thread Daniel Brown
2008/2/7 Louie Henry <[EMAIL PROTECTED]>: > Good Day All What's up, Louie? > I am running windows xp pro and using built in IIS as my web-server. And I > installed PHP 5.2.5. I also installed MySQL 5.0.37. Now PHP is working, how > ever I having problems with the configuration with MySQL. [

Re: [PHP] PHP setup

2008-02-07 Thread Nathan Nobbe
On Feb 7, 2008 8:47 AM, Dare Williams <[EMAIL PROTECTED]> wrote: > WAMP means WINDOWS(os) - APACHE(webserver) - MYSQL(db) - PHP(platform). you know if youre running iis and mysql or mssql, its actually called the WIMP stack ;) -nathan

Re: [PHP] shopping carts

2008-02-07 Thread Eric Butera
On Feb 7, 2008 9:11 AM, Jason Pruim <[EMAIL PROTECTED]> wrote: > > > On Feb 7, 2008, at 9:01 AM, Eric Butera wrote: > > > On Feb 6, 2008 7:28 PM, Jason Pruim <[EMAIL PROTECTED]> wrote: > >> > >> > >> On Feb 6, 2008, at 5:56 PM, Eric Butera wrote: > >> > >>> On Feb 6, 2008 4:18 PM, nihilism machine

Re: [PHP] date() and wrong timezone (or time)

2008-02-07 Thread Martin Marques
Jochem Maas escribió: Martin Marques schreef: Nathan Nobbe escribió: On Feb 6, 2008 6:13 AM, Martin Marques <[EMAIL PROTECTED]> wrote: I got an update from tzdata on a Debian server due to a daylight saving change here in Argentina. I doubt that debian stable is pushing newer versions of T

Re: [PHP] shopping carts

2008-02-07 Thread Jason Pruim
On Feb 7, 2008, at 9:01 AM, Eric Butera wrote: On Feb 6, 2008 7:28 PM, Jason Pruim <[EMAIL PROTECTED]> wrote: On Feb 6, 2008, at 5:56 PM, Eric Butera wrote: On Feb 6, 2008 4:18 PM, nihilism machine <[EMAIL PROTECTED]> wrote: Does anyone know of a shopping cart which allows you to add mul

Re: [PHP] shopping carts

2008-02-07 Thread Eric Butera
On Feb 6, 2008 7:28 PM, Jason Pruim <[EMAIL PROTECTED]> wrote: > > > On Feb 6, 2008, at 5:56 PM, Eric Butera wrote: > > > On Feb 6, 2008 4:18 PM, nihilism machine <[EMAIL PROTECTED]> > > wrote: > >> Does anyone know of a shopping cart which allows you to add multiple > >> custom fields to each prod

Re: [PHP] PHP setup

2008-02-07 Thread Dare Williams
To solve this problem, I will advice you to probably remove all the former installation. Because PHP do have problem relating to IIS several times. so it better you install complete pack of PHP Application. You can use a PHP Application call WAMP SERVER. It's good PHP Application for depl

[PHP] Re: Schedule tasks from server

2008-02-07 Thread David Robley
Pieter du Toit wrote: > Hi people > > Is there a way that i can schedule tasks on my webserver that will > automatically fire on a certain time and date, without anyone visiting the > website? > > This domain is hosted by a ISP and not by me. > > Thanks If you don't need close granularity in t

Re: [PHP] date() and wrong timezone (or time)

2008-02-07 Thread Jochem Maas
Martin Marques schreef: Nathan Nobbe escribió: On Feb 6, 2008 6:13 AM, Martin Marques <[EMAIL PROTECTED]> wrote: I got an update from tzdata on a Debian server due to a daylight saving change here in Argentina. I doubt that debian stable is pushing newer versions of TZ db, than that found

Re: [PHP] problem with imagefontwidth function, It looks to be unavailable...

2008-02-07 Thread Jochem Maas
Legolas wood schreef: Hi Thank you for reading my post I am trying to run a php based application using php5 and apache. but I receive an error like: *Fatal error*: Call to undefined function imagefontwidth() in */var/www/v603/includes/functions.php* on line *28* that would tend to indicate

[PHP] problem with imagefontwidth function, It looks to be unavailable...

2008-02-07 Thread Legolas wood
Hi Thank you for reading my post I am trying to run a php based application using php5 and apache. but I receive an error like: *Fatal error*: Call to undefined function imagefontwidth() in */var/www/v603/includes/functions.php* on line *28* when line 28 and its surrounding lines are: ## cre

Re: [PHP] PHP setup

2008-02-07 Thread Jochem Maas
Louie Henry schreef: Good Day All I am running windows xp pro and using built in IIS as my web-server. And I installed PHP 5.2.5. I also installed MySQL 5.0.37. Now PHP is working, how ever I having problems with the configuration with MySQL. I used phpinfo(), and I notice this doc_ro

[PHP] PHP setup

2008-02-07 Thread Louie Henry
Good Day All I am running windows xp pro and using built in IIS as my web-server. And I installed PHP 5.2.5. I also installed MySQL 5.0.37. Now PHP is working, how ever I having problems with the configuration with MySQL. I used phpinfo(), and I notice this doc_root no value

Re: [PHP] Re: Multiple MySQL INSERT into loop

2008-02-07 Thread Paul Scott
On Thu, 2008-02-07 at 10:55 +, Colin Guthrie wrote: > Simplest way would be to define your data in an array instead: > > e.g. $data = array(1 => array('id' => x, 'entry' => y, 'name' => z), ...). > And of course to tie it all into a transaction that can be rolled back in case of problems.

[PHP] Re: Multiple MySQL INSERT into loop

2008-02-07 Thread Colin Guthrie
Rob G wrote: > //BEGIN EXAMPLE > > > > mysql_query ("INSERT INTO testimonials (id, quote, name) VALUES ('$id_1', > '$entry_1', '$name_1')"); > > > > mysql_query ("INSERT INTO testimonials (id, quote, name) VALUES ('$id_2', > '$entry_2', '$name_2')"); > > > > mysql_query ("INSERT INTO te

Re: [PHP] Exception handling in PHP

2008-02-07 Thread Richard Heyes
// ... That's from memory, so there may be a few errors. Seems there was. Try this: class DBException extends Exception {} try { $connection = mysql_connect(...); if (!$connection) { throw new DBException('Failed to connect to database'); } // Database exception handling

Re: [PHP] Exception handling in PHP

2008-02-07 Thread Richard Heyes
Does that mean for every exception do we have to write our custom exception and describe it from our own message If you mean "Do I have to write custom exception classes?", the no. You could just use the PHP Exception class. Eg. class DBException extends Exception {} try { $connection =

Re: [PHP] Passing object reference to session

2008-02-07 Thread Jochem Maas
Michael Moyle schreef: Jochem, On Thu, 2008-02-07 at 09:11 +0100, Jochem Maas wrote: Michael Moyle schreef: Hi, I am new to the list and have a question that inspired me to join the list as I can not find any answer online. When a object reference is passed to the $_SESSION array what happen

Re: [PHP] PHP Source code protection

2008-02-07 Thread Richard Heyes
Greg Donald wrote: On 2/6/08, Richard Heyes <[EMAIL PROTECTED]> wrote: There's the Zend Encoder at www.zend.com. Though it may be called something else now. Pointless. http://www.phprecovery.com/ Pointless? I think it is exactly the answer to the original persons question. -- Richard Hey

Re: [PHP] PHP Source code protection

2008-02-07 Thread Per Jessen
Richard Lynch wrote: > After you get your PHP code all worked out, re-write it as a custom > PHP extension -- or even just the core of it, and send them a .so or > .dll to install. Interesting option. Does require more effort, but if you rewrite the whole thing in C, you might gain some performa

Re: [PHP] PHP Source code protection

2008-02-07 Thread Per Jessen
John Taylor-Johnston wrote: > I'm not sure where PHP stands on this politically. But I believe in > Open Source, which allows you to encode your code. But why? At heart > I'm a purist GNU. Stallman was right when he first tried to fix a > faulty printer. I too believe in Open Source, but there ar

Re: [PHP] Re: Recommended ORM for PHP

2008-02-07 Thread Zoltán Németh
2008. 02. 6, szerda keltezéssel 18.50-kor Manuel Lemos ezt írta: > on 02/06/2008 11:10 AM js said the following: > > Hi list, > > > > When creating a LAMP app, I always start by writing ORM myself. > > It's fun but it usually takes a long time. > > Besides, that always results in a toy-system, >

Re: [PHP] Passing object reference to session

2008-02-07 Thread Michael Moyle
Jochem, On Thu, 2008-02-07 at 09:11 +0100, Jochem Maas wrote: > Michael Moyle schreef: > > Hi, > > > > I am new to the list and have a question that inspired me to join the > > list as I can not find any answer online. > > > > When a object reference is passed to the $_SESSION array what happens

Re: [PHP] Exception handling in PHP

2008-02-07 Thread Paul Scott
On Thu, 2008-02-07 at 00:20 -0800, Prabath Kumarasinghe wrote: > Understood, Thanks Paul > Pleasure, but please don't top post, it makes it really hard to follow a thread easily. Most people on this list take time out from their really busy day jobs to help out, and the more time that everyone

Re: [PHP] Exception handling in PHP

2008-02-07 Thread Prabath Kumarasinghe
Understood, Thanks Paul Cheers Prabath --- Paul Scott <[EMAIL PROTECTED]> wrote: > > On Wed, 2008-02-06 at 23:37 -0800, Prabath > Kumarasinghe wrote: > > Does that mean for every exception do we have to > write > > our custom exception and describe it from our own > > message > > > > No, it me

Re: [PHP] Passing object reference to session

2008-02-07 Thread Jochem Maas
Michael Moyle schreef: Hi, I am new to the list and have a question that inspired me to join the list as I can not find any answer online. When a object reference is passed to the $_SESSION array what happens to let's assume php5. all objects are reference like, they behave from a user POV as

Re: [PHP] Exception handling in PHP

2008-02-07 Thread Paul Scott
On Wed, 2008-02-06 at 23:37 -0800, Prabath Kumarasinghe wrote: > Does that mean for every exception do we have to write > our custom exception and describe it from our own > message > No, it means that when you want to throw a meaningful exception, you need to type in a message. I mentioned cust