php-general Digest 10 Aug 2005 05:58:22 -0000 Issue 3616

2005-08-10 Thread php-general-digest-help
php-general Digest 10 Aug 2005 05:58:22 - Issue 3616 Topics (messages 220292 through 220322): Re: blank page with PHP 220292 by: Bruce Gilbert 220293 by: Bruce Gilbert 220294 by: Sabine Re: Generating a 404 status message with header() 220295 by: Jasper

php-general Digest 10 Aug 2005 18:40:46 -0000 Issue 3617

2005-08-10 Thread php-general-digest-help
php-general Digest 10 Aug 2005 18:40:46 - Issue 3617 Topics (messages 220323 through 220353): Re: N/A 220323 by: Jasper Bryant-Greene 220328 by: John Nichel 220352 by: Rory Browne Fixing Invalid Characters in RSS Feeds.. ? 220324 by: Greg Schnippel

Re: [PHP] N/A

2005-08-10 Thread Jasper Bryant-Greene
R. Ragunathan wrote: can we implement lock to a table using postgres with php. if any of u all knows the solution do reply back. You may also want to look at the following URL: http://www.postgresql.org/docs/8.0/interactive/explicit-locking.html -- PHP General Mailing List

[PHP] Fixing Invalid Characters in RSS Feeds.. ?

2005-08-10 Thread Greg Schnippel
I wrote a custom blog/CMS script that I use to generate RSS feeds. Every so often, in the process of cutting and pasting from other sites I will inadvertently enter a bad character that RSS doesn't like which causes the whole feed to break. (For example, versions of quotation marks or long

Re: [PHP] Insert one or many chekbox values in a db mysql

2005-08-10 Thread Greg Schnippel
Try this article on Evolt: http://www.evolt.org/article/Storing_form_array_data_to_MySQL_using_PHP/18/60222/ that covers the whole process with good code examples.. - schnippy On 8/9/05, Jesús Alain Rodríguez Santos [EMAIL PROTECTED] wrote: Hi, I have 5 chekboxes in a page, I would like

Re: [PHP] php output to string

2005-08-10 Thread Matthew Weier O'Phinney
* Jesús Fernández [EMAIL PROTECTED]: thanks, it works, but that returns the php code. what i actually need is the output of that php code evaluated. So eval() the string... -- Matthew Weier O'Phinney Zend Certified Engineer http://weierophinney.net/matthew/ -- PHP General Mailing List

Re: [PHP] Insert one or many chekbox values in a db mysql

2005-08-10 Thread John Nichel
Jesús Alain Rodríguez Santos wrote: Hi, I have 5 chekboxes in a page, I would like insert the values of all chekboxes checked in a mysql db. Okay, have fun. -- John C. Nichel ÜberGeek KegWorks.com 716.856.9675 [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] N/A

2005-08-10 Thread John Nichel
R. Ragunathan wrote: hi, can we implement lock to a table using postgres with php. if any of u all knows the solution do reply back. http://www.catb.org/~esr/faqs/smart-questions.html Pay close attention to the sections dealing with Before you ask, and Use meaningful, specific subject

[PHP] Restarting windows from php

2005-08-10 Thread Karl-Heinz Christian Zeck
Does anyone have any idea how to restart windows from a php script? I tried the following: exec('SHUTDOWN -r -t 01'); or exec('SHUTDOWN /r'); I received the following warning message: Warning: exec(): Unable to fork [SHUTDOWN -r -t 01]. I never used this kind of functions before.

RE: [PHP] Restarting windows from php

2005-08-10 Thread Jay Blanchard
[snip] Does anyone have any idea how to restart windows from a php script? I tried the following: exec('SHUTDOWN -r -t 01'); or exec('SHUTDOWN /r'); I received the following warning message: Warning: exec(): Unable to fork [SHUTDOWN -r -t 01]. I never used this kind of functions

Re: [PHP] Restarting windows from php

2005-08-10 Thread Karl-Heinz Christian Zeck
I don't want to restart windows locally, I want to restart it remotely. I need a php script that restarts the server. Is this possible or not? On 8/10/05, Jay Blanchard [EMAIL PROTECTED] wrote: [snip] Does anyone have any idea how to restart windows from a php script? I tried the following:

