php-general Digest 29 Dec 2007 16:59:06 -0000 Issue 5206

Topics (messages 266343 through 266363):

Re: Sayonara PHP
        266343 by: Martin Alterisio

php.ini in php5.2.1
        266344 by: jekillen
        266345 by: Jochem Maas

is_prefix() - checking wheather $A is prefix for $B
        266346 by: AmirBehzad Eslami
        266347 by: Zoltán Németh
        266350 by: AmirBehzad Eslami
        266351 by: Silvio Porcellana
        266353 by: Zoltán Németh

script stoped working over christmas ?
        266348 by: Joker7
        266354 by: Zoltán Németh

Re: script stoped working over christmas ? (whoops)
        266349 by: Joker7

Re: [PHP-DEV] Sayonara PHP
        266352 by: Colin Guthrie
        266357 by: Nathan Nobbe

Re: Unix date (even more bazaar)
        266355 by: Daniel Brown
        266358 by: Zoltán Németh
        266359 by: tedd
        266360 by: tedd
        266361 by: Robert Cummings
        266363 by: Daniel Brown

Re: when does php stop php executing when user clicks stop
        266356 by: Daniel Brown

Re: fopen() for http:// sometimes working, sometimes not
        266362 by: Albert Wiersch

Administrivia:

To subscribe to the digest, e-mail:
        [EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
        [EMAIL PROTECTED]

To post to the list, e-mail:
        [EMAIL PROTECTED]


----------------------------------------------------------------------
--- Begin Message ---
2007/12/26, Andrés Robinet <[EMAIL PROTECTED]>:
>
> Well, my fellow countryman... one of my classmates at college had a
> saying:
> "el hombre es un animal de costumbres" (translate it "you gringos" :) - no
> offense). And I guess it's most of the time like that... we learn
> something,
> we are never willing to unlearn it. But the truth is, there are at least
> as
> many habits and learnt behaviors as people are there walking in the
> streets.
> So, sometimes, we should be a bit more tolerant to "foreign habits"
> (unless
> we are Micro$oft.. but even so...).
>
> If my intuition is right you must come from the Java/C++ world (my bet is
> java 80/20). Maybe you have evaluated the hassles of implementing
> namespaces
> into PHP... and you have concluded it's not possible. Or maybe, that it
> will
> be a "buggy implementation" in the end; like PHP 4 OOP (which doesn't look
> like OOP at all). Maybe some old-seasoned gurus in the internals community
> have set you apart, or have treated your opinions with contempt (this is
> just my assumption, like most of this email's contents). So, you are now
> assuming that you won't need PHP, and that it will 'die("alone")' like
> some
> poem of your authorship stated in one of its verses. Yes, after all
> developers find out the hassles of namespaces and type hinting in PHP,
> they
> will give up... won't they? (just reading your mind... forgive my
> arrogance
> and continue).


Well, it's been years since I've done anything important in Java or C++.
I've been doing mostly scripting languages in all sorts of flavors.

I don't really care that my opinion felt to /dev/null or something else, I
just kept trying, and when I understood that I had to get my hands really
dirty to be taken into consideration, that's what I did. The short time I
had been dwelling through php source code, I finally understood why the core
developers have such a short temper. To be fair with the core developers,
the php community should issue a "thank you for keeping php running" email
each week.

The poem! That was fun! =D
It's not an assumption that I won't need PHP, it's just that I wanna try
doing something that's far away from web development and php. It would have
been a waste to leave everything I wrote in the first mail in the garbage
bin. That's why I wrote it, so if there's someone who sees that something is
sensible or useful in there, he can just take it. That was my only
intention.

I don't expect developers to just give up. I expect them to (a) accept them
and continue doing as always (b) ignore them (c) complain (d) use them
wrongly. I'll go for (d) if you wanna bet.

You know... I think I'm about your age (judging for the picture of yours at
> phpclasses.org, if that's your picture). Maybe a bit younger, or a bit
> older... but just a bit. And the thing is, I heard about two years ago or
> so, a big buzz around a "PHP replacement". It was something about trains
> (that's the farthest understanding I reached on it... "something about
> trains"). I think it was called, railroad, or railway, or diamond on a
> train... mmmm... nope, now I remember, it's "ruby on rails" (if you have a
> sarcasm detector, use it now). Last time I checked, it was still alive...
> arguably in a much more evolved fashion, and some (may I say "few"?)
> hosting
> companies support it now. I don't know much about current statistics, but
> I'm tempted to say that:
> - There are many more Books on PHP than on RoR
> - There are many more PHP hosting offers than RoR's counterpart (even if
> we
> reduce the stats to PHP 5 - just a guess)
> - There are many many more websites built on top of PHP than the RoR's
> counterpart
> - There are many many more extensions, APIs and Frameworks for PHP than
> for
> RoR (actually, RoR IS a framework itself)
> - There are many many more PHP developers than RoR developers
> In the shared market niche, PHP has beaten java, coldfusion, asp, and
> perl,
> which already existed. PHP has survived .Net rumbling, despite the Vb, C#,
> J# or C++ flavors and the awesome Vi$ual $tudio IDE. And despite all the
> predictions and prophecies about PHP's doom... it is still here, and will
> be
> here and in the top 5 for at least 10 years. By the time PHP is replaced
> by
> RoR or anything else, I will probably be selling RoR T-Shirts, or be
> retired, or be dead (maybe of lung cancer, or cirrhosis, or just because
> no-one can live past 120's)...


Please, don't let me get started on the Freaks on Rails.

RoR is a stillborn baby. It wasn't just bad enough that the RoR developer
failed while doing the first video presentation of RoR. People still kept
boarding that train. And it become worst, people from PHP started to think
that RoR was actually a good idea to be copied.

There are two major faults with RoR:
1) The MVC design pattern is not applied correctly
2) The whole application is designed around the (faulty) MVC design pattern

