[PHP] Re: using mysql_close() = best practice?

2009-10-26 Thread Eric Bauman
On 24/10/2009 7:36 PM, Kim Madsen wrote: Hi PHP closes an open db connection when the script is done. I've read somewhere that in PHP6 this behaviour will dissapear, is this true? In that case using mysql_close() would definetly be best practice in all current scripts, to make it portable. A n

[PHP] What is the best practice for adding persistence to an MVC model?

2009-10-26 Thread Eric Bauman
I'm in the process of implementing an ultra-light MVC framework in PHP. It seems to be a common opinion that the loading of data from a database, file etc. should be independent of the Model, and I agree. What I'm unsure of is the best way to link this "data layer" into MVC. I've considered a

Re: [PHP] Strange behaviour with uploaded files .. XAMPP on Windows

2009-10-26 Thread Angus Mann
Yep, you were right. When I look, now I see that the permissions for the file are different to locally created files. Thanks for that ! Yeah, definitely sounds like a permissions issue. I'm not much of a windows admin, but this looks like it might help: http://www.mydigitallife.info/2007

Re: [PHP] Strange behaviour with uploaded files .. XAMPP on Windows

2009-10-26 Thread Brady Mitchell
On Mon, Oct 26, 2009 at 6:31 PM, Angus Mann wrote: > When I use a form to upload a file, using $_FILES['uploadedfile']['name'] > and move_uploaded-file($_FILES['uploadedfile']['name'], $targetpath) strange > effects happen. > > The file is uploaded to the target directory just as it should. > > Bu

Re: [PHP] How to Get the Sub Classes of a Parent Class

2009-10-26 Thread Martin Scotta
On Mon, Oct 26, 2009 at 10:33 PM, David Otton < phpm...@jawbone.freeserve.co.uk> wrote: > 2009/10/27 Raymond Irving : > > >>> I want to automatically initialize a specific sub class when the php > page > >>> is loaded. > > >> You may be able solve this with a simple class_exists() (pseudo-code > a

Re: [PHP] How to Get the Sub Classes of a Parent Class

2009-10-26 Thread Martin Scotta
On Mon, Oct 26, 2009 at 10:22 PM, Raymond Irving wrote: > > This works if you know the name of the class. What I'm looking for is a way > to get one of the sub classes and initialize it dynamically. > > > > > > From: David Otton > To: Raymond Irving > Cc: PHP-Ge

Re: [PHP] How to Get the Sub Classes of a Parent Class

2009-10-26 Thread David Otton
2009/10/27 Raymond Irving : >>> I want to automatically initialize a specific sub class when the php page >>> is loaded. >> You may be able solve this with a simple class_exists() (pseudo-code ahead): >> >> if(class_exists($var)) { >> $class = new $var; >> } else { >> $class = new FourOhF

[PHP] Strange behaviour with uploaded files .. XAMPP on Windows

2009-10-26 Thread Angus Mann
Hi all. I'm not sure if this is really a PHP question or specific to XAMPP, or windows in general... I have XAMPP including PHP 4.29 running on a Vista machine. When I use a form to upload a file, using $_FILES['uploadedfile']['name'] and move_uploaded-file($_FILES['uploadedfile']['name'], $ta

Re: [PHP] How to Get the Sub Classes of a Parent Class

2009-10-26 Thread Raymond Irving
This works if you know the name of the class. What I'm looking for is a way to get one of the sub classes and initialize it dynamically. From: David Otton To: Raymond Irving Cc: PHP-General List Sent: Sun, October 25, 2009 10:25:27 AM Subject: Re: [PHP] Ho

RE: [PHP] dynamic menu with show hide capabilities - understanding possible workflow

2009-10-26 Thread MEM
Thanks a lot for your replies. Let's see if I understand, if not, please, let me know, I'm not that proficient in English. Second try, in order to accomplish this, I have to: 1) Generate the multidimensional array from query. 2) Generate the ul / li menu (echo + foreach) displaying all child

Re: [PHP] Issues with MySQL connectivity ... on only one machine, and for a while now

2009-10-26 Thread Michael Shadle
nope. it's a quad core with 4 gig ram [r...@sql02 ~]# free -m total used free sharedbuffers cached Mem: 3905 3774130 0170941 -/+ buffers/cache: 2662 1243 Swap: 3906 20 3886 [r...@

[PHP] simplexml_load_file() improvement

