Re: [PHP] Re: set up mass virtual hosting with apache/nginx and PHP ... best practice2012?

2012-08-25 Thread D. Dante Lorenso
On 8/25/12 6:11 AM, Matijn Woudt wrote: Hi Dante, Wouldn't it be much easier to use reseller packages like DirectAdmin or cPanel? AFAIK it should be pretty easy to do the things above. I'm considering that as well. In the end, I really only want 3 features, however: - ftp access to files

Re: [PHP] set up mass virtual hosting with apache/nginx and PHP ... best practice 2012?

2012-08-25 Thread D. Dante Lorenso
that has replaced it since then. -- Dante On Wed, Aug 22, 2012 at 6:26 AM, D. Dante Lorenso da...@lorenso.com mailto:da...@lorenso.com wrote: All, I need to set up a server to enable 5,000 students to have web hosting provided by the school with PHP and MySQL support. I'm

[PHP] set up mass virtual hosting with apache/nginx and PHP ... best practice 2012?

2012-08-21 Thread D. Dante Lorenso
All, I need to set up a server to enable 5,000 students to have web hosting provided by the school with PHP and MySQL support. I'm trying to figure out what is the best way to do this. We have Active Directory and are using Centrify to authenticate usernames and passwords on our Linux

[PHP] php safe mode no more?

2012-08-02 Thread D. Dante Lorenso
The school I work with wants to set up PHP and MySQL hosting for about 10,000 students. I see that in 5.4, PHP safe-mode is being removed. How is it supposed to be done if not safe-mode? Are all the hosting providers using suExec and running PHP as CGI or FastCGI? If I'm trying to do this

Re: [PHP] Serving a .dmg via readfile?

2012-04-25 Thread D. Dante Lorenso
bytes in your file as you shuttle chunks to the client instead of slooping it all into memory in one hunk. -- Dante D. Dante Lorenso da...@lorenso.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] srand questions

2012-01-12 Thread Matthew D. Pagel
outside of the function in which the random number is seeded? Or does a different function re-seed itself automatically? d) Would php's random number generator be influenced by other programs running on the system (assuming they're not tampering with the memory allocated to the running script)? 2

[PHP] PHP 5.4.0beta1 released

2011-09-15 Thread d...@php.net
Hello! Stas has packed PHP 5.4.0beta1 which you can find here: http://downloads.php.net/stas/ The Windows team provides windows binaries which you find here: http://windows.php.net/qa/ Please test it carefully, and report any bugs in the bug system, but only if you

[PHP] PHP 5.4.0beta1 released

2011-09-15 Thread d...@php.net
Hello! Stas has packed PHP 5.4.0beta1 which you can find here: http://downloads.php.net/stas/ The Windows team provides windows binaries which you find here: http://windows.php.net/qa/ Please test it carefully, and report any bugs in the bug system, but only if you

[PHP] PHP 5.4.0beta1 released

2011-09-15 Thread d...@php.net
Hello! Stas has packed PHP 5.4.0beta1 which you can find here: http://downloads.php.net/stas/ The Windows team provides windows binaries which you find here: http://windows.php.net/qa/ Please test it carefully, and report any bugs in the bug system, but only if you

[PHP] PHP 5.4.0beta1 released

2011-09-15 Thread d...@php.net
Hello! Stas has packed PHP 5.4.0beta1 which you can find here: http://downloads.php.net/stas/ The Windows team provides windows binaries which you find here: http://windows.php.net/qa/ Please test it carefully, and report any bugs in the bug system, but only if you

Re: [PHP] PHP 5.4.0beta1 released

2011-09-15 Thread d...@php.net
Please test it carefully, and report any bugs in the bug system, but only if you have a short reproducable test case. The next beta will be released on Oct 13. regards, Stas and David WHY post it four times?? a glitch with my mail server. -- PHP General Mailing List

[PHP] is there a static constructor?

2011-03-30 Thread D. Dante Lorenso
All, I want to build a config file class that gets called statically. Is there such a thing as a static constructor? Example: class Daz_Config { public static function load() { ... } public static function get($key) { self :: load(); ... } } Daz_Config ::

Re: [PHP] Path question

2011-03-29 Thread D. Dante Lorenso
On 3/28/11 8:18 PM, Jack wrote: Hello All, Is there a smarter way to do includes by setting up a path or something where I don't have to include /home/domain.com/includes/include_file.php Apparently my path is as shown above, but I would prefer to just put in /includes/include_file.php I

Re: [PHP] Howdy (new in here)

