Re: [PHP] Configuring interfaces through php

2008-12-23 Thread Nathan Nobbe
On Wed, Dec 24, 2008 at 12:36 AM, Heysem Kaya wrote: > Hi Nathan, > > Thanks for your response. Is there such a way to reconfigure the interface > IP,dns and gateway as well? > please keep responses on-list, so that others may benefit. yes, you can do anything (almost?) you can on the cli w/ t

Re: [PHP] MERRY XMAS

2008-12-23 Thread Nathan Nobbe
On Tue, Dec 23, 2008 at 8:59 PM, German Geek wrote: > Merry xmas to everyone! Thanks for the support and fun discussions. word

Re: [PHP] Re: Segmentation fault in php5-imap

2008-12-23 Thread Nathan Nobbe
On Tue, Dec 23, 2008 at 5:30 PM, Dan Osipov wrote: > Script takes about 5 minutes to run (average). On other servers I've seen > it run over 2 hours without segfaults... All depends on how many messages > are in the NNTP mailboxes. ok, so this is def a long running script then. After applying

[PHP] MERRY XMAS

2008-12-23 Thread German Geek
Merry xmas to everyone! Thanks for the support and fun discussions. Regards, Tim Tim-Hinnerk Heuer http://www.ihostnz.com

[PHP] Re: Segmentation fault in php5-imap

2008-12-23 Thread Dan Osipov
Script takes about 5 minutes to run (average). On other servers I've seen it run over 2 hours without segfaults... All depends on how many messages are in the NNTP mailboxes. After applying the mentioned patch to libc-client2002edebian the issue persisted. No change... I'm not running xdebug