The MVC design pattern has one purpose and one purpose only, user interface
implementation. RoR forces you to put code that's not pertinent to the
system design because the MVC design pattern is forced on you. You should
never force a problem to fit a pattern.

The resultant is code that's hardly maintainable, mostly redundant, poorly
reusable, scalable only in dreams, and strictly limited.

All the PHP "frameworks" which copied the RoR ideology, had also, most of
the times, copied its faults. Luckily, the Zend Framework was really well
thought, and it is, as I said before, IMHO, the first real php framework.

It's ironic that they choose "Rails" as the name for their abomination. It's
quite appropriate. When you're on rails there's not much you can do, just
one way to go.

The point is... "sayonara PHP" means "sayonara most new clients" right now,
> sayonara "sustained trend", sayonara "all php-based solutions" and
> sayonara
> "most of the web development world". The facts show that googling for
> "PHP"
> throws about 8,830,000,000 results (this is a bit biased, but the point
> still holds)... try to Google for anything else and get similar numbers.


Probably, I'm not sure. But, in this case, yes, I'm saying goodbye to web
development.

[snip]
>
> All in all, my fellow countryman, I guess that unless you have a huge
> positive bank account balance, and you drive a BMW (I don't like them
> anyway…) you'd better off tolerating PHP for this little "namespace issue"
> if you want to stay in business. Unless, of course, that you have an
> incoming contract to develop a core system for an NSA mainframe. And if
> that's the case please tell them I prepare the most awesome "mate"
> (http://en.wikipedia.org/wiki/Mate_(beverage)) in the world, and that you
> cannot work without it.


I'll tell them, but I'm guessing it won't be easy to pass through
immigration with a bag of  "yerba". Last man I heard trying, was almost
body-cavity searched.

xD

I know that, even if you wish to leave PHP forever, you'll come back… all
> the roads will lead you to it. So, you'd better take a smart decision now…
> than have no other choice in the future (... ok, that was kind of The
> Godfather's script, lol).
>
> Enjoy your holidays,
>
> Rob
>

We'll see... for now I'll follow the stupid decision of finally doing what I
intended when I began this whole dance of software development. I hoping
with all my heart that this will go well and I'll never have to work in web
development again. If not, well, I'll come back to whatever it's that's
being used in that specific moment, be it PHP or whatever may come.

Just know that I'm not leaving for some petty reason. And I really hope that
someone else could find anything sensible in the things I posted in the
first mail, and keep on building on top of them.

Best Regards and Happy New Year,

Martin Alterisio

--- End Message ---
--- Begin Message ---
Hello;
I have not had the necessity to deal with php.ini files for some time.
Now, because I switch from Sendmail to Postfix on one system I
need to adjust the sendmail path variable. I cannot find a php.ini file
in the specified location. That is not a problem because I can use
ini_set(). What is puzzling is that my system,
I built and installed from source on a number of different systems and
seem to remember that the process creates a php.ini file. Maybe I have
it wrong but in the past I seem to remember being able to find one to
make sure register variables was set to off. (or maybe I ignored it because that is the default now). So, is the fact that this file is missing something
I should be concerned about?
PS; I have subscribed to the php-install list and get not responses to
my posts, or e-mails my ISP says contain viruses, possibly from a user
who requested I contact him (of her) off list.
Thanks
Jeff K

--- End Message ---
--- Begin Message ---
jekillen schreef:
> Hello;
> I have not had the necessity to deal with php.ini files for some time.
> Now, because I switch from Sendmail to Postfix on one system I
> need to adjust the sendmail path variable. 

are you sure you need to change it? doesn't postfix come with some kind of
compatibility wrapper [script] that takes the place of sendmail itself ...
IIRC most MTAs are sendmail compatible in that way.

> I cannot find a php.ini file
> in the specified location. That is not a problem because I can use
> ini_set(). What is puzzling is that my system,
> I built and installed from source on a number of different systems and
> seem to remember that the process creates a php.ini file. Maybe I have
> it wrong but in the past I seem to remember being able to find one to
> make sure register variables was set to off. (or maybe I ignored it because
> that is the default now). So, is the fact that this file is missing
> something
> I should be concerned about?

php uses it's defaults if it can't load an .ini file - the only concern
is whether this bothers you.

note that you can also set .ini settings via webserver configurations files
(e.g. in apache's httpd.conf or .htaccess files)

> PS; I have subscribed to the php-install list and get not responses to
> my posts, or e-mails my ISP says contain viruses, possibly from a user
> who requested I contact him (of her) off list.
> Thanks
> Jeff K
> 

--- End Message ---
--- Begin Message ---
I want to write a function to check
whether string $A is a prefix for string $B or not.

I writing this function in order to prevent directory traversal
during a download request. (e.g., download.php?file=..\index.php)

I want to make sure that the realpath() of the requested file is
within the realpath() of the download-directory. Trying to make
sure that the the $download_dir is a prefix for $filepath.

@see: http://en.wikipedia.org/wiki/Directory_traversal
**
*TWO FUNCTIONS:*

function is_prefix1($prefix, $str) {
    return (0 == strncasecmp($prefix, $str, strlen($prefix)));
}

function is_prefix2($prefix, $str) {
    return (0 === stripos($str, $prefix));
}
*USAGE:*
if (is_prefix1('a', 'abcdef'))
 echo 'prefix1 returned True!', '<br />';

if (is_prefix2('a', 'abcdef'))
 echo 'prefix2 returned True!', '<br />';

------------------------
Do these functions do the same job?
Which one provides better performance?

-behzad

--- End Message ---
--- Begin Message ---
2007. 12. 29, szombat keltezéssel 13.39-kor AmirBehzad Eslami ezt írta:
> I want to write a function to check
> whether string $A is a prefix for string $B or not.

if (strpos($B, $A) === 0) {
  echo '$B begins with $A';
} else {
  echo '$B does not begin with $A';
}

greets
Zoltán Németh

> 
> I writing this function in order to prevent directory traversal
> during a download request. (e.g., download.php?file=..\index.php)
> 
> I want to make sure that the realpath() of the requested file is
> within the realpath() of the download-directory. Trying to make
> sure that the the $download_dir is a prefix for $filepath.
> 
> @see: http://en.wikipedia.org/wiki/Directory_traversal
> **
> *TWO FUNCTIONS:*
> 
> function is_prefix1($prefix, $str) {
>     return (0 == strncasecmp($prefix, $str, strlen($prefix)));
> }
> 
> function is_prefix2($prefix, $str) {
>     return (0 === stripos($str, $prefix));
> }
> *USAGE:*
> if (is_prefix1('a', 'abcdef'))
>  echo 'prefix1 returned True!', '<br />';
> 
> if (is_prefix2('a', 'abcdef'))
>  echo 'prefix2 returned True!', '<br />';
> 
> ------------------------
> Do these functions do the same job?
> Which one provides better performance?
> 
> -behzad

--- End Message ---
--- Begin Message ---
In case you haven't realized it, I have already written two functions to
check
for a prefix !! The question is: Which function is better? (is_prefix1() or
is_prefix2())

On 12/29/07, Zoltán Németh <[EMAIL PROTECTED]> wrote:
>
> 2007. 12. 29, szombat keltezéssel 13.39-kor AmirBehzad Eslami ezt írta:
> > I want to write a function to check
> > whether string $A is a prefix for string $B or not.
>
> if (strpos($B, $A) === 0) {
> echo '$B begins with $A';
> } else {
> echo '$B does not begin with $A';
> }
>
> greets
> Zoltán Németh
>
> >
> > I writing this function in order to prevent directory traversal
> > during a download request. (e.g., download.php?file=..\index.php)
> >
> > I want to make sure that the realpath() of the requested file is
> > within the realpath() of the download-directory. Trying to make
> > sure that the the $download_dir is a prefix for $filepath.
> >
> > @see: http://en.wikipedia.org/wiki/Directory_traversal
> > **
> > *TWO FUNCTIONS:*
> >
> > function is_prefix1($prefix, $str) {
> >     return (0 == strncasecmp($prefix, $str, strlen($prefix)));
> > }
> >
> > function is_prefix2($prefix, $str) {
> >     return (0 === stripos($str, $prefix));
> > }
> > *USAGE:*
> > if (is_prefix1('a', 'abcdef'))
> >  echo 'prefix1 returned True!', '<br />';
> >
> > if (is_prefix2('a', 'abcdef'))
> >  echo 'prefix2 returned True!', '<br />';
> >
> > ------------------------
> > Do these functions do the same job?
> > Which one provides better performance?
> >
> > -behzad
>
>

--- End Message ---
--- Begin Message --- You should benchmark and tell us - anyway, just looking at the code, I'd say 'is_prefix2()' is faster since there's 1 function call instead of 2


AmirBehzad Eslami wrote:
In case you haven't realized it, I have already written two functions to
check
for a prefix !! The question is: Which function is better? (is_prefix1() or
is_prefix2())

On 12/29/07, Zoltán Németh <[EMAIL PROTECTED]> wrote:
2007. 12. 29, szombat keltezéssel 13.39-kor AmirBehzad Eslami ezt írta:
I want to write a function to check
whether string $A is a prefix for string $B or not.
if (strpos($B, $A) === 0) {
echo '$B begins with $A';
} else {
echo '$B does not begin with $A';
}

greets
Zoltán Németh

I writing this function in order to prevent directory traversal
during a download request. (e.g., download.php?file=..\index.php)

I want to make sure that the realpath() of the requested file is
within the realpath() of the download-directory. Trying to make
sure that the the $download_dir is a prefix for $filepath.

@see: http://en.wikipedia.org/wiki/Directory_traversal
**
*TWO FUNCTIONS:*

function is_prefix1($prefix, $str) {
    return (0 == strncasecmp($prefix, $str, strlen($prefix)));
}

function is_prefix2($prefix, $str) {
    return (0 === stripos($str, $prefix));
}
*USAGE:*
if (is_prefix1('a', 'abcdef'))
 echo 'prefix1 returned True!', '<br />';

if (is_prefix2('a', 'abcdef'))
 echo 'prefix2 returned True!', '<br />';

------------------------
Do these functions do the same job?
Which one provides better performance?

-behzad


--
Antinori and Partners - http://www.antinoriandpartners.com
PHP solutions - in Italy

--- End Message ---
--- Begin Message ---
2007. 12. 29, szombat keltezéssel 15.36-kor AmirBehzad Eslami ezt írta:
> In case you haven't realized it, I have already written two functions
> to check
> for a prefix !! The question is: Which function is better?
> (is_prefix1() or is_prefix2())

ehh, sorry I did not read your mail carefully before replying... must be
because it's saturday but I have to work ;)

your function is_prefix2() is almost the same as what I've written. I
think that would be better, but that's just personal taste, actually I
don't think there would be significant difference in performance between
the two functions.

greets
Zoltán Németh

>  
> On 12/29/07, Zoltán Németh <[EMAIL PROTECTED]> wrote: 
>         2007. 12. 29, szombat keltezéssel 13.39-kor AmirBehzad Eslami
>         ezt írta:
>         > I want to write a function to check 
>         > whether string $A is a prefix for string $B or not.
>         
>         if (strpos($B, $A) === 0) {
>         echo '$B begins with $A';
>         } else {
>         echo '$B does not begin with $A';
>         }
>         
>         greets
>         Zoltán Németh 
>         
>         >
>         > I writing this function in order to prevent directory
>         traversal
>         > during a download request. (e.g.,
>         download.php?file=..\index.php)
>         >
>         > I want to make sure that the realpath() of the requested
>         file is 
>         > within the realpath() of the download-directory. Trying to
>         make
>         > sure that the the $download_dir is a prefix for $filepath.
>         >
>         > @see: http://en.wikipedia.org/wiki/Directory_traversal
>         > **
>         > *TWO FUNCTIONS:*
>         >
>         > function is_prefix1($prefix, $str) {
>         >     return (0 == strncasecmp($prefix, $str,
>         strlen($prefix)));
>         > } 
>         >
>         > function is_prefix2($prefix, $str) {
>         >     return (0 === stripos($str, $prefix));
>         > }
>         > *USAGE:*
>         > if (is_prefix1('a', 'abcdef'))
>         >  echo 'prefix1 returned True!', '<br />'; 
>         >
>         > if (is_prefix2('a', 'abcdef'))
>         >  echo 'prefix2 returned True!', '<br />';
>         >
>         > ------------------------
>         > Do these functions do the same job?
>         > Which one provides better performance?
>         >
>         > -behzad
>         
> 

--- End Message ---
--- Begin Message ---
Can anyone see why this has stopped working...
latest.php is used with <? 
include("/home/sever2/public_html/teaup/article/article_summary.php") ?> to 
show the latest news articles.

Cheers
Chris

config.php
<?php
$max_summary = 6;
$max_latest = 7;
$summary_template = "t_summary.tp";
$article_template = "t_article.tp";
$password = "password";
?>

latest.php
<?php

  require('config.php');

 $filename = "article_summary.php";

 #- open article summaries
 if(file_exists($filename)){
  $fh = fopen($filename, "r");
  $old_news = fread($fh, filesize($filename));
  fclose($fh);
 }

    #- get article
 $articles = explode("<!--ARTICLE-->", $old_news);
 $i=0;
 foreach ( $articles as $article ){
  if(count($articles)>$i){
   if($max_latest >= $i++){
    print $article;
   }
  }
 }

?>

--- End Message ---
--- Begin Message ---
2007. 12. 29, szombat keltezéssel 11.23-kor Joker7 ezt írta:
> Can anyone see why this has stopped working...

what does it mean stopped working?
what error message do you get?
etc etc

greets
Zoltán Németh

> latest.php is used with <? 
> include("/home/sever2/public_html/teaup/article/article_summary.php") ?> to 
> show the latest news articles.
> 
> Cheers
> Chris
> 
> config.php
> <?php
> $max_summary = 6;
> $max_latest = 7;
> $summary_template = "t_summary.tp";
> $article_template = "t_article.tp";
> $password = "password";
> ?>
> 
> latest.php
> <?php
> 
>   require('config.php');
> 
>  $filename = "article_summary.php";
> 
>  #- open article summaries
>  if(file_exists($filename)){
>   $fh = fopen($filename, "r");
>   $old_news = fread($fh, filesize($filename));
>   fclose($fh);
>  }
> 
>     #- get article
>  $articles = explode("<!--ARTICLE-->", $old_news);
>  $i=0;
>  foreach ( $articles as $article ){
>   if(count($articles)>$i){
>    if($max_latest >= $i++){
>     print $article;
>    }
>   }
>  }
> 
> ?>
> 

--- End Message ---
--- Begin Message ---
Whoops sorry the include should be ....
include("/home/sever2/public_html/teaup/article/latest.php")
Chris

In news: [EMAIL PROTECTED] - "Joker7"  wrote :
>> Can anyone see why this has stopped working...
>> latest.php is used with <?
>> include("/home/sever2/public_html/teaup/article/article_summary.php")
>> ?> to show the latest news articles.
>>
>> Cheers
>> Chris
>>
>> config.php
>> <?php
>> $max_summary = 6;
>> $max_latest = 7;
>> $summary_template = "t_summary.tp";
>> $article_template = "t_article.tp";
>> $password = "password";
>>>
>>
>> latest.php
>> <?php
>>
>>  require('config.php');
>>
>> $filename = "article_summary.php";
>>
>> #- open article summaries
>> if(file_exists($filename)){
>>  $fh = fopen($filename, "r");
>>  $old_news = fread($fh, filesize($filename));
>>  fclose($fh);
>> }
>>
>>    #- get article
>> $articles = explode("<!--ARTICLE-->", $old_news);
>> $i=0;
>> foreach ( $articles as $article ){
>>  if(count($articles)>$i){
>>   if($max_latest >= $i++){
>>    print $article;
>>   }
>>  }
>> }



-- 
Cheap As Chips Broadband http://yeah.kick-butt.co.uk
Superb hosting & domain name deals http://host.kick-butt.co.uk 

--- End Message ---
--- Begin Message ---
Martin Alterisio wrote:
> Well, it was my intent not to say that in particular because is rather
> personal. I just wanted to pass on all the things that may be of some use to
> another developer.

Sorry I didn't mean to drag it out of you :)

> If you must know, there are three reasons why I'm distancing myself from
> PHP.
> 
> 1) I'm tired of web development as a whole. Too many clients which do not
> understand what the web is. Too many opiniologists who should know what the
> web is but talk about a second web, which is nothing more than the old web
> with logos on shiny floor. It feels like the bubble all over again (luckily
> I was too young to be affected when the first happened, now I cannot say I
> won't be affected).

That's fair enough really. I'm still enjoying it, even if I'm not always
at the bleeding edge!

> 2) I started in the business of software development with a dream that I was
> told afterwards it was childish and immature. Now I've learned enough to
> know that my dream, being a game developer, it's neither childish nor
> immature, totally the opposite, it's probably the most serious and important
> job in the whole software development industry. I wanna give it a try
> chasing that rainbow.

Absolutely. I have a lot of friends in that industry and it's definately
a market in which there are lots of opportunities in many different
areas of testing etc. It's hard work and from what I hear long hours,
but it's certainly rewarding in terms of work enjoyment :)

> 3) I'm not so sure anymore if PHP is profitable as a language choice for web
> development. The small and medium projects market is becoming infested with
> developers who I cannot compete anymore in terms of cost, and software
> quality is something this market did not yet got a grasp on. Big projects
> market has scalability requirements that aren't easily met on PHP grounds,
> and if it does, the cost is code quality or performance, two things that
> this market doesn't easily overlook.

I think it depends on how you use PHP to be honest. If you're playing
about on small to medium sized projects for clients PHP is an excellent
choice IMO. With the right approach and understanding PHP is also an
excellent choice for large scale projects (Facebook anyone??).

One of the interesting points you make about code quality I think is
true but that's simply because of the low barrier for entry into PHP
coding. Lots of people are self taught and their PHP projects are often
their first programming projects. Even if they've had a programming
background, web projects are often quite different. I know a lot of my
code is crap and I'm now working hard to replace the old bits with new
designs and approaches and am becoming increasingly happy with the
potential for scalability and maintenance etc. so I'm happily sticking
with PHP for the time being for most of my projects.

> Right now, the future of web development is mostly uncertain, too many
> things are happening too fast. If I had to I would bet on Java for server
> technology and Flash for client technology. The performance of Java6 have
> left PHP and the many other scripting languages panting for air way way
> behind. And its scripting API has engulfed all the good things about
> scripting languages into its domain. And yet the most important thing about
> Java is its scalability. Let's be honest, how can anyone expect to beat Sun
> in its own turf (networking)? Anyway, PHP developers, remember this word:
> "Quercus".

Well I think this is true to an extent but there are always going to be
several platform technologies out there and I think PHP will continue to
be a major player in that area, regardless of the success of JSP/ASP/RoR
etc.

> And the Flash guys pulled a rabbit out of the hat and called it Flash 9.
> They broke every compatibility known to developers, but finally developing
> for Flash doesn't suck. And also, they are going with the open-source
> approach as the Sun guys did (I pity the poor graphic designer, he still has
> to get a commercial license to author some content for the flash
> environment). And we have now many tools to apply the AJAX technique and
> DHTML easily, but I would still beat the crap out of anyone who thinks that
> building a thick client on HTML DOM and javascript is a good idea.

I think this is very true too, but not always. Flash is fine and I think
it will play a key part in some applications I will develop in the
future but I don't think DHTML+JS will die just yet. It really depends
on your application - if you want a funky system for email or another
desktop-like app, then Flash is a good choice, if you just want small
bits of interactivity in your webpage I really don't have a problem with
javascript (especially with the excellent jQuery). Flash has too many
drawbacks in terms of accessibility and indexibility for it to be a
general replacement for all things client side (not that you were
suggesting that). So again, I think there is plenty room for all sorts
of things out there.

> On the other hand, there hasn't happened anything important on the PHP
> frontier, except for the PHP4 EOL and the Zend Framework (IMHO the first
> real framework for PHP). And the most annoying thing is this stupid marriage
> PHP/MySQL that keeps on going. The moment was appropriate for PHP to end
> this relationship and PDO was a good step towards this. You'll probably have
> heard or will soon hear about mysqlnd, and many will think "yay! mysql
> functions are again part of the core!!! and they're faster!!!" and I would
> be thinking "damn! open source php projects will be tightly tied to MySQL,
> AGAIN!".

Well I quite like MySQL but I am very much in favour of PDO right now. I
think healthy competition is needed in this area to ensure a good degree
of innovation! I'm quite annoyed right now at some of the decisions
MySQL have made regarding their development structure of late but such
is life.

> That's all. I don't think that rant may be of use to anyone, but at least it
> felt nice to let go of some steam.

I think it's useful to get other people's opinions on things and yours
was very well written and thought out. Not everyone will agree with it
all but some of your points will ring true with some (especially the
non-PHP stuff!). Thanks for takign the time to reply with that info.

Good luck in the games industry :)

