[PHP] Re: PEAR segfaulting

2009-10-19 Thread Greg Beaver
Ashley M. Kirchner wrote: Typing 'pear segmentation fault' in Google produces tons of responses so I know I'm not the only one with this issue, but I'll be damned if I can figure out what the problem is and how to fix it. I rolled my own PHP 5.3.0 from source. Compilation went fine, no

Re: [PHP] PEAR segfaulting

2009-10-19 Thread Greg Beaver
Ashley M. Kirchner wrote: Well, it boiled down to zlib.so causing the segfault. As soon as I removed that module, everything worked. Recompiling just the zlib.so module yielded the same result: pear segfaults. So now the question is: is it zlib's fault, or is it pear? At this

Re: [PHP] Re: Re: Re: Design Patterns

2009-08-13 Thread Greg Beaver
Robert Cummings wrote: Martin Zvarík wrote: Ralph Deffke napsal(a): NO NO NO OOP is the best ever inventet ! see my comments on this list, I will also come up with an pure oop opensource OMS very soon. I just think a dam big pattern catalog like this one is like an elephant

[PHP] Re: PHP as Language

2009-07-24 Thread Greg Beaver
Martin Scotta wrote: Hi all Is there a formal definition for the php language? Where I can found it? I've STW with no results. http://svn.php.net/viewvc/php/php-src/trunk/Zend/zend_language_parser.y?revision=281094view=markup which is Zend/zend_language_parser.y in the source code of

Re: [PHP] This is the kind of [expletives deleted] answer that iscertain to prevent bugs being reported.

2009-07-24 Thread Greg Beaver
Robert Cummings wrote: I understand where you're coming from, and I've been on the same road before with PHP bug reports. And while I remember being really annoyed, especially when it turned out to actually be a bug, I have to say if you define your case clearly and state where either the

[PHP] Re: Renaming all variables in a repository

2009-07-23 Thread Greg Beaver
Eddie Drapkin wrote: Hey all, we've got a repository here at work, with something like 55,000 files in it. For the last few years, we've been naming $variables_like_this and functions_the_same($way_too). And now we've decided to switch to camelCasing everything and I've been tasked with

[PHP] Re: php/sqlite3

2009-07-08 Thread Greg Beaver
bruce wrote: hi... i've got an issue where i'm trying to incorporate sqlite3 into my php. i'm running fedora 9, php5.2.9. the php app was installed using the tun install process... i know the docs say that php5+ is supposed to have sqlite incorporate natively... however, on this

[PHP] Re: Editing PEAR packages

2009-07-05 Thread Greg Beaver
Waynn Lue wrote: I wanted to makes some local edits to a PEAR package that I downloaded in order to build some custom functionality into it. What's the best way to manage this process to ensure that I don't accidentally blow away any changes if I update the package? Should I just copy the

[PHP] Re: Editing PEAR packages

2009-07-05 Thread Greg Beaver
Waynn Lue wrote: Yeah, that's why I was hoping to maintain a separate install, since it would be easier to diff the patches. Shawn: Thanks for the suggestion to extend, I only wanted to make small changes to an existing function though, so it's harder to do it that way. My other thought was

[PHP] Re: namespace keyword

2009-07-02 Thread Greg Beaver
Martin Scotta wrote: Hil all I'm a 5.2.0 user (WINXP) I have a class like this... Class IsThisBad { const NAMESPACE = 'something'; /* code */ function __construct( $other=self::NAMESPACE ) { /* do stuff */ } } Recently the version 5.3 was released, so...

[PHP] OCSP DER encoding implemenation?

2009-06-19 Thread Greg Beaver
Hi, Does anyone have a non-GPLed implementation of DER encoding for an OpenSSL certificate authority OCSP request floating around, or even a basic DER encoder? Thanks, Greg -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: strange include path error

2007-06-27 Thread Greg Beaver
brian wrote: PHP 5.1.4 on Fedora 2 I recieved a note from a client about a problem with their site today. Looking at the error log, i found that the DB connection script that's included into any other that needs it was throwing an error because MDB2.php couldn't be found: Failed opening

[PHP] Re: second/custom PEAR/PECL installation. possible? how?

2007-06-06 Thread Greg Beaver
Jochem Maas wrote: I have a [gentoo] server with 2 apache installations ... the std distro apache runs with php4 which includes an installation of PEAR and PECL. the second apache is compiled by hand and runs with php5 (also compiled by hand) - obviously both of these are installed

Re: [PHP] Re: second/custom PEAR/PECL installation. possible? how?

