Re: [PHP] Php error with MySql

2005-01-07 Thread Stan F
- Original Message - From: Wil [EMAIL PROTECTED] To: php-general@lists.php.net Sent: Thursday, January 06, 2005 9:35 PM Subject: [PHP] Php error with MySql I get the following error Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in

Re: [PHP] On large application organization [long and possibly boring]

2005-01-07 Thread Josh Whiting
If I have a large app what is the difference, other than having a very large file, of doing this switch($action){ /* several dozen cases to follow */ case foo: writing out all of the code break; } and this switch($action){ /* several dozen

Re: [PHP] Persistent PHP web application?

2005-01-07 Thread Jason Barnett
Does not up to date mean the code isn't working with current releases of php 4 or 5? I'd be interested in giving it a try. I believe this is the case. AFAIK the APC library doesn't support PHP5 or at least it didn't when I looked at it. If you want to pitch in support for APC you should just

[PHP] E-mails with mail() as UTF-8

2005-01-07 Thread Kimmo Alm
Hey again! I'm having major trouble using mail() to deliver UTF-8 e-mails. They get sent and delivered successfully, but seem to be... messed up when they arrive (they go through my ISP's relay e-mail server). My headers basically look like this: From: Test [EMAIL PROTECTED]\nMIME-Version:

Re: [PHP] Persistent PHP web application?

2005-01-07 Thread Josh Whiting
Call me crazy or ignorant, i'm both, but would it be possible to build an extension that, in its MINIT hook as you suggest, actually runs a separate PHP script that contains global definitions, then makes those definitions available to later scripts? this is basically my original desire

Re: [PHP] On large application organization [long and possibly boring]

2005-01-07 Thread Jason Barnett
Jamie Alessio wrote: Correct me if I am wrong, but includes (and/or requires) will get all of the code in all of the cases regardless if the case is being processed. You're wrong. The include() and require() statements are only evaluated when they are reached in your application code, so there is

[PHP] PEAR Spreadsheet_Excel_Writer

2005-01-07 Thread Pedro Irán Méndez Pérez
somebody have a example of this class?, because the package don't have, thank's :) = ¿Acaso se olvidará la mujer de su bebé, y dejará de compadecerse del hijo de su vientre? Aunque ellas se olviden, yo no me olvidaré de ti Isa 40:27 = Atte Pedro Irán Méndez Pérez -- PHP General

[PHP] Re: E-mails with mail() as UTF-8

2005-01-07 Thread HarryG
Possibly the relay server can not send messages in the UTF-8 format so it has to convert the message. Try to install a local mail server on your pc smtp server in IIS on Windows or Postfix in linux and then try use your local server to delivery the mail rather than the isp's mail server Kimmo

Re: [PHP] bizzare duplicate mail() call

2005-01-07 Thread Jason Wong
On Friday 07 January 2005 05:45, Jed R. Brubaker wrote: [snip] The emails are frequent enough (every couple of minutes) that it is very easy to track, but I don't have a clue as to what would be the cause. Does anyone have any suggestions as to where to start looking? Your mail server logs.

Re: [PHP] On large application organization [long and possibly boring]

2005-01-07 Thread Jason Barnett
Otherwise, I'm curious as to why you're using a large switch, not that it's bad inherently IMHO, but there may be a better overall approach. /jw I don't know why *he* wants to do it, but one useful example is the MVC model (google MVC phppatterns if you're unfamiliar with the term). For a

Re: [PHP] bizzare duplicate mail() call

2005-01-07 Thread Richard Davey
Hello Jed, Thursday, January 6, 2005, 9:45:38 PM, you wrote: JRB What is so strange is that it only occurs for these odd periods of time. For JRB example, yesterday from 4pm to this morning at 7am, 2 copies would be sent. JRB Last week for several days, 5 copies would be sent. JRB The emails

Re: [PHP] bizzare duplicate mail() call

2005-01-07 Thread Jamie Alessio
The first place I would look is in your web server logs to establish if the pages are actually requested multiple times at the time the duplicate emails are sent. - Jamie Hello all - this problem is so wierd that I don't even know where to start. Hopefully you all can give me a couple leads.

[PHP] PHP Unit Tests - which framework to use?

2005-01-07 Thread dAniel hAhler
Hello PHP - General, I'm looking for a PHP Unit Test framework and found so far: SimpleTest: https://sourceforge.net/projects/simpletest/ PEAR PHPUnit: - http://pear.php.net/package/PHPUnit - http://pear.php.net/package/PHPUnit2 Sourceforge PHPUnit: http://phpunit.sourceforge.net/ While

Re: [PHP] call a function within the same class

2005-01-07 Thread kalinga
great!, thanks for the detailed answer. vk. p.s. I hope following URL will be helpfull to php oop beginners.. http://www.zend.com/zend/tut/class-intro.php On Thu, 6 Jan 2005 08:57:48 -0800 (PST), Richard Lynch [EMAIL PROTECTED] wrote: kalinga wrote: Dear all, I recently started PHP OOP

[PHP] String replace inside img

2005-01-07 Thread Fredrik Arild Takle
I have a some problems doing a search and replace in a string. I want to replace: img ALT= src=base/image.php?id=3 border=0 with img ALT= src=image.php?id=3 border=0 Note ALT, src, border properties may come in random order. My solution today is a not good enough because I only do an

[PHP] Fetch data from dbf file?

2005-01-07 Thread Supri anto
hi all, did anyone know how to fetch data from dbf file (Clipper) ? best regards, suprie -- Jangan tanyakan apa yang Indonesia telah berikan pada mu tapi bertanyalah apa yang telah engkau berikan kepada Indonesia -BEGIN GEEK CODE BLOCK- Version: 3.1 GU/IT d- s: a-- C++ UL P L++ E W++

Re: [PHP] PHP Unit Tests - which framework to use?

2005-01-07 Thread Dirk Kredler
Am Freitag, 7. Januar 2005 09:49 schrieb dAniel hAhler: I'm looking for a PHP Unit Test framework and found so far: SimpleTest: https://sourceforge.net/projects/simpletest/ PEAR PHPUnit: - http://pear.php.net/package/PHPUnit - http://pear.php.net/package/PHPUnit2 Sourceforge PHPUnit:

RE: [PHP] On large application organization [long and possibly bo ring]

2005-01-07 Thread Ford, Mike
To view the terms under which this email is distributed, please go to http://disclaimer.leedsmet.ac.uk/email.htm On 07 January 2005 00:37, Josh Whiting wrote: Correction: include() statements are executed at *run time*, which means that if the case is not executed, the include will not be

RE: [PHP] Re: On large application organization [long and possibl y boring]

2005-01-07 Thread Ford, Mike
To view the terms under which this email is distributed, please go to http://disclaimer.leedsmet.ac.uk/email.htm On 06 January 2005 23:40, Jason Barnett wrote: I thought there was a difference for include and require for conditionals. But apparently not. :) There used to be, somewhere

RE: [PHP] On large application organization [long and possibly bo ring]

2005-01-07 Thread Ford, Mike
To view the terms under which this email is distributed, please go to http://disclaimer.leedsmet.ac.uk/email.htm On 07 January 2005 00:20, Jason Barnett wrote: That was what I thought also. However just to add to the confusion: I think require'd files were evaluated no matter what back in

Re: [PHP] String replace inside img

2005-01-07 Thread Jason Wong
On Friday 07 January 2005 07:32, Fredrik Arild Takle wrote: I have a some problems doing a search and replace in a string. I want to replace: img ALT= src=base/image.php?id=3 border=0 with img ALT= src=image.php?id=3 border=0 Note ALT, src, border properties may come in random order. My

Re: [PHP] Persistent PHP web application?

2005-01-07 Thread William Lovaton
Hi everybody in this thread, The phpbeans (or sockets) kind of solutions won't work as Josh Whiting (original author of this thread) would expect. phpbeans is a good idea to share (complex) business logic and data between many web servers but it will have to serialize and unserialize the data to

RE: [PHP] On large application organization [long and possibly boring]

2005-01-07 Thread Jay Blanchard
[snip] Otherwise, I'm curious as to why you're using a large switch, not that it's bad inherently IMHO, but there may be a better overall approach. /jw I don't know why *he* wants to do it, but one useful example is the MVC model (google MVC phppatterns if you're unfamiliar with the

Re: [PHP] On large application organization [long and possibly bo

2005-01-07 Thread Jason Barnett
the file is not even read! The include() method is not only more efficient but also easier to maintain as you suggest. The efficiency point is at least debatable -- opening and reading the file is actually quite an expensive operation, the cost of which may outweigh the A good point not to be

[PHP] GD Module

2005-01-07 Thread Jeff McKeon
I've been searching the net all moring for this. Can anyone give me a link were I can find information on how to compile PHP with GD module support? Thanks, Jeff -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] GD Module

2005-01-07 Thread Jay Blanchard
[snip] I've been searching the net all moring for this. Can anyone give me a link were I can find information on how to compile PHP with GD module support? [/snip] http://us2.php.net/GD -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: E-mails with mail() as UTF-8

2005-01-07 Thread Kimmo Alm
On Fri, 7 Jan 2005 18:50:50 +1100, HarryG [EMAIL PROTECTED] wrote: Possibly the relay server can not send messages in the UTF-8 format so it has to convert the message. Try to install a local mail server on your pc smtp server in IIS on Windows or Postfix in linux and then try use your local

Re: [PHP] On large application organization [long and possibly boring]

2005-01-07 Thread John Nichel
Jay Blanchard wrote: snip Remember, I am old school. My first programming venture was in the 70's with FORTRAN, so all of you young bucks view programming differently than I do. /snip Old fart. I didn't venture into programming until 1980 with BASIC on an Atari. ;) Somebody wake-up grandpa

Re: [PHP] On large application organization [long and possibly boring]

2005-01-07 Thread Jason Barnett
Remember, I am old school. My first programming venture was in the 70's with FORTRAN, so all of you young bucks view programming differently than I do. I have a tendency to view things more from a C or C++ POV in I am indeed a young buck... but now I find myself moving (backwards?) because I have

Re: [PHP] GD Module

2005-01-07 Thread John Nichel
Jeff McKeon wrote: I've been searching the net all moring for this. Can anyone give me a link were I can find information on how to compile PHP with GD module support? http://us4.php.net/gd -- John C. Nichel ÜberGeek KegWorks.com 716.856.9675 [EMAIL PROTECTED] -- PHP General Mailing List

RE: [PHP] On large application organization [long and possibly boring]

2005-01-07 Thread Jesse Castro
[snip] You're wrong. The include() and require() statements are only evaluated when they are reached in your application code, so there is a big difference between your two examples. In you use the second example the code will only be included by PHP if the application logic enters the case

Re: [PHP] GD Module

2005-01-07 Thread Richard Lynch
Jeff McKeon wrote: I've been searching the net all moring for this. Can anyone give me a link were I can find information on how to compile PHP with GD module support? The only not-so-obvious thing is you need to download and install the libraries for JPEG, TIFF, etc so GD can use them -- Or

RE: [PHP] On large application organization [long and possibly boring]

2005-01-07 Thread Richard Lynch
Just out of curiosity, a lot of people had answers to this question, but I couldn't find a shred of evidence in the documentation. Did you do similar tests, hear from gurus, or something of like? Or did I just miss it somewhere? Once upon a time, a long time ago, require and include were

[PHP] Multiple POP accounts on Webmail Front

2005-01-07 Thread James Nunnerley
Hi All, Bit of a side question, but it's still php related. Does anyone know of a Webmail client, preferably open-source, that is able to support single login, to allow users to collect and use multiple POP3 or IMAP accounts? I'm currently using Ilohamail, and have used Squirrel in the

Re: [PHP] Php error with MySql

2005-01-07 Thread Wil Hitchman
Apologies...just have had loose fingers - Original Message - From: Jay Blanchard [EMAIL PROTECTED] To: Wil [EMAIL PROTECTED]; php-general@lists.php.net Sent: Thursday, January 06, 2005 3:31 PM Subject: RE: [PHP] Php error with MySql [snip] ...stuff... Wil [/snip] I replied to this over

Re: [PHP] On large application organization [long and possibly boring]

2005-01-07 Thread Jason Barnett
Consider yourself bytten, RTFM indeed! (BTW, this behavior is not really mentioned anywhere that I can find in TFM, it is more or less an assumption to be made from an example which would not prove the include) OK this is the last time I push the button on this one, but since you asked ;)

Re: [PHP] On large application organization [long and possibly bo

2005-01-07 Thread Jason Barnett
Bottom line: I always require_once at the top of a file for any files that I will require. No sense in doing anything else if the required files aren't there. For conditionally including files include_once() has always made the most sense to me. I'm not sure that's the best strategy: since

[PHP] Re: PHP Unit Tests - which framework to use?

2005-01-07 Thread Matthew Weier O'Phinney
* dAniel hAhler [EMAIL PROTECTED]: I'm looking for a PHP Unit Test framework and found so far: SimpleTest: https://sourceforge.net/projects/simpletest/ PEAR PHPUnit: - http://pear.php.net/package/PHPUnit - http://pear.php.net/package/PHPUnit2 Sourceforge PHPUnit:

Re: [PHP] On large application organization [long and possibly boring]

2005-01-07 Thread Jamie Alessio
This doesn't prove the case either way. Nice catch on that one but actually there might be another problem with my example. According to example 16-8 on http://us2.php.net/include/ Because include() and require() are special language constructs, you must enclose them within a statement

RE: [PHP] On large application organization [long and possibly boring]

2005-01-07 Thread Jesse Castro
[snip] You're wrong. The include() and require() statements are only evaluated when they are reached in your application code, so there is a big difference between your two examples. In you use the second example the code will only be included by PHP if the application logic enters the case

Re: [PHP] Persistent PHP web application?

2005-01-07 Thread Rasmus Lerdorf
On Fri, 7 Jan 2005, William Lovaton wrote: The phpbeans (or sockets) kind of solutions won't work as Josh Whiting (original author of this thread) would expect. phpbeans is a good idea to share (complex) business logic and data between many web servers but it will have to serialize and

RE: [PHP] On large application organization [long and possibly boring]

2005-01-07 Thread Jay Blanchard
[snip] I appreciate all of ya'll's insight on this and for setting me straight on the includes/requires band wagon. I made some incorrect assumptions (and didn't run the simple tests I could have run myself, as a couple of you have pointed out) and I will now have to eat some crow in front of

Re: [PHP] Image copying

2005-01-07 Thread Liam Gibbs
Richard, thanks. This made it much clearer. I read this, then stepped away and thought about it later and it makes so much more sense. Basically, I guess I ended up with the result IMG SRC = Resource id #x in my HTML. Man, I thought I was telling it to print the results of the resource ID, but it

Re: [PHP] On large application organization [long and possibly boring]

2005-01-07 Thread Jason Barnett
Assumably, if includes were processed before the script was executed, it would show a syntax error in foo2.php. We ran Good point about the syntax error. the test (v 4.2.1) and no error was returned, so that pretty much answers the question (READ: includes are not processed until they are

RE: [PHP] On large application organization [long and possibly boring]

2005-01-07 Thread Jay Blanchard
[snip] BUT, also from documentation on http://us2.php.net/include/ it looks like your example might not hold any water either. Be warned that parse error in required file doesn't cause processing halting. Based on that it appears that introducing the parse error in foo2.php doesn't prove that

Re: [PHP] Compiling PHP with external mySQL libraries

2005-01-07 Thread Richard Lynch
DAvid wrote: 1) Does adding 'shared,' as a ./configure option mean the module is compiled as an external, dynamically loaded module as compared to the module being statically linked into the 'exe' file? So that adding 'shared,' means I must add a line in the PHP ini file to load the

Re: [PHP] On large application organization [long and possibly boring]

2005-01-07 Thread Richard Lynch
Jay Blanchard wrote: switch($action){ /* several dozen cases to follow */ case foo: writing out all of the code break; } and this switch($action){ /* several dozen cases to follow */ case foo: include that will handle

Re: [PHP] migrating to PHP 5 + Apache 2 from PHP 4.3.8 + Apache 1.3.33.

2005-01-07 Thread symbulos partners
Jason Barnett wrote: exercise for myself, but then again I don't need to either. ;) This would also be something that would be a great benefit to share with the PHP community if you decide to compile this list of thread-safe extensions. If we could share a bit of the effort with someone

Re: [PHP] Multiple POP accounts on Webmail Front

2005-01-07 Thread Greg Donald
On Fri, 7 Jan 2005 16:26:02 -, James Nunnerley [EMAIL PROTECTED] wrote: Does anyone know of a Webmail client, preferably open-source, that is able to support single login, to allow users to collect and use multiple POP3 or IMAP accounts? http://www.horde.org/imp/4.0/ snip Fetching mails

Re: [PHP] PHP 5 confusion

2005-01-07 Thread Richard Lynch
Reading the PHP 5 documentation at: HYPERLINK http://www.php.net/manual/en/language.oop5.basic.phphttp://www.php.net/man ual/en/language.oop5.basic.php, I am confused. In the example given, what is the difference between: $assigned = $instance; $reference = $instance; I would expect

Re: [PHP] On large application organization [long and possibly boring]

2005-01-07 Thread Richard Lynch
Jamie Alessio wrote: BUT, also from documentation on http://us2.php.net/include/ it looks like your example might not hold any water either. Be warned that parse error in required file doesn't cause processing halting. Based on that it appears that introducing the parse error in foo2.php

Re: [PHP] Multiple POP accounts on Webmail Front

2005-01-07 Thread Richard Lynch
James Nunnerley wrote: Bit of a side question, but it's still php related. Does anyone know of a Webmail client, preferably open-source, that is able to support single login, to allow users to collect and use multiple POP3 or IMAP accounts? I'm currently using Ilohamail, and have used

Re: [PHP] Multiple POP accounts on Webmail Front

2005-01-07 Thread Steve Buehler
Well, Squirrelmail does.sort of. This might not be exactly what you are looking for, but you can add the fetchmail plugin to squirrelmail so that it can pull email from other pop3 accounts. http://www.squirrelmail.org/plugin_view.php?id=50 Steve At 10:26 AM 1/7/2005, James Nunnerley wrote:

RE: [PHP] On large application organization [long and possibly boring]

2005-01-07 Thread Jay Blanchard
[snip] Richard Lynch speaks: But it ends up being not all that maintainable, and you end up having to open up and track too many files with too many interactions when you go down this route. I abandoned this style and have never regretted it. YMMV [/snip] In favor of what? -- PHP General

Re: [PHP] Multiple POP accounts on Webmail Front

2005-01-07 Thread Jamie Alessio
IIRC, It does not do IMAP, it does not handle secure connections, it does not ... Squirrelmail does support IMAP. I'm using it to access a courier IMAP server with no problems. From http://www.squirrelmail.org/about.php It includes built-in pure PHP support for the IMAP and SMTP protocols I

RE: [PHP] On large application organization [long and possibly boring]

2005-01-07 Thread Richard Lynch
Jay Blanchard wrote: [snip] Richard Lynch speaks: But it ends up being not all that maintainable, and you end up having to open up and track too many files with too many interactions when you go down this route. I abandoned this style and have never regretted it. YMMV [/snip] In favor

Re: [PHP] migrating to PHP 5 + Apache 2 from PHP 4.3.8 + Apache 1.3.33.

2005-01-07 Thread Richard Lynch
symbulos partners wrote: Jason Barnett wrote: exercise for myself, but then again I don't need to either. ;) This would also be something that would be a great benefit to share with the PHP community if you decide to compile this list of thread-safe extensions. If we could share a bit of

[PHP] On large application organization [long and possibly boring]

2005-01-07 Thread Joe Harman
This is Definatley a good conversation... I've realy thought of doing it this way... but i do agree with the person who said that 'having to keep track of a ton of different files could get complicated ... i can't imagine the performance difference would be that big... but then again, i suppose it

[PHP] Need a Calender class that can access a DB

2005-01-07 Thread Phillip S. Baker
Greetings All, I have the need to find a calender class/script. What I am trying to do is have a view by month calender that lists all classes for the month. People can see the names of the classes in the month display and then click on the link and get the detailed information about the class

[PHP] Pagination Optimization

2005-01-07 Thread Bruno B B Magalhães
Hi guys, currently I have a function in my framework´s mysql driver , that fetch paginated results... Here it´s: === /* * Fetch paginated results

[PHP] Re: Pagination Optimization

2005-01-07 Thread M. Sokolewicz
first of all, you're running 4 queries here. 4 queries is a lot! Especially when you don't need more than 2 ;) the problem here is that your queries are pretty unknown to this function. Although it does a nice result for that unknowing, there's a few minor things that make it faster. First of

[PHP] Re: E-mails with mail() as UTF-8

2005-01-07 Thread Manuel Lemos
Hello, on 01/07/2005 01:33 AM Kimmo Alm said the following: Hey again! I'm having major trouble using mail() to deliver UTF-8 e-mails. They get sent and delivered successfully, but seem to be... messed up when they arrive (they go through my ISP's relay e-mail server). My headers basically look

[PHP] preg match

2005-01-07 Thread Chandana Bandara
This php script perform matching text of some certain URLs. but in this preg_match it wont match few patterns _ . with help of this script , can some body help me to match the other all patterns .plz ? ?php $user=root; $pass=; $db=aa; $dblink =

Re: [PHP] preg match

2005-01-07 Thread Rory Browne
I'm not sure what you're trying to do with preg_match, since the parameters you send to it, are from the database, and an undeclared variable $msg(which is what exactly). Unless you give us examples of the arguments to preg_match, and what you expect the results should be, as well as what they