Col

--- End Message ---
--- Begin Message ---
On Dec 28, 2007 11:17 PM, Martin Alterisio <[EMAIL PROTECTED]> wrote:

> 2007/12/26, Colin Guthrie <[EMAIL PROTECTED]>:
>
> 3) I'm not so sure anymore if PHP is profitable as a language choice for
> web
> development. The small and medium projects market is becoming infested
> with
> developers who I cannot compete anymore in terms of cost, and software
> quality is something this market did not yet got a grasp on. Big projects
> market has scalability requirements that aren't easily met on PHP grounds,
> and if it does, the cost is code quality or performance, two things that
> this market doesn't easily overlook.


try telling that to yahoo, or wikipedia, or facebook..
no, php scales just fine.  the problem is most people dont put in the effort
learning
how to scale with php.  and for those people who sacrifice code quality,
well thats
their own decision and they should be aware of the consequences.  if a
business
owner is too niaeve to know, said business owner should be told by a
competent
developer or project manager what risks are being taken.

i would venture to say java or .net are potentially more costly depending on
what
your particular technology mix is.  really anything that you can sell, built
on open
source, should inherently be high margin products / services.


> Right now, the future of web development is mostly uncertain, too many
> things are happening too fast. If I had to I would bet on Java for server
> technology and Flash for client technology. The performance of Java6 have
> left PHP and the many other scripting languages panting for air way way
> behind. And its scripting API has engulfed all the good things about
> scripting languages into its domain. And yet the most important thing
> about
> Java is its scalability. Let's be honest, how can anyone expect to beat
> Sun
> in its own turf (networking)? Anyway, PHP developers, remember this word:
> "Quercus".
>