2009-10-26 Thread Marco Barbieri
Hi all! This is my first mail, I hope I will use this mailing list in the correct mode. One of main advantages of SQL in the concorrent access of many script to the same database. I would like improve similar functions to the SimpleXML module. In particular, I want modify the simplexml_load_file()

[PHP] simple xml object

2009-10-26 Thread Chris W
I have the following xmlwith standard tags changed to [ and ] to prevent mail clients from encoding it as html. [?xml version="1.0"?] [resultset errors="0" results="86"] [result id="20080922133104871678" lastinspected="9/29/2009 0:00"]0.4[/result] [result id="20080922133104871678" lastinspec

Re: [PHP] (nginx) fcgi+PHP+memcache on RedHat: Class 'Memcache' not found...

2009-10-26 Thread Eddie Drapkin
On Mon, Oct 26, 2009 at 12:22 PM, Tom Barrett wrote: > 2009/10/26 Eddie Drapkin : >> On Mon, Oct 26, 2009 at 11:59 AM, Tom Barrett wrote: >>> 2009/10/26 Eddie Drapkin : On Mon, Oct 26, 2009 at 11:45 AM, Tom Barrett wrote: > Hello > > I have installed: >  - libevent >  -

Re: [PHP] (nginx) fcgi+PHP+memcache on RedHat: Class 'Memcache' not found...

2009-10-26 Thread Tom Barrett
2009/10/26 Eddie Drapkin : > On Mon, Oct 26, 2009 at 11:59 AM, Tom Barrett wrote: >> 2009/10/26 Eddie Drapkin : >>> On Mon, Oct 26, 2009 at 11:45 AM, Tom Barrett wrote: Hello I have installed:  - libevent  - libmemcached (http://tangent.org/552/libmemcached.html)  -

Re: [PHP] (nginx) fcgi+PHP+memcache on RedHat: Class 'Memcache' not found...

2009-10-26 Thread Eddie Drapkin
On Mon, Oct 26, 2009 at 11:59 AM, Tom Barrett wrote: > 2009/10/26 Eddie Drapkin : >> On Mon, Oct 26, 2009 at 11:45 AM, Tom Barrett wrote: >>> Hello >>> >>> I have installed: >>>  - libevent >>>  - libmemcached (http://tangent.org/552/libmemcached.html) >>>  - Done a PECL installation (pecl downlo

Re: [PHP] (nginx) fcgi+PHP+memcache on RedHat: Class 'Memcache' not found...

2009-10-26 Thread Tom Barrett
2009/10/26 Eddie Drapkin : > On Mon, Oct 26, 2009 at 11:45 AM, Tom Barrett wrote: >> Hello >> >> I have installed: >>  - libevent >>  - libmemcached (http://tangent.org/552/libmemcached.html) >>  - Done a PECL installation (pecl download memcached, phpize && >> ./configure && make) >>  - memcached

Re: [PHP] dynamic menu with show hide capabilities - understanding possible workflow

2009-10-26 Thread Ashley Sheridan
On Mon, 2009-10-26 at 08:49 -0700, Jim Lucas wrote: > MEM wrote: > > Thank you all. > > > > Ok. Please stay with me, cause I still have some doubts. > > Not only do I need to display the subitems on click but also, when the user > > clicks on one menu item, I need to change the URI as well. >

Re: [PHP] dynamic menu with show hide capabilities - understanding possible workflow

2009-10-26 Thread Jim Lucas
MEM wrote: > Thank you all. > > Ok. Please stay with me, cause I still have some doubts. > Not only do I need to display the subitems on click but also, when the user > clicks on one menu item, I need to change the URI as well. > Why? Because, each time the user clicks on a menu item (whateaver

Re: [PHP] (nginx) fcgi+PHP+memcache on RedHat: Class 'Memcache' not found...

2009-10-26 Thread Eddie Drapkin
On Mon, Oct 26, 2009 at 11:45 AM, Tom Barrett wrote: > Hello > > I have installed: >  - libevent >  - libmemcached (http://tangent.org/552/libmemcached.html) >  - Done a PECL installation (pecl download memcached, phpize && > ./configure && make) >  - memcached > >> cat /etc/php.d/memcached.ini >

[PHP] (nginx) fcgi+PHP+memcache on RedHat: Class 'Memcache' not found...

2009-10-26 Thread Tom Barrett
Hello I have installed:  - libevent  - libmemcached (http://tangent.org/552/libmemcached.html)  - Done a PECL installation (pecl download memcached, phpize && ./configure && make)  - memcached > cat /etc/php.d/memcached.ini ; Memcached default settings extension=memcache.so > ls -1  /usr/lib64/p

RE: [PHP] dynamic menu with show hide capabilities - understanding possible workflow

2009-10-26 Thread Ashley Sheridan
On Mon, 2009-10-26 at 15:01 +, MEM wrote: > Thank you all. > > > > Ok. Please stay with me, cause I still have some doubts. > > Not only do I need to display the subitems on click but also, when the > user clicks on one menu item, I need to change the URI as well. > > Why? Because, each

RE: [PHP] dynamic menu with show hide capabilities - understanding possible workflow

2009-10-26 Thread MEM
Thank you all. Ok. Please stay with me, cause I still have some doubts. Not only do I need to display the subitems on click but also, when the user clicks on one menu item, I need to change the URI as well. Why? Because, each time the user clicks on a menu item (whateaver that item as childs o

Re: [PHP] dynamic menu with show hide capabilities - understanding possible workflow

2009-10-26 Thread Ashley Sheridan
On Mon, 2009-10-26 at 13:28 +, MEM wrote: > Hello all, > > I'm on my way to build my first dynamic menu using php. > However, each time I say this, people start jumping at me crying out loud: > "Jquery" . > I don't need js for this. Really. (At least, this is what I believe). > > So I was wo

[PHP] dynamic menu with show hide capabilities - understanding possible workflow

2009-10-26 Thread MEM
Hello all, I'm on my way to build my first dynamic menu using php. However, each time I say this, people start jumping at me crying out loud: "Jquery" . I don't need js for this. Really. (At least, this is what I believe). So I was wondering if It's possible to accomplish it, by using css and php

Re: [PHP] php mail() function

2009-10-26 Thread John Black
Bob McConnell wrote: I strongly recommend you call the help desk at Shaw and ask them to explain what is happening. They should know what is going on with their servers. Everyone on this list appears to be guessing at the problem, which is not likely to help you. But they are educated guesses :

RE: [PHP] php mail() function

2009-10-26 Thread Bob McConnell
From: James Prentice > I have tried setting both $to and $email to be the same shaw address > since I assumed it should be recognized by the mail server, but it's > still getting bounced. So why is 'www-d...@homemade' being listed as > the sender? Any ideas? I strongly recommend you call the help

Re: [PHP] Issues with MySQL connectivity ... on only one machine, and for a while now

2009-10-26 Thread John Black
Michael Shadle wrote: Oct 25 22:00:01 sql02 php: PHP Warning: mysqli_connect(): (HY000/2013): Lost connection to MySQL server at 'sending authentication information', system error: 32 in /home/foo/web/foo.com/core.php on line 2394 mysql 5.0.75 on ubuntu jaunty 64-bit php 5.2.11 (but has been sh

Re: [PHP] getcsv error

2009-10-26 Thread John Black
Looks like Steve posted the answer so here is something related. I use the function below to deal with those annoying magic quotes setups. The function will remove the magically annoying quotes from the POST, GET, COOKIE and REQUEST arrays. Simply save it to a file and include it on top of your

Re: [PHP] RewriteRule to hide PHP vars in URL

2009-10-26 Thread Ashley Sheridan
On Mon, 2009-10-26 at 07:46 +0530, kranthi wrote: > you have to type the relative path to your document root for every URI) > > seems you are looking for > http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html#RewriteCond I don't think that will do what he wants. Consider the following two exa

Re: [PHP] Issues with MySQL connectivity ... on only one machine, and for a while now

2009-10-26 Thread Michael Shadle
Yep the only connectivity issues are coming from the server itself. I have 3 webservers talking to this server and never get a failed read - the batch jobs running on the server itself have issues once in a while. I even FORCED sockets just in case it was using TCP via localhost... On Mon, Oct 2

Re: [PHP] Issues with MySQL connectivity ... on only one machine, and for a while now

2009-10-26 Thread Kim Madsen
Michael Shadle wrote on 2009-10-26 06:48: Oct 25 22:00:01 sql02 php: PHP Warning: mysqli_connect(): (HY000/2013): Lost connection to MySQL server at 'sending authentication information', system error: 32 in /home/foo/web/foo.com/core.php on line 2394 It's either this or one or two others. What