php-general Digest 8 Jan 2010 07:25:00 -0000 Issue 6527

2010-01-07 Thread php-general-digest-help
php-general Digest 8 Jan 2010 07:25:00 - Issue 6527 Topics (messages 300889 through 300897): Re: First time PHP user question 300889 by: Jim Lucas cannot access SimpleXML object property 300890 by: Mari Masuda 300891 by: Jonathan Tapicer 300892 by: Mari

[PHP] Newbie needs help

2010-01-07 Thread John Taylor-Johnston
$content = ... a bunch of text with some !--protected--protected information!--/protected-- with some more text with some more !--protected--tabletrtdmore protected text/td/tr/table!--/protected-- and even !--protected--bsome protected contentb!--/protected--; I want to replace any content

Re: [PHP] Unable to get output from exec ssh remote-server 'ping -c4 ip'

2010-01-07 Thread hack988 hack988
see this http://www.phpclasses.org/browse/package/4282.html 2009/12/28 robert mena robert.m...@gmail.com: Hi, I need to develop an interface that will, for example, ping IPs from a remote server. So the php script will be hosted in a server with ssh access (key) to the remote server. I can

Re: [PHP] Newbie needs help

2010-01-07 Thread viraj
try http://www.php.net/manual/en/function.preg-replace-callback.php. you need to read a bit on 'regular expressions' http://www.gskinner.com/RegExr/ will be handy in crafting a suitable regex to capture your 'tags' ~viraj On Thu, Jan 7, 2010 at 2:16 PM, John Taylor-Johnston

Re: [PHP] Newbie needs help