i know all about quercus.  im on the resin interest mailing list as well.
to be frank quercus has its own problems.
lets face it; java is serious.  there are many aspects of java i prefer over
php,
for example the comparatively clean apis provided in the standard libraries.
i dont see java doing so well on the web compared to php though, and i think
php is better suited for the web.  if you want to compare them overall in
terms of
what all they can do, eg.
daemons, desktop apps, applets and such; well i think its clear java has
more
and although php does have some ports to the desktop im not one to say
whether theyre any good as ive not used them.
however i shall not stray from my point which is php is well, and ill say
it,
*better* suited for the web (server side) than java.  it is also highly
scalable
albiet techniques that arent packaged with the language itself.

btw; i liked you comment about coding c like a cowbow to gain any notice
from the internals group ;)

-nathan

--- End Message ---
--- Begin Message ---
On Dec 28, 2007 11:06 PM, mano <[EMAIL PROTECTED]> wrote:
> N.Manohara Kurup,
> Thoppil House, Pollethai P.O,
> Mararikulam,
> Alappuzha- 688567, Kerala, India.
> Tel: 0478- 2865432
> Mob; 9495211159
> E-mail: [EMAIL PROTECTED]
> Web: http://mano.bizhat.com
>
> Sir,
>
> I wish to create my website www.manonivas.org so as i f anyone wish to
> enter in it they should pay a payment to my bank
> account online. As soon as they transfered money to my account then
> only they have to login my site and enter the link
> www.manonivas.org/radial_remedies.htm .
> Then login session expires after 24 hours and if they wish to reenter
> they have to pay the same amount.
> Please send me a script and other designing details to create my
> website as above described format.
> Please send the reply to my email ID: [EMAIL PROTECTED] or as a reply
> for this message.
> Regards
> N. Manohara Kurup
>


    Yeah, like that's going to happen.