Re: [PHP] Restarting windows from php

2005-08-10 Thread Cafer Şimşek
Hi, I think, Karl says that to how to shutdown the server. This is posible with rundll, or using Win32API functions. This is the detailed information about how to use Win32API functions in PHP: http://www.php.net/manual/en/ref.w32api.php So, also this is an information about ExitWindows()

Re: [PHP] Restarting windows from php

2005-08-10 Thread Joseph Oaks
First off, windows has no clue what a fork is, much less the command 'shutdown -r -t 01'. You can get a windows based version here for windows 2000, http://support.microsoft.com/default.aspx?scid=kb;en-us;317371sd=tech If you on windows xp or 2003 servers I'm not sure how this will work now that

Re: [PHP] Restarting windows from php

2005-08-10 Thread Richard Davey
Hello Karl-Heinz, Wednesday, August 10, 2005, 3:05:32 PM, you wrote: KHCZ Does anyone have any idea how to restart windows from a php script? KHCZ I tried the following: KHCZ exec('SHUTDOWN -r -t 01'); KHCZ or KHCZ exec('SHUTDOWN /r'); KHCZ I received the following warning message:

RE: [PHP] Restarting windows from php

2005-08-10 Thread tg-php
Could be that he's trying to use PHP to restart the server. Or could be using php via command line or through a system like GTK or Winbinder. It's worth noting that you should make sure you're restarting the machine you think you are, but the question still remains... is this possible and

Re[2]: [PHP] Restarting windows from php

2005-08-10 Thread Richard Davey
Hello Joseph, Wednesday, August 10, 2005, 3:26:05 PM, you wrote: JO First off, windows has no clue what a fork is, A fork is several different things, and there's no reason why Windows cannot implement a fork via its standard APIs. JO much less the command 'shutdown -r -t 01'. -r = Shutdown

RE: [PHP] Restarting windows from php

