php-general Digest 10 Jul 2009 15:39:29 -0000 Issue 6222

2009-07-10 Thread php-general-digest-help
php-general Digest 10 Jul 2009 15:39:29 - Issue 6222 Topics (messages 295124 through 295146): DOMDocument saveHTML() configurable? 295124 by: Michael A. Peters HTTP headers and include() 295125 by: James Colannino 295126 by: Eddie Drapkin 295127 by: Michael

[PHP] open source event calendar

2009-07-10 Thread Joey
Hello All! Does anyone know of a good open source calendar app? Hopefully one that has ongoing development etc. ( sorry asked this before, but can't find a web list to search for the previous results, php.net has a list that is not searchable ) Thanks!

Re: [PHP] HTTP headers and include()

2009-07-10 Thread James Colannino
Eddie Drapkin wrote: HTTP headers are sent and finalized after the first bit of output. I had the same problem before and it turned out to be because I had a close tag ? at the end of a file followed by some whitespace. The solution was to remove the ? from the end of all the files and I

Re: [PHP] open source event calendar

2009-07-10 Thread kranthi
that depends upon your need.embedding google calendar is best for starters

Re: [PHP] HTTP headers and include()

2009-07-10 Thread kranthi
a single line break after the closing ? will not cause this problem. PHP interpreter will neglect a single line break after ? a good debugger like xdebug will be helpful in this case. u can also see the source code of the file to locate the output. any thing before php warning is the output before

RE: [PHP] Obeying the rules (was Simple login form with cookies)

2009-07-10 Thread Arno Kuhl
I'm sure those who've been on this list a while muttered here we go again... when this thread started. Personally I think if there was a poll about this the bell curve would have some on the left demanding we all top post, many on the right of the curve demanding we all bottom post, and a solid

Re: [PHP] Re: SESSION variables: How much is too much?

2009-07-10 Thread kranthi
I prefer to reduce SESSION usage as much as possible. but I dont hesitate to use them if need arises. Points to note - Execution time: Only session_id is stored on the client's computer, and the actual data is stored on the server. so it will take nearly same time to process 100 session

Re: [PHP] mysterious f character appearing. Why??

2009-07-10 Thread kranthi
I faced the same problem many times. The reason turned out to be an additional character outside /td tags. HTML formating software like Dreamweaver, HTML Tidy, Notepad++ will be helpful in these cases. Above all use HTML Validatior extension for firefox. Any ways this question has got nothing to

RE: [PHP] Obeying the rules (was Simple login form with cookies)

2009-07-10 Thread abdulazeez alugo
To: php-general@lists.php.net From: t...@marston-home.demon.co.uk Date: Thu, 9 Jul 2009 22:37:44 +0100 Subject: Re: [PHP] Obeying the rules (was Simple login form with cookies) Still Learnin' ssski...@gmail.com wrote in message news:4a565c73.8090...@gmail.com... Tony Marston wrote:

Re: [PHP] open source event calendar

2009-07-10 Thread Daniel Brown
On Fri, Jul 10, 2009 at 03:13, Joeyj...@web56.net wrote: Hello All! Does anyone know of a good open source calendar app? Hopefully one that has ongoing development etc. ( sorry asked this before, but can't find a web list to search for the previous results, php.net has a list that is not

Re: [PHP] open source event calendar

2009-07-10 Thread tedd
At 3:13 AM -0400 7/10/09, Joey wrote: Hello All! Does anyone know of a good open source calendar app? Hopefully one that has ongoing development etc. ( sorry asked this before, but can't find a web list to search for the previous results, php.net has a list that is not searchable ) Joey:

Re: [PHP] PHP script for detecting pattern sequences?

2009-07-10 Thread Isaac Dover
sorry, should have added that i'm not aware of any library to do this, but you could certainly write one! :) and i forgot to use the list, sorry. - isaac On Fri, Jul 10, 2009 at 10:28 AM, Isaac Dover isaacdo...@gmail.com wrote: though this looks suspiciously like a homework assignment, i'll

[PHP] Error Trapping

2009-07-10 Thread Floyd Resler
I'm having a hard time getting my head around this problem. I have to connect to a FoxPro database using an ODBC driver. Sometimes when I connect I get an error. The error doesn't occur all the time and usually another connect attempt works. I can trap the error through an error

Re: [PHP] HTTP headers and include()

2009-07-10 Thread Michael A. Peters
tedd wrote: At 12:24 AM -0700 7/10/09, James Colannino wrote: Eddie Drapkin wrote: HTTP headers are sent and finalized after the first bit of output. I had the same problem before and it turned out to be because I had a close tag ? at the end of a file followed by some whitespace. The

Re: [PHP] PHP script for detecting pattern sequences?

2009-07-10 Thread Andrew Ballard
On Fri, Jul 10, 2009 at 10:30 AM, Isaac Doverisaacdo...@gmail.com wrote: On Wed, Jul 8, 2009 at 11:32 PM, WenDong Zhang zwd2...@gmail.com wrote: On Thu, Jul 9, 2009 at 6:00 AM, Per Jessen p...@computer.org wrote: A suitable regex might look something like this: /([0-9]+)\1+/ Not

Re: [PHP] Error Trapping

2009-07-10 Thread Eddie Drapkin
On Fri, Jul 10, 2009 at 10:56 AM, Floyd Reslerfres...@adex-intl.com wrote: I'm having a hard time getting my head around this problem.  I have to connect to a FoxPro database using an ODBC driver.  Sometimes when I connect I get an error.  The error doesn't occur all the time and usually

Re: [PHP] PHP script for detecting pattern sequences?

2009-07-10 Thread Isaac Dover
i just got pwned! thanks, andrew. i should've paid more attention to what i was reading. - isaac On Fri, Jul 10, 2009 at 11:19 AM, Andrew Ballard aball...@gmail.com wrote: On Fri, Jul 10, 2009 at 10:30 AM, Isaac Doverisaacdo...@gmail.com wrote: On Wed, Jul 8, 2009 at 11:32 PM, WenDong Zhang

Re: [PHP] Error Trapping

2009-07-10 Thread Floyd Resler
Eddie, Thanks for the tip. It suddenly occurred to me what I was doing wrong. I do use an error trap but I was telling my script to stop running after the error. So, now I ignore it and continue through the loop you suggested. I guess it was working exactly the way I had written it!

Re: [PHP] Error Trapping

2009-07-10 Thread Eddie Drapkin
On Fri, Jul 10, 2009 at 11:39 AM, Floyd Reslerfres...@adex-intl.com wrote: Eddie,        Thanks for the tip.  It suddenly occurred to me what I was doing wrong.  I do use an error trap but I was telling my script to stop running after the error.  So, now I ignore it and continue through the

[PHP] mysql cache query as xml

2009-07-10 Thread workerho...@studysite.eu
hi guys, i need some help by optimize the performance. my problem is that i need a lot of rows the whole site (don't ask i need the rows really :-) ) this is about ~4000 rows it will be loaded from mysql database in 0.3 seconds my idea was to cache this rows in a xml file like for example:

Re: [PHP] mysql cache query as xml

2009-07-10 Thread Daniel Brown
Chris; From my understanding of your question, your message (included below in its entirety) is better sent to the MySQL General list, which I've CC'd on this reply. If you haven't yet, please subscribe there at mysql-subscr...@lists.mysql.com to follow the thread for responses. If

Re: [PHP] mysql cache query as xml

2009-07-10 Thread Andrew Ballard
On Fri, Jul 10, 2009 at 12:36 PM, Daniel Browndanbr...@php.net wrote:    Chris;    From my understanding of your question, your message (included below in its entirety) is better sent to the MySQL General list, which I've CC'd on this reply.  If you haven't yet, please subscribe there at

Re: [PHP] mysql cache query as xml

2009-07-10 Thread workerho...@studysite.eu
hi andrew i think you understand my problem a little, but if 100 user load this query at the same time, the two mysql server had a lot to do! so i think to cache this query as xml to the application server local make thinks faster, but, i would like to have the same performance to read this xml

Re: [PHP] mysql cache query as xml

2009-07-10 Thread Daniel Brown
On Fri, Jul 10, 2009 at 12:59, Andrew Ballardaball...@gmail.com wrote: I understood the question to be how to improve performance by caching MySQL results into an XML document (which, given that it was posted here) within a PHP script. Perhaps this is not the correct interpretation, but if so

Re: [PHP] mysql cache query as xml

2009-07-10 Thread Daniel Brown
On Fri, Jul 10, 2009 at 13:07, workerho...@studysite.euworkerho...@studysite.eu wrote: hi andrew i think you understand my problem a little, but if 100 user load this query at the same time, the two mysql server had a lot to do! so i think to cache this query as xml to the application server

Re: [PHP] mysql cache query as xml

2009-07-10 Thread workerho...@studysite.eu
hmm, the infrastructure ist good, this is just this query so to solve my problem i could run mysql on the application server and store just this table and read the query from them, it could solve my problem litte, i hope so! Daniel Brown schrieb: On Fri, Jul 10, 2009 at 13:07,

Re: [PHP] mysql cache query as xml

2009-07-10 Thread Daniel Brown
On Fri, Jul 10, 2009 at 13:23, workerho...@studysite.euworkerho...@studysite.eu wrote: hmm, the infrastructure ist good, this is just this query so to solve my problem i could run mysql on the application server and store just this table and read the query from them, it could solve my

Re: [PHP] mysql cache query as xml

2009-07-10 Thread Bastien Koert
On Fri, Jul 10, 2009 at 1:23 PM, workerho...@studysite.euworkerho...@studysite.eu wrote: hmm, the infrastructure ist good, this is just this query so to solve my problem i could run mysql on the application server and store just this table and read the query from them, it could solve my

Re: [PHP] mysql cache query as xml

2009-07-10 Thread workerho...@studysite.eu
yes i think i should do this Daniel Brown schrieb: On Fri, Jul 10, 2009 at 13:23, workerho...@studysite.euworkerho...@studysite.eu wrote: hmm, the infrastructure ist good, this is just this query so to solve my problem i could run mysql on the application server and store just this

[PHP] Re: [PHP-WEBMASTER] Show Source QUESTION

2009-07-10 Thread Daniel Brown
On Fri, Jul 10, 2009 at 02:47, David Leesubl...@yahoo.com wrote: I was wanting to have a page called source.php like you guys, and have it display the source code for the pages, but I've looked at the source code for you guys source.php page and I can't seem to make it work on my server.

Re: [PHP] mysql cache query as xml

2009-07-10 Thread Jon Tamayo
On Fri, 10 Jul 2009 13:29:31 -0400 Bastien Koert phps...@gmail.com wrote: On Fri, Jul 10, 2009 at 1:23 PM, workerho...@studysite.euworkerho...@studysite.eu wrote: hmm, the infrastructure ist good, this is just this query so to solve my problem i could run mysql on the application server

Re: [PHP] mysql cache query as xml

2009-07-10 Thread Michael A. Peters
workerho...@studysite.eu wrote: hi andrew i think you understand my problem a little, but if 100 user load this query at the same time, the two mysql server had a lot to do! so i think to cache this query as xml to the application server local make thinks faster, but, i would like to have the

Re: [PHP] runtime access to static variable

2009-07-10 Thread Madbreaks
Jack Bates-2 wrote: How do I access a static variable when I do not know the name of the class until runtime? Why not just: eval('$staticVal = '.get_class($myClass).'::staticVarName;'); ...now the value is in $staticVal. Or am I missing something here? No need to tell me eval is evil

Re: [PHP] runtime access to static variable

2009-07-10 Thread Martin Scotta
On Fri, Jul 10, 2009 at 4:25 PM, Madbreaksnab...@vektral.com wrote: Jack Bates-2 wrote: How do I access a static variable when I do not know the name of the class until runtime? Why not just: eval('$staticVal = '.get_class($myClass).'::staticVarName;'); ...now the value is in

[PHP] HELP SQL INJECTION

2009-07-10 Thread Chris Payne
Hi everyone, My server appears to be the victim of a chinese hack-attack and I believe they managed to change pages via SQL Injection, do any of you have any ideas how to lock down my forms so MySQL cannot be used from my forms? Thanks everyone Chris -- PHP General Mailing List

Re: [PHP] HELP SQL INJECTION

2009-07-10 Thread Daniel Brown
On Fri, Jul 10, 2009 at 15:48, Chris Paynechris_pa...@danmangames.com wrote: Hi everyone, My server appears to be the victim of a chinese hack-attack and I believe they managed to change pages via SQL Injection, do any of you have any ideas how to lock down my forms so MySQL cannot be used

Re: [PHP] HELP SQL INJECTION

2009-07-10 Thread Eddie Drapkin
On Fri, Jul 10, 2009 at 3:50 PM, Daniel Browndanbr...@php.net wrote: On Fri, Jul 10, 2009 at 15:48, Chris Paynechris_pa...@danmangames.com wrote: Hi everyone, My server appears to be the victim of a chinese hack-attack and I believe they managed to change pages via SQL Injection, do any of

Re: [PHP] DOMDocument saveHTML() configurable?

2009-07-10 Thread Steve
Michael A. Peters wrote: The $dom-saveHTML() function does a pretty good job of knowing what tags are not closed - IE it does br, meta, param, etc. correctly. Is there a way to add a tag without children to it's database? Specifically I'm talking about the new source tag from HTML 5 that is

Re: [PHP] PHP not running properly

2009-07-10 Thread Bastien Koert
On Fri, Jul 10, 2009 at 4:17 PM, Daniel Browndanbr...@php.net wrote: On Fri, Jul 10, 2009 at 15:44, Togrul Mamedbekovtogrul.mamedbe...@iadc.org wrote: Hello Sir or Madam, We just updated our PHP 5.2 software. And when I try to run the php info script! I get a blank screen!    What do you

[PHP] PHP not running properly

2009-07-10 Thread Togrul Mamedbekov
Hello Sir or Madam, We just updated our PHP 5.2 software. And when I try to run the php info script! I get a blank screen! I am including my php.ini settings Please help Thank you in advance, Togrul Mamedbekov Marketing Publishing Assistant *10370 Richmond Ave, Ste 760, Houston,

Re: [PHP] PHP not running properly

2009-07-10 Thread Daniel Brown
On Fri, Jul 10, 2009 at 15:44, Togrul Mamedbekovtogrul.mamedbe...@iadc.org wrote: Hello Sir or Madam, We just updated our PHP 5.2 software. And when I try to run the php info script! I get a blank screen! What do you see when you view the source of the page with phpinfo() ? -- /Daniel

[PHP] php.ini directive include_path variables

2009-07-10 Thread J.P. Trosclair
I'm wondering if there is a way to dynamically set the absolute path of an include directory based on the document root of the site via htaccess or some other method other than in the scripts themselves within the site. Example of what I'm looking for: $doc_root/.htaccess: php_value

Re: [PHP] php.ini directive include_path variables

2009-07-10 Thread Daniel Brown
On Fri, Jul 10, 2009 at 16:56, J.P. Trosclairjptroscl...@judelawfirm.com wrote: I'm wondering if there is a way to dynamically set the absolute path of an include directory based on the document root of the site via htaccess or some other method other than in the scripts themselves within the

Re: [PHP] HELP SQL INJECTION

2009-07-10 Thread Govinda
On Jul 10, 2009, at 1:50 PM, Daniel Brown wrote: On Fri, Jul 10, 2009 at 15:48, Chris Paynechris_pa...@danmangames.com wrote: Hi everyone, My server appears to be the victim of a chinese hack-attack and I believe they managed to change pages via SQL Injection, do any of you have any ideas

Re: [PHP] php.ini directive include_path variables

2009-07-10 Thread J.P. Trosclair
Daniel Brown wrote: Please check the archives and Google before posting here. This exact question was just discussed and answered within the last seven days. I don't recall the name of the thread (perhaps someone else could name it for me), but I believe the original poster was Govinda.

Re: [PHP] mysql cache query as xml

2009-07-10 Thread workerho...@studysite.eu
first thanks to all who have read ;-) your solution looks like the method how i done it actually, i have tested the last hours the solution with sql lite on application server the Solution: 3 Mysql Server ( 1 more to handle the big load ) (1 Master, 2 Slaves) mysql replication 10

Re: [PHP] php.ini directive include_path variables

2009-07-10 Thread Daniel Brown
On Fri, Jul 10, 2009 at 17:24, J.P. Trosclairjptroscl...@judelawfirm.com wrote: I've spent the better part of this afternoon looking through google and the archives for different variations on terminology before resorting to subscribing and posting to this list. Will go back to digging based

Re: [PHP] php.ini directive include_path variables

2009-07-10 Thread Govinda
On Jul 10, 2009, at 3:16 PM, Daniel Brown wrote: On Fri, Jul 10, 2009 at 16:56, J.P. Trosclairjptroscl...@judelawfirm.com wrote: I'm wondering if there is a way to dynamically set the absolute path of an include directory based on the document root of the site via htaccess or some other

Re: [PHP] php.ini directive include_path variables

2009-07-10 Thread Daniel Brown
On Fri, Jul 10, 2009 at 17:28, Govindagovinda.webdnat...@gmail.com wrote: yes, look for posts with this subject line: Re: [PHP] best way to properly build an include path *regardless*  from where I am calling the include? (just don't ask me to explain everything that those good souls were

Re: [PHP] php.ini directive include_path variables

2009-07-10 Thread J.P. Trosclair
Govinda wrote: [PHP] best way to properly build an include path*regardless* Thanks, appreciated. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] HELP SQL INJECTION

2009-07-10 Thread Chris Payne
Hi everyone, Hmmm i'm not sure it is an SQL Injection now, done a lot more checking and it is inserting code at the end of every index.htm index.html default.html and index.php pages on my site. Ooooh what fun :-) Chris On Fri, Jul 10, 2009 at 2:22 PM, Govindagovinda.webdnat...@gmail.com

Re: [PHP] HELP SQL INJECTION

2009-07-10 Thread Daniel Brown
On Fri, Jul 10, 2009 at 17:37, Chris Paynechris_pa...@danmangames.com wrote: Hi everyone, Hmmm i'm not sure it is an SQL Injection now, done a lot more checking and it is inserting code at the end of every index.htm index.html default.html and index.php pages on my site. Ooooh what fun :-)

Re: [PHP] HELP SQL INJECTION

2009-07-10 Thread Chris Payne
Hi, Yes their IP is from Russia by Chinese in origin. How can this be prevented? Thank you all SO much for your help, it is very appreciated. Chris On Fri, Jul 10, 2009 at 2:40 PM, Daniel Browndanbr...@php.net wrote: On Fri, Jul 10, 2009 at 17:37, Chris Paynechris_pa...@danmangames.com

Re: [PHP] HELP SQL INJECTION

2009-07-10 Thread Daniel Brown
On Fri, Jul 10, 2009 at 17:48, Chris Paynechris_pa...@danmangames.com wrote: Hi, Yes their IP is from Russia by Chinese in origin. How can this be prevented? Thank you all SO much for your help, it is very appreciated. So would be your move to bottom-posting (with nods to the jihad

Re: [PHP] HELP SQL INJECTION

2009-07-10 Thread Chris Payne
Thank you all SO much for your help, it is very appreciated.    So would be your move to bottom-posting (with nods to the jihad that was the longest thread of the list so far this month) as per the mailing list rules.  ;-P    What's the URL to your site, if you feel comfortable in providing

Re: [PHP] HELP SQL INJECTION

2009-07-10 Thread Daniel Brown
On Fri, Jul 10, 2009 at 18:11, Chris Paynechris_pa...@danmangames.com wrote: Sorry I post at the top because i'm legally blind and it's easier but i'll try to post at the bottom :-) This is the main site on my server: http://www.oxyge.net I just took out the offending code at the end of

Re: [PHP] mysql cache query as xml

2009-07-10 Thread Phpster
On Jul 10, 2009, at 5:25 PM, workerho...@studysite.eu workerho...@studysite.eu wrote: first thanks to all who have read ;-) your solution looks like the method how i done it actually, i have tested the last hours the solution with sql lite on application server the Solution: 3

Re: [PHP] HELP SQL INJECTION

2009-07-10 Thread Zareef Ahmed
Hi, First of all change your FTP password and stop storing your password in your FTP client. This type of attacks are very common with the people who use insecure FTP client. My previous experience with your kind of problem tell me that chances of a FTP attack are really higher in the pattern

[PHP] I am RTFM, but still stumbling on how to get built-in functions parsed in heredoc

2009-07-10 Thread Govinda
How do I get basename(__FILE__) or htmlentities($somevar) to be evaluated in a heredoc? Govinda govinda.webdnat...@gmail.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] I am RTFM, but still stumbling on how to get built-in functions parsed in heredoc

2009-07-10 Thread Eddie Drapkin
On Fri, Jul 10, 2009 at 8:25 PM, Govindagovinda.webdnat...@gmail.com wrote: How do I  get basename(__FILE__) or htmlentities($somevar) to be evaluated  in a heredoc? Govinda govinda.webdnat...@gmail.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe,

Re: [PHP] I am RTFM, but still stumbling on how to get built-in functions parsed in heredoc

2009-07-10 Thread Daniel Brown
On Fri, Jul 10, 2009 at 20:25, Govindagovinda.webdnat...@gmail.com wrote: How do I  get basename(__FILE__) or htmlentities($somevar) to be evaluated  in a heredoc? You don't. Instead, you have to store the output from those in a variable (or array), then place it into the HEREDOC it.

Re: [PHP] I am RTFM, but still stumbling on how to get built-in functions parsed in heredoc

2009-07-10 Thread Zareef Ahmed
On Sat, Jul 11, 2009 at 5:55 AM, Govinda govinda.webdnat...@gmail.comwrote: How do I get basename(__FILE__) or htmlentities($somevar) to be evaluated in a heredoc? heredoc was there to work with the strings... why you want to use functions into that? Govinda

Re: [PHP] PHP not running properly

2009-07-10 Thread Zareef Ahmed
A quick checklist/todo list : 1. set display_errors=yes in php.ini 2. Make sure you are using full ?php tag to write your script. For a good solutions you should also mentions about your OS/Web Server Zareef Ahmed On Sat, Jul 11, 2009 at 1:53 AM, Bastien Koert phps...@gmail.com wrote: On

Re: [PHP] I am RTFM, but still stumbling on how to get built-in functions parsed in heredoc

2009-07-10 Thread Govinda
On Jul 10, 2009, at 6:34 PM, Zareef Ahmed wrote: heredoc was there to work with the strings... why you want to use functions into that? I'm lazy. Like to type less. ;-) But now I know. Thanks guys. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

[PHP] MySql Injection advice

2009-07-10 Thread Haig Dedeyan
Hi everyone, I'm starting to experiment with an edit form and I am seeing the following behaviour: $fname = mysql_real_escape_string($fname); $lname = mysql_real_escape_string($lname); $sql = UPDATE phonedir SET fname = '$fname',lname = '$lname' WHERE id=$id; $result = mysql_query($sql);

Re: [PHP] MySql Injection advice

2009-07-10 Thread Michael A. Peters
Haig Dedeyan wrote: Hi everyone, I'm starting to experiment with an edit form and I am seeing the following behaviour: $fname = mysql_real_escape_string($fname); $lname = mysql_real_escape_string($lname); $sql = UPDATE phonedir SET fname = '$fname',lname = '$lname' WHERE id=$id; $result =

Re: [PHP] MySql Injection advice

2009-07-10 Thread Haig Dedeyan
On July 10, 2009 11:26:04 pm Haig Dedeyan wrote: Haig Dedeyan wrote: Hi everyone, I'm starting to experiment with an edit form and I am seeing the following behaviour: $fname = mysql_real_escape_string($fname); $lname = mysql_real_escape_string($lname); $sql = UPDATE phonedir