2011-02-18 Thread D. Dante Lorenso
On 2/18/11 8:39 AM, Kirk Bailey wrote: Oh hey, that's a good point. All the stuff i saw so far indented 2 spaces. WHY? Can I just indent a TAB if my editor permits this? indenting 4 spaces (2 nests) is easy, but suppose I hit one extra space- not enough difference to be really noticeable. Let's

Re: [PHP] Re: String manipulation

2010-11-14 Thread D. Dante Lorenso
character position in the string. Ron ... but you sound like you are looking for the 'wordwrap' function. -- Dante -- D. Dante Lorenso da...@lorenso.com 972-333-4139 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Template engines

2010-11-11 Thread D. Dante Lorenso
On 11/11/10 12:04 PM, Michael Shadle wrote: Not to discredit this long post but the media here is now calling kids who text often hypertexting teens which really irked me even more...I bet some non-technical news guy thinks he is awesome for coming up with that one. LOL! I too thought those

Re: [PHP] auto indentation

2010-04-27 Thread D. Dante Lorenso
. -- Dante -- D. Dante Lorenso da...@lorenso.com 972-333-4139 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Example of good PHP namespace usage?

2010-03-19 Thread D. Dante Lorenso
All, I want to start using PHP namespaces for my projects. Currently, I name my classes similar to how Zend Framework names theirs and I end up with classes like: LS_Util_String I'm thinking that if I converted this to namespaces, the classes would be named like: LS\Util\String I'd

[PHP] Facebook PHP compiler

2010-02-02 Thread Cesar D. Rodas
Hello, Have you guys checked this PHP to C++ converter from the Facebook People? http://developers.facebook.com/news.php?blog=1story=358 Regards, -- Cesar D. Rodas cro...@php.net http://crodas.org/ -- http://cesar.la/ Phone: +595-961-974165 -- PHP General Mailing List (http://www.php.net

Re: [PHP] memory efficient hash table extension? like lchash ...