2010-01-07 Thread John Taylor-Johnston
Great. Ok. Thanks. [I'm a top quoter)]. I'll look at it. This was my dirty way of hacking it: if (($current_user-id == 0) ($user_ID == 0)) { $content = str_replace('!--protected--', 'bProtected !--', $content); $content = str_replace('!--/protected--', '-- Content/b a href=/wp-login.php[Log

[PHP] Call to undefined method on class property!?

2010-01-07 Thread Allen McCabe
I have a singleton database object in a global file at the top of my document. In most other locations I am able to access it just fine, however in my footer I want to loop through a properties list for links (I am saving links to a database, each with its own properties). Here is the code

Re: [PHP] Call to undefined method on class property!?

2010-01-07 Thread Darren Karstens
Do you have a method in your Database class called affected_rows() ? From the code you have shown you only have a member variable called affected_rows and so your call $db-fetch_array($result) is falling over. On Thu, Jan 7, 2010 at 8:47 AM, Allen McCabe allenmcc...@gmail.com wrote: I have a

[PHP] Re: Resin/Quercus

2010-01-07 Thread Nathan Rixham
Mattias Thorslund wrote: Hi, I wonder if anyone has experience with running PHP on the Resin server. Opinions, good, bad? Gotchas? Similar projects? http://www.caucho.com/projects/resin/ Thanks, Mattias Resin is excellent - especially if you need to integrate in with java apps

[PHP] Re: First time PHP user question

2010-01-07 Thread Nathan Rixham
Rick Dwyer wrote: Hello List. I have been playing around with PHP, running a few tutorials and I came across an error message I could not resolve. The tutorial is Generating One Time URL's by Oreilly: http://www.oreillynet.com/pub/a/php/2002/12/05/one_time_URLs.html Basically the PHP

Re: [PHP] Call to undefined method on class property!?

2010-01-07 Thread Thijs Lensselink
Allen McCabe wrote: I have a singleton database object in a global file at the top of my document. In most other locations I am able to access it just fine, however in my footer I want to loop through a properties list for links (I am saving links to a database, each with its own properties).

Re: [PHP] Re: PHP programming strategy; lots of little include files, or a few big ones?

2010-01-07 Thread Daniel Egeberg
On Thu, Jan 7, 2010 at 04:11, Daevid Vincent dae...@daevid.com wrote: I think it's a case by case basis. Generally File I/O is expensive, but then again, as you say, having everything in a couple files is also sub-optimal for organizing and keeping things modular. That is easily sorted out

Re: [PHP] Site Moved From PHP4 to PHP5 Server - header, location no longer working

2010-01-07 Thread Ashley Sheridan
On Thu, 2010-01-07 at 16:50 +1030, James McLean wrote: On Thu, Jan 7, 2010 at 1:35 PM, Vernon Webb ver...@comp-wiz.com wrote: I move a number of sites from one server to another and one the one server we had php4 and now we have php5 and since then my server seems to hang every time

Re: [PHP] Re: First time PHP user question

2010-01-07 Thread Ashley Sheridan
On Thu, 2010-01-07 at 09:19 +, Nathan Rixham wrote: Rick Dwyer wrote: Hello List. I have been playing around with PHP, running a few tutorials and I came across an error message I could not resolve. The tutorial is Generating One Time URL's by Oreilly:

Re: [PHP] Re: First time PHP user question

2010-01-07 Thread Rick Dwyer
Thanks Ashley Nathan. As it turns out, there is more than one tmp folder... and I was looking in the wrong one. When I SSH'd in the correct one, I created the missing file and it began to work properly. Thanks for chiming in. --Rick On Jan 7, 2010, at 7:58 AM, Ashley Sheridan wrote:

Re: [PHP] Re: First time PHP user question

2010-01-07 Thread Ashley Sheridan
On Thu, 2010-01-07 at 08:32 -0500, Rick Dwyer wrote: Thanks Ashley Nathan. As it turns out, there is more than one tmp folder... and I was looking in the wrong one. When I SSH'd in the correct one, I created the missing file and it began to work properly. Thanks for chiming in.

RE: [PHP] Site Moved From PHP4 to PHP5 Server - header, location no longer working

2010-01-07 Thread Vernon Webb
That's the odd thing, there is nothing being indicated in the error logs the server just hangs and I have to restart apache in order to get the site back up. First I thought it might be the server so I move over to a different server, but I still have the same issue. What I feel is really odd

RE: [PHP] Site Moved From PHP4 to PHP5 Server - header, location no longer working

2010-01-07 Thread Ashley Sheridan
On Thu, 2010-01-07 at 08:40 -0500, Vernon Webb wrote: That's the odd thing, there is nothing being indicated in the error logs the server just hangs and I have to restart apache in order to get the site back up. First I thought it might be the server so I move over to a different server,

RE: [PHP] Site Moved From PHP4 to PHP5 Server - header, location no longer working

2010-01-07 Thread Vernon Webb
Didn't know there were php logs, I thought they would be included in the Apache logs, where do I find the php logs? ~V From: Ashley Sheridan [mailto:a...@ashleysheridan.co.uk] Sent: Thu 1/7/2010 8:42 AM To: Vernon Webb Cc: php-general@lists.php.net Subject:

RE: [PHP] Site Moved From PHP4 to PHP5 Server - header, location no longer working

2010-01-07 Thread Ashley Sheridan
On Thu, 2010-01-07 at 08:57 -0500, Vernon Webb wrote: Didn't know there were php logs, I thought they would be included in the Apache logs, where do I find the php logs? ~V From: Ashley Sheridan [mailto:a...@ashleysheridan.co.uk] Sent: Thu 1/7/2010

Re: [PHP] Call to undefined method on class property!? - [CLOSED]

2010-01-07 Thread Allen McCabe
I caught that error, but the line number was referring to the assignment, it didn't even get to the obvious error. Why would $total = $db-affected_rows, (assigning the value of $affected_rows to $total) be interpreted as a method call? I have since defined a num_rows() method (using

Re: [PHP] Re: First time PHP user question

2010-01-07 Thread Jim Lucas
Ashley Sheridan wrote: On Thu, 2010-01-07 at 08:32 -0500, Rick Dwyer wrote: Thanks Ashley Nathan. As it turns out, there is more than one tmp folder... and I was looking in the wrong one. When I SSH'd in the correct one, I created the missing file and it began to work properly.

[PHP] cannot access SimpleXML object property

2010-01-07 Thread Mari Masuda
Hi, I am working with an XML document and have a SimpleXML object whose var_dump looks like this: --- object(SimpleXMLElement)#2 (10) { [@attributes]= array(1) { [id]= string(7) 3854857 } [type]= string(7) Article [createDate]= string(25) 2006-09-06T16:42:20-07:00

Re: [PHP] cannot access SimpleXML object property

2010-01-07 Thread Jonathan Tapicer
On Thu, Jan 7, 2010 at 6:56 PM, Mari Masuda mari.mas...@stanford.edu wrote: Hi, I am working with an XML document and have a SimpleXML object whose var_dump looks like this: --- object(SimpleXMLElement)#2 (10) {  [@attributes]=  array(1) {    [id]=    string(7) 3854857  }  [type]=  

Re: [PHP] cannot access SimpleXML object property

2010-01-07 Thread Mari Masuda
On Jan 7, 2010, at 2:31 PM, Jonathan Tapicer wrote: On Thu, Jan 7, 2010 at 6:56 PM, Mari Masuda mari.mas...@stanford.edu wrote: Hi, I am working with an XML document and have a SimpleXML object whose var_dump looks like this: --- object(SimpleXMLElement)#2 (10) { [@attributes]=

Re: [PHP] Re: PHP programming strategy; lots of little include files, or a few big ones?

2010-01-07 Thread clancy_1
On Wed, 6 Jan 2010 19:11:07 -0800, dae...@daevid.com (Daevid Vincent) wrote: -Original Message- From: Al [mailto:n...@ridersite.org] Sent: Wednesday, January 06, 2010 5:09 PM To: php-general@lists.php.net Subject: [PHP] Re: PHP programming strategy; lots of little include

Re: [PHP] Re: PHP programming strategy; lots of little include files, or a few big ones?

2010-01-07 Thread clancy_1
On Wed, 06 Jan 2010 23:20:26 -0500, kolb0...@umn.edu (Daniel Kolbo) wrote: Daevid Vincent wrote: -Original Message- From: Al [mailto:n...@ridersite.org] Sent: Wednesday, January 06, 2010 5:09 PM To: php-general@lists.php.net Subject: [PHP] Re: PHP programming strategy; lots of

RE: [PHP] Site Moved From PHP4 to PHP5 Server - header, location no longer working

2010-01-07 Thread Vernon Webb
It's the oddest thing. I've found the logs but there is no error at all, the server just hangs and the only way to get it back is to restart Apache. From: Ashley Sheridan [mailto:a...@ashleysheridan.co.uk] Sent: Thu 1/7/2010 9:04 AM To: Vernon Webb Cc:

Re: [PHP] Re: PHP programming strategy; lots of little include files, or a few big ones?

2010-01-07 Thread Robert Cummings
clanc...@cybec.com.au wrote: Thank you all for your comments. I did not know about bytecode caches. They're an interesting concept, but if I am interpreting the paper http://itst.net/654-php-on-fire-three-opcode-caches-compared correctly they only double the average speed of operation, which

Re: [PHP] Re: PHP programming strategy; lots of little include files, or a few big ones?

2010-01-07 Thread clancy_1
On Thu, 07 Jan 2010 22:48:59 -0500, rob...@interjinn.com (Robert Cummings) wrote: clanc...@cybec.com.au wrote: Thank you all for your comments. I did not know about bytecode caches. They're an interesting concept, but if I am interpreting the paper