php-general Digest 5 Jan 2011 20:00:35 -0000 Issue 7117
Topics (messages 310498 through 310511):
Re: Newbie Question
310498 by: tedd
310499 by: tedd
310503 by: David Harkness
310508 by: Daniel Brown
310509 by: Robert Cummings
310511 by: David Harkness
Re: Hot Topics
310500 by: tedd
310501 by: tedd
310502 by: tedd
310504 by: Bastien Koert
310507 by: Richard Quadling
Re: File-Upload per Drag-N-Drop?
310505 by: tedd
Re: Unload/reload included class
310506 by: David Harkness
[security] PHP has DoS vuln with large decimal points
310510 by: Daevid Vincent
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 ---
At 9:36 PM -0300 1/1/11, Adolfo Olivera wrote:
Hi,
I'm new for php. Just trying to get my hello world going on godaddy
hosting. Can't getting to work. I think sintax it's ok. I was understanding
that my shared hosting plan had php installed. Any suggestions. Thanks,
Happy 2011!!
PS: Please, feel free to educate me on how to address the mailing list,
since again, I'm new to php and not a regular user of mailing lists,
I think it's the sintax -- that's usually left to governments -- try
syntax instead.
I agree with Ash to simply use .php as the file's suffix. While you
could use .html, but it's usually hard for newbees to understand
what's happening.
So, create a file containing:
<?php echo('Hello World'); ?>
and save it as myfile.php
Then open your browser and put the url of the file in the address bar
and you should see Hello World.
If you don't, then post again.
Cheers,
tedd
--
-------
http://sperling.com/
--- End Message ---
--- Begin Message ---
At 7:43 PM -0600 1/2/11, Larry Garfield wrote:
On Sunday, January 02, 2011 4:56:28 pm Adolfo Olivera wrote:
Thanks for the replies. I'll just put a php on all my html containing php.
A little of topic. Wich IDE are you guys using. I'm sort of in a catch
twenty two here. I been alternating vim and dreamweaver. I'm trying to go
100% open source, but I really find dreamweaver easier to use so far.
I bounce between NetBeans and Eclipse, depending on which currently sucks
less. I have yet to find a PHP IDE that doesn't suck; it's just degrees of
suckage. :-)
--Larry Garfield
Ain't that the truth.
I use GoLive 9 without all the WYSIWYG nonsense -- DW can be used in
the same fashion, but it's still bloatware.
I teach using NetBeans, because it generally sucks less than Eclipse.
Eclipse is simply too complicated and NetBeans tries to be less, but
it's still too much.
I really don't understand why someone can't make a simple good editor
(php, css, javascript, html) with a file management system that shows
both client and server side files. I always feel I am programming
with one eye closed when using NetBeans.
Cheers,
tedd
--
-------
http://sperling.com/
--- End Message ---
--- Begin Message ---
On Wed, Jan 5, 2011 at 8:20 AM, tedd <[email protected]> wrote:
> I teach using NetBeans, because it generally sucks less than Eclipse.
> Eclipse is simply too complicated and NetBeans tries to be less, but it's
> still too much.
>
Have you tried PHPStorm? I installed it but haven't had a chance to play
with it yet. Despite the name, I believe it is designed to handle (X)HTML,
JavaScript, and CSS as well.
I use and prefer Eclipse for Python and Java code, but I found its PHP
support severely lacking the last time I checked (a year ago?). However, at
this new job since I do mostly PHP I stick to NetBeans even when working in
Java occasionally. It's just easier to use the same tool since all the menus
and key commands are just different enough. I can't objectively comment on
which layout is better. I prefer Eclipse, but I used it for a few years
before trying NetBeans and am simply more comfortable with it. Both are
great and horrible at the same time. :)
I do have to say that NetBeans more than Eclipse will randomly become
unusable for unknown reasons: disk and CPU activity spike, code-completion
lags, whatever. Eclipse seems more solid in this regard.
David
--- End Message ---
--- Begin Message ---
On Wed, Jan 5, 2011 at 11:32, David Harkness <[email protected]> wrote:
>
> I do have to say that NetBeans more than Eclipse will randomly become
> unusable for unknown reasons: disk and CPU activity spike, code-completion
> lags, whatever. Eclipse seems more solid in this regard.
Whereas, on Linux, I've found the exact opposite to be true:
NetBeans seemed to work fine, while Eclipse would lock.
That said, I only use IDE's when I want to see what's new in the
world, or to see if I could speed up my own development processes at
all. Somehow, I always find myself back to vim, awk, sed, grep, and
the like. With the exception of a few websites (Gmail usually, but
not always, included), I spend my time on the command line, and have
for years. GUI's, IDE's, RAD's, and so forth all have their place
with some folks.... I just don't believe the place is with me.
However, if for nothing else than to stay abreast of things, I'm going
to have to check out PHPStorm. Until you mentioned it, I'd never even
heard the name.
--
</Daniel P. Brown>
Network Infrastructure Manager
Documentation, Webmaster Teams
http://www.php.net/
--- End Message ---
--- Begin Message ---
On 11-01-05 01:35 PM, Daniel Brown wrote:
On Wed, Jan 5, 2011 at 11:32, David Harkness<[email protected]> wrote:
I do have to say that NetBeans more than Eclipse will randomly become
unusable for unknown reasons: disk and CPU activity spike, code-completion
lags, whatever. Eclipse seems more solid in this regard.
Whereas, on Linux, I've found the exact opposite to be true:
NetBeans seemed to work fine, while Eclipse would lock.
That said, I only use IDE's when I want to see what's new in the
world, or to see if I could speed up my own development processes at
all. Somehow, I always find myself back to vim, awk, sed, grep, and
the like. With the exception of a few websites (Gmail usually, but
not always, included), I spend my time on the command line, and have
for years. GUI's, IDE's, RAD's, and so forth all have their place
with some folks.... I just don't believe the place is with me.
However, if for nothing else than to stay abreast of things, I'm going
to have to check out PHPStorm. Until you mentioned it, I'd never even
heard the name.
I'm with you on that. I'm still using a combination of terminals, joe,
and various command-line tools. Whether I'm local or remote, all of the
same tools are at my fingertips. In the few cases where I need to work
in a Windows environment, I just mount the filesystem (for dev anyways)
over NFS and proceed as usual :)
Cheers,
Rob.
--
E-Mail Disclaimer: Information contained in this message and any
attached documents is considered confidential and legally protected.
This message is intended solely for the addressee(s). Disclosure,
copying, and distribution are prohibited unless authorized.
--- End Message ---
--- Begin Message ---
On Wed, Jan 5, 2011 at 10:35 AM, Daniel Brown <[email protected]> wrote:
> On Wed, Jan 5, 2011 at 11:32, David Harkness <[email protected]>
> wrote:
> > I do have to say that NetBeans more than Eclipse will randomly become
> > unusable for unknown reasons: disk and CPU activity spike,
> code-completion
> > lags, whatever. Eclipse seems more solid in this regard.
>
> Whereas, on Linux, I've found the exact opposite to be true:
> NetBeans seemed to work fine, while Eclipse would lock.
>
I used Eclipse on Windows and only a short while on Ubuntu, and I've used
NetBeans exclusively on Ubuntu. I actually switched to using the beta and
now dev builds of NetBeans because of the issues I mentioned. To this day
when I'm editing PHP files, the disk is hit with every keystroke. This
doesn't happen for any other file type such as Java. There's no good reason
that I can think of for that, and it's quite annoying.
That said, I only use IDE's when I want to see what's new in the
> world, or to see if I could speed up my own development processes at
> all.
There are so many helpful additions to modern IDEs that I miss when I drop
into basic editors. The key is integration. When I'm editing a file, the IDE
shows me which lines have been modified, added, and removed. I can hover
over the indicator to see the original text or revert the change. You can
get this information outside the editor, but I find it speeds up my work to
have it in one place. Of course, I often find myself using grep instead of
the IDE's "find in files" feature. ;) Old habits die hard.
I will admit that I never got to be much of an emacs or vi power user, and
I'd bet they have a lot of the IDE capabilities I have grown to love. I also
have poor vision requiring larger fonts for the main text area, and most
IDEs (GUIs really) provide more tools for me to mitigate the problem than a
fixed terminal.
David
--- End Message ---
--- Begin Message ---
At 9:22 PM -0500 12/29/10, Daniel Brown wrote:
I'm
particularly interested in the opinions of folks who recall the old
system, but any opinions and ideas are more than welcome.
Hi Daniel:
I think it was a good idea and practice -- look forward to seeing it again.
+1
Cheers,
tedd
PS: Also, I'm glad to see that you finally admit you are always
wrong. It took me a while to realize that I'm always wrong as well,
but I'm much better for it. People who are always right, never
accomplish anything.
--
-------
http://sperling.com/
--- End Message ---
--- Begin Message ---
At 11:48 PM -0500 12/29/10, Jason Pruim wrote:
And as someone who is married as well I agree with what you said.
Sometimes it's easier to just say you're sorry then fighting even
when you know you're right.
Jason Pruim
It's much easier when you realize you are never right.
Cheers,
tedd
--
-------
http://sperling.com/
--- End Message ---
--- Begin Message ---
At 2:16 AM -0500 12/30/10, Robert Cummings wrote:
On 10-12-30 12:36 AM, Daniel Brown wrote:
Yeah, that was in for a few weeks, but I believe it was Robert Cummings
who went out of his way to show its imperfections. Maybe we should
incorporate a syntax checker to show parse errors for the week, too. ;-P
Hmmmpf... I never go out of my way >:)
Cheers,
Rob.
Yeah right...
If you never go out of your way, then why are you posting here?
You're just a hard-crusted softie.
Cheers,
tedd
--
-------
http://sperling.com/
--- End Message ---
--- Begin Message ---
On Wed, Jan 5, 2011 at 11:31 AM, tedd <[email protected]> wrote:
> At 2:16 AM -0500 12/30/10, Robert Cummings wrote:
>>
>> On 10-12-30 12:36 AM, Daniel Brown wrote:
>>>
>>> Yeah, that was in for a few weeks, but I believe it was Robert
>>> Cummings
>>> who went out of his way to show its imperfections. Maybe we should
>>> incorporate a syntax checker to show parse errors for the week, too. ;-P
>>
>> Hmmmpf... I never go out of my way >:)
>>
>> Cheers,
>> Rob.
>
> Yeah right...
>
> If you never go out of your way, then why are you posting here?
>
> You're just a hard-crusted softie.
A crustacean?
--
Bastien
Cat, the other other white meat
--- End Message ---
--- Begin Message ---
On 5 January 2011 16:35, Bastien Koert <[email protected]> wrote:
> On Wed, Jan 5, 2011 at 11:31 AM, tedd <[email protected]> wrote:
>> At 2:16 AM -0500 12/30/10, Robert Cummings wrote:
>>>
>>> On 10-12-30 12:36 AM, Daniel Brown wrote:
>>>>
>>>> Yeah, that was in for a few weeks, but I believe it was Robert
>>>> Cummings
>>>> who went out of his way to show its imperfections. Maybe we should
>>>> incorporate a syntax checker to show parse errors for the week, too. ;-P
>>>
>>> Hmmmpf... I never go out of my way >:)
>>>
>>> Cheers,
>>> Rob.
>>
>> Yeah right...
>>
>> If you never go out of your way, then why are you posting here?
>>
>> You're just a hard-crusted softie.
>
> A crustacean?
"Crunchy on the outside, smooth on the inside ... armadillo".
--
Richard Quadling
Twitter : EE : Zend
@RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY
--- End Message ---
--- Begin Message ---
At 7:23 PM +0100 12/29/10, Michelle Konzack wrote:
Hello,
my users have an Online-File-Store with nearly anything they need but
one feature is missing: Drag-D-Drop.
I like to implement Drag-D-Drop so users can Drag a file from a File-
Manager and Drop it on the Upload-Icon in my Webinterface.
Can someone tell me HOW THIS WORKS?
It works on the client-side and only IF the user allows javascript to
be turned on.
This is a php list -- I suggest that you post this question to a
javascript list or even jQuery (Google it).
Cheers,
tedd
--
-------
http://sperling.com/
--- End Message ---
--- Begin Message ---
On Tue, Jan 4, 2011 at 4:44 PM, Patrik Pomichal
<[email protected]>wrote:
> Loading plugin is easy, when my app found new file in plugins dir,
> include and register it. But if i change the plugin source i must restart
> the app to reload it.
If you don't mind the resource burn (memory) of loading a lot of code over
time without flushing it out when not needed, you could have the plugin
files contain the methods without the enclosing class declaration. When you
(re)load a plugin, you create a dynamic class name using a counter or some
other uniqueness mechanism, build a string containing a class declaration
wrapped around the file's contents, and use eval() to load it.
You could of course let the coder put a class name into the plugin file if
that looks nicer and do a string replace on it with your dynamic name. The
key is that you cannot unload classes in PHP AFAIK so you must come up with
a new class name each time. The old compiled bytecode will remain, but you
can destroy the old plugin instance to regain a little memory.
David
--- End Message ---
--- Begin Message ---
The error in the way floating-point and double-precision numbers are
handled sends 32-bit systems running Linux, Windows, and FreeBSD into an
infinite loop that consumes 100 percent of their CPU's resources.
Developers are still investigating, but they say the bug appears to affect
versions 5.2 and 5.3 of PHP. They say it could be trivially exploited on
many websites to cause them to crash by adding long numbers to certain
URLs.
<?php $d = 2.2250738585072011e-308; ?>
The crash is also triggered when the number is expressed without scientific
notation, with 324 decimal places.
Read on...
http://www.theregister.co.uk/2011/01/04/weird_php_dos_vuln/
--
Daevid Vincent
http://daevid.com
There are only 11 types of people in this world. Those that think binary
jokes are funny, those that don't, and those that don't know binary.
--- End Message ---