2010-01-25 Thread D. Dante Lorenso
a server shutdown (don't need to be written to disk), but I can not afford for the server to throw away values that don't fit into memory. If there is a way to configure memcached guarantee storage, that might work. -- Dante On Sun, Jan 24, 2010 at 9:39 AM, D. Dante Lorenso da...@lorenso.com

Re: [PHP] memory efficient hash table extension? like lchash ...

2010-01-24 Thread D. Dante Lorenso
shiplu wrote: On Sun, Jan 24, 2010 at 3:11 AM, D. Dante Lorenso da...@lorenso.com wrote: All, I'm loading millions of records into a backend PHP cli script that I need to build a hash index from to optimize key lookups for data that I'm importing into a MySQL database. The problem

[PHP] memory efficient hash table extension? like lchash ...

2010-01-23 Thread D. Dante Lorenso
All, I'm loading millions of records into a backend PHP cli script that I need to build a hash index from to optimize key lookups for data that I'm importing into a MySQL database. The problem is that storing this data in a PHP array is not very memory efficient and my millions of records are

[PHP] GSOC Idea, RPC Server

2009-03-18 Thread Cesar D. Rodas
it and returns its return. - The client: a PHP script that will exec an RPC, That is my idea so far, please I'd like to read feedbacks. -- Cesar D. Rodas http://cesar.la/ Phone: +595-961-974165 Samuel Beckett - Birth was the death of him. -- PHP General Mailing List (http://www.php.net

[PHP] ms-word reading from PHP on linux O.S

2009-02-23 Thread Srinivasa Rao D
Hi all, * How better, i can read ms-word doc files from PHP on LINUX OS*.On searching I got *catdoc* softaware.By using this i can read word doc data as a text. function catdoc_file($fname) { $ret = exec('catdoc -ab '.escapeshellarg($fname) .' 21'); if (preg_match('/^sh: line 1:

Re: [PHP] ms-word reading from PHP on linux O.S

2009-02-23 Thread Srinivasa Rao D
thanks Lucas.This code is very helpful to me.

[PHP] Threads PHP

2008-05-16 Thread Cesar D. Rodas
Hello, Is there a way to have threads in PHP? -- Best Regards Cesar D. Rodas http://www.cesarodas.com http://www.thyphp.com http://www.phpajax.org Phone: +595-961-974165

RE: [PHP] Which file called the function?

2007-12-21 Thread Cesar D. Rodas
( 'global.php' ); echo 'You are in file: '; myFunc(); ? In each case, what is echoed out for __FILE__ is global.php. Apart from analyzing the debug_backtrace array, is there any way that myFunc() would display one.php and two.php respectively? thnx, Christoph -- Best Regards Cesar D

Re: [PHP] nested array...

2007-12-17 Thread Cesar D. Rodas
) ) if I want to check whether id=5 is in that $nestedarray, how to do that?!?! i'd really appreciate the help.. thanks in advance.. -- Best Regards Cesar D. Rodas http://www.cesarodas.com http://www.thyphp.com http://www.phpajax.org Phone: +595-961-974165

Re: [PHP] Session timeout

2007-12-13 Thread Cesar D. Rodas
: http://www.php.net/unsub.php -- Best Regards Cesar D. Rodas http://www.cesarodas.com http://www.thyphp.com http://www.phpajax.org Phone: +595-961-974165

[PHP] A SESSION Problem

2007-12-11 Thread Cesar D. Rodas
://www.php.net/unsub.php -- Best Regards Cesar D. Rodas http://www.cesarodas.com http://www.thyphp.com http://www.phpajax.org Phone: +595-961-974165

Re: [PHP] Incorporating a PHP/MySQL based search

2007-12-08 Thread Cesar D. Rodas
which discuss some simple solutions or articles/blogs on the web? Clearly I'm not looking for anything as complex as Google's engine, ;-) but would love just to be able to understand/incorporate a decent level of search capabilities. Cheers all, - sf -- Best Regards Cesar D. Rodas http

Re: [PHP] nested objects

2007-12-07 Thread Cesar D. Rodas
No problem, Just ask your doubts, we're here to help and get help :-) On 07/12/2007, Victor Matherly [EMAIL PROTECTED] wrote: Thanks that fixed it. That was so simple no wonder I was banging my head on the wall :-). - Original Message - From: Cesar D. Rodas [EMAIL PROTECTED

[PHP] nested objects

2007-12-07 Thread Cesar D. Rodas
/unsub.php -- Cesar D. Rodas http://www.cesarodas.com http://www.thyphp.com http://www.phpajax.org Phone: +595-961-974165

Re: [PHP] howto get .tar.gz content's filenames

2007-12-05 Thread Cesar D. Rodas
On 05/12/2007, Per Jessen [EMAIL PROTECTED] wrote: Cesar D. Rodas wrote: Call exec is not good, because you are executing other program, instead of that you should use some PHP program, take a look here http://www.phpclasses.org/search.html?words=tarx=0y=0go_search=1 The access

[PHP] References to a variable and scope

2007-12-04 Thread Cesar D. Rodas
better in the following pseudo php code. function foo($a) { $GLOBALS['references']['a'] = /*references to $a */ } function bar() { echo $GLOBALS['references']['a']; } $var=hello foo($var); $var = hi; bar(); /* it should print hi instead of hello */ -- Best Regards Cesar D. Rodas

Re: [PHP] References to a variable and scope

2007-12-04 Thread Cesar D. Rodas
On 04/12/2007, Cesar D. Rodas [EMAIL PROTECTED] wrote: Robert, On 04/12/2007, Robert Cummings [EMAIL PROTECTED] wrote: On Tue, 2007-12-04 at 16:58 -0400, Cesar D. Rodas wrote: Hello, I know that PHP doesn't support pointers to a variable, instead of that there is references

Re: [PHP] howto get .tar.gz content's filenames

2007-12-04 Thread Cesar D. Rodas
://www.php.net/unsub.php -- Best Regards Cesar D. Rodas www.cesarodas.com www.thyphp.com www.phpajax.org Phone: +595-961-974165 -- Best Regards Cesar D. Rodas http://www.cesarodas.com http://www.thyphp.com http://www.phpajax.org Phone: +595-961-974165

Re: [PHP] // ?

2007-12-04 Thread Cesar D. Rodas
on the end of a php tag (?) or new line, that is not a bug. Kevin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Best Regards Cesar D. Rodas http://www.cesarodas.com http://www.thyphp.com http://www.phpajax.org Phone: +595-961-974165

Re: [PHP] Reading registry values

2007-08-01 Thread Travis D
On 7/31/07, Crash Dummy [EMAIL PROTECTED] wrote: Hope this isn't overkill but it is a module (read COM, or VBA module) to manipulate the registry: Overkill is a massive understatement. :-) No doubt. To answer everyone's curiosity as to why I want to access the registry, I am working

Re: [PHP] Unexpected values in an associative array

2007-08-01 Thread Travis D
On 7/31/07, Ken Tozier [EMAIL PROTECTED] wrote: ... // set fetch prefs $this-db-setAttribute(PDO:: FETCH_ASSOC, true); // also tried 1 ... Is that the way to do it? Hmm.. Maybe I sent you in the wrong direction - I can't find any docs on using

Re: [PHP] Array question

2007-02-27 Thread Gerry D
Mike, See entire function under topic Array question - maybe UTF?... I am trying to change accented characters to their equivalent without accents. And yes, the arrays look fine after var_dump()... Gerry On 2/27/07, Ford, Mike [EMAIL PROTECTED] wrote: On 27 February 2007 04:23, Gerry D

[PHP] Array question

2007-02-26 Thread Gerry D
I have a question on how to retrieve the value that corresponds to a key in an array. $fruit = array('a' = 'apple', 'b' = 'banana', 'c' = 'cranberry'); $key = array_search($c, $fruit); if ( $key === FALSE ) $n = $c; else

[PHP] JPEG info needed

2007-01-22 Thread Gerry D
I need PHP to find out if a jpeg file uses progressive encoding. None of the standard exif or image functions seem to be able to tell me that. (please correct me if I'm wrong) Can anybody help me? TIA Gerry -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

[PHP] classes and objects: php5. The Basics

2007-01-16 Thread Cheseldine, D. L.
Hi I'm stuck on The Basics page of the php5 Object Model: http://uk.php.net/manual/en/language.oop5.basic.php The top example has the code: A::foo(); even though foo is not declared static in its class. How does it get called statically without being declared static? regards dave -- PHP

[PHP] Sendmail_from

2006-09-06 Thread D Sledge
OS: Red Hat Enterprise Linux AS release 4 (Nahant Update 4) web server: Apache 2.0 php version: 4.3.9 When I use the function mail(), the the from email address that is used is apache@hostname. I tried setting the sendmail_from directive in php.ini and the ServerAdmin directive in

Re: [PHP] Shopping cart

2006-08-21 Thread Gerry D
So if I understand you gentlemen correctly, these pre-builds serve as examples how NOT to do it? Gerry On 8/20/06, Larry Garfield [EMAIL PROTECTED] wrote: On Sunday 20 August 2006 20:17, Gerry D wrote: On 8/19/06, Larry Garfield [EMAIL PROTECTED] wrote: OSCommerce is crap. Don't bother

Re: [PHP] Shopping cart

2006-08-20 Thread Gerry D
On 8/19/06, Larry Garfield [EMAIL PROTECTED] wrote: OSCommerce is crap. Don't bother. Why do you say that, Larry? I may want to get into an app like that because I think one of my clients is ready for it. What are the cons, and what are my options? What are Drupal's limitations? TIA Gerry

Re: [PHP] How to run one php app from another?

2006-08-13 Thread Gerry D
I don't know if you solved this already, but I use it to redirect to different pages depending on whther the user is logged in or not. Something like header(location:/page/?p=login); works fine. You were on the right track. Gerry On 6/15/06, tedd [EMAIL PROTECTED] wrote: Hi gang: This seems

Re: [PHP] Re: How to run one php app from another? RECAP

2006-08-13 Thread Gerry D
On 6/16/06, tedd [EMAIL PROTECTED] wrote: At 2:35 PM +0200 6/16/06, Barry wrote: But once output is made. You can't remove it. That isn't possible with PHP. I think I get it now. PHP does everything before the user see's anything. Any links (direct or via a form) are objects that the browser

Re: [PHP] page redirecting

2006-08-13 Thread Gerry D
On 6/28/06, Richard Lynch [EMAIL PROTECTED] wrote: On Wed, June 28, 2006 5:17 am, kristianto adi widiatmoko wrote: i need to redirecting page, it could be done by using header function like this header(Location : page2.php?var1=foo); Then, the URL should be a full, complete URL, and not

Re: [PHP] Preventing double-clicks

2006-08-13 Thread Gerry D
Jay, I use a technique to prevent hitting the back button and resubmitting data. I use a 2-script process, one with the form and submit button (I set a session var here), and a second form (the action script). The action script makes sure the session variable is set, processes the info, then

Re: [PHP] Functions

2006-08-13 Thread Gerry D
On 6/30/06, Richard Lynch [EMAIL PROTECTED] wrote: #2. Don't alter the case of the input data, if at all possible. Accept what the user has given, and take it as it is. You can make your application not care about case, and you can format the case on ouput (maybe even with fancy CSS stuff) but

Re: [PHP] Chicago PHP Conference

2006-08-12 Thread Gerry D
Richard, Within the US that might be ok, but given latest developments, who wants to fly into the US from elsewhere? I could drive from Canada if I take 2 weeks vacation... I don't want to be a show stopper, but I think you need to explain what your target audience is re global travel, not just

Re: [PHP] Comment form spammer

2006-08-12 Thread Gerry D
My implementation of captcha eliminated chinese spam. See http://www.lilyregister.com/page/?p=contact Gerry On 8/9/06, Micky Hulse [EMAIL PROTECTED] wrote: Hi, Recently, a client of mine was getting a ton of spam email from a site called hotbox.com. I updated her form to one with more spam

Re: [PHP] A way to stop spam on this list

2006-08-12 Thread Gerry D
They're not Jap but Chi. And they drove me crazy on my websites until I fixed them. http://www.lilyregister.com/page/?p=contact is what stopped the idiots. Gerry On 6/19/06, Denis Gerasimov [EMAIL PROTECTED] wrote: Hello List Members, I am very tired of deleting spam messages received from

Re: [PHP] Unicode

2006-08-12 Thread Gerry D
Tedd, Interesting that nobody knows the answer... I am struggling with this very issue for an international lily register... http://www.lilyregister.com/ Gerry On 6/5/06, tedd [EMAIL PROTECTED] wrote: At 7:08 PM -0700 6/4/06, Rasmus Lerdorf wrote: Larry Garfield wrote: In C or C++, yes. In

Re: [PHP] Better way of doing this? (menu and submenus)

2006-06-21 Thread D. Dante Lorenso
a p_position (parent position) and c_position (child) for each of the menu items, that way I can do a ORDER BY in my query and it should still look good and changing positions shouldnt be a problem (ask anyone who's married, being flexable in changing positions is VERY important :-D ) Doing an ORDER

Re: [PHP] For Loop

2006-06-20 Thread D. Dante Lorenso
Albert Padley wrote: Thanks everyone. Always nice to know there is more than one direction to go in. A alternative to variable variables might use these: http://us3.php.net/manual/en/function.compact.php http://us3.php.net/manual/en/function.extract.php 'extract' looks like it might be

Re: [PHP] basic php problem

2006-06-15 Thread D. Dante Lorenso
Dave Goodchild wrote: if $_REQUEST['page'] is not set, why not do this: $page = isset($_REQUEST['page']) ? $_REQUEST['page'] : 1; (ternary operator) // test, numeric read, with default and bounds checking $page = empty($_REQUEST['page']) ? 1 : intval($_REQUEST['page']); $page = min(max($page,

[PHP] paging results in large resultsets: mysql vs postgresql?

2006-06-15 Thread D. Dante Lorenso
All, I just discovered this neat little gem in MySQL which makes it easy to page large result sets: * SELECT SQL_CALC_FOUND_ROWS * FROM table LIMIT 10, 10 * SELECT FOUND_ROWS() The neat thing is that SQL_CALC_FOUND_ROWS will cause MySQL to tally up all the rows that WOULD

Re: [PHP] paging results in large resultsets: mysql vs postgresql?

2006-06-15 Thread D. Dante Lorenso
Richard Lynch wrote: 3. use the built-in cursor of PostgreSQL which pre-dates MySQL LIMIT and OFFSET clauses, which are non-standard hacks Rasmus introduced back in the day. Care to elaborate? Cast into context of PDO if you can...? Dante -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] Calculating difference between two days

2006-06-14 Thread D. Dante Lorenso
[EMAIL PROTECTED] wrote: I need to calculate no. of days between two dates, actually between date stored in DB and today's date. Does anybody has an example I can use? Your database will have this function. In PostgreSQL: SELECT data_column - NOW() AS date_diff; There are similar

Re: [PHP] Checking for empty()

2006-06-14 Thread D. Dante Lorenso
Ashley M. Kirchner wrote: I have a form with various fields on it that I want to make sure aren't empty or the user didn't just hit the space bar or return (in a text field). What's the best way to do this? Seems empty() will fail on a textarea if the user simply hits a space or return and

Re: [PHP] declaring a class as stdClass?

2006-06-14 Thread D. Dante Lorenso
Mariano Guadagnini wrote: Hi list, I hace an existencial doubt: i've seem many scripts declaring classes as stdClass. In the documentation (for PHP5 and also for 4), it says that this class is internal of php, and should't be used. By the manner I saw it's being used, i guess that it can be

Re: [PHP] binary zero evaluates as true!?

2006-06-08 Thread D. Dante Lorenso
: -- pre ?php $zero = (string)'0'; $one = (string)'1'; var_dump($zero); var_dump($one); printf(char: %s, ord: %d, byte: %08b\n, $zero, ord($zero), $zero); printf(char: %s, ord: %d, byte: %08b\n, $one, ord($one), $one); // string(1) 0 // string(1) 1 // char: 0, ord: 48, byte:

Re: [PHP] remove last comma in string

2006-06-08 Thread D. Dante Lorenso
weetat wrote: Hi all, I am using php 4.3.2 and mysql , linux. I have a sql statement below : UPDATE tbl_chassis_temp SET country = 'Singapore', city 'SINGAPORE', building = 'Tampines Central 6', other = 'Level 03-40', I need to remove the last comma from sql text above. I have

Re: [PHP] binary zero evaluates as true!?

2006-06-08 Thread D. Dante Lorenso
Jon wrote: The second thing that needs to be said here is simply a re-statement of the original, this time more verbosely. The list of things in php that evaluate as false is as follows: * the boolean FALSE itself * the integer 0 (zero) * the float 0.0 (zero) * the empty string, and the

[PHP] Try XMLWriter ... was Re: [PHP] OO purism sucks - sell me on PHP5?

2006-06-02 Thread D. Dante Lorenso
[EMAIL PROTECTED] wrote: What are some of the other killer features of PHP5 that I may be sleeping on here. You have got to get your hands on XMLWriter. I don't write any XHTML inside php any more. I've wrapped the XMLWriter object inside my own object and now I can create 100%

[PHP] Am I supposed to be using SPL?

2006-05-31 Thread D. Dante Lorenso
I was about to write code to recursively list the contents of a directory when I remembered seeing an object in SPL that would do it for me: http://us3.php.net/manual/en/function.recursivedirectoryiterator-next.php But there is no documentation on this object, and although I have it in

[PHP] get directory paths recursively using SPL ... was Re: [PHP] Am I supposed to be using SPL?

2006-05-31 Thread D. Dante Lorenso
Jochem Maas wrote: also take a look here: http://www.wiki.cc/php/RecursiveDirectoryIterator yes it's meant to be used, yes you can use it in production BUT your a little on the bleeding edge (not very many people using it full on) AND the whole of SPL is still a little in flex (as is php5-php6

[PHP] Long one here, but hopefully someone took their Adderall

2006-05-30 Thread Pavleck, Jeremy D.
I also have a strong suspicion this webmail will be sending this HTML formatted, so I apologize in advance. Anyway, here it goes! Greetings All! I'm trying to build a webpage that will pull out server information using snmpget and snmpwalkoid, among other things. Most of the things I poll are

Re: [PHP] Code check

2006-05-29 Thread D. Dante Lorenso
Paul Goepfert wrote: ... What this script does is selects tomorrows date... Here is a one-line way to find the month and day of tomorrow: ?php list($tomorrow_month, $tomorrow_day) = split(':', date('m:d', time()+86400)); ? Test that ... I just wrote it off the top of my head. Maybe that

[PHP] Best way to handle multiple snmpgets

2006-05-26 Thread Pavleck, Jeremy D.
Greetings, I'm creating a more or less 'dashboard' where people can enter the server name, then I'll snmpget a bunch of different oids and show the status of the device. Now the problem is snmpget doesn't allow multiple OIDs in one go, so I have to snmpget(server, community, oid1);,

[PHP] Escaping double quotes

2006-05-25 Thread Pavleck, Jeremy D.
So I'm writing this page (PHP Newbie here) and it checks to see if a var is set, if it isn't it spits out the form info like so: echo form action=myform.php method=post; Now is there a way to 'wrap' that so I don't have to escape quotes? Something like perls 'qq' function is what I'm looking for.

[PHP] streamlining php.ini; php.ini is not parsable with parse_ini_file

2006-05-25 Thread D. Dante Lorenso
All, I want to clean up my PHP.ini file on production to be as streamlined as possible so that it's easier to work with and maintain. It is easier to do a diff of my INI and the recommended INI if both files are very similar with whitespace removed, comments cleaned out, and keys sorted,

[PHP] Embedding PHP 5 in a C application

2006-05-24 Thread D. Dante Lorenso
All, Can anybody give me a pointer on where I might start to learn how to embed Zend2/PHP 5 inside a stand-alone C application? I realize that by asking a question like this it might imply I am not prepared enough to do handle the answer, but ignoring that, is there a document out there?

Re: [PHP] getting subdirectory

2006-05-23 Thread D. Dante Lorenso
Dallas Cahker wrote: how do I get the subdirectory that a page is being pulled from. say I have three sites running the same script and I need to determine which site is which. http://www.domain.com/subdir1 http://www.domain.com/subdir2 http://www.domain.com/subdir3 and subdir1, subdir2 and

[PHP] PHP SNMP

2006-05-23 Thread Pavleck, Jeremy D.
Greetings, Seem to have a bit of a problem I can't figure out. I'm trying to query servers via SNMP with PHP's snmpget function. Everything seems to work fine, no problems at all - except I'd like the web page to print the string value instead of the numeric value (I.E. OK for the Compaq Drive

[PHP] Going through 2 arrays at once

2006-05-23 Thread Pavleck, Jeremy D.
Greetings, PHP Rookie here with a quick question - how do I go through 2 arrays at once with different keys? I'd like to combine these 2 arrays into one: for ( $i = 0; $i sizeof($logicalDrive); $i++) { echo $arrLogDrive[$i]br /\n; } for (reset($logicalDrive); $i =

RE: [PHP] Going through 2 arrays at once

2006-05-23 Thread Pavleck, Jeremy D.
Thanks for all the replies guys, it really helped me pick up a few things. One I ended up doing was using array_combine, like so: $d = array_combine($arrLogDrive, $logicalDrive); print_r($d); for (reset($d); $j = key($d); next($d)) { echo $j: $d[$j]br /\n; } Now, while it works spot

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

2006-05-19 Thread D. Dante Lorenso
Robert Samuel White wrote: When I ran the command: pecl install zip-1.3.1 It intalled the zip.so file to: /usr/local/lib/php/extensions/no-debug-non-zts-20050922/zip.so Extensions are compiled with a given Zend/PHP API. The zip extension you installed was compiled against the API dated

[PHP] Bug in XMLWriter?

2006-05-19 Thread D. Dante Lorenso
I am using XMLWriter with PHP 5.1.4 and find that it doesn't behave as I expect. I am under the impressing that until I call 'endElement', I should be free to continue adding attributes to an opened element regardless of whether I have already added elements or text below it. Look at this

Re: [PHP] Re: Bug in XMLWriter?

2006-05-19 Thread D. Dante Lorenso
Rob Richards wrote: Expected behavior. See comments within code snippet. D. Dante Lorenso wrote: I am using XMLWriter with PHP 5.1.4 and find that it doesn't behave as I expect. I am under the impressing that until I call 'endElement', I should be free to continue adding attributes

Re: [PHP] Does PECL install modify my php.ini? or even look at it?

2006-05-16 Thread D. Dante Lorenso
Richard Lynch wrote: On Thu, May 11, 2006 6:02 pm, D. Dante Lorenso wrote: pecl install memcache Is it possible that pecl has an --extension-dir flag to tell it WHERE to install stuff, or perhaps an optional command line arg or ... Cuz, really, the odds on it being where you want

Re: [PHP] Does PECL install modify my php.ini? or even look at it?

2006-05-16 Thread D. Dante Lorenso
Richard Lynch wrote: On Tue, May 16, 2006 10:34 am, D. Dante Lorenso wrote: Richard Lynch wrote: On Thu, May 11, 2006 6:02 pm, D. Dante Lorenso wrote: pecl install memcache s it possible that pecl has an --extension-dir flag to tell it WHERE to install stuff, or perhaps

[PHP] imagefrompng() question

2006-05-15 Thread D A GERM
I'm having difficulty displaying text after imagefrompng(). I'm using PEARS's Image_Barcode to displa a barcode and trying to wrap imagefrompng() around it. I am able to display the barcode properly but not the rest of my document (a mix a text and other images). Is there a proper heading I

[PHP] xmlwriter_write_raw() not in 5.1.4 yet?

2006-05-14 Thread D. Dante Lorenso
I'm on the latest and greatest PHP 5.1.4. I can see the function I think I want in the manual: http://us3.php.net/manual/en/function.xmlwriter-write-raw.php But the manual says it's only in CVS. I confirmed that I don't have it: *Fatal error*: Call to undefined function

Re: [PHP] Re: SimpleXML is creating nodes when it shouldn't...

2006-05-12 Thread D. Dante Lorenso
Marcus Boerger wrote: I think that's a bug and not a feature. Why was this changed? It is called write support. I think we are going to add a flag so that one can specify whether write support is enabled or not. Creating data without using '=' assignment or calling a function is

[PHP] PHP SRM, a dead project?

2006-05-12 Thread D. Dante Lorenso
All, I'm interested in a PHP application server that is non-webserver based which I can run on Linux. I was hoping for something like: * http://www.vl-srm.net/index.php Does anyone know about this project? It appears to be dead. Hasn't been updated in a couple years. Is there a

[PHP] PECL / PEAR confusion (with memcache)

2006-05-11 Thread D. Dante Lorenso
All, I'm really having a hard time making sense of PECL and PEAR. My understanding is that PECL is for PHP extensions (written in C using the extension API) and that PEAR is a repository of PHP modules (classes written in PHP using the PEAR-approved framework). PEAR VS PECL COMMANDS On my

Re: [PHP] include_path and absolute paths in include functions

2006-05-11 Thread D. Dante Lorenso
Steven Stromer wrote: For years I was lulled into thinking I understood php include functions... I have always used relative paths in my include and related functions, for instance: include_once (lib/included.php); However, I am now needing to switch to absolute paths: include_once

[PHP] Does PECL install modify my php.ini? or even look at it?

2006-05-11 Thread D. Dante Lorenso
All, I installed an extension via PECL and it seems to have plopped the extension into it's own extension directory instead of the one in my PHP.ini file. pecl install memcache /usr/lib/php/extensions/no-debug-non-zts-20050922/memcache.so But my PHP.ini file says to use: grep

Re: [PHP] Re: include_path and absolute paths in include functions

2006-05-11 Thread D. Dante Lorenso
If you are using PHP 5, you might have some fun with the __autoload() function. I use something like this in production: //-- function __autoload($class_name) { require_once ($class_name..php); } function push_libs() {

[PHP] SimpleXML is creating nodes when it shouldn't...

2006-05-11 Thread D. Dante Lorenso
I've recently upgraded to PHP 5.1.4 from 5.1.2 and noticed that in 5.1.3 there were changes made to SimpleXML. Now, when I touch an element which didn't used to exist, instead of acting like it didn't exist, it creates it! That's horrible! Well, this used to work: ?php $xmlstr =

[PHP] tired of referencing static variables/constants with 'self ::'

2006-05-09 Thread D. Dante Lorenso
Does anyone know if it's possible to reference class constants or static variables without having to use 'self::' all the time? class A { const MY_CONSTANT = true; public function test() { echo self :: MY_CONSTANT; // works echo MY_CONSTANT; // doesn't work } } I don't

Re: [PHP] tired of referencing static variables/constants with 'self ::'

2006-05-09 Thread D. Dante Lorenso
John Wells wrote: On 5/9/06, D. Dante Lorenso [EMAIL PROTECTED] wrote: Does anyone know if it's possible to reference class constants or static variables without having to use 'self::' all the time? No, ... Why? The reason is SCOPE. As wonderful as PHP is, it can't read your mind. So

Re: [PHP] tired of referencing static variables/constants with 'self ::'

2006-05-09 Thread D. Dante Lorenso
D. Dante Lorenso wrote: As an OOP programmer, I would expect the scope search to be as follows: 1. LOCAL: current method 2. THIS: current instance ($this) 3. SELF: current class parent classes, in order of inheritance 4. GLOBAL: globals Actually, 2 and 3 are really the same but only

[PHP] throttle output streamed from a file?

2006-05-09 Thread D. Dante Lorenso
All, I have a file which I want to stream from PHP: readfile($file_name); However, this function has the problem that it reads the whole file into memory and then tries to write it to output. Sometimes, you can hit the memory limit in PHP before the file contents are completely output

Re: [PHP] throttle output streamed from a file?

2006-05-09 Thread D. Dante Lorenso
Jochem Maas wrote: D. Dante Lorenso wrote: All, I have a file which I want to stream from PHP: it's not that relevant, but, I don't thinking streaming is the correct term. your merely dumping a files' content to std output. readfile($file_name); the trick you need to employ

Re: [PHP] throttle output streamed from a file?

2006-05-09 Thread D. Dante Lorenso
Eric Butera wrote: On 5/9/06, D. Dante Lorenso [EMAIL PROTECTED] wrote: To do this, I would think I need a function in PHP which will output a buffered stream with blocking enabled. Can anybody point me in the right direction? I'm probably way off base on what you're trying to do, but maybe

  1   2   3   4   5   6   >