[PHP] Kickstarter Project on Massive Log data Aggregation and Processing with Open Source Software
Hi Everyone, I just launched a Kickstarter project that will fund the creation of a course on how to aggregate, process, search and visualize massive log data using open source software. I believe some of the folks on the user mailing list would find this helpful. Web applications do generate a lot of log data and I believe that knowing how to deal with it could be very valuable. Is it OK to send out an email with a summary of what the project is about?
Re: [PHP] classes and variables
You do not need to access $DB as a global variable Since $db_database is a property of search_helper, you can initialize it by passing a value via the constructor like this class search_helper extends AjaxACApplication { protected $db_database; public function __construct($database_name) { $this-db_database = $database_name; } public function setDbName($database_name) { $this-db_database = $database_name; } public function sayDbName() { echo The database name is . $this-db_database; } } This should allow you to do this $helper = new search_helper($DB); Later on you can also change the database name like this $helper-setDbName($newDB); This should state what the database name is $helper-sayDbName(); On Mon, May 3, 2010 at 5:05 PM, Merlin Morgenstern merli...@fastmail.fmwrote: Hi there, I am new to classes in PHP and do want to change a class that has been in a package I downloaded. I do simply want to access a variable from outside. This is the code: class search_helper extends AjaxACApplication { //global $DB; var $db_database = 'test'; } I would like to replace 'test' with $DB. This is the variable from outside that holds the name of the Database. Thank you for any help! Merlin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Good Enough is not good enough. To give anything less than your best is to sacrifice the gift. Quality First. Measure Twice. Cut Once. http://www.israelekpo.com/
[PHP] Drupal Developers and Themers Needed in Orlando, Florida
I am not sure if this is the right place for this message but please contact me if you are interested. Hi There, My name is Israel Ekpo and I work as a technical lead for Bonnier Corporation. Bonnier Corporation is a major publishing organization with offices in the US, headquarters in Stockholm and operations in over 20 countries strategically dispersed around the globe. We are looking for good and experienced Drupal developers and themers. If you have experience developing web applications with drupal and also if you have theming experience in drupal, please feel free to email me your resume. Experienced PHP developers and CSS experts could also be considered. Please email your updated resume to me at israele...@gmail.com Please place Drupal Developer or Drupal Themer in the subject line of the email. Thanks. -- Good Enough is not good enough. To give anything less than your best is to sacrifice the gift. Quality First. Measure Twice. Cut Once.
Re: [PHP] Re: What PHP version are you using?
On Mon, Nov 2, 2009 at 2:15 PM, John Black s...@network-technologies.orgwrote: Bob McConnell wrote: I just checked the Red Hat 5.4 manifest and it shows php-5.1.6-23.el5 - php-5.1.6-23.2.el5_3. CentOS simply repackages the Red Hat kit without the proprietary bits. I don't understand why they are so far behind on a build that was just released last month, but our hosting service only provides what's in the official release. I just check the CentOS repo and the repo lists php-5.1.6-23.2.el5_3.x86_64.rpm as latest. So CentOS is as upto date as RedHat, the way it should be. -- John Define: Ubuntard = The drivel this guy spews is inane and forgettable stuff, characterized by comments that treat Ubuntu as if it is the only distribution in existence. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php That is not good. 5.1.6 was released in August 2006. More than 3 years ago. There are a lot of bug fixes since then http://www.php.net/ChangeLog-5.php It looks like the php libraries are not maintained in CentOS and Red Hat Repositories. -- Good Enough is not good enough. To give anything less than your best is to sacrifice the gift. Quality First. Measure Twice. Cut Once.
[PHP] What PHP version are you using?
Hi Guys, I just want to conduct a quick survey to find out what version of PHP people are using in their production environments. I have a PHP extension for Solr that I have set the minimum required version as 5.2.11. http://pecl.php.net/package/solr/ However, most of the PHP users that want to use it are unable to do so because the PHP version in the PROD environments is below 5.2.11 They are also nervous about upgrading to newer versions as it will require some regression testing. In my production environment I am using 5.3.0 and most of the people that I have contacted seems to be running 5.2.10 When I released the extension, I did all my regression tests against PHP 5.2.11 and now I am considering doing regression tests against 5.2.4 (released 30 August 2007) and newer versions so that I can set the minimum required version to 5.2.4 in order to accommodate more people. I cannot go below 5.2.0 though but I am thinking about starting at 5.2.4 and newer. I would really appreciate some feedback as it will be useful in helping me determine which PHP version numbers to do my regression tests against. Thanks. -- Good Enough is not good enough. To give anything less than your best is to sacrifice the gift. Quality First. Measure Twice. Cut Once.
Re: [PHP] What PHP version are you using?
On Thu, Oct 29, 2009 at 11:15 AM, Fernando Castillo Aparicio f_c_a_1...@yahoo.es wrote: 5.2.8, but testing 5.3 in local environment. Thanks Fernando. -- Good Enough is not good enough. To give anything less than your best is to sacrifice the gift. Quality First. Measure Twice. Cut Once.
Re: [PHP] What PHP version are you using?
On Thu, Oct 29, 2009 at 11:47 AM, tedd tedd.sperl...@gmail.com wrote: At 11:10 AM -0400 10/29/09, Israel Ekpo wrote: Hi Guys, I just want to conduct a quick survey to find out what version of PHP people are using in their production environments. My version depends upon the client. I have one client who is still in version 4.3.1.0. Cheers, tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com Thanks guys. -- Good Enough is not good enough. To give anything less than your best is to sacrifice the gift. Quality First. Measure Twice. Cut Once.
Re: [PHP] What PHP version are you using?
On Thu, Oct 29, 2009 at 12:30 PM, Dan McCullough dan.mccullo...@gmail.comwrote: Like Israel it depends on the client I am doing several projects for a client now that the hosting company is still using 4.0.6 - and its been a headache. Most of the personal projects and many of my other clients are on 5.1 or higher. On Thu, Oct 29, 2009 at 12:22 PM, Tom Barrett t...@miramedia.co.uk wrote: 2009/10/29 Israel Ekpo israele...@gmail.com Hi Guys, I just want to conduct a quick survey to find out what version of PHP people are using in their production environments. I have a PHP extension for Solr that I have set the minimum required version as 5.2.11. [snip] I cannot go below 5.2.0 though but I am thinking about starting at 5.2.4 and newer. I would really appreciate some feedback as it will be useful in helping me determine which PHP version numbers to do my regression tests against. cat /etc/redhat-release Red Hat Enterprise Linux Server release 5.3 (Tikanga) php -v PHP 5.1.6 (cli) (built: Feb 26 2009 07:01:12) Copyright (c) 1997-2006 The PHP Group Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend Technologies yum list php Loaded plugins: downloadonly, rhnplugin, security Excluding Packages in global exclude list Finished Installed Packages php.x86_64 5.1.6-23.2.el5_3 installed I wouldn't have thought this to be too uncommon. HTH The internal Zend Engine version my extension was written for is 2.2.0 or newer. That is why I would not be able to go below 5.2.0, unfortunately. But so far, I appreciate your responses. Please keep it coming. -- Good Enough is not good enough. To give anything less than your best is to sacrifice the gift. Quality First. Measure Twice. Cut Once.
Re: [PHP] Fedora 11 PHP install problems
On Fri, Oct 23, 2009 at 11:54 AM, Ashley Sheridan a...@ashleysheridan.co.ukwrote: Hiya, I know this isn't the best place to ask, but I figured enough people here would have at some point installed PHP on some Linux variant, and I'm hoping that some of you may have even done it on Fedora 11. I'm using the built in gui package manager in Fedora (kpackagekit) to install php, mysql and php-mysql. I let it resolve the dependencies and install, but phpMyAdmin refuses to connect to the Mysql database with the default username and password (root, no password) even though I can successfully connect to plain old Mysql over the command line with mysql -u root -p I thought it was some problem with the built in repositories, so I attempted to build PHP from source, and after sorting out the dependencies manually, I got PHP installed and working from the command line. However, when I try to start httpd up again, it gives me the following error: libphp5.so: undefined symbol: OnUpdateLong I ran a nm command against the libphp5.so file, and the first line is U OnUpdateLong (intentional spaces there) Has anyone come across either of these problems and do you know of a way to overcome either one? All I need really is a way to get it working, so don't mind whether it's via the GUI or the command line! Thanks, Ash http://www.ashleysheridan.co.uk Hi Ashey, What version of PHP did you compile? What were your ./configure options? It looks like the php source is using OnUpdateLong but the source file containing OnUpdateLong is not included or linked properly. I have ran into this kind of problem before. -- Good Enough is not good enough. To give anything less than your best is to sacrifice the gift. Quality First. Measure Twice. Cut Once.
Re: [PHP] Fedora 11 PHP install problems
What about the error libphp5.so: undefined symbol: OnUpdateLong Are you still observing that error? On Fri, Oct 23, 2009 at 1:23 PM, Ashley Sheridan a...@ashleysheridan.co.ukwrote: On Fri, 2009-10-23 at 13:19 -0400, Israel Ekpo wrote: On Fri, Oct 23, 2009 at 11:54 AM, Ashley Sheridan a...@ashleysheridan.co.uk wrote: Hiya, I know this isn't the best place to ask, but I figured enough people here would have at some point installed PHP on some Linux variant, and I'm hoping that some of you may have even done it on Fedora 11. I'm using the built in gui package manager in Fedora (kpackagekit) to install php, mysql and php-mysql. I let it resolve the dependencies and install, but phpMyAdmin refuses to connect to the Mysql database with the default username and password (root, no password) even though I can successfully connect to plain old Mysql over the command line with mysql -u root -p I thought it was some problem with the built in repositories, so I attempted to build PHP from source, and after sorting out the dependencies manually, I got PHP installed and working from the command line. However, when I try to start httpd up again, it gives me the following error: libphp5.so: undefined symbol: OnUpdateLong I ran a nm command against the libphp5.so file, and the first line is U OnUpdateLong (intentional spaces there) Has anyone come across either of these problems and do you know of a way to overcome either one? All I need really is a way to get it working, so don't mind whether it's via the GUI or the command line! Thanks, Ash http://www.ashleysheridan.co.uk Hi Ashey, What version of PHP did you compile? What were your ./configure options? It looks like the php source is using OnUpdateLong but the source file containing OnUpdateLong is not included or linked properly. I have ran into this kind of problem before. -- Good Enough is not good enough. To give anything less than your best is to sacrifice the gift. Quality First. Measure Twice. Cut Once. I've actually got some steps closer to figuring out the problem. It seems that the connection between PHP and MySQL was fine, it just refused a connection as root. If I create another user it connects via phpMyAdmin just fine. The thing now is figuring out either how to get it to connect as root (it currently keeps refusing root) or create another user with all the privileges of root so I can connect with that. As of yet I haven't been able to figure out either! Thanks, Ash http://www.ashleysheridan.co.uk -- Good Enough is not good enough. To give anything less than your best is to sacrifice the gift. Quality First. Measure Twice. Cut Once.
Re: [PHP] regex pattern for extracting URLs
On Fri, Oct 23, 2009 at 1:48 PM, Ashley Sheridan a...@ashleysheridan.co.ukwrote: On Fri, 2009-10-23 at 13:45 -0400, Brad Fuller wrote: On Fri, Oct 23, 2009 at 1:28 PM, Ashley Sheridan a...@ashleysheridan.co.ukwrote: On Fri, 2009-10-23 at 13:23 -0400, Brad Fuller wrote: I'm looking for a regular expression to accomplish a specific task. I'm hoping someone who's really good at regex patterns can lend a quick hand. I need a regex pattern that will grab URLs out of HTML that have a certain link text. (i.e. the word Continue) This is what I have so far but it does not work properly (If there are other attributes in the a tag it returns them as part of the URL.) preg_match_all('#a[\s]+[^]*href\s*=\s*([\\']+)([^]+?)(\1|)Continue/a#i', $html, $matches); It needs to be able to extract the URL and disregard arbitrary attributes in the HTML tag Test it with the following examples: a href=/path/to/url.htmlContinue/a a href='/path/to/url.html'Continue/a a href=http://example.com/path/to/url.html; class=linkContinue/a a style=font-size: 12px href=http://example.com/path/to/url.html; onlick=someFunction('foo','bar')Continue/a Please reply Your help is much appreciated. Thanks in advance, Brad F. preg_match_all('#a[\s]+[^]*href\s*=\s*[\\']+([^\\']+?).+?Continue/a#i', $html, $matches); I just changed your regex a bit. What your regex was previously doing was matching everything from the first quote after the href= right up until the first it found, which would usually be the one that closes the opening tag. You could make it a bit more intelligent if you wished with backreferencing to make sure it matches against the same type of quotation character it matched as the start of the href's value. Thanks, Ash http://www.ashleysheridan.co.uk I appreciate the help. However, when try this I only get the first character of the URL. Can you double check it please. Thanks again I think it's probably the first ? in ([^\\']+?) Remove that and it should do the trick Thanks, Ash http://www.ashleysheridan.co.uk Hi Brad, I agree with Jim. Take a look at this. It might help. ?php $xml_string = TEXT_BOUNDARY html head title/title /head body div a href=http://example.com/path/to/urlA.html;Continue/a a href=http://example.com/path/to/url2.html;Brad Fuller/a a href=http://example.com/path/to/urlB.html;Continue/a a href=http://example.com/path/to/url4.html;PHP.net/a a href=http://example.com/path/to/urlC.html; class=linkContinue/a a style=font-size: 12px href= http://example.com/path/to/urlD.html; onclick=someFunction('foo','bar')Continue/a /div /body /html TEXT_BOUNDARY; $xml = simplexml_load_string($xml_string); $continue_hrefs = $xml-xpath(//a[text() = 'Continue']/@href); print_r($continue_hrefs); ? -- Good Enough is not good enough. To give anything less than your best is to sacrifice the gift. Quality First. Measure Twice. Cut Once.
Re: [PHP] Spam opinions please
On Tue, Oct 20, 2009 at 2:36 PM, Jonathan Tapicer tapi...@gmail.com wrote: That will work just for one IP, but they could spam you from another IP. I suggest you add a good captcha to the form and that way you can avoid spam forever. Regards, Jonathan On Tue, Oct 20, 2009 at 3:31 PM, Gary gwp...@ptd.net wrote: I have several sites that are getting hit with form spam. I have the script set up to capture the IP address so I know from where they come. I found a short script that is supposed to stop these IP addresses from accessing the form page, it redirects the spammer to another page (I was going to redirect to a page that has lots of pop-ups, scantily clad men and offers of joy beyond imagination), but someone suggested I redirect to the Federal Trade Commission or perhpas the FBI. Any thoughts on the script and its effectivness? ?php $deny = array(111.111.111, 222.222.222, 333.333.333); if (in_array ($_SERVER['REMOTE_ADDR'], $deny)) { header(location: http://www.google.com/;); exit(); } ?Gary __ Information from ESET Smart Security, version of virus signature database 4526 (20091020) __ The message was checked by ESET Smart Security. http://www.eset.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Here is a tutorial on captcha http://blog.sankhomallik.com/2008/12/17/tutorial-using-zend_captcha_image/ -- Good Enough is not good enough. To give anything less than your best is to sacrifice the gift. Quality First. Measure Twice. Cut Once.
Re: [PHP] Whacky increment/assignment logic with $foo++ vs ++$foo
On Tue, Oct 6, 2009 at 2:34 PM, Jay Blanchard jblanch...@pocket.com wrote: [snip] I find it interesting for a discussion to go on this long for something as $a = $a++; [/snip] You think that is interesting? Start a conversation about these {} -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php You guys are very funny! Its very funny how so many people are fired up and ready to strike by something this miniscule. Speaking of starting a conversation, what do you think about the goto construct introduced just recently? -- Good Enough is not good enough. To give anything less than your best is to sacrifice the gift. Quality First. Measure Twice. Cut Once.
[PHP] Any Apache Solr Users in the house?
Hi All, I have been working on a PHP extension for Apache Solr for quite sometime now. I just finished testing it and I have completed the initial user level documentation of the API Version 0.9.0-beta has just been released. It already has built-in readiness for Solr 1.4 If you are using Apache Solr 1.3 or later in PHP, I would appreciate if you could check it out and give me some feedback. Thanks in advance. It is very easy to install on UNIX systems. I am still working on the build for windows. It should be available for Windows soon. http://solr.israelekpo.com/manual/en/solr.installation.php A quick list of some of the features of the API include : - Built in serialization of Solr Parameter objects. - Reuse of HTTP connections across repeated requests. - Ability to obtain input documents for possible resubmission from query responses. - Simplified interface to access server response data (SolrObject) - Ability to connect to Solr server instances secured behind HTTP Authentication and proxy servers The following components are also supported - Facets - MoreLikeThis - TermsComponent - Stats - Highlighting Solr PECL Extension Homepage http://pecl.php.net/package/solr Some examples are available here http://solr.israelekpo.com/manual/en/solr.examples.php Interim Documentation Page until refresh of official PHP documentation http://solr.israelekpo.com/manual/en/book.solr.php The C source is available here http://svn.php.net/viewvc/pecl/solr/ -- Good Enough is not good enough. To give anything less than your best is to sacrifice the gift. Quality First. Measure Twice. Cut Once.