Re: [PHP-DEV] Its time for PHP to grow up
Michael Dransfield wrote: I believe that companies will be more than willing to pay whatever you can think of for the enterprise benefits like clustering SRM etc... These packages could be packaged into an enterprise product, without referencing the components individually. Then adding support, I dont know what kind of support is provided by Microsoft (telephone email or otherwise...) email support would be easy to provide since there are already support newsgroups for every aspect of PHP. I would gladly pay for a PHP application server somewhat like AOLServer. If I had a multi-threaded app server, that could load up a library of PHP code into memory at startup, pool database connections, provide session management and object persistence like SRM, and then let me assign URLs (with reg exp's even!) to specific PHP functions or scripts. And if it had a transport/protocol abstraction that allowed me to use it as a mail server, or ftp server too, so I could assign PHP code to reply to emails or customize downloaded files, I don't think I'd ever switch to a different system. Oh yeah, and internal timed execution of specific PHP functions too. Then again, I may simply be smoking a lot of crack and be asking for the impossible. -- Gabriel Ricard [EMAIL PROTECTED] -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] php module state initialization
I know that there are several script caching systems that exist for PHP currently, and they increase the speed of PHP scripts greatly, but I wonder if there is something more that can be done to increase the execution speed of scripts. Primarily, what I'm interested in, is the ability to have PHP load a library/include type script when it is started, and then have that state persist for all scripts that are executed. I believe this is something that AOLServer does when it starts up. I don't know if this functionality exists with PHP, if someone out there has perhaps made an extension that can do this, or if it's even possible. I don't know the architecture of Apache or other servers and how they work so please let me know if this is simply not possible. Could it work in such a way that when the PHP module is initialized it would read in a PHP file, and then when the server is either forked or a thread is created, the state of the PHP module is cloned so that the functions/variables defined in the pre-loaded script would automatically exist? Could someone perhaps give me some pointers to documentation that would help me better understand how the PHP module interacts with web servers such as, but not limited to, Apache/AOLServer? -- Gabriel Ricard [EMAIL PROTECTED] -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] php module state initialization
Rasmus Lerdorf wrote: Well, the absolute fastest way to get something similar to this is to write a PHP extension in C that performs your time-sensitive operations. It really is much easier than most people think to extend PHP in this fashion. If you are a moderately experienced C programmer, you can take a function you have written in PHP and turn it into C without too much hassle. -Rasmus Well, yes, that is something I plan on doing, but not everyone is capable of doing that, which is why I asked. Do you think it's possible? -- Gabriel Ricard [EMAIL PROTECTED] -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] ?= and %= both work, why not ?php=
Why are short tags (? ? and % %) such a bad thing? Why does the PHP formatting (tags) matter in terms of SGML XML? Not that it matters, but personally I prefer to use the short tags ? and ? because it's less code for me to write, it fits nicely into my HTML, and I find ?= much easier to read than ?php echo. I honestly don't really care for ?php= , although I do understand the reasoning behind it and agree with the consistency argument for it. - Gabriel -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] foreach
This is neither a problem with PHP nor FreeTDS. From the manual: sybase_fetch_array() is an extended version of sybase_fetch_row(). In addition to storing the data in the numeric indices of the result array, it also stores the data in associative indices, using the field names as keys. Therefore each row contains duplicates of each value. Use sybase_fetch_row() instead. And, btw, this question really belongs on the php-general list. ;) - Gabriel Rose, Billy wrote: Environment: Apache 2.0.35 PHP 4.2.0RC2 FreeTDS used in place of Sybase libraries to connect to MS SQL 2000 RedHat Linux 7.1 PII 233 Problem: Using foreach retrieves a duplicate of each database column. Code tested: html head titleTest/title /head body ? $link = sybase_connect($dbhost,$dbuser,$dbpass) or die(Error connecting); sybase_select_db($dbname) or die(Error selecting database); $result = sybase_query($query) or die(Error running query); print(table border='0' width='100%' cellpadding='0' cellspacing='4'\n); while ($row = sybase_fetch_array($result)) { print(tr\n); foreach ($row as $col) { print(td.$col./td\n); } print(/tr\n); } print(/table\n); sybase_free_result($result); sybase_close($link); ? /body /html Is this a PHP issue, or a FreeTDS problem? Billy Rose [EMAIL PROTECTED] -- Gabriel Ricard [EMAIL PROTECTED] -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] [phpbugs@priorwebsites.com: Bug #16681 Updated: Requestnew words(), word(), wordindex(), wordlength() functions]
Markus Fischer wrote: word (str, num) Returns the num'th word from string str. If num is greater than the number of words in str, the null string is returned. We've implemented a userland function like this for some code at work and I welcome an implementation in C. The only thing I'd add is an optional field one could use to change the character that separates the words in the sentence. But perhaps that makes it a bit too close to a str_* type function, like explode(). -- Gabriel Ricard [EMAIL PROTECTED] -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] The PHP Platform
I wholeheartedly agree with Dan on this issue. This bickering really doesn't help anybody make PHP any better. From what I can gather this mailing list is oriented towards developing a certain tool, PHP. While Java and .Net discussions are relative in terms of their respective PHP extensions, and possibly in examining areas where PHP can be improved, arguing over using Java and/or .Net and how much one uses them, and for that matter, what they use them for, whether or not the use them with their toaster or if they use them with a cat or in a hat, doesn't matter at all. This thread needs to become productive or die, or perhaps everyone should just ignore it? Just my opinion... - Gabriel Ken Egervari wrote: You are completely avoiding the issue here. Getting the job done and getting it done fast with the right tools are also 2 big differences. - Original Message - From: Dan Hardiker [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, April 17, 2002 12:22 PM Subject: RE: [PHP-DEV] The PHP Platform Is there alot of this sort of bickering on this mailing list, or is this out of the norm? Ken, Mike - does it *really* matter who uses what technology to get the job done? Isn't it much more important what the resulting code is capable of doing and in what manner? -- Dan Hardiker [[EMAIL PROTECTED]] ADAM Software Systems Engineer First Creative Ltd Ken Egervari writes: Actually, I use java most of the time. Who's making the assumptions? I assume nothing. You posted earlier: I for one have been using Java and .Net for all my applications now. Which is it, java most of the time, or java and .net for all my applications now. Big difference. Mike Robinson -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php -- Gabriel Ricard [EMAIL PROTECTED] -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php