-- 
Daniel P. Brown
[Phone Numbers Go Here!]
[They're Hidden From View!]

If at first you don't succeed, stick to what you know best so that you
can make enough money to pay someone else to do it for you.

--- End Message ---
--- Begin Message ---
2007. 12. 29, szombat keltezéssel 09.42-kor Daniel Brown ezt írta:
> On Dec 28, 2007 11:06 PM, mano <[EMAIL PROTECTED]> wrote:
> > N.Manohara Kurup,
> > Thoppil House, Pollethai P.O,
> > Mararikulam,
> > Alappuzha- 688567, Kerala, India.
> > Tel: 0478- 2865432
> > Mob; 9495211159
> > E-mail: [EMAIL PROTECTED]
> > Web: http://mano.bizhat.com
> >
> > Sir,
> >
> > I wish to create my website www.manonivas.org so as i f anyone wish to
> > enter in it they should pay a payment to my bank
> > account online. As soon as they transfered money to my account then
> > only they have to login my site and enter the link
> > www.manonivas.org/radial_remedies.htm .
> > Then login session expires after 24 hours and if they wish to reenter
> > they have to pay the same amount.
> > Please send me a script and other designing details to create my
> > website as above described format.
> > Please send the reply to my email ID: [EMAIL PROTECTED] or as a reply
> > for this message.
> > Regards
> > N. Manohara Kurup
> >
> 
> 
>     Yeah, like that's going to happen.

I didn't even receive this one...

greets
Zoltán Németh

> 
> 
> -- 
> Daniel P. Brown
> [Phone Numbers Go Here!]
> [They're Hidden From View!]
> 
> If at first you don't succeed, stick to what you know best so that you
> can make enough money to pay someone else to do it for you.
> 

--- End Message ---
--- Begin Message ---
    Yeah, and to what bazaar are you going, old man?

    Look, I'm so loopy right now, I'm top-posting.  How bizarre!!!!

    </Dan>

Ohhh, I hate it when that happens -- but, I have had even more embarrassing moments.

As to the problem I posted about strings being different, it was a gremlin I found in the string. A hex edit of the file showed that the space between the date and time, which should have been a space (20) was actually a new line (0A) character.

Oh well, at least I found it.

Thanks all.

tedd

--
-------
http://sperling.com  http://ancientstones.com  http://earthstones.com

--- End Message ---
--- Begin Message ---
At 4:58 PM +0100 12/29/07, Zoltán Németh wrote:
2007. 12. 29, szombat keltezéssel 09.42-kor Daniel Brown ezt írta:

 > > I wish to create my website www.manonivas.org so as i f anyone wish to
 > > enter in it they should pay a payment to my bank
 > > account online. As soon as they transfered money to my account then
 > only they have to login my site and enter the link
 > www.manonivas.org/radial_remedies.htm .
 > Then login session expires after 24 hours and if they wish to reenter
 > they have to pay the same amount.
 > Please send me a script and other designing details to create my
 > website as above described format.
 > Please send the reply to my email ID: [EMAIL PROTECTED] or as a reply
 > for this message.
 > Regards
 > N. Manohara Kurup
 > >
 >     Yeah, like that's going to happen.

I didn't even receive this one...

That's OK, because I received two of them.

Where do people that that come from?

tedd

--
-------
http://sperling.com  http://ancientstones.com  http://earthstones.com

--- End Message ---
--- Begin Message ---
On Sat, 2007-12-29 at 11:37 -0500, tedd wrote:
> At 4:58 PM +0100 12/29/07, Zoltán Németh wrote:
> >2007. 12. 29, szombat keltezéssel 09.42-kor Daniel Brown ezt írta:
> >
> >  > > I wish to create my website www.manonivas.org so as i f anyone wish to
> >  > > enter in it they should pay a payment to my bank
> >  > > account online. As soon as they transfered money to my account then
> >>  > only they have to login my site and enter the link
> >>  > www.manonivas.org/radial_remedies.htm .
> >>  > Then login session expires after 24 hours and if they wish to reenter
> >>  > they have to pay the same amount.
> >>  > Please send me a script and other designing details to create my
> >>  > website as above described format.
> >>  > Please send the reply to my email ID: [EMAIL PROTECTED] or as a reply
> >>  > for this message.
> >>  > Regards
> >>  > N. Manohara Kurup
> >  > >
> >  >     Yeah, like that's going to happen.
> >
> >I didn't even receive this one...
> 
> That's OK, because I received two of them.
> 
> Where do people that that come from?

You guys answered this wrong...

I have the solution for you, to get it you will need to log into my site
and make a large payment. That will get you to the first line of the
solution. To see the next line, or after 5 minutes you will need to log
in again and make another large payment. This process will continue for
a while, specifically until I have all your money or you have all my
solution.

Cheers,
Rob.
-- 
...........................................................
SwarmBuy.com - http://www.swarmbuy.com

    Leveraging the buying power of the masses!
...........................................................

--- End Message ---
--- Begin Message ---
On Dec 29, 2007 11:43 AM, Robert Cummings <[EMAIL PROTECTED]> wrote:
> On Sat, 2007-12-29 at 11:37 -0500, tedd wrote:
> > At 4:58 PM +0100 12/29/07, Zoltán Németh wrote:
> > >2007. 12. 29, szombat keltezéssel 09.42-kor Daniel Brown ezt írta:
> > >
> > >  > > I wish to create my website www.manonivas.org so as i f anyone wish 
> > > to
> > >  > > enter in it they should pay a payment to my bank
> > >  > > account online. As soon as they transfered money to my account then
> > >>  > only they have to login my site and enter the link
> > >>  > www.manonivas.org/radial_remedies.htm .
> > >>  > Then login session expires after 24 hours and if they wish to reenter
> > >>  > they have to pay the same amount.
> > >>  > Please send me a script and other designing details to create my
> > >>  > website as above described format.
> > >>  > Please send the reply to my email ID: [EMAIL PROTECTED] or as a reply
> > >>  > for this message.
> > >>  > Regards
> > >>  > N. Manohara Kurup
> > >  > >
> > >  >     Yeah, like that's going to happen.
> > >
> > >I didn't even receive this one...
> >
> > That's OK, because I received two of them.
> >
> > Where do people that that come from?
>
> You guys answered this wrong...
>
> I have the solution for you, to get it you will need to log into my site
> and make a large payment. That will get you to the first line of the
> solution. To see the next line, or after 5 minutes you will need to log
> in again and make another large payment. This process will continue for
> a while, specifically until I have all your money or you have all my
> solution.

    I've received six exact copies of the same email.  Some people are ignorant.

    And sure, I'm one of them.... just not this time.  And that feels
pretty good.  ;-P

-- 
Daniel P. Brown
[Phone Numbers Go Here!]
[They're Hidden From View!]

If at first you don't succeed, stick to what you know best so that you
can make enough money to pay someone else to do it for you.

--- End Message ---
--- Begin Message ---
On Dec 28, 2007 8:43 PM, Eric Wood <[EMAIL PROTECTED]> wrote:
> Eric Wood wrote:
> > If database operations are underway when a user accesses a web page,
> > then user clicks stop on the browser, does the php stop immediately too?
> >
> > I'd rather the php continue behind the scenes to fullfill all the
> > actions I need it do to whether the user wants to see if happen or not.
> >
> > Overall I wonder how modphp keeps the code executing even if the browser
> > drops the connection via stop.
> >
> > Any insight is greatly appreciated.
> >
> > thanks,
> > -eric wood
> >
> >
> I pretty much found my answers over at:
> http://us2.php.net/manual/en/features.connection-handling.php
>
> thanks anyway,

    You may also want to look into ignore_user_abort(), Eric.


-- 
Daniel P. Brown
[Phone Numbers Go Here!]
[They're Hidden From View!]

If at first you don't succeed, stick to what you know best so that you
can make enough money to pay someone else to do it for you.

--- End Message ---
--- Begin Message ---
""Dan"" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
>
> You really need to filter your input more, have a list of what is 
> acceptable not what is unacceptable.  That being, make it a requirement 
> that the url input has a TDL(.com, .net, .org, etc.) or is a valid IP(ping 
> it), only allow alphanumerics for the name, etc.  When you don't validate 
> your site can get hacked, I know it's not really insecure but it's just an 
> example of input you may not expect, if you try to validate 
> http://localhost it goes ahead and validates your server's html.

I make sure it starts with "http:" or "https:" and change spaces to %20 so 
it will work. I also check for some possible recursion issues. I think I'm 
fairly secure just doing that. What could happen security wise? What else do 
you think I need to do? I don't want to check for a TLD as there are many 
and I don't think it is necessary... and pinging doesn't seem like a good 
idea either as some servers probably won't respond to pings.

The localhost issue is interesting, but I don't see it as a security issue.

I would like to know if there are any serious secirity issues I may be 
overlooking though.

Thanks,
Albert

--- End Message ---

Reply via email to