2007-06-06 Thread Greg Beaver
Eric Butera wrote: My work machine is a OS X iMac that has Apple's php4 standard, plus I have a php4 and php5 custom compiled myself. I've been able to issue sudo /path/to/php4/bin/pear or /path/to/php5/bin/pear and that installs the packages correctly for each version that I want.

[PHP] Re: PHP5 Static functions called through __call() that don't exist... yet

2007-05-19 Thread Greg Beaver
Jared Farrish wrote: Hi all, I am building an assertType object using static functions. What I want to keep away from is the following: code public static function assertString($para){ return $answer; }; public static function assertBool($para){ return $answer; }; ... public

[PHP] Re: Question

2007-03-20 Thread Greg Beaver
Dan Shirah wrote: Looking for some direction here. I have a form that collects user data. When an employee opens the form they enter in all of the user data for an account, however the account can have multiple users so the employee has the option to Enter another user for this account

[PHP] Re: image digit to check password

2007-03-20 Thread Greg Beaver
Alain Roger wrote: Hi, There is a trend on internet that when you want to change your password, you need to type : 1. the former password. 2. the new one 3. a 2nd time the new one to confirm that no mistake has been done on step 2. however, several website also propose an additional

[PHP] Re: Question

2007-03-20 Thread Greg Beaver
Dan Shirah wrote: In my database I have two tables. One table stores all of the account information, the other table stores all of the user information. Table 1 account_id - is the primary key and is unique to each account Table 2 user_id - is the primary key and is unique to each

[PHP] Re: unpack on offsets in binary data in variable?

2007-01-09 Thread Greg Beaver
Markus Fischer wrote: Hi, I'm searching for an efficient way to use unpack on binary data within a variable (php 5.1.something). In the past I was doing fopen fseek unpack( fread(...) fseek etc. Now this time I need to do the same, but I don't have an actual file: my data is only

[PHP] RELEASE ANNOUNCEMENT: PhpDocumentor 1.3.0 *stable*

2006-08-18 Thread Greg Beaver
RELEASE ANNOUNCEMENT PhpDocumentor 1.3.0 *stable* August 18, 2006 Download: pear upgrade PhpDocumentor http://pear.php.net/PhpDocumentor http://sourceforge.net/project/showfiles.php?group_id=11194package_id=10450release_id=440432 Information and documentation: http://www.phpdoc.org The

[PHP] Re: call_user_func_array on STATIC method

2006-08-18 Thread Greg Beaver
steve wrote: Does anyone know of a way to call a static method with an array of objects? I thought for sure this would work, but it does not: $v = call_user_func_array($class::$method,$params); Do I have to resort to eval()??? $v = call_user_func_array(array($class, $method), $params);

[PHP] Re: SPL Iterator and Associative Array

2006-06-02 Thread Greg Beaver
Jason Karns wrote: I'm going to try my best to explain what I'm trying to do. I have my own class that has an array member. This class itself implements Iterator. One of the fields in the array is itself an array that I would like to iterate over. Here's some code: class Folio

Re: [PHP] Getting an advanced foreach to work