[PHP] Re: Assignment (Was Re: [PHP] More microptimisation (Was Re: [PHP] Variable as an index)

2008-12-23 Thread Clancy
On Tue, 23 Dec 2008 10:25:13 -0500, tedd.sperl...@gmail.com (tedd) wrote: >At 9:10 AM +1100 12/23/08, Clancy wrote: >>Schlossnagle (in "Advanced PHP Programming") advises: >> >>$i = 0; while ($i < $j) >> { >> >> ++$i; >> } >> >>rather than: >> >>$i = 0; while ($i < $j)

Re: [PHP] Help with a Search Function

2008-12-23 Thread Ashley Sheridan
On Tue, 2008-12-23 at 16:14 -0600, Terion Miller wrote: > Hey Everyone, been steaming right along for a couple days but now I'm stuck > on writing a search function, could you all take a look at it and see what > it could be, I will mark the line throwing the error in red, I did try just > commenti

Re: [PHP] Re: Segmentation fault in php5-imap

2008-12-23 Thread Nathan Nobbe
On Tue, Dec 23, 2008 at 1:42 PM, Dan Osipov wrote: > Everything matches. The only thing that's different is that the server > that's having the problem has been running the script every 15 mins for the > past 2 months - which leads me to believe there might be a memory leak > somewhere... if th

[PHP] Help with a Search Function

2008-12-23 Thread Terion Miller
Hey Everyone, been steaming right along for a couple days but now I'm stuck on writing a search function, could you all take a look at it and see what it could be, I will mark the line throwing the error in red, I did try just commenting out that line and searching for a record by OrderID that I kn

Re: [PHP] eof bof in php

2008-12-23 Thread German Geek
Totally agree. Whenever i can i put html outside of php tags mainly because the code gets more readable because in eclipse u get syntax highlighting etc. Tim-Hinnerk Heuer http://www.ihostnz.com On Wed, Dec 24, 2008 at 4:13 AM, tedd wrote: > At 2:21 PM -0500 12/22/08, Anthony Gentile wrote: >

[PHP] Re: Segmentation fault in php5-imap

2008-12-23 Thread Dan Osipov
Everything matches. The only thing that's different is that the server that's having the problem has been running the script every 15 mins for the past 2 months - which leads me to believe there might be a memory leak somewhere... Although complete recompiling should reset something, right? I

Re: [PHP] Create PHP form from MySQL table structure

2008-12-23 Thread Ronnie MacGregor
On Tue, 23 Dec 2008 13:15:04 + Richard Heyes said : > In a similar vain to phpMyEdit (or whatever it's called), is my MySQL > Table Editor. It's aimed at maintaining a table, but without allowing > users to destroy your table Which helps. > > http://www.phpguru.org/static/TableEditorComp

Re: [PHP] Create PHP form from MySQL table structure

2008-12-23 Thread Ronnie MacGregor
On Tue, 23 Dec 2008 11:38:22 -0500 Eric Butera said : > > a lot of frameworks have scaffolding or crud screens they can make for > you to do this. (cake, akelos, yii, code igniter) > > http://codeigniter.com/user_guide/general/scaffolding.html > http://book.cakephp.org/view/311/Scaffolding > ht

Re: [PHP] Segmentation fault in php5-imap

2008-12-23 Thread Nathan Nobbe
On Tue, Dec 23, 2008 at 12:34 PM, Dan Osipov wrote: > Hello, > > I have a CLI PHP script I'm running on a Debian Etch server every 15 > minutes, that downloads messages from NNTP server using PHP imap functions. > The script is working fine on several Windows systems, and other Linux > servers, bu

RE: [PHP] Create PHP form from MySQL table structure

2008-12-23 Thread Ronnie MacGregor
On Tue, 23 Dec 2008 06:38:29 -0600 Jay Blanchard said : > Here is a quick and dirty function that I have used for a couple of > years now, complete with comments; This looks very promising, thanks for sharing. -- Ronnie MacGregor Scotland Ronnie at dBASEdeveloper dot co dot uk www.dBASE

[PHP] Segmentation fault in php5-imap

2008-12-23 Thread Dan Osipov
Hello, I have a CLI PHP script I'm running on a Debian Etch server every 15 minutes, that downloads messages from NNTP server using PHP imap functions. The script is working fine on several Windows systems, and other Linux servers, but has been continuously throwing a segfault error on this p

Re: [PHP] Where I can find the PHP5 grammar/specification?

2008-12-23 Thread Nathan Nobbe
On Tue, Dec 23, 2008 at 11:19 AM, Juan Kinunt wrote: > Hi! > I'm looking for the PHP 5 grammar specification. I'm studying the > possibility of implementing an abstract interpretation tool with flex/bison > in order to find security vulnerabilities (Injection vulnerabilities, XSS) > in the code i

[PHP] Where I can find the PHP5 grammar/specification?

2008-12-23 Thread Juan Kinunt
Hi! I'm looking for the PHP 5 grammar specification. I'm studying the possibility of implementing an abstract interpretation tool with flex/bison in order to find security vulnerabilities (Injection vulnerabilities, XSS) in the code in a static manner. I know Pixy but I would like to study another

Re: [PHP] Create PHP form from MySQL table structure

2008-12-23 Thread Eric Butera
On Sun, Dec 21, 2008 at 5:35 AM, R B MacGregor wrote: > Hi folks > > Anybody got any recommendations for a utility which would create a quick head > start by creating the php/html code for a basic form using the field structure > of a MySQL table ? > > Thanks for any suggestions. > > -- > Ronnie M

RE: [PHP] Create PHP form from MySQL table structure

2008-12-23 Thread Jay Blanchard
[snip] Nice piece of code -- thanks for providing that. [/snip] You're welcome. It could stand a few small improvements, but I pretty much use it every day. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] shell_exec seems to hang other web requests while running convert

2008-12-23 Thread Nathan Nobbe
On Tue, Dec 23, 2008 at 1:18 AM, German Geek wrote: > We can live with the fact that it will take a little longer to process the > images. The image processing is only done by 2 people, about once a month, > just to save them time (they would do it with photoshop otherwise and it is > really bori

Re: [PHP] Configuring interfaces through php

2008-12-23 Thread Nathan Nobbe
On Tue, Dec 23, 2008 at 6:07 AM, Heysem Kaya wrote: > Hi, > I would like to configure the interfaces from a web page. What I should do > is (AFAIK) writing reading /etc/network/interfaces and writing it. Rebooting > networking after writing process. > > How can I do it in a practical way? you ca

RE: [PHP] Create PHP form from MySQL table structure

2008-12-23 Thread tedd
Here is a quick and dirty function that I have used for a couple of years now, complete with comments; -snip- Nice piece of code -- thanks for providing that. Cheers, tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://w

[PHP] Assignment (Was Re: [PHP] More microptimisation (Was Re: [PHP] Variable as an index)

2008-12-23 Thread tedd
At 9:10 AM +1100 12/23/08, Clancy wrote: Schlossnagle (in "Advanced PHP Programming") advises: $i = 0; while ($i < $j) { ++$i; } rather than: $i = 0; while ($i < $j) { ... $i++; } as the former apparently uses less m

Re: [PHP] eof bof in php

2008-12-23 Thread tedd
At 2:21 PM -0500 12/22/08, Anthony Gentile wrote: I would argue it is better practice as: than Hello World"; ?> Anthony Gentile Certainly, but all you have done here is to move your to different places. There is a threshold one reaches in deciding where is the "best" place to put the

Re: [PHP] Create PHP form from MySQL table structure

2008-12-23 Thread Richard Heyes
> ... In a similar vain to phpMyEdit (or whatever it's called), is my MySQL Table Editor. It's aimed at maintaining a table, but without allowing users to destroy your table Which helps. http://www.phpguru.org/static/TableEditorComparison.html http://www.phpguru.org/static/TableEditor.html -

[PHP] Configuring interfaces through php

2008-12-23 Thread Heysem Kaya
Hi, I would like to configure the interfaces from a web page. What I should do is (AFAIK) writing reading /etc/network/interfaces and writing it. Rebooting networking after writing process. How can I do it in a practical way? Heysem

RE: [PHP] Create PHP form from MySQL table structure

2008-12-23 Thread Jay Blanchard
[snip] Yes I could write my own, but was trying to avoid re-inventing the wheel. [/snip] Here is a quick and dirty function that I have used for a couple of years now, complete with comments; function formCreate($database, $table, $action, $excludeCols, $recordID){ /* * This fun

Re: [PHP] Create PHP form from MySQL table structure

2008-12-23 Thread Ronnie MacGregor
On Sun, 21 Dec 2008 12:24:30 -0500 tedd said : > Interesting. > > I am sure that one can write a script to find all the fields in a > table and create a form from that. Yes I could write my own, but was trying to avoid re-inventing the wheel. > However, I don't know of any utility that does t

[PHP] Re: Create PHP form from MySQL table structure

2008-12-23 Thread Ronnie MacGregor
On Sun, 21 Dec 2008 14:13:36 -0500 Al said : > > > R B MacGregor wrote: > > Hi folks > > > > Anybody got any recommendations for a utility which would create a quick > > head > > start by creating the php/html code for a basic form using the field > > structure > > of a MySQL table ? > >

Re: [PHP] More microptimisation (Was Re: [PHP] Variable as an index)

2008-12-23 Thread Clancy
On Mon, 22 Dec 2008 22:40:58 -0800, larstor...@gmail.com ("Lars Torben Wilson") wrote: >Well, in all fairness, it *is* faster--but you'll only notice the >difference in extremely tight and long-running loops (try it ;) ). As >long as you know why you're using it and what the side effects are, it

Re: [PHP] More microptimisation (Was Re: [PHP] Variable as an index)

2008-12-23 Thread German Geek
oops, yes of course lol Tim-Hinnerk Heuer http://www.ihostnz.com On Tue, Dec 23, 2008 at 7:43 PM, Lars Torben Wilson wrote: > 2008/12/22 German Geek : > > agree, ++$i wont save u nething, it just means that the variable is > > incremented after it is used: > > You meant ". . .before it is used:

Re: [PHP] shell_exec seems to hang other web requests while running convert

2008-12-23 Thread German Geek
We can live with the fact that it will take a little longer to process the images. The image processing is only done by 2 people, about once a month, just to save them time (they would do it with photoshop otherwise and it is really boring and time consuming). In fact, i might set up an automatic e