2005-08-10 Thread George Pitcher
Just out of interest, how is the restart going to authenticate itself to get up and running? I used to do something like this between two servers - but the were Macs and I was using Frontier and it did work, but not without the odd mishap. If you just want to do it remotely (without recourse to

[PHP] redirect based off server string

2005-08-10 Thread Robert Sossomon
Anyone have a script or know of a way to check and see what the url is of a system and then sending it to another url if it is not right? I have this problem where if someone is using: http://www.ces.ncsu.edu/depts/fourh instead of: http://www.nc4h.org to get to my site it is breaking other

[PHP] display error line in object method

2005-08-10 Thread Georgi Ivanov
Hi, I have a db wrapper class. I use it like this : $db-query(SQL HERE) or die ($db-error()); Is there a way to display the line on which $db-error() is executed without doing die (__LINE__. .$db-error() )? If i put __LINE__ in the class the line number is always the line in the class file. I

Re: [PHP] redirect based off server string

2005-08-10 Thread Greg Schnippel
Try doing a pattern match on the server string and then using Header to redirect them if its coming from the old server: if (preg_match(/ces.ncsu/i, $_SERVER[HTTP_HOST])) { header(Location: http://www.nc4h.org;); } - schnippy On 8/10/05, Robert Sossomon [EMAIL PROTECTED] wrote:

RE: [PHP] display error line in object method

2005-08-10 Thread Mike Johnson
From: Georgi Ivanov [mailto:[EMAIL PROTECTED] Hi, I have a db wrapper class. I use it like this : $db-query(SQL HERE) or die ($db-error()); Is there a way to display the line on which $db-error() is executed without doing die (__LINE__. .$db-error() )? If i put __LINE__ in the class

Re: [PHP] display error line in object method

2005-08-10 Thread Georgi Ivanov
Thank you for the replay. I know i can pass __LINE to $db-error(). This is not the idea. I want $db-error() to print the line on which it was executed . $parent::__LINE__ Who is the $parent here ? On Wednesday 10 August 2005 18:20, Mike Johnson wrote: From: Georgi Ivanov [mailto:[EMAIL

RE: [PHP] display error line in object method

2005-08-10 Thread Mike Johnson
From: Georgi Ivanov [mailto:[EMAIL PROTECTED] Thank you for the replay. I know i can pass __LINE to $db-error(). This is not the idea. I want $db-error() to print the line on which it was executed . $parent::__LINE__ Who is the $parent here ? There isn't, necessarily. That was

[PHP] REGEX for query

2005-08-10 Thread Jay Blanchard
Howdy boys and girls! I have a rather interesting issue. I need to locate every query in every PHP application we have for an integration project. I have started doing some research, but I wanted throw this out there as a little exercize because it is interesting. Several queries are written as

[PHP] Re: Re[2]:[PHP] Restarting windows from php

2005-08-10 Thread Joseph Oaks
Richard, thanks for the pointer on the shutdown command, nice to see them implement that in 2k3 and XP, I don't use them on a regular base and sure don't use them in server environment. As for the fork, windows can't preform a fork of a process. There are API's out there that can do this for

[PHP] force download

2005-08-10 Thread Sebastian
some of my users are complaining that when they try download media files (mp3, mpeg, etc) their media player opens and doesn't allow them to physically download the media. These are IE users, firefox seems to like my code, but IE refuses to download the file and plays it instead.. can anyone

Re: [PHP] Restarting windows from php

2005-08-10 Thread Stut
Karl-Heinz Christian Zeck wrote: Does anyone have any idea how to restart windows from a php script? I tried the following: exec('SHUTDOWN -r -t 01'); or exec('SHUTDOWN /r'); I received the following warning message: Warning: exec(): Unable to fork [SHUTDOWN -r -t 01]. There are a

RE: [PHP] REGEX for query

2005-08-10 Thread Michael Sims
Jay Blanchard wrote: I have a rather interesting issue. I need to locate every query in every PHP application we have for an integration project. I have started doing some research, but I wanted throw this out there as a little exercize because it is interesting. Several queries are written

[PHP] dynamic object instances

2005-08-10 Thread Thomas Angst
Hello List, I would like to create an object inside a function with its classname and a parameter list submitted by the function call. function create($class, $parameter) { $obj = new $class($parameter); return $obj; } This is working very well. But I have not every time the same count

[PHP] Re: Fixing Invalid Characters in RSS Feeds.. ?

2005-08-10 Thread Manuel Lemos
Hello, on 08/10/2005 10:05 AM Greg Schnippel said the following: I wrote a custom blog/CMS script that I use to generate RSS feeds. Every so often, in the process of cutting and pasting from other sites I will inadvertently enter a bad character that RSS doesn't like which causes the whole feed

Re: [PHP] redirect based off server string

2005-08-10 Thread Leon Vismer
If you are using apache you can use the redirect module VirtualHost 152.1.45.10 Servername www.ces.ncsu.edu ServerAlias * Redirect permanent / http://www.nc4h.org/ /VirtualHost -- Leon On Wednesday 10 August 2005 16:52, Robert Sossomon wrote: Anyone have a script or know of a way to check

Re: [PHP] N/A

2005-08-10 Thread Rory Browne
As Ireland's property developers scramble to snap up every last square metre of prime Dublin real estate, a green oasis in the heart of this booming capital is standing firm against the tide of change. All this may seem highly irrelevent, but when you have a N/A subject, then anything is in.

Re: [PHP] force download

2005-08-10 Thread James R.
That would be browser dependent, something you have no control over. Maybe you can include a little text message saying right-click save as for the users not intelligent enough to figure it out themselves. - Original Message - From: Sebastian [EMAIL PROTECTED] To:

[PHP] Re: dynamic object instances

2005-08-10 Thread Matthew Weier O'Phinney
* Thomas Angst [EMAIL PROTECTED]: I would like to create an object inside a function with its classname and a parameter list submitted by the function call. function create($class, $parameter) { $obj = new $class($parameter); return $obj; } This is working very well. But I have

[PHP] html_entity_decode () for hellip;, rsquo;, etc.

2005-08-10 Thread Marco
I tried using html_entity_decode () but why won't these characters decode: rsquo; ndash; hellip; ldquo; rdquo; -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Gathering CPU info from Linux and FreeBSD and placing it into a MySQL db

2005-08-10 Thread Patrick - Jupiter Hosting
Hey all, First time poster to this mailing list, but I've been lurking for a week now, and it seems like there are a lot of helpful people on this list. I hope to help others out with problems I can answer for them in the future. Now, I have an important task at hand. My company has assigned me

Re: [PHP] force download

2005-08-10 Thread Sebastian
James R. wrote: That would be browser dependent, something you have no control over. Maybe you can include a little text message saying right-click save as for the users not intelligent enough to figure it out themselves. - Original Message - From: Sebastian [EMAIL PROTECTED]

Re: [PHP] force download

2005-08-10 Thread Sebastian
James R. wrote: That would be browser dependent, something you have no control over. Maybe you can include a little text message saying right-click save as for the users not intelligent enough to figure it out themselves. - Original Message - From: Sebastian [EMAIL PROTECTED] To:

Re: [PHP] force download

2005-08-10 Thread Chris
A comment is inline. Sebastian wrote: some of my users are complaining that when they try download media files (mp3, mpeg, etc) their media player opens and doesn't allow them to physically download the media. These are IE users, firefox seems to like my code, but IE refuses to download the

[PHP] what should I look for with this error

2005-08-10 Thread Bruce Gilbert
I get this error a lot, and think it may be an easy fix, but don't really know what to look for. 'Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /hsphere/local/home/bruceg/inspired-evolution.com/Contact_Form_Test.php on line

RE: [PHP] what should I look for with this error

2005-08-10 Thread Jay Blanchard
[snip] I get this error a lot, and think it may be an easy fix, but don't really know what to look for. 'Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /hsphere/local/home/bruceg/inspired-evolution.com/Contact_Form_Test.php on

Re: [PHP] html_entity_decode () for hellip;, rsquo;, etc.

2005-08-10 Thread Leon Vismer
Hi Marco To awnser you question I do not know why it is excluded from the default decode array. Maybe it could be that these are multibyte characters (any takers)? You can get a list of the entities that are changed $trans = get_html_translation_table(HTML_ENTITIES);

Re: [PHP] what should I look for with this error

2005-08-10 Thread Bruce Gilbert
I don't see any missing semi-colons off hand. The error is supposedly on line 556 in the below code: !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN html!-- InstanceBegin template=/Templates/subpage_template.dwt codeOutsideHTMLIsLocked=false -- head !-- InstanceBeginEditable

Re: [PHP] force download

2005-08-10 Thread Richard Lynch
On Wed, August 10, 2005 12:49 pm, Chris wrote: if ($extension != 'txt') { header(Content-disposition: inline; filename=\$file[type]\); } else { // force txt files to prevent XSS header(Content-disposition: attachment; filename=\$file[type]\); } The Content-disposition header is

Re: [PHP] force download

2005-08-10 Thread Richard Lynch
On Wed, August 10, 2005 12:43 pm, Sebastian wrote: That would be browser dependent, something you have no control over. Maybe you can include a little text message saying right-click save as for the users not intelligent enough to figure it out themselves. I defy you to find any web browser

Re: [PHP] html_entity_decode () for hellip;, rsquo;, etc.

2005-08-10 Thread Richard Lynch
On Wed, August 10, 2005 11:55 am, Marco wrote: I tried using html_entity_decode () but why won't these characters decode: rsquo; ndash; hellip; ldquo; rdquo; WILD GUESS: Those are not standards-based, and are some made-up Microsoft crap? -- Like Music? http://l-i-e.com/artists.htm --

RE: [PHP] html_entity_decode () for hellip;, rsquo;, etc.

2005-08-10 Thread Jim Moseby
hellip; Is this the IP range assigned to hell? I always suspected they were on the net. JM -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] what should I look for with this error

2005-08-10 Thread John Nichel
Bruce Gilbert wrote: snip a ton of un-needed code Your heredoc is messed up. Look into getting an editor which will highlight the errors for you. This mailing list isn't here to syntax check (unless it's 4:30 on a Friday). -- John C. Nichel ÜberGeek KegWorks.com 716.856.9675 [EMAIL

Re: [PHP] display error line in object method

2005-08-10 Thread Richard Lynch
On Wed, August 10, 2005 8:10 am, Georgi Ivanov wrote: Hi, I have a db wrapper class. I use it like this : $db-query(SQL HERE) or die ($db-error()); Is there a way to display the line on which $db-error() is executed without doing die (__LINE__. .$db-error() )? Sure! Use these guys:

Re: Re[2]: [PHP] Restarting windows from php

2005-08-10 Thread Richard Lynch
On Wed, August 10, 2005 7:45 am, Richard Davey wrote: Hello Joseph, Wednesday, August 10, 2005, 3:26:05 PM, you wrote: JO much less the command 'shutdown -r -t 01'. -r = Shutdown with restart -t = Set the timeout for shutdown (xx seconds) 01 = The timeout value Open a command prompt,

RE: [PHP] Gathering CPU info from Linux and FreeBSD and placing it into aMySQL db

2005-08-10 Thread Nathan Tobik
Can I ask why you are trying to write a script that from what I understand goes to each box to retrieve the data instead of pushing the data to the central db? You could write a little script in PHP that gathers the required information and then does an insert into your database. Then from the

Re: [PHP] Restarting windows from php

2005-08-10 Thread Richard Lynch
On Wed, August 10, 2005 7:05 am, Karl-Heinz Christian Zeck wrote: Does anyone have any idea how to restart windows from a php script? You could send it the various hacks such as Ping of Death ranging up to current Microsoft Windows bugs from any remote computers :-) I tried the following:

RE: [PHP] what should I look for with this error

2005-08-10 Thread Jay Blanchard
[snip] 755 lines of code that should have never been posted in its entirity, especially without line numbers or something saying ---HERE IS THE PROBLEM LINE [/snip] Dude, when you have a syntax error like this only post 20 or 30 lines of the code surrounding the line and then point out which line

Re: [PHP] Re: dynamic object instances

2005-08-10 Thread Thomas Angst
Matthew Weier O'Phinney schrieb: Use the func_* functions, along with array_shift(). In addition, you'll need to use either a standard-named static instantiator, or the class name as the constructor method: function create($class) { $args = func_get_args(); array_shift($args); // remove

RE: [PHP] what should I look for with this error

2005-08-10 Thread Jay Blanchard
[snip] Dude, when you have a syntax error like this only post 20 or 30 lines of the code surrounding the line and then point out which line is #foo, 'k? Your HEREDOC appears to be messed up. On line 623 the closing identifier is not in first column of the line (when I cut n paste the code into an

Re: [PHP] graph - dowloads/hr

2005-08-10 Thread Richard Lynch
On Tue, August 9, 2005 3:07 pm, Sebastian wrote: i'd like to create a graph with the amount of downloads per hour, i am a little confused how i should go about this. i know i can use rrdtool/mrtg, but im looking for more 'user friendly' graphs with custom colors,etc. each time someone

RE: [PHP] Gathering CPU info from Linux and FreeBSD and placing it into aMySQL db

2005-08-10 Thread Patrick - Jupiter Hosting
Hi Nate, We are a hosting company. We use this Mambo-like CMS called CATS, which pretty much tells us what company owns what server(s) in our data centers. CATS will provide us with a list of details on the specs for each machine they own, which include the specs I listed (memory, # of cpus,

Re: [PHP] force download

2005-08-10 Thread Sebastian
Richard Lynch wrote: On Wed, August 10, 2005 12:49 pm, Chris wrote: if ($extension != 'txt') { header(Content-disposition: inline; filename=\$file[type]\); } else { // force txt files to prevent XSS header(Content-disposition: attachment; filename=\$file[type]\); } The

Re: [PHP] php output to string

2005-08-10 Thread Richard Lynch
On Tue, August 9, 2005 2:55 pm, Jesús Fernández wrote: Hi there, i'm a little newbie you know. I have a php that returns some xml, and i want to parse that xml through php. the xml returned depends on the variable passed thru the url. what i need is to get the output of that php file and

Re: [PHP] Regular expressions book

2005-08-10 Thread Anas Mughal
The best I found is: O'Reilly book - Mastering Regular Expressions On 8/3/05, -k. [EMAIL PROTECTED] wrote: Has anyone here tried to learn Regular expressions with RegexBuddy? http://www.regular-expressions.info/regexbuddy.html It looks pretty cool, and even has some PHP specific

Re: [PHP] html_entity_decode () for hellip;, rsquo;, etc.

2005-08-10 Thread Jasper Bryant-Greene
Richard Lynch wrote: On Wed, August 10, 2005 11:55 am, Marco wrote: I tried using html_entity_decode () but why won't these characters decode: rsquo; ndash; hellip; ldquo; rdquo; WILD GUESS: Those are not standards-based, and are some made-up Microsoft crap? Nah, they are standard HTML

Re: [PHP] Gathering CPU info from Linux and FreeBSD and placing it into aMySQL db

2005-08-10 Thread Greg Donald
On 8/10/05, Patrick - Jupiter Hosting [EMAIL PROTECTED] wrote: Hi Nate, We are a hosting company. We use this Mambo-like CMS called CATS, which pretty much tells us what company owns what server(s) in our data centers. CATS will provide us with a list of details on the specs for each

Re: [PHP] rename an uploaded file.

2005-08-10 Thread Richard Lynch
On Tue, August 9, 2005 6:16 am, Stut wrote: Colons (:) are not allowed in Windows filenames. Of course they aren't allowed in file NAMES -- Because they are an integral part of a drive letter designation such as C: which is what is being used here. There's nothing wrong with the C: part of the

Re[4]: [PHP] Restarting windows from php

2005-08-10 Thread Richard Davey
Hello Richard, Wednesday, August 10, 2005, 9:40:02 PM, you wrote: RL I dunno if YOUR Windows box has some cygwin thingie or something RL that makes shutdown be a real command, or if it's just a RL versioning issue, but the single test platform I had available RL pretty much had no shutdown

Re: [PHP] Restarting windows from php

2005-08-10 Thread Tyler Kiley
I never used this kind of functions before. What's wrong? In IIS for Execute Permissions I have Scripts and Executables. What permissions should I set for the Internet Guest Account? Or something else caused the problem, not the permissions? Please help me.:) On windows, php uses cmd.exe to

Re: [PHP] force download

2005-08-10 Thread Richard Lynch
On Wed, August 10, 2005 2:07 pm, Sebastian wrote: if i don't use Content-disposition IE downloads the file as unknown (mp3, exe, or otherwise) with no extension and the names the file you are downloading becomes the name of the script that was called. lol? So here's what you do. Go ahead and

Re: [PHP] Gathering CPU info from Linux and FreeBSD and placing it into aMySQL db

2005-08-10 Thread Patrick - Jupiter Hosting
Hi Greg, Thanks for the link, although I don't think this is exactly what I am looking for. I am looking for a rather simple way to automate the ssh into each box and gathering of the system information, instead of monitoring the servers. This is going to be a one time operation, as once we

Re: [PHP] Gathering CPU info from Linux and FreeBSD and placing it into aMySQL db

2005-08-10 Thread Robert Cummings
On Wed, 2005-08-10 at 19:07, Patrick - Jupiter Hosting wrote: Hi Greg, Thanks for the link, although I don't think this is exactly what I am looking for. I am looking for a rather simple way to automate the ssh into each box and gathering of the system information, instead of monitoring

[PHP] Redisplaying information from a HTML form

2005-08-10 Thread Ravi Gogna
Hi there I'm absolutely new at this so forgive me if none of it makes any sense! I'm trying to write a page which lets you apply for tickets. I've written it in PHP and used simple variable names for all the input fields. Upon clicking submit, I want the form to be checked for incorrect

Re: [PHP] Restarting windows from php

2005-08-10 Thread Jochem Maas
Richard Lynch wrote: On Wed, August 10, 2005 7:05 am, Karl-Heinz Christian Zeck wrote: Does anyone have any idea how to restart windows from a php script? ... SSL, password protected, maybe even have the script record a time-stamp when it's run, and refuse to run itself more often than

Re: [PHP] dynamic object instances

2005-08-10 Thread Jochem Maas
Thomas Angst wrote: Hello List, I would like to create an object inside a function with its classname and a parameter list submitted by the function call. function create($class, $parameter) { $obj = new $class($parameter); return $obj; } This is working very well. But I have not

Re: [PHP] what should I look for with this error

2005-08-10 Thread Jochem Maas
John Nichel wrote: Bruce Gilbert wrote: snip a ton of un-needed code Your heredoc is messed up. Look into getting an editor which will highlight the errors for you. This mailing list isn't here to syntax check (unless it's 4:30 on a Friday). can we hold you to that John ;-) -- PHP

Re: [PHP] N/A

2005-08-10 Thread Jochem Maas
Rory Browne wrote: As Ireland's property developers scramble to snap up every last square metre of prime Dublin real estate, a green oasis in the heart of this booming capital is standing firm against the tide of change. fantastic Rory! lol All this may seem highly irrelevent, but when you

Re: [PHP] Re: dynamic object instances

2005-08-10 Thread Eli
Thomas Angst wrote: Thanks for you answer, but sorry, I do not understand your hint. I tried this code: class test { var $txt; function test($txt) { $this-txt = $txt; } function out() { echo $this-txt; } } $obj = call_user_func_array(array('test', 'test'), array('foobar'));

Re: [PHP] Re: dynamic object instances

2005-08-10 Thread Jochem Maas
Eli wrote: Thomas Angst wrote: Thanks for you answer, but sorry, I do not understand your hint. I tried this code: class test { var $txt; function test($txt) { $this-txt = $txt; } function out() { echo $this-txt; } } $obj = call_user_func_array(array('test', 'test'),

Re: [PHP] Redisplaying information from a HTML form

2005-08-10 Thread Jochem Maas
Ravi Gogna wrote: Hi there I'm absolutely new at this so forgive me if none of it makes any sense! I'm trying to write a page which lets you apply for tickets. I've written it in PHP and used simple variable names for all the input fields. Upon clicking submit, I want the form to be checked

Re: [PHP] display error line in object method

2005-08-10 Thread comex
On 8/10/05, Georgi Ivanov [EMAIL PROTECTED] wrote: Hi, I have a db wrapper class. I use it like this : $db-query(SQL HERE) or die ($db-error()); Is there a way to display the line on which $db-error() is executed without doing die (__LINE__. .$db-error() )?

Re: [PHP] Re: dynamic object instances

2005-08-10 Thread Eli
Jochem Maas wrote: Eli wrote: ? $obj_eval=return new $class(; for ($i=0; $icount($args); $i++) $obj_eval.=\$args[$i],; $obj_eval=substr($obj_eval,0,-1).);; $obj=eval($obj_eval); ? I believe that this is the kind of clever, evil stuff the OP was trying to avoid... (evil - eval :-) -

[PHP] How efficient is OOP in PHP5?

2005-08-10 Thread TalkativeDoggy
Hi all, I have heard that function style is 400% faster than OOP in PHP, and give a little agreement. So in the past year, I write more PHP code in function way while less in OOP way. This morning, I read an article called How efficient is OOP in PHP according to the author's test, writing

[PHP] Sockets and SOAP

2005-08-10 Thread Eli
Hi, I want to implement a client-server relationship between a PHP server application and another .NET client application. I want the connection to be kept alive, so I use the socket routine running till disconnecting. I also want to transfer the data between the server and client using SOAP

[PHP] date field

2005-08-10 Thread John Taylor-Johnston
I have a field 'updated' How can I tell if the date is older than 1 year ago (or should I think of 365 days)? `updated` date NOT NULL default '1999-12-12' I've looked at: http://ca3.php.net/manual/en/function.getdate.php Thanks, John -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] date field

2005-08-10 Thread Jasper Bryant-Greene
John Taylor-Johnston wrote: I have a field 'updated' How can I tell if the date is older than 1 year ago (or should I think of 365 days)? `updated` date NOT NULL default '1999-12-12' From the description you gave it looks like you're using a DBMS to store the date. If it's MySQL, then just

[PHP] Re: date field

2005-08-10 Thread Ben Ramsey
In PHP, you could do something like: $updated = strtotime($db_result['updated']); $one_year_ago = strtotime('-1 year'); if ($updated $one_year_ago) { // updated date is older than a year ago } John Taylor-Johnston wrote: I have a field 'updated' How can I tell if the date is older