2006-05-23 Thread Greg Beaver
Chris wrote: Jonas Rosling wrote: ... while ($count count($salespersons)) { I see you have solved it - just one comment. This particular line will get evaluated every time. If you have a large number of elements in $salespersons, it will slow things down considerably. Quick

[PHP] Re: Extensions Directory (PEAR/PECL)

2006-05-22 Thread Greg Beaver
Robert Samuel White wrote: Please let me know if this would be more appropriate to post in a PEAR or PECL forum. Today, I've been trying to install some extensions - in particular, the GD library and the ZIP library. I've finally managed to get it all working, but there was one issue that

[PHP] [RELEASE ANNOUNCEMENT] phpDocumentor 1.3.0RC6

2006-05-02 Thread Greg Beaver
May 2, 2006 RELEASE ANNOUNCEMENT phpDocumentor 1.3.0RC6 Download: http://pear.php.net/PhpDocumentor http://www.phpdoc.org The phpDocumentor team would like to announce the release of version 1.3.0RC6. This is the last release candidate of version 1.3.0, the first stable version to be released

[PHP] Re: How does PECL and PEAR handle versioning of PHP core?

2006-04-26 Thread Greg Beaver
D. Dante Lorenso wrote: All, If I install PHP 5 and want to use a PECL extension, does that work the same as if I install PHP 4 and try to use the same extension? One extension that I use a lot is 'memcache' from PECL: http://pecl.php.net/package/memcache When I view this site, I

Re: [PHP] Ajax please....

2006-04-08 Thread Greg Beaver
Robert Cummings wrote: On Sat, 2006-04-08 at 14:40, Manuel Lemos wrote: Hello, on 04/08/2006 10:53 AM Ryan A said the following: Carlin Bingham / Tedd: --- Yes, but then I would have to reload the whole page just to tell the person that the account username was already

[PHP] Re: PHP AJAX Framework - Suggestions Please

2006-04-01 Thread Greg Beaver
Andrei Verovski (aka MacGuru) wrote: Hi, Anyone can suggest me which PHP AJAX framework you are using, for what reason(s), what are pros and cons of your particular choice. I found many, and now facing difficult choice. BTW, how do you pass session id between calls to PHP from

[PHP] Re: PHP, SQL, AJAX, JS and populating a SelectBox?

2006-03-18 Thread Greg Beaver
Daevid Vincent wrote: I need to dynamically update a select box with results from a SQL database using AJAX, but I can't find a single example of how to do this. Basically I have a text input field, and a select box. As someone types in the input field, I want the select box to fill in

Re: [PHP] Re: PHP, SQL, AJAX, JS and populating a SelectBox?

2006-03-18 Thread Greg Beaver
Manuel Amador (Rudd-O) wrote: Greg Beaver wrote: Daevid Vincent wrote: I need to dynamically update a select box with results from a SQL database using AJAX, but I can't find a single example of how to do this. Basically I have a text input field, and a select box. As someone types

Re: [PHP] Re: PHP, SQL, AJAX, JS and populating a SelectBox?

2006-03-18 Thread Greg Beaver
Manuel Amador (Rudd-O) wrote: Greg Beaver wrote: This is far too complicated. You don't need 50 lines of code to convert from server-side data to HTML when the browser does it for you (and far more efficiently) with this code: var someCallback = { ajaxfunc: function(res

Re: [PHP] Re: PHP, SQL, AJAX, JS and populating a SelectBox?

2006-03-18 Thread Greg Beaver
Manuel Amador (Rudd-O) wrote: 1) what if the returned markup is invalid? Well, the browser renders it oddly, and through the fact that your server-side code is straightforward filling in an html template with actual values, all you need to do is view the source (with the firefox web

Re: [PHP] Re: PHP, SQL, AJAX, JS and populating a SelectBox?

2006-03-18 Thread Greg Beaver
Manuel Amador (Rudd-O) wrote: Just for argument's sake: the result is not identical. Assume, for one second, that you have two PHP functions: function getCitiesAsHTML($countryName); function getCitiesAsXML($countryName); The first issues a snippet of HTML text, with options. The second

[PHP] Re: php -w causes a parse error

2006-01-25 Thread Greg Beaver
Bom Demais wrote: I wanted to run php -w on my include files on the live server to reduce overhead. But php -w causes parse errors in the include files. Here's an example of what happens: tanner /php_files % php -l misc.inc No syntax errors detected in misc.inc tanner /php_files % php

[PHP] Re: Local PEAR install confusion

2005-11-20 Thread Greg Beaver
Colin Andrews wrote: about 3 months ago I set up a local install of pear on my web host account (a cpanel system). A couple days ago, my hosting company upgraded us to php 4.4.2-dev. I started seeing a lot of warnings coming out my PEAR includes: Notice: Only variable references should be

[PHP] Re: Local PEAR install confusion

2005-11-20 Thread Greg Beaver
Colin Andrews wrote: Thanks a ton- So then that means that the only way to get rid of the warnings is to change the error reporting level? No, report the warnings as a bug at pear.php.net/bugs You can also hand-fix the source in the mean time, it's only 5-10 lines of code, right? Greg

Re: [PHP] Regex for Amateur Radio Callsigns

2005-11-17 Thread Greg Beaver
Leonard Burton wrote: HI, Tuesday, November 15, 2005, 8:39:19 PM, you wrote: Here are how they look W1W W1AW WA1W AD4HZ N9URK WB6NOA 4N1UBG Let's do it this way... What are the rules for a valid callsign? Basicly, you see an example of each different type of callsign. Other than the

[PHP] [RELEASE ANNOUNCEMENT] PEAR 1.4.0 provides revolution in PHP installation

2005-09-20 Thread Greg Beaver
September 20, 2005 FOR IMMEDIATE RELEASE Contact: Gregory Beaver ([EMAIL PROTECTED]) As of Sunday, September 18, 2005, the PEAR installer has reached maturity as an enterprise-level installation tool for PHP code. The release of version 1.4.0 stable ushers in several essential features for

[PHP] [RELEASE ANNOUNCEMENT] PEAR 1.4.0 provides revolution in PHP installation

2005-09-20 Thread Greg Beaver
September 20, 2005 FOR IMMEDIATE RELEASE Contact: Gregory Beaver ([EMAIL PROTECTED]) As of Sunday, September 18, 2005, the PEAR installer has reached maturity as an enterprise-level installation tool for PHP code. The release of version 1.4.0 stable ushers in several essential features for

[PHP] Re: PEAR installation

2005-06-08 Thread Greg Beaver
Danielle wrote: I'm having problems installing PEAR. When running the go-pear.php installer (version 0.2.2), I get the following message after submitting the form on the 'Configuration' page... Error Downloading package: Pager download of http://pear.php.net/get/Pager

Re: [PHP] Objects and Performance

2005-06-08 Thread Greg Beaver
Greg Donald wrote: On 6/8/05, NSK [EMAIL PROTECTED] wrote: Hi, I am creating a small API in PHP, i.e. a collection of reusable functions for other programmers. As it is now, it is just many functions together in the same file. Do you think I should make it object-oriented? What are the pros and

[PHP] Re: 4.3.11 and PEAR

2005-04-06 Thread Greg Beaver
Jakob Goldbach wrote: Hi, What happened to all the pear packages that were in 4.3.10 ? I don't see this change in the changelog :-) $ tar ztf php-4.3.10.tar.gz | grep tar | grep pear php-4.3.10/pear/packages/HTTP-1.2.2.tar php-4.3.10/pear/packages/Net_Socket-1.0.1.tar

[PHP] Re: [PHP-DEV] PHP 5.0.4RC1 and PHP 4.3.11RC1 rolled

2005-03-14 Thread Greg Beaver
Edin Kadribasic wrote: Windows binaries are now available at: PHP 5.0.4RC1 http://downloads.php.net/edink/php-5.0.4RC1-Win32.zip PHP 4.3.11RC1 http://downloads.php.net/edink/php-4.3.11RC1-Win32.zip Additional downloads for PHP 5.0.4RC1: http://downloads.php.net/edink/pecl-5.0.4RC1-Win32.zip

[PHP] Re: Limit iterations on a foreach loop?

2005-02-11 Thread Greg Beaver
Brian Dunning wrote: I'm using an RSS feed that has WAY too much content, I only want the first 10. I'm outputting the array with a foreach loop: is there a way to limit it to only go through the first 10? Thanks, - Brian $i = 1; foreach ($rsses as $rss) { if ($i++ = 10) { break;

[PHP] Re: Global class instances mysteriously set to NULL

2005-01-09 Thread Greg Beaver
James wrote: I'm struggling to narrow this down, and am chasing my tail to figure this out. I apologise for the imprecise nature. PHP: 4.3.2 (latest RHEL 3 version; php-4.3.2-19.ent.src.rpm) OS: Linux kernel 2.4.21-15.0.3.EL Distro: RHEL 3, all updates I have an app that defines two global class

[PHP] Re: Using the OR operator in an IF statement

2005-01-08 Thread Greg Beaver
Tim Burgan wrote: Hello, Can someone please correct me on my efforts below. If I have a condition where I want to test if a variable is not equal to student, staff, or admin.. what's the simplest was to achieve that? Here's what I tried.. that didn't work: ?php if ( ($_POST['usertype'] !=

[PHP] Re: PDFlib-Lite-6.0.1

2005-01-04 Thread Greg Beaver
2wsxdr5 wrote: http://www.pdflib.com/products/pdflib/download/601src/PDFlib-Lite-6.0.1.tar.gzI am trying to install PDFlib-Lite-6.0.1 on my testing server. So far no luck. I am starting with php 4.3.3 and apache 2.0 on an SUSE 9.0 machine. Apache and php were installed with the OS. I

[PHP] Re: PHP5 Namespace ?

2005-01-04 Thread Greg Beaver
Matthew Weier O'Phinney wrote: * Alawi Albaity [EMAIL PROTECTED]: is really that the support for namespace in php5 is removed ? or there are replacment for it ? It's been removed as it's not currently working: http://php.net/ChangeLog-5.php My understanding is that it will be at least 5.1

Re: [PHP] migrating to PHP 5 + Apache 2 from PHP 4.3.8 + Apache 1.3.33.

2005-01-03 Thread Greg Beaver
Symbulos Partners wrote: There are 4 alternative solutions 0)php 5 + Apache 2 1)php 5 + Apache 2 pre-fork (not totally satisfactory, but better than have a system that is unstable) 2)php 5 + Apache 1.3.33 (which is not totally satisfactory, less than 0,1 in any case, but better than have a system

[PHP] Re: newbie.. $_GET $_POST

2005-01-03 Thread Greg Beaver
Pablo D Marotta wrote: Hi there.. I need to pass variables to a page through an html link. I do it like this: A href=Extra/excelListing3.php?buildQuery=?php echo $buildQuery ?Export/A where 'buildQuery' is the variable I´m passing. In the destination page, I capture it with $_GET and that´s it. I

[PHP] Re: php5 webhosting

2005-01-03 Thread Greg Beaver
Greg Donald wrote: Anyone found any good deals with webhosts supporting PHP5 yet? it's not exactly for newbies, but bluga.net has been doing a fine job for me. Greg P.S. ZCE doesn't exactly imply newbie :) this is for others on the list -- PHP General Mailing List (http://www.php.net/) To

[PHP] Re: function problem

2005-01-02 Thread Greg Beaver
Hi Viktor, Viktor Popov wrote: Hi, I'm trying to do the following but I don't have any success. Could you help me here... I have this code in mu page: ?php include script/functions.php; require 'script/common.inc'; $valid = TRUE; if (isset ($_POST['submit'])) { foreach($_POST as $key=$value) {

[PHP] Re: distributed architecture....

2004-12-30 Thread Greg Beaver
Bruce Douglas wrote: hi... i'm contemplating a project where a number of websites would communicate with each other via some network of round robin/distributed servers. Each 'client' website/app would be considered to be a 'node' of the overall network, and be able to upload/download information

[PHP] Re: Data Access Object (DAO) with PHP

2004-12-11 Thread Greg Beaver
Adwin Wijaya wrote: Hi, Is there any mature DAO class for PHP (free) ? http://pear.php.net/DB_DataObject Greg -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Multiple Inheritance

2004-12-10 Thread Greg Beaver
Greg Donald wrote: with it, but I will go grab a PEAR module if it fits my needs. Code re-use may be the only redeeming quality of OO programming, and honestly I can re-use your code from a non-OO include file just as easily. yep, unless the function names happen to conflict with ones you've

[PHP] Re: Please save me from insanity - PHP4 / OO

2004-12-05 Thread Greg Beaver
Ben wrote: class Ob { var $prop; } class Test { function setMe($ob) { $ob-prop = $this; } } $ob = new Ob(); $test = new Test(); $test-setMe($ob); if ($ob-prop) error_log(PHP is OK); else error_log(PHP is a fucking MARE); What is my problem here? Please help! You've run into the

[PHP] Re: Please save me from insanity - PHP4 / OO

2004-12-05 Thread Greg Beaver
Ben wrote: Thanks a lot for your responses guys. Unfortunately it still isn't working for me. I've tried both : $ob-prop = $this and$ob-prop = $this (just in case) Neither produce a PHP is OK. I'm using version 4.2.2 btw. (If ONLY I was on 5) Thanks again, Ben Greg wrote: class Test {

[PHP] Re: Please save me from insanity - PHP4 / OO

2004-12-05 Thread Greg Beaver
Ben wrote: class Ob { var $prop; } class Test { function setMe($ob) { $ob-prop = $this; } } $ob = new Ob(); $test = new Test(); $test-setMe($ob); if ($ob-prop) error_log(PHP is OK); You should use if (is_a($ob-prop, 'test')) Greg -- PHP General Mailing List

Re: [PHP] Getting static member for a class which name is stored

2004-11-28 Thread Greg Beaver
Jake Press wrote: Simas Toleikis wrote: Jake Press wrote: Hi Francisco, Your not alone, a number of other users have enountered this bug. string get_class ( object obj ) Its not a bug... You are getting class name as a string for output purposes etc.. Doing something like TestClass::some_static

[PHP] Re: Overriding static members?

2004-11-28 Thread Greg Beaver
Matthew Weier O'Phinney wrote: * Francisco M. Marzoa Alonso [EMAIL PROTECTED]: Can I override static members in someway under PHP5? Is the answer is negative, Why not? If they are marked public (or not marked at all as public, private, or protected, in which case the default is public), then

[PHP] Re: php 4 to 5

2004-11-28 Thread Greg Beaver
Travis Conway wrote: I do not know much about the history of php and do not know why there is active development on both the 4 and 5 major versions, but is there a definite reason for me to migrate from 4 to 5 on my servers? Depends on what you wish to do with php. PHP 5 has far better support

Re: [PHP] Re: intalling pear:db

2004-11-25 Thread Greg Beaver
Merlin wrote: that did not help. The pear manual says that this can be installed via command line, plus pear list tells me that the package is installed. However if I call phpinfo() there is no mentioning about pear in any way?! Do I have to enable it first anyhow?` I assume you have very little

[PHP] Re: Getting static member for a class which name is stored in a variable

2004-11-25 Thread Greg Beaver
Francisco M. Marzoa Alonso wrote: I've code like follows: ?php class TestClass { public static $Data = 'This is the data'; } $Obj = new TestClass (); $ClassName = get_class ($Obj); echo $ClassName::$Data; ? http://www.php.net/manual/en/language.oop5.reflection.php ?php class TestClass {

[PHP] Re: intalling pear:db

2004-11-24 Thread Greg Beaver
Merlin wrote: Hi there, I am trying to get a class running which requires pear:DB. I downloaded the package and executed: # pear install DB-1.6.8.tgz DB already installed pear upgrade DB-1.6.8.tgz -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Array unset

2004-11-17 Thread Greg Beaver
Bruno b b magalhães wrote: So, the question, how resort the numeric values to 1,2,3,4? http://www.php.net/array_values Greg -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: debug_backtrace bug?

2004-11-17 Thread Greg Beaver
Thomas Peri wrote: I wanted to run this past the list before submitting a bug report. (I've searched the bugs and haven't found anything relevant to my problem.) The problem is that when s method of one class is overridden in a subclass, debug_backtrace() doesn't distinguish between the two

[PHP] Re: PHP 4 to 5 class issues involving static methods and $this

2004-11-17 Thread Greg Beaver
Chris wrote: I have a class where I need to be able to use the methods as static methods as well as using them inside an initialized class. Here's an example of what I need to do: class my_class { var $elements = array(); // holds all of my elements function format_string($string) {

Re: [PHP] debug_backtrace bug?

2004-11-17 Thread Greg Beaver
Marek Kilimajer wrote: The 'class' index reflects what __CLASS__ constant would show. Bug report: http://bugs.php.net/22960 Status: It works as expected and intended. right, but this states that __CLASS__ is bar inside bar::b() and is foo inside foo::b(). In this case, debug_backtrace() is

[PHP] Re: What should I name my base class?

2004-11-17 Thread Greg Beaver
Brent Clements wrote: I know this probably doesn't matter, but what is the pretty standard naming convention for base class names? Should I name it base.class, main.class, or the name of my application, application.class? What does everyone else use? Avoid base classes like the plague. They only

[PHP] Re: Globally accessible objects without using 'global $obj;'

2004-11-12 Thread Greg Beaver
Chris W. Parker wrote: What I'd ultimately like to do is be able to return more than just a true/false from a function regarding it's end state. For example, a function could fail for multiple reasons and just returning a plain false for all situations does not suffice. You could either return an

[PHP] Re: adding a space every 4 chars

2004-11-11 Thread Greg Beaver
Justin French wrote: Hi, What's the quickest way to add a space every four characters? Eg 123456789 becomes 1234 5678 9 ?php $a = '123456789'; echo implode(' ', str_split($a, 4)); ? Greg -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] PEAR Calendar

2004-11-03 Thread Greg Beaver
Greg Donald wrote: On Wed, 3 Nov 2004 15:41:54 +0800, Roger Thomas [EMAIL PROTECTED] wrote: I would like to install PEAR Calendar module and did a [EMAIL PROTECTED] apps]# pear install Calendar but got these: No release with state equal to: 'stable' found for 'Calendar' Please advise. Install

Re: [PHP] PEAR Calendar

2004-11-03 Thread Greg Beaver
Greg Donald wrote: On Wed, 03 Nov 2004 16:28:13 -0500, Greg Beaver [EMAIL PROTECTED] wrote: Install it manually. http://pear.php.net/manual/en/installation.manually.php This is terrible advice. $ pear install --force Calendar. And you think --force is better? Pffft. When the PEAR developers make

[PHP] Re: name of the function

2004-11-03 Thread Greg Beaver
Gustavo A. Baratto wrote: hello there, is there anyway to know the name of the function that is being executed? In the docs (http://www.php.net/manual/en/ref.funchand.php), we can find out the arguments of the function, but not the name of the function itself. echo __FUNCTION__; Greg -- PHP

[PHP] Re: An easier way? $_POST[] = $_SESSION[]

2004-11-01 Thread Greg Beaver
Erich Kolb wrote: Is there an easier way to assign all post data from a form to session data? Eg., $_SESSION['first_name'] = $_POST['first_name']; $_SESSION['last_name'] = $_POST['last_name']; $_SESSION['email'] = $_POST['email']; Never pass in data from any external source without explicitly

[PHP] PHP_EOL on Darwin?

2004-10-31 Thread Greg Beaver
Hi all, What's the standard line ending for Darwin? is it still the same as old Mac, which I think was just \r? Or does it use \n like unix? Greg -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Require_once(_)...when does it reset?

2004-10-28 Thread Greg Beaver
Mike wrote: I am playing with PEAR_Info on my server. It was working fine, then I upgraded some classes, now it is not. I think it is because PHP is holding on to the old code from some require_once functions. I may be totally wrong but that is all I can think of what would cause this. Other

[PHP] Re: Add methods to object dinamically

2004-10-26 Thread Greg Beaver
Francisco M. Marzoa Alonso wrote: I've seen that's possible to add members to objects dinamically, in example: class MyClass { private $a; } $MyObject = new MyClass (); $MyObject-b = 1; Now $MyObject has a public member called 'b' that has a value of '1'. The question is, is it possible to

[PHP] Re: clearstatcache, how to use?

2004-10-25 Thread Greg Beaver
Louie Miranda wrote: I have this code that checks for a file if it exists and do something if it doesnt exist. Problem exist when im updating my data on the directory, even if i did upload it. it still shows the non-existent data. I have read that i should add the clearstatcache();, how am i going

[PHP] Re: PHP 5 abstract method and class type hints of extending classes

2004-10-25 Thread Greg Beaver
Jeremy Weir wrote: The quesion is: how would one make an abstract method that can be compatible with all extending classes that define the method using different class type hints? The php block below is how I thought it should work, but will give this error at parse time: errorFatal error:

[PHP] Re: Pure PHP menu tree

2004-10-25 Thread Greg Beaver
Ryan A wrote: Hi, I have been searching on the net for the past 2 hours without success, so need a recommendation now :-) Basically i am looking for a PHP menu tree, looking on google I have found many but most of them use Javascript with php, or are pure JS or DHTML, I want one that is pure php

[PHP] Re: Good Class/API Design ?

2004-10-25 Thread Greg Beaver
Adam Reiswig wrote: Hey all, I just got my hands on the excellent books PHP Anthology 1 2 and am wanting to start playing around with classes. My question to the list is, what, in your opinion, constitutes good class/api design? Is it better to design several smaller classes that each focus

[PHP] special request for windows 98 users to help develop PEAR's pear.bat

2004-10-23 Thread Greg Beaver
Hi, In the effort to improve pear.bat for windows users, I would like to ask any windows 98 users that are still left to try this simple test: open a MS-DOS prompt and type: C:\ mkdir C:\test C:\ mkdir C:\test\me C:\ echo echo %~d0%~p0 C:\test\me\test.bat C:\ \test\me\test.bat C:\ cd \test\me

[PHP] Re: parsing a string

2004-10-20 Thread Greg Beaver
Dan McCullough wrote: Hey everyone Having a bit of trouble with something. I have a string which has known patterns. $stringCampusBob (Williams)~\toms more crap)~\blah blah blah)~\; What I am looking for is Location which is Campus

[PHP] Re: PEAR status on PHP5?

2004-10-12 Thread Greg Beaver
Adrian Madrid wrote: Is PEAR stable on PHP5? I'm trying a new project on PHP5 and keep getting different kinds of errors (deprecated, etc.) on DB.php, PEAR.php, etc. Looks like so far there has been no show stoppers but it would be nice if it wouldn't give errors. What's the status on this? Has

Re: [PHP] Naming conventions

2004-10-01 Thread Greg Beaver
Jason Davidson wrote: Oh please dont start a thread on which is better .. but i beleive it was decided that camel case is the standard now. Jason Jensen, Kimberlee [EMAIL PROTECTED] wrote: What do you use for your naming conventions for variables functions classes I'm trying to tell my

[PHP] Re: Version Controlling

2004-09-26 Thread Greg Beaver
Stephen Craton wrote: This is slightly off topic, but I feel it's a little something that's worthy of discussion here. I've been interested in running CVS for a while now, but being on a Windows machine is holding me back somewhat, and I'm not entirely sure CVS is even something I need. Basically,

[PHP] Re: Strange errors when PHP script called from CRON

2004-09-22 Thread Greg Beaver
Pablo Gosse wrote: The script which is called by my crontab to start this process executes every minute, so I find it very strange that I'm getting these sporadic error messages. Can any one shed any light on this for me? Does your crontab script use file locking to make sure that it isn't

[PHP] Re: Good xml to array class?

2004-09-22 Thread Greg Beaver
Brent Clements wrote: I've done searching on google for xml parsers and xml to array using php and honestly there are S many. Most of the classes I've taken a look at either aren't finished, or require dom to work. Either I write my own or I get help from you guys. So me being the lazy

Re: [PHP] Good xml to array class?

2004-09-22 Thread Greg Beaver
Yann Larrive wrote: Go with SimleXML it's a PHP extention. Yann simplexml is PHP 5, and relies on libxml. If you don't have DOM, you don't have simplexml. Also, simplexml cannot be serialized in any form other than an xml string. If you wish to work with actual arrays (for instance, if

[PHP] Re: readdir behavior I cannot understand

2004-09-19 Thread Greg Beaver
Jason Fb wrote: ?php // Note that !== did not exist until 4.0.0-RC2 $root_dir = /Users/jason/Sites/; $folder_on_server test; This should be: $folder_on_server = test; T_CONSTANT_ENCAPSED_STRING is a long way of saying a string that doesn't have any fanciness in it like test or 'hello', but not

Re: [PHP] List Etiquette

2004-09-18 Thread Greg Beaver
PHP Warning: Missing forest, too many trees. Lots of you are good coders, I've seen you devote immense time and enegry to crafting informative and helpful posts for years, let's just move on and read messages using incredibly normal skills like short-term memory and index finger dexterity for your

Re: [PHP] Splitting 12345 - 1,2,3,4,5

2004-09-16 Thread Greg Beaver
Martin Holm wrote: Michael Mao wrote: Thanks John. Found what I'm looking for: Function str_split() to make it php4 compatible you can use this function: |?php if (!function_exists('str_split')) { function str_split ($str, $size = 1) { $arr = array(); for ($i = 0 ; $i strlen($str) ;

[PHP] Re: XML parser for PHP5

2004-09-15 Thread Greg Beaver
Matthew Sims wrote: Anyone know any good XML parsers that work with PHP5? Most of what I can find on freshmeat are still using PHP4 classes and Google isn't turning up much either. What do you want to do? This parses xml pretty well: ?php $parsed = simplexml_load_file('filename.xml'); ? as does

Re: [PHP] Re: XML parser for PHP5

2004-09-15 Thread Greg Beaver
Matthew Sims wrote: My fault, I should have been more specific. An RSS reader. :) I was using xmlParser-0.3 and feedParser-0.5 to display news sites. Since I've converted to PHP5, they no longer work for me. definitely a combination of simplexml and DOM would work. You need DOM in order to

[PHP] Re: Splitting 12345 - 1,2,3,4,5

2004-09-15 Thread Greg Beaver
Michael Mao wrote: Anyone know how I can split a number into individual digits? If you want to be funky, you can try ?php $digits = str_split(12345 . ''); ? Greg -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: extended class question

2004-09-13 Thread Greg Beaver
Hello again Ed, This is a tricky thing. When you define a variable as being private, it literally becomes unavailable to child classes, and exists only as the var1 variable in objects of class test. To prove this, try: ?php class a { private $a; function geta() { return

[PHP] Re: Class dependencies

2004-09-11 Thread Greg Beaver
Ed Lazor wrote: I'm creating classes that rely on the presence of other classes that I've created. Does PHP5 provide a way to specify these dependencies or a way to check these dependencies when the class is instantiated? For example, class Automobile would fail to instantiate if class Tire

Re: [PHP] Array inside Class

2004-09-10 Thread Greg Beaver
M. Sokolewicz wrote: To summarize: ?php class Liste { var $input2; var $input; function Liste() { /* or, if you're using php5: public function __construct() { */ $this-input = array(1,2,3); $this-input2 = array_pad($this-input,10,1); } } The reason being, for this, that

[PHP] Re: Can I name a session variable using another variable?

2004-09-10 Thread Greg Beaver
Hi John, I would recommend making $_SESSION['prevtime'] an array $roomname = 'sampleroom'; if (!isset($_SESSION['prevtime'])) { $_SESSION['prevtime'] = array(); } $_SESSION['prevtime'][$roomname] = time(); Then, you can if (isset($_SESSION['prevtime'][$roomname])) { // update the session

  1   2   3   >