Re: [PHP] free allocated memory: HOW ?

2007-04-13 Thread Chris



ok, the complete workflow is a little bit complicated. we are using a
workflow engine and the newsletter generator is one step of three. the
first cleans the statistics data, the second generates the new data and
the third is the one which generates the mails.


Put this in between each line and see where your memory is jumping the most:

error_log('in file ' . __FILE__ . ' at line ' . __LINE__ . '; memory 
usage is ' . number_format((memory_get_usage() / 1024), 4) . ' kb');


Once you've worked out the biggest jumps, fix them, then work on the 
next one and so on.



It's going to be a lot quicker doing something like that over asking us 
to help you work out thousands of lines of code.


--
Postgresql  php tutorials
http://www.designmagick.com/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] free allocated memory: HOW ?

2007-04-13 Thread Chris

Arthur Erdös wrote:

It can if you're trying to process a borked image...

I've had imagecreatefromjpeg() eat memory up to almost 50x the size of
the image before finally deciding it can't handle it and crapping out.
That was *after* running it through getimagesize() with no problem at 
all.


okay - good point - but in this case the OP is reading in an html 
template file,

just a string of 20.7Kb, what could go wrong there?



this is probably one issue... the template is an HTML template 
containing images like img src=http://www.brainguide.com/xxx/. How 
does PHP handle this stuff? I suppose that it is just a string and the 
image at the URL is not really read, or am I wrong?


It's just part of the string of content unless you do something special 
with it.


--
Postgresql  php tutorials
http://www.designmagick.com/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] WWE in Stamford, CT needs a kick ass PHP Developer!

2007-04-13 Thread Stut

tedd wrote:
this 
ain't the bad old days.


That's debatable!

-Stut

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] free allocated memory: HOW ?

2007-04-13 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2007-04-12 18:17:34 +0200:
 3-4 seconds is dead slow if you ask me - a script like this should be capable 
 of
 making the average mailserver go completely apeshit assuming you'd be mailing 
 the
 newsletters out directly after creating them [rather than storing them in a 
 db] (i.e.
 pumping out lots of emails a second] ... I know this because I have a qmail 
 server
 that has trouble keeping up with my massmailer scripts.

switch po Postfix, one problem fewer for you.

-- 
How many Vietnam vets does it take to screw in a light bulb?
You don't know, man.  You don't KNOW.
Cause you weren't THERE. http://bash.org/?255991

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] WWE in Stamford, CT needs a kick ass PHP Developer!

2007-04-13 Thread Stut

tedd wrote:

At 7:41 PM +0100 4/12/07, Stut wrote:
Yes you'll need to put in a bit more work, but the result will be that 
much better.


-Stut


Sorry Stut -- I know you know this, but it's more work to NOT use css.


Not when you have a pre-made table-based layout already.

-Stut

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] free allocated memory: HOW ?

2007-04-13 Thread Arthur Erdös
Am Freitag, den 13.04.2007, 16:03 +1000 schrieb Chris:
  ok, the complete workflow is a little bit complicated. we are using a
  workflow engine and the newsletter generator is one step of three. the
  first cleans the statistics data, the second generates the new data and
  the third is the one which generates the mails.
 
 Put this in between each line and see where your memory is jumping the most:
 
 error_log('in file ' . __FILE__ . ' at line ' . __LINE__ . '; memory 
 usage is ' . number_format((memory_get_usage() / 1024), 4) . ' kb');
 
 Once you've worked out the biggest jumps, fix them, then work on the 
 next one and so on.
 
 
 It's going to be a lot quicker doing something like that over asking us 
 to help you work out thousands of lines of code.
 

sure, i just posted the code because i was asked to ;)

i figured out the biggest jump (after reading the template) but could
not fix it yet -.-

thats why I asked a general question concerning php memory handling.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] free allocated memory: HOW ?

2007-04-13 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2007-04-13 07:49:43 +0200:
 
  Just post your source already.
  
 
 ok, the complete workflow is a little bit complicated. we are using a
 workflow engine and the newsletter generator is one step of three. the
 first cleans the statistics data, the second generates the new data and
 the third is the one which generates the mails.
 
 here is the concerning method:

aren't you suffering from fetching huge result sets? just a guess.

-- 
How many Vietnam vets does it take to screw in a light bulb?
You don't know, man.  You don't KNOW.
Cause you weren't THERE. http://bash.org/?255991

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] free allocated memory: HOW ?

2007-04-13 Thread Chris

Arthur Erdös wrote:

Am Freitag, den 13.04.2007, 16:03 +1000 schrieb Chris:

ok, the complete workflow is a little bit complicated. we are using a
workflow engine and the newsletter generator is one step of three. the
first cleans the statistics data, the second generates the new data and
the third is the one which generates the mails.

Put this in between each line and see where your memory is jumping the most:

error_log('in file ' . __FILE__ . ' at line ' . __LINE__ . '; memory 
usage is ' . number_format((memory_get_usage() / 1024), 4) . ' kb');


Once you've worked out the biggest jumps, fix them, then work on the 
next one and so on.



It's going to be a lot quicker doing something like that over asking us 
to help you work out thousands of lines of code.




sure, i just posted the code because i was asked to ;)

i figured out the biggest jump (after reading the template) but could
not fix it yet -.-


Reading in the template should only happen once and take roughly as much 
memory as the file is big.


If the file is 20k, memory should go up roughly by that much.

If it's going up a lot more, something is going wrong (either you're 
doing something wrong or you're not just reading the template - you're 
doing something else along with that).


--
Postgresql  php tutorials
http://www.designmagick.com/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] WWE in Stamford, CT needs a kick ass PHP Developer!

2007-04-13 Thread Robert Cummings
Dear Tedd,

Please put me down for one pint of asshole, because while you sit on
that glass pedestal of CSS superiority I can't help but notice how
http://ancientstones.com/ looks completely fucked up in Opera. Opera I
might add is ACID2 compliant. Now please go shove your better than thou
CSS up your ass :) Trust me, I am at least as versed as you in CSS and
choose to use tables.

Cheers,
Rob.



On Thu, 2007-04-12 at 20:02 -0400, tedd wrote:
 At 6:31 PM -0500 4/12/07, Richard Lynch wrote:
 On Thu, April 12, 2007 1:34 pm, Robert Cummings wrote:
   ... It's too bad, I love CSS, it
   makes for really clean markup, but using it completely in place of
   tables just isn't feasible right now without resorting to CSS
   tricks.
   And using tricks is just as much against the spirit of CSS as using
   tables for layout :)
 
 While straying even more OT than usual, I must chime in with me too
 
 I cannot count the number of times I've seen CSS purists pull out
 gnarly disgusting hacks, far worse than any nested table layout, to
 work around browser incompatibilities.
 
 It would be nice if CSS actually let designers specify what they need
 to specify.  [Can you say 3-column layout with page footer?]
 
 And if browsers actually implemented CSS correctly...
 
 But, really, CSS is still lacking in what seems to me some basic
 fundamentals in terms of being able to say put this thing here, and
 that thing there and you end up resorting to all kinds of
 non-intuitive code to get the look you want...
 
 Richard, you surprise me.
 
 CSS is like any other tool -- learn to use it and it will work.
 
 As far as any layout, if you can show an example it can be done in css.
 
 As far as replacing tables, CSS doesn't -- it provides tables even 
 more versatility. Tables have their place, but not in layout.
 
 Lastly, one man's gnarly disgusting hack, is another man's way around 
 a short coming of IE. How many times have you had to use javascript 
 to accomplish a task instead of using just php? One could call that a 
 gnarly disgusting hack, but it's just a solution. As this list 
 proves, no language is without problems.
 
 Cheers,
 
 tedd
 -- 
 ---
 http://sperling.com  http://ancientstones.com  http://earthstones.com
 
-- 
..
| InterJinn Application Framework - http://www.interjinn.com |
::
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for   |
| creating re-usable components quickly and easily.  |
`'

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] free allocated memory: HOW ?

2007-04-13 Thread Arthur Erdös
 Reading in the template should only happen once and take roughly as much 
 memory as the file is big.
 
 If the file is 20k, memory should go up roughly by that much.
 
 If it's going up a lot more, something is going wrong (either you're 
 doing something wrong or you're not just reading the template - you're 
 doing something else along with that).
 

i completely agree with you ;)

i will check if the template is really the reason for the big jump with
logging the memory usage each line.

apart from that, i am still wondering why the memory usage grows in each
loop for about 30 megs...

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: WYSIWYG vs. the 'power-user'

2007-04-13 Thread Sancar Saran
It depends what did you want...

For example. My current project uses own template engine. It was so simple. 
you have to use {} marked nodes inside of generic html document.

You have to use text editor to update template file...

Then guess what... Our HTML designers cring for dreamweaver support. Yes sure 
they are very capable html design (they can create better designs than me). 
And without dreamweaver their capacity was gone...

In GUI mode you are connected to gui. Without it your knowladge was 
worthless...

Depending some buttons and images make me sick. 

And if you there for doing someting to win your food, gui way is so much 
simpler.

And if you there for walking to your way you have to know what happen inside 
to depend only yourself...

Regards

Sancar

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Dreamhost! PHP as CGI!???

2007-04-13 Thread Micky Hulse
I think I just read that PHP is ran as CGI on Dreamhost... this does not 
sound good. Can anyone confirm?


What do you all think? Good? Bad?

I have dealt with one other server that did this (PHP as CGI) and I 
hated it!


I just bought a years worth of hosting... I have a trial period so I 
think I can still cancel.


Should I stick with it or find a host that runs PHP under Apache?

Please advise.

(FYI: Using Expression Engine for CMS/blog -- I read that it is 
recommended to use EE with PHP not as CGI.)


Many thanks in advance!
Cheers,
Micky

--
Wishlists: http://snipurl.com/vrs9
   Switch: http://browsehappy.com/
 BCC?: http://snipurl.com/w6f8
   My: http://del.icio.us/mhulse

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Dreamhost! PHP as CGI!???

2007-04-13 Thread Tijnema !

On 4/13/07, Micky Hulse [EMAIL PROTECTED] wrote:

I think I just read that PHP is ran as CGI on Dreamhost... this does not
sound good. Can anyone confirm?

What do you all think? Good? Bad?

I have dealt with one other server that did this (PHP as CGI) and I
hated it!

I just bought a years worth of hosting... I have a trial period so I
think I can still cancel.

Should I stick with it or find a host that runs PHP under Apache?

Please advise.

(FYI: Using Expression Engine for CMS/blog -- I read that it is
recommended to use EE with PHP not as CGI.)

Many thanks in advance!
Cheers,
Micky


Google tells me that it is an optional feature to run PHP as CGI,
default it is running under apache. Atleast that's what i found for
dreamhost.

Tijnema


--
Wishlists: http://snipurl.com/vrs9
   Switch: http://browsehappy.com/
 BCC?: http://snipurl.com/w6f8
   My: http://del.icio.us/mhulse

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Dreamhost! PHP as CGI!???

2007-04-13 Thread Micky Hulse

Micky Hulse wrote:
I think I just read that PHP is ran as CGI on Dreamhost... this does not 
sound good. Can anyone confirm?


Found this:

http://php.dreamhosters.com/

I guess I am just wondering what your thoughts are when it comes to 
running PHP as CGI? Good/Bad? Maybe I should not worry about it?


Off-list replies are cool with me if this is a little OT.

Thanks!
M

--
Wishlists: http://snipurl.com/vrs9
   Switch: http://browsehappy.com/
 BCC?: http://snipurl.com/w6f8
   My: http://del.icio.us/mhulse

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Dreamhost! PHP as CGI!???

2007-04-13 Thread Richard Davey

Micky Hulse wrote:

I think I just read that PHP is ran as CGI on Dreamhost... this does not 
sound good. Can anyone confirm?


If you've got access to your account with them, you can confirm it 
yourself. Check the output of a phpinfo().



What do you all think? Good? Bad?


Not *that* terrible at all, but if you've only been with Dreamhost for a 
few days you've got far worse things to experience yet IMHO (shoddy 
uptime, shoddy servers, shoddy network, etc)



Should I stick with it or find a host that runs PHP under Apache?


www.pair.com runs PHP 4 as an Apache Module, and are a superb host (I've 
used them since 1996) - but even better in the next few weeks they 
rollout PHP 5.2.1 as standard on all servers. Can't wait :)


Cheers,

Rich
--
Zend Certified Engineer
http://www.corephp.co.uk

Never trust a computer you can't throw out of a window

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Dreamhost! PHP as CGI!???

2007-04-13 Thread Micky Hulse

Hi Tijnema! Thanks for the quick reply, I really appreciate the help. :)

Tijnema ! wrote:

Google tells me that it is an optional feature to run PHP as CGI,
default it is running under apache. Atleast that's what i found for
dreamhost.


Ah, from what I am reading, it sounds like that used to be the option, 
and may still be a feature for older users... but (from what I 
understand, which is not much) PHP 5 is CGI only:


DreamHost currently allows several PHP configurations. In the user 
Control Panel you can choose between PHP4 and PHP5 running as a CGI 
application (with optional FastCGI support). While it's no longer 
officially supported you currently still have the possibility to have 
PHP running as an Apache module (mod_php).


Finally you have the option to compile your own custom PHP with the 
exact version of PHP you wish and with any module you require.

http://php.dreamhosters.com/

Hmmm, I guess it sounds like I can setup things to use the Apache 
module, but they make it sound so evil:


If one of those is a show-stopper for you, you can easily switch to 
running PHP as an Apache module and not CGI, but be prepared for a bunch 
of potential security and ease-of-use issues!

http://blog.dreamhosters.com/kbase/index.cgi?area=2933

Looks like I have a ton of reading to do... Unfortunately I am more of a 
designer than I am a system administrator... so not sure if messing with 
PHP on my DH account is worth the headache. :(


I have just had bad experiences in past with PHP as CGI... Not fun.

Lol, well... Thanks Tijnema! I really appreciate your help on this one. ;)

Have a great day/night!
Cheers,
M




--
Wishlists: http://snipurl.com/vrs9
   Switch: http://browsehappy.com/
 BCC?: http://snipurl.com/w6f8
   My: http://del.icio.us/mhulse

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] scandir and ftp wrapper

2007-04-13 Thread John Ewing

I can think of only one reason why your test might be invalid:

If you have already logged in to the FTP server from the browser, and
the user:pass in the URL aren't the ones actually authenticating you,
but the ones saved in the browser are the ones that let you in, you'd
get the behaviour you have described.

Seeems unlikely to be the cause, but quit the browser before your test
to be sure.




The ftp login details are definitely correct. I found another linux  machine
I have access to on which running the identical line of code on worked. That
was a fc5 machine with the rpm'd version of apache and php.

The problem showed up after I did the upgrade to 5.2.1 so the wrapper stuff
worked before but now its just silently failing. I compile php from source
so I wonder if its some compilation/configuration issue ?

I did consider if it was a firewall/network issue as the other machine is on
a completely different network but I can passively ftp to the ftp server
using the linux command line ftp program

You may also want to consider using http://php.net/ftp as a

work-around, if this new-fangled FPT streams stuff just isn't working.

Or even http://php.net/curl for that matter.



I would like to avoid having to re-write the code using curl if possible.

Cheers

J.


Re: [PHP] free allocated memory: HOW ?

2007-04-13 Thread Jochem Maas
Roman Neuhauser wrote:
 # [EMAIL PROTECTED] / 2007-04-12 18:17:34 +0200:
 3-4 seconds is dead slow if you ask me - a script like this should be 
 capable of
 making the average mailserver go completely apeshit assuming you'd be 
 mailing the
 newsletters out directly after creating them [rather than storing them in a 
 db] (i.e.
 pumping out lots of emails a second] ... I know this because I have a qmail 
 server
 that has trouble keeping up with my massmailer scripts.
 
 switch po Postfix, one problem fewer for you.

yeah or exim, only I can't because it's one of the darn plesk servers - and 
changing
out the mail server is not something I can do.

 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Dreamhost! PHP as CGI!???

2007-04-13 Thread Tijnema !

On 4/13/07, Richard Davey [EMAIL PROTECTED] wrote:

Micky Hulse wrote:

 I think I just read that PHP is ran as CGI on Dreamhost... this does not
 sound good. Can anyone confirm?

If you've got access to your account with them, you can confirm it
yourself. Check the output of a phpinfo().

 What do you all think? Good? Bad?

Not *that* terrible at all, but if you've only been with Dreamhost for a
few days you've got far worse things to experience yet IMHO (shoddy
uptime, shoddy servers, shoddy network, etc)

 Should I stick with it or find a host that runs PHP under Apache?

www.pair.com runs PHP 4 as an Apache Module, and are a superb host (I've
used them since 1996) - but even better in the next few weeks they
rollout PHP 5.2.1 as standard on all servers. Can't wait :)

Cheers,

Rich


I'm using www.dapx.com for my www sites. Setup is a pain in the ass
there, it can take a few days before you get a reply. But once you got
it, it's a really nice host. Nice speed, really 99.9% uptime, and not
much limited stuff :) safe_mode is even turned off :)

Tijnema

--
Zend Certified Engineer
http://www.corephp.co.uk

Never trust a computer you can't throw out of a window

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: PHP editor

2007-04-13 Thread David Robley
Jonathan Kahan wrote:

 Hi all,
 
 I beleive this is in the realm of php (I have learned my lesson from last
 time). Does anyone have recomendation for any free (I.E. permanently free
 not 30 day trial) of a good php editor. The ones i am seeing all only
 allow usage for a limited time.

OMG - it must be a few days now since this question (in some form) was
asked. This URL is listed on the PHP website Links page, but seeing you
haven't found it there, here you go.

http://www.midnighthax.com/phpeditors.php





Cheers
-- 
David Robley

2 bdrm furn w c/h, said Tom aptly.
Today is Pungenday, the 30th day of Discord in the YOLD 3173. 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP editor

2007-04-13 Thread David Robley
Robert Cummings wrote:

 On Wed, 2007-04-11 at 10:30 -0500, Philip Thompson wrote:

 Obviously some people think this is NOT in the realm of php.
 Nonetheless, I think it's a relevant question and others have
 answered it well.
 
 Relevant sure... but the answers are in the frickin' archives several
 times over.
 
 Cheers,
 Rob.

s/several/several thousand/


Cheers
-- 
David Robley

The girl's been kidnapped, said Tom mistakenly.
Today is Pungenday, the 30th day of Discord in the YOLD 3173. 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Dreamhost! PHP as CGI!???

2007-04-13 Thread Micky Hulse
Hi Richard! Thanks for the help, I really appreciate your time and 
advice. :)


Richard Davey wrote:
If you've got access to your account with them, you can confirm it 
yourself. Check the output of a phpinfo().


Ah, lol. Good call:

Server API: CGI/FastCGI
Virtual Directory Support: disabled
Configuration File (php.ini) Path: /etc/php5/cgi/php.ini

Looks like CGI to me, no? Sorry, server stuff is not my forte.

Not *that* terrible at all, but if you've only been with Dreamhost for a 
few days you've got far worse things to experience yet IMHO (shoddy 
uptime, shoddy servers, shoddy network, etc)


Lol, funny you should mention that... Within a few days of getting an 
account, my server went down with a bunch of other folks... I guess it 
was a DOS attack or something.


www.pair.com runs PHP 4 as an Apache Module, and are a superb host (I've 
used them since 1996) - but even better in the next few weeks they 
rollout PHP 5.2.1 as standard on all servers. Can't wait :)


Oooh, excellent. Actually, I had other folks suggest Pair too. Only 
reason why my client and I picked DH was the price. I guess I get what I 
pay for.


Hmm, pair may be worth the extra $$. Do you think the Webmaster plan 
is decent for a small but soon-to-be growing site?

http://www.pair.com/services/web_hosting/webmaster.html

THanks again Richard! I greatly appreciate the help. ;)

Cheers,
M


--
Wishlists: http://snipurl.com/vrs9
   Switch: http://browsehappy.com/
 BCC?: http://snipurl.com/w6f8
   My: http://del.icio.us/mhulse

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Dreamhost! PHP as CGI!???

2007-04-13 Thread Micky Hulse

Tijnema ! wrote:

I'm using www.dapx.com for my www sites. Setup is a pain in the ass
there, it can take a few days before you get a reply. But once you got
it, it's a really nice host. Nice speed, really 99.9% uptime, and not
much limited stuff :) safe_mode is even turned off :)


Ah, thanks for the tip-off. Looking at what they offer now. I wish I had 
asked here first before buying hosting for a year from DH.


Thanks again Tijnema. ;)

Cheers,
M

--
Wishlists: http://snipurl.com/vrs9
   Switch: http://browsehappy.com/
 BCC?: http://snipurl.com/w6f8
   My: http://del.icio.us/mhulse

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: free allocated memory: HOW ?

2007-04-13 Thread Colin Guthrie
Jochem Maas wrote:
 yeah or exim, only I can't because it's one of the darn plesk servers - and 
 changing
 out the mail server is not something I can do.

I have recently escaped Pleskhog day. It's s refreshing - so
happy to just be given an apache config and let loose!!!

Col

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] width and height of flash-files

2007-04-13 Thread David Robley
Heiko Sudar wrote:

 hi,
 is there a way to get the width and the height of a flash movie
 via php?
 
 heiko

What is this thread - see how many times a thread can be hijacked and go off
topic before the thread nazi steps in?

Oh wait, I've stepped in :-)


Cheers
-- 
David Robley

Everybody is ignorant, only on different subjects.
Today is Pungenday, the 30th day of Discord in the YOLD 3173. 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] width and height of flash-files

2007-04-13 Thread Tijnema !

On 4/13/07, Heiko Sudar [EMAIL PROTECTED] wrote:

hi,
is there a way to get the width and the height of a flash movie
via php?

heiko


Have a look at this class:
http://www.phpclasses.org/browse/file/6443.html

It parses the header of an SWF(Flash) file, and it does also get
height and width :)

Tijnema

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Dreamhost! PHP as CGI!???

2007-04-13 Thread Richard Davey

Micky Hulse wrote:

Lol, funny you should mention that... Within a few days of getting an 
account, my server went down with a bunch of other folks... I guess it 
was a DOS attack or something.


It will be the first of many :)

Oh and hey... you'll soon experience the sporadic will it or won't it 
nature of their Control Panel loading too. I always loved that one.


Oooh, excellent. Actually, I had other folks suggest Pair too. Only 
reason why my client and I picked DH was the price. I guess I get what I 
pay for.


Abso-frigging-lutely.

Hmm, pair may be worth the extra $$. Do you think the Webmaster plan 
is decent for a small but soon-to-be growing site?


It will cope with your needs *easily* and the best thing about them - 
they can scale-up your account at any time, to whatever you need, as you 
grow. Some HUGE sites are hosted comfortably on Pair. Even php.net ;)


Cheers,

Rich
--
Zend Certified Engineer
http://www.corephp.co.uk

Never trust a computer you can't throw out of a window

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: free allocated memory: HOW ?

2007-04-13 Thread Jochem Maas
Colin Guthrie wrote:
 Jochem Maas wrote:
 yeah or exim, only I can't because it's one of the darn plesk servers - and 
 changing
 out the mail server is not something I can do.
 
 I have recently escaped Pleskhog day. It's s refreshing - so

ROFL. if it's all the same 'Pleskhogday' is going into my arsenal of glib 
comments,
ready for the next late night plesk-initiated server madness.

 happy to just be given an apache config and let loose!!!
 
 Col
 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Download multiple sound files?

2007-04-13 Thread Jochem Maas
Richard Lynch wrote:
 On Thu, April 12, 2007 11:15 am, Skip Evans wrote:
 I have a need to allow a user to download multiple
 sound files (mp3s, typically) from a single link.
 I've been looking at various solutions via Google,
 but have not seen one yet to do this.

 Can anyone point me in the right direction or give
 me a lead on how this can be done?
 
 The HTTP protocol simply does not allow what you describe, at least
 not exactly -- There is one, and only one, download/response to one
 HTTP request.
 
 Some things you can consider:
 
 Use exec with tar (or zip or tar + gzip or whatever) to create a
 single file to download, with all the MP3s in it.  This requires the
 user to use WinZip (or similar) to unpack the files.
 
 Create a playlist by concatenating a bunch of URLs to audio files. 

basically a podcast.
imho if you offer a zip (maybe a self-extracting zip) *and* a podcast
of each set of mp3s you'd have a clean and user friendly interface ...
ofcourse you'll still have to convince the PHB, but that's your problem ;-).


 They won't have downloads of the audio files, unless they choose to
 use wget -i on that file, or something similar, but it does make for
 a nice way to group a bunch of audio files in a way that most users
 know how to deal with.
 
 You could, in theory, write some nasty JavaScript that would start a
 download, and a META tag to take them to the next file, so that the
 browser would essentially visit each file to be downloaded in turn,
 via JS and META tags.  This would suck pretty bad, imho, but it's
 possible.
 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: width and height of flash-files

2007-04-13 Thread Colin Guthrie
Tijnema ! wrote:
 On 4/13/07, Heiko Sudar [EMAIL PROTECTED] wrote:
 hi,
 is there a way to get the width and the height of a flash movie
 via php?

 heiko

 Have a look at this class:
 http://www.phpclasses.org/browse/file/6443.html
 
 It parses the header of an SWF(Flash) file, and it does also get
 height and width :)
 
 Tijnema

AFAIK, the built in getimagesize() parses .swf too
http://uk3.php.net/manual/en/function.getimagesize.php

Col.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Cheap Ping

2007-04-13 Thread Leonard Burton

HI


I am trying to find a simple way to test to see if a web site
is up or not.



What about analyzing the results from exec(ping www.domain.ext); ?


--
Leonard Burton, N9URK
http://www.jiffyslides.com
[EMAIL PROTECTED]
[EMAIL PROTECTED]

The prolonged evacuation would have dramatically affected the
survivability of the occupants.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] WWE in Stamford, CT needs a kick ass PHP Developer!

2007-04-13 Thread Jarrel Cobb

Nice observation.

On 4/13/07, Robert Cummings [EMAIL PROTECTED] wrote:


Dear Tedd,

Please put me down for one pint of asshole, because while you sit on
that glass pedestal of CSS superiority I can't help but notice how
http://ancientstones.com/ looks completely fucked up in Opera. Opera I
might add is ACID2 compliant. Now please go shove your better than thou
CSS up your ass :) Trust me, I am at least as versed as you in CSS and
choose to use tables.

Cheers,
Rob.



On Thu, 2007-04-12 at 20:02 -0400, tedd wrote:
 At 6:31 PM -0500 4/12/07, Richard Lynch wrote:
 On Thu, April 12, 2007 1:34 pm, Robert Cummings wrote:
   ... It's too bad, I love CSS, it
   makes for really clean markup, but using it completely in place of
   tables just isn't feasible right now without resorting to CSS
   tricks.
   And using tricks is just as much against the spirit of CSS as using
   tables for layout :)
 
 While straying even more OT than usual, I must chime in with me too
 
 I cannot count the number of times I've seen CSS purists pull out
 gnarly disgusting hacks, far worse than any nested table layout, to
 work around browser incompatibilities.
 
 It would be nice if CSS actually let designers specify what they need
 to specify.  [Can you say 3-column layout with page footer?]
 
 And if browsers actually implemented CSS correctly...
 
 But, really, CSS is still lacking in what seems to me some basic
 fundamentals in terms of being able to say put this thing here, and
 that thing there and you end up resorting to all kinds of
 non-intuitive code to get the look you want...

 Richard, you surprise me.

 CSS is like any other tool -- learn to use it and it will work.

 As far as any layout, if you can show an example it can be done in css.

 As far as replacing tables, CSS doesn't -- it provides tables even
 more versatility. Tables have their place, but not in layout.

 Lastly, one man's gnarly disgusting hack, is another man's way around
 a short coming of IE. How many times have you had to use javascript
 to accomplish a task instead of using just php? One could call that a
 gnarly disgusting hack, but it's just a solution. As this list
 proves, no language is without problems.

 Cheers,

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

--
..
| InterJinn Application Framework - http://www.interjinn.com |
::
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for   |
| creating re-usable components quickly and easily.  |
`'




Re: [PHP] Dreamhost! PHP as CGI!???

2007-04-13 Thread Miles Thompson

On 4/13/07, Richard Davey [EMAIL PROTECTED] wrote:


Micky Hulse wrote:

 Lol, funny you should mention that... Within a few days of getting an
 account, my server went down with a bunch of other folks... I guess it
 was a DOS attack or something.

It will be the first of many :)

Oh and hey... you'll soon experience the sporadic will it or won't it
nature of their Control Panel loading too. I always loved that one.

 Oooh, excellent. Actually, I had other folks suggest Pair too. Only
 reason why my client and I picked DH was the price. I guess I get what I
 pay for.

Abso-frigging-lutely.

 Hmm, pair may be worth the extra $$. Do you think the Webmaster plan
 is decent for a small but soon-to-be growing site?

It will cope with your needs *easily* and the best thing about them -
they can scale-up your account at any time, to whatever you need, as you
grow. Some HUGE sites are hosted comfortably on Pair. Even php.net ;)

Cheers,

Rich
--
Zend Certified Engineer
http://www.corephp.co.uk



Have a look at www.hub.org.  They host PostgreSQL world wide, you get a
virtual machine, not a virtual host, and  they are v. helpful in setting up
software.

Miles


RE: [PHP] WWE in Stamford, CT needs a kick ass PHP Developer!

2007-04-13 Thread Tim
CSS is young, it will mature in time, meanwhile to each his own layout
manner.

I see what you are saying Rob, (yes the BUT) BUT table are orginally for
formatting data in a litteral manner and css is for layout. 

Personally i have a heck of time getting embedded tables to do the job for
me especially when mixed with javascript (then again i am not using any
click and go make your site program, and am NOT saying you are, just that
generating the layout with php i find easier with embedded divs doing
divdiv/div/div rather then
tabletrtdtabletrtd/td/tr/table/td/tr/table and not
mentionning the easy of using div classe rather then table/tr/td
classes...). 

I found css to be really helpfull in all my designs with essentially no
hacks for cross-browser compatiblity (ie6 ie7 ff1 ff2) which are the 80%+
browsers on the market today.

Eggh, maybe i should try opening one of my sites in OPERA one of these days
so i can cry :P But then again i don't guarantee they work on any other then
the stated browsers and my clients are fine with that... So far..

I see your point and understand fully.. Hopefully css will evolve into a
purely compatible layout facilitation for web designers/programmers in the
future, so far it has made my day and my UNTable sites are quite clean, and
hopefully it will make yours someday ;)

Oh and guys, since when is their ONE good way of doing things??? The only
thing i regret here is the violence some of these posts take :) Isn't the
world full of it already? Can't we tone it down in here where their is some
resemblance of peace? ;)

Regards,

Tim 

 -Message d'origine-
 De : Jarrel Cobb [mailto:[EMAIL PROTECTED] 
 Envoyé : vendredi 13 avril 2007 15:24
 À : Robert Cummings
 Cc : tedd; [EMAIL PROTECTED]; Jochem Maas; [EMAIL PROTECTED]
 Objet : Re: [PHP] WWE in Stamford, CT needs a kick ass PHP Developer!
 
 Nice observation.
 
 On 4/13/07, Robert Cummings [EMAIL PROTECTED] wrote:
 
  Dear Tedd,
 
  Please put me down for one pint of asshole, because while 
 you sit on 
  that glass pedestal of CSS superiority I can't help but notice how 
  http://ancientstones.com/ looks completely fucked up in 
 Opera. Opera I 
  might add is ACID2 compliant. Now please go shove your better than 
  thou CSS up your ass :) Trust me, I am at least as versed 
 as you in 
  CSS and choose to use tables.
 
  Cheers,
  Rob.
 
 
 
  On Thu, 2007-04-12 at 20:02 -0400, tedd wrote:
   At 6:31 PM -0500 4/12/07, Richard Lynch wrote:
   On Thu, April 12, 2007 1:34 pm, Robert Cummings wrote:
 ... It's too bad, I love CSS, it  makes for really 
 clean markup, 
but using it completely in place of  tables just isn't 
 feasible 
right now without resorting to CSS  tricks.
 And using tricks is just as much against the spirit of CSS as 
using  tables for layout :)
   
   While straying even more OT than usual, I must chime in 
 with me too
   
   I cannot count the number of times I've seen CSS purists 
 pull out 
   gnarly disgusting hacks, far worse than any nested table 
 layout, to 
   work around browser incompatibilities.
   
   It would be nice if CSS actually let designers specify what they 
   need to specify.  [Can you say 3-column layout with page footer?]
   
   And if browsers actually implemented CSS correctly...
   
   But, really, CSS is still lacking in what seems to me some basic 
   fundamentals in terms of being able to say put this thing here, 
   and that thing there and you end up resorting to all kinds of 
   non-intuitive code to get the look you want...
  
   Richard, you surprise me.
  
   CSS is like any other tool -- learn to use it and it will work.
  
   As far as any layout, if you can show an example it can 
 be done in css.
  
   As far as replacing tables, CSS doesn't -- it provides 
 tables even 
   more versatility. Tables have their place, but not in layout.
  
   Lastly, one man's gnarly disgusting hack, is another man's way 
   around a short coming of IE. How many times have you had to use 
   javascript to accomplish a task instead of using just 
 php? One could 
   call that a gnarly disgusting hack, but it's just a solution. As 
   this list proves, no language is without problems.
  
   Cheers,
  
   tedd
   --
   ---
   http://sperling.com  http://ancientstones.com  
   http://earthstones.com
  
  --
  ..
  | InterJinn Application Framework - http://www.interjinn.com |
  ::
  | An application and templating framework for PHP. Boasting  | a 
  | powerful, scalable system for accessing system services  
 | such as 
  | forms, properties, sessions, and caches. InterJinn |
  | also provides an extremely flexible architecture for   |
  | creating re-usable components quickly and easily.  |
  `'
 
 
 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, 

[PHP] IE6 PHP

2007-04-13 Thread elk dolk
Hi all,
I have a bunch of thumbnail images that link to larger versions of the images 
and want to line them up in rows across the screen , using CSS I put them into 
a separate DIV. To get them to line up horizontally across the window I use CSS 
to FLOAT each DIV to the left, CSS looks like this:
div.float {
float: left;
}
and the HTML :
div class=floatimg srcimage.jpg.../br //div
Firefox and Netscape show the thumbnails in rows like this:

[] [] [] []
[] [] [] []
[] [] [] []

but in IE6 there is a problem , the first row is O.K. but the second ant the 
third rows are not O.K.  it looks like this:
[] [] [] []
[] []  
  [] []
[]
  [] [] []

please comment
   
-
Ahhh...imagining that irresistible new car smell?
 Check outnew cars at Yahoo! Autos.

Re: [PHP] WWE in Stamford, CT needs a kick ass PHP Developer!

2007-04-13 Thread tedd

At 3:17 AM -0400 4/13/07, Robert Cummings wrote:

Dear Tedd,

Please put me down for one pint of asshole, because while you sit on
that glass pedestal of CSS superiority I can't help but notice how
http://ancientstones.com/ looks completely fucked up in Opera. Opera I
might add is ACID2 compliant. Now please go shove your better than thou
CSS up your ass :) Trust me, I am at least as versed as you in CSS and
choose to use tables.

Cheers,
Rob.



Dear Rob:

It's not a question of CSS superiority  -- but rather a matter of 
best practice. You want to use a screw driver to drive a nail, then 
fine -- but some of us do know better.


You pointed out that my http://ancientstones.com was not appearing as 
it should and you were right. I had made some minor changes and did 
not check Opera. However, the fix was a single line of code and it 
took me less than a minute to find it -- try that with tables.


I'm not saying any of this because of any better than thou 
attitude, but rather because it's true. If you don't want to consider 
what I have to say, then fine, no skin off my nose.


But I do know this, I listen to what you have to say about php 
because you know what you're talking about. But in this case, my 
friend, we differ greatly. You want to stick with tables then fine, 
but if you are as well versed as I am in CSS, then you know that 
using tables for layout is more costly in overall development, 
maintenance, sales, and accessibility. To me and my clients, those 
things matter.


Concepts like separating content from presentation, graceful 
degradation and progressive enhancement are not just phrases one 
imagined so they could sit on a glass pedestal and look down on 
everyone else. They are practices that work and are far more reaching 
than WYSIWYG table layouts.


Cheers,

tedd

PS: Meant, or not, no offense taken -- I do enjoy your colorful manner. :-)
--
---
http://sperling.com  http://ancientstones.com  http://earthstones.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] PHP RAD framework

2007-04-13 Thread Man-wai Chang

Any recommendation? Smarty Templates help a bit, but still need lots of
coding...

-- 
  .~.   Might, Courage, Vision, SINCERITY. http://www.linux-sxs.org
 / v \  Simplicity is Beauty! May the Force and Farce be with you!
/( _ )\ (Ubuntu 6.10)  Linux 2.6.20.6
  ^ ^   22:26:01 up 6 days 5:17 0 users load average: 1.00 1.03 1.00
news://news.3home.net news://news.hkpcug.org news://news.newsgroup.com.hk

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] IE6 PHP

2007-04-13 Thread Richard Davey

elk dolk wrote:


I have a bunch of thumbnail images that link to larger versions of the images 
and want to line them up in rows across the screen , using CSS I put them into 
a separate DIV. To get them to line up horizontally across the window I use CSS 
to FLOAT each DIV to the left, CSS looks like this:

[snip]

please comment


This is absolutely nothing to do with PHP. You'd be better off posting 
to a CSS list.


Cheers,

Rich
--
Zend Certified Engineer
http://www.corephp.co.uk

Never trust a computer you can't throw out of a window

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Re: WYSIWYG vs. the 'power-user'

2007-04-13 Thread Chetan Graham
Sancar said:

It depends what did you want...

For example. My current project uses own template engine. It was so simple.
you have to use {} marked nodes inside of generic html document.

You have to use text editor to update template file...

Then guess what... Our HTML designers cring for dreamweaver support. Yes
sure
they are very capable html design (they can create better designs than me).
And without dreamweaver their capacity was gone...

In GUI mode you are connected to gui. Without it your knowladge was
worthless...

Depending some buttons and images make me sick.

And if you there for doing someting to win your food, gui way is so much
simpler.

And if you there for walking to your way you have to know what happen
inside
to depend only yourself...

Regards

Sancar

Hey Sancar:
I agree with your view.  It seems to work for you. There are ones reading
the php lists that pray for the knowledge to be a great php coder and or
web designer like the ones they see out there on the web.

If you know HTML 4.01 inside and out(which is not so time consuming as
this is not a programming languge, its a markup language) the GUI is a
wonderful tool that quickly composes a page.

So use the GUI's all you want knowing what they really are.
Do whatever it takes to make your project come together.

Thank you Sancar for your experience.

Blessings,
Chetan

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] WWE in Stamford, CT needs a kick ass PHP Developer!

2007-04-13 Thread tedd

At 8:39 PM -0400 4/12/07, Jarrel Cobb wrote:
 If you're striving to be the best front end developer you can be 
then yes, by all means, use pure CSS for layout and never use tools 
like DW but thats not everyone's goal.


Fair enough.

My complaint here is not what anyone chooses to do/use but rather 
what they claim to be. If people are claiming to be the leading 
edge of web development and are still stuck in using tables for 
layout, then I find fault with that because using tables that way is 
certainly not leading edge.


Cheers,

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

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] IE6 PHP

2007-04-13 Thread Tim
 

 -Message d'origine-
 De : elk dolk [mailto:[EMAIL PROTECTED] 
 Envoyé : vendredi 13 avril 2007 16:16
 À : [EMAIL PROTECTED]
 Objet : [PHP] IE6  PHP
 
 Hi all,
 I have a bunch of thumbnail images that link to larger 
 versions of the images and want to line them up in rows 
 across the screen , using CSS I put them into a separate DIV. 
 To get them to line up horizontally across the window I use 
 CSS to FLOAT each DIV to the left, CSS looks like this:
 div.float {
 float: left;
 }

First off i wouldnt give a class name float rather my_float, i don't
know for sure if its a conflict but i always assume it may be and avoid it..

 and the HTML :
 div class=floatimg srcimage.jpg.../br //div 
 Firefox and Netscape show the thumbnails in rows like this:
 
 [] [] [] []
 [] [] [] []
 [] [] [] []
 
 but in IE6 there is a problem , the first row is O.K. but the 
 second ant the third rows are not O.K.  it looks like this:
 [] [] [] []
 [] []  
   [] []
 []
   [] [] []
 
 please comment

Have you tried adding borders to that div ie: border: 1px solid black;
To actually see what the div's are doing, that is the basic debugging
method i uses on all my divs when i can't get something to fit (beware of
the border adding 1px on all sides if you are using fixed size div's).
Second i found that by floating all sub-elements of a float element you
will end up tearing less hair out then you would by mixing non float
elements with float elements, try giving that img a float:left style and see
what happens...

Also what is that br doing there? Could you give more code onhow you are
generating this thumbnail table?

Regards,

Tim

Funny, you mentionned you css problem in the middle of a css shitstorm here
:P

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] IE6 PHP

2007-04-13 Thread Tim
Oh and if it really is a pure css problem try a css list ;)

 

 -Message d'origine-
 De : elk dolk [mailto:[EMAIL PROTECTED] 
 Envoyé : vendredi 13 avril 2007 16:16
 À : [EMAIL PROTECTED]
 Objet : [PHP] IE6  PHP
 
 Hi all,
 I have a bunch of thumbnail images that link to larger 
 versions of the images and want to line them up in rows 
 across the screen , using CSS I put them into a separate DIV. 
 To get them to line up horizontally across the window I use 
 CSS to FLOAT each DIV to the left, CSS looks like this:
 div.float {
 float: left;
 }
 and the HTML :
 div class=floatimg srcimage.jpg.../br //div 
 Firefox and Netscape show the thumbnails in rows like this:
 
 [] [] [] []
 [] [] [] []
 [] [] [] []
 
 but in IE6 there is a problem , the first row is O.K. but the 
 second ant the third rows are not O.K.  it looks like this:
 [] [] [] []
 [] []  
   [] []
 []
   [] [] []
 
 please comment

 -
 Ahhh...imagining that irresistible new car smell?
  Check outnew cars at Yahoo! Autos.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] WWE in Stamford, CT needs a kick ass PHP Developer!

2007-04-13 Thread Jochem Maas
Tim wrote:

...

 
 Oh and guys, since when is their ONE good way of doing things??? The only
 thing i regret here is the violence some of these posts take :) Isn't the
 world full of it already? Can't we tone it down in here where their is some
 resemblance of peace? ;)

oh, the world is definitely full of 'it'.
do consider that peace and violence are in essence opposites, you can hold to 
the
concept of one without also conceptualizing (and thereby giving credance to) 
the other.

what your searching for is not to be found in such dualistic crap.

peacepipe in one hand, broadsword in the other - lets hack on :-)

 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] WWE in Stamford, CT needs a kick ass PHP Developer!

2007-04-13 Thread Tim
 

 -Message d'origine-
 De : Jochem Maas [mailto:[EMAIL PROTECTED] 
 Envoyé : vendredi 13 avril 2007 16:32
 À : Tim
 Cc : 'Jarrel Cobb'; 'Robert Cummings'; 'tedd'; [EMAIL PROTECTED]; 
 [EMAIL PROTECTED]
 Objet : Re: [PHP] WWE in Stamford, CT needs a kick ass PHP Developer!
 
 Tim wrote:
 
 ...
 
  
  Oh and guys, since when is their ONE good way of doing 
 things??? The 
  only thing i regret here is the violence some of these 
 posts take :) 
  Isn't the world full of it already? Can't we tone it down in here 
  where their is some resemblance of peace? ;)
 
 oh, the world is definitely full of 'it'.
 do consider that peace and violence are in essence opposites, 
 you can hold to the concept of one without also 
 conceptualizing (and thereby giving credance to) the other.
 
 what your searching for is not to be found in such dualistic crap.
 
 peacepipe in one hand, broadsword in the other - lets hack on :-)

***BIG SMILE***

Tim

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] WWE in Stamford, CT needs a kick ass PHP Developer!

2007-04-13 Thread tedd

At 4:05 PM +0200 4/13/07, Tim wrote:

 The only
thing i regret here is the violence some of these posts take :) Isn't the
world full of it already? Can't we tone it down in here where their is some
resemblance of peace? ;)

Tim


Tim:

Don't worry about it. This manner is common for this list -- just 
because someone tells you to shove it, doesn't mean you have to. :-)


Besides, it fun.

Cheers,

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

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] WWE in Stamford, CT needs a kick ass PHP Developer!

2007-04-13 Thread Tim
 

 -Message d'origine-
 De : tedd [mailto:[EMAIL PROTECTED] 
 Envoyé : vendredi 13 avril 2007 16:37
 À : Tim; 'Jarrel Cobb'; 'Robert Cummings'
 Cc : 'tedd'; [EMAIL PROTECTED]; 'Jochem Maas'; [EMAIL PROTECTED]
 Objet : RE: [PHP] WWE in Stamford, CT needs a kick ass PHP Developer!
 
 At 4:05 PM +0200 4/13/07, Tim wrote:
   The only
 thing i regret here is the violence some of these posts take 
 :) Isn't 
 the world full of it already? Can't we tone it down in here 
 where their 
 is some resemblance of peace? ;)
 
 Tim
 
 Tim:
 
 Don't worry about it. This manner is common for this list -- 
 just because someone tells you to shove it, doesn't mean you 
 have to. :-)
 
 Besides, it fun.

Ahh thought it was a my bomb/penis is bigger then you bomb/penis issue ;)
I'll get used to it... Someday...

Regards,

Tim

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP editor

2007-04-13 Thread Timothy Murphy
Just showing my ignorance, probably,
but what exactly is meant by a PHP editor?

Does it mean an editor for editing PHP scripts,
or an editor written in PHP?

-- 
Timothy Murphy  
e-mail (80k only): tim /at/ birdsnest.maths.tcd.ie
tel: +353-86-2336090, +353-1-2842366
s-mail: School of Mathematics, Trinity College, Dublin 2, Ireland

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: WYSIWYG vs. the 'power-user'

2007-04-13 Thread tedd

At 7:18 PM +0300 4/12/07, Chetan Graham wrote:

To set the record straight for both camps,


It's good to know both sides of everything. But that's part of the 
problem because usually those who use only one, don't understand the 
other.


If you  are proficient in both, then you have the experience and 
knowledge to make an informed determination as to what works best.


It doesn't make any difference if you're talking about WYSIWYG v hand 
coding, or using php v javascript, or using tables vs css -- they all 
have their place. However, it takes experience in all to determine 
what's best to use to accomplish the task at hand.


And the task at hand can mean different things to different people. 
Some may want a quick and dirty web page while others may have 
different needs (i.e., accessibility, scalability).


But, somewhere down the line, we all arrive at the same place. The 
question is, does it work for what you want?


Cheers,

tedd

PS:  Side note -- if you knew all that could be, you would still want 
what you want?

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

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] PHP editor

2007-04-13 Thread Jay Blanchard
[snip]
Just showing my ignorance, probably,
but what exactly is meant by a PHP editor?

Does it mean an editor for editing PHP scripts,
or an editor written in PHP?
[/snip]

Something to edit PHP with...unless you're trying to be funny 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP editor

2007-04-13 Thread Philip Thompson

On Apr 13, 2007, at 10:26 AM, Jay Blanchard wrote:


[snip]
Just showing my ignorance, probably,
but what exactly is meant by a PHP editor?

Does it mean an editor for editing PHP scripts,
or an editor written in PHP?
[/snip]

Something to edit PHP with...unless you're trying to be funny



LOL! I don't know why this was so funny, but I laughed at Jay's  
comment (I can just see the light bulb turn on). Nonetheless, this  
ignorant user brings up a thought - are there any editors written  
in PHP?


~Philip

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP editor

2007-04-13 Thread M.Sokolewicz

Philip Thompson wrote:

On Apr 13, 2007, at 10:26 AM, Jay Blanchard wrote:


[snip]
Just showing my ignorance, probably,
but what exactly is meant by a PHP editor?

Does it mean an editor for editing PHP scripts,
or an editor written in PHP?
[/snip]

Something to edit PHP with...unless you're trying to be funny



LOL! I don't know why this was so funny, but I laughed at Jay's comment 
(I can just see the light bulb turn on). Nonetheless, this ignorant 
user brings up a thought - are there any editors written in PHP?


~Philip
I sure hope not. Editors should never be written in scripting-languages 
in my opinion.


- tul

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP editor

2007-04-13 Thread Stut

M.Sokolewicz wrote:

Philip Thompson wrote:

On Apr 13, 2007, at 10:26 AM, Jay Blanchard wrote:


[snip]
Just showing my ignorance, probably,
but what exactly is meant by a PHP editor?

Does it mean an editor for editing PHP scripts,
or an editor written in PHP?
[/snip]

Something to edit PHP with...unless you're trying to be funny



LOL! I don't know why this was so funny, but I laughed at Jay's 
comment (I can just see the light bulb turn on). Nonetheless, this 
ignorant user brings up a thought - are there any editors written in 
PHP?


~Philip
I sure hope not. Editors should never be written in scripting-languages 
in my opinion.


So you have an issue with every web-based CMS on the planet? IMHO it 
doesn't matter what language/tool/technology is used to write software, 
as long as it does the job and meets customer requirements.


-Stut

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP editor

2007-04-13 Thread Tijnema !

On 4/13/07, M.Sokolewicz [EMAIL PROTECTED] wrote:

Philip Thompson wrote:
 On Apr 13, 2007, at 10:26 AM, Jay Blanchard wrote:

 [snip]
 Just showing my ignorance, probably,
 but what exactly is meant by a PHP editor?

 Does it mean an editor for editing PHP scripts,
 or an editor written in PHP?
 [/snip]

 Something to edit PHP with...unless you're trying to be funny


 LOL! I don't know why this was so funny, but I laughed at Jay's comment
 (I can just see the light bulb turn on). Nonetheless, this ignorant
 user brings up a thought - are there any editors written in PHP?

 ~Philip
I sure hope not. Editors should never be written in scripting-languages
in my opinion.

- tul



Uhm, C is a scripting language too right?

Most editors are written in C :)

Tijnema

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Cheap Ping

2007-04-13 Thread tedd

At 11:16 PM -0600 4/12/07, [EMAIL PROTECTED] wrote:

Hello,
I am trying to find a simple way to test to see if a web site
is up or not.  I tried using
$file = file_get_contents(http://www.example.com/page.html;);
but when the site is down it takes too long and seems to time out
terminating the script rather than returning a false I can test.
Is there some way I can set a shorter limit?  Or something?
Any other suggestions?
Best,
Craig


Try:

if ($unix)
   {
   system (ping -c$count -w$count $host);
   system(killall ping);
   }
else
   {
   system(ping -n $count $host);
   }

Cheers,

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

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: WWE in Stamford, CT needs a kick ass PHP Developer!

2007-04-13 Thread Chetan Graham
Tim wrote:
...

 Oh and guys, since when is their ONE good way of doing things??? The only
 thing i regret here is the violence some of these posts take :) Isn't the
 world full of it already? Can't we tone it down in here where their is
some
resemblance of peace? ;)

Tim I sympathise with you on this.  There are many people that read these
posts and are shocked that a professional can be so reactive in anger to
others views.  It is a bit shocking to see this in a PHP list.

Jochem's view:
oh, the world is definitely full of 'it'.

Yes, Jochem this phenomenal world is utterly a mystery.  It is full of
illusion.

do consider that peace and violence are in essence opposites, you can
hold to the concept of one without also conceptualizing (and thereby
giving credence to) the other.

Welcome to the world of opposites where everything either rusts, dies or
eventually falls apart. And Everything in this Universe is controlled by
this truth.

what your searching for is not to be found in such dualistic crap.

As long as you believe that you are separate from everything else you are in
delusion.  This is the original sin.  Everything else, this phenomenal
world and everything in it comes from this original sin

peace pipe in one hand, broadsword in the other - lets hack on :-)

notebook and pen in one hand, WYSIWYG HTML editor in the other -

Lets find peace and not be so reactive to things outside of my view.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP editor

2007-04-13 Thread Jarrel Cobb

No, C is not a scripting language.  There probably are some editors written
in python though...which is a scripting language.

On 4/13/07, Tijnema ! [EMAIL PROTECTED] wrote:


On 4/13/07, M.Sokolewicz [EMAIL PROTECTED] wrote:
 Philip Thompson wrote:
  On Apr 13, 2007, at 10:26 AM, Jay Blanchard wrote:
 
  [snip]
  Just showing my ignorance, probably,
  but what exactly is meant by a PHP editor?
 
  Does it mean an editor for editing PHP scripts,
  or an editor written in PHP?
  [/snip]
 
  Something to edit PHP with...unless you're trying to be funny
 
 
  LOL! I don't know why this was so funny, but I laughed at Jay's
comment
  (I can just see the light bulb turn on). Nonetheless, this ignorant
  user brings up a thought - are there any editors written in PHP?
 
  ~Philip
 I sure hope not. Editors should never be written in scripting-languages
 in my opinion.

 - tul


Uhm, C is a scripting language too right?

Most editors are written in C :)

Tijnema

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] PHP editor

2007-04-13 Thread Buesching, Logan J
Komodo, written in python and XUL (yes, the firefox extention engine).

-Original Message-
From: Jarrel Cobb [mailto:[EMAIL PROTECTED] 
Sent: Friday, April 13, 2007 12:08 PM
To: Tijnema !
Cc: M. Sokolewicz; Philip Thompson; php General List
Subject: Re: [PHP] PHP editor

No, C is not a scripting language.  There probably are some editors
written in python though...which is a scripting language.

On 4/13/07, Tijnema ! [EMAIL PROTECTED] wrote:

 On 4/13/07, M.Sokolewicz [EMAIL PROTECTED] wrote:
  Philip Thompson wrote:
   On Apr 13, 2007, at 10:26 AM, Jay Blanchard wrote:
  
   [snip]
   Just showing my ignorance, probably, but what exactly is meant by

   a PHP editor?
  
   Does it mean an editor for editing PHP scripts, or an editor 
   written in PHP?
   [/snip]
  
   Something to edit PHP with...unless you're trying to be funny
  
  
   LOL! I don't know why this was so funny, but I laughed at Jay's
 comment
   (I can just see the light bulb turn on). Nonetheless, this
ignorant
   user brings up a thought - are there any editors written in PHP?
  
   ~Philip
  I sure hope not. Editors should never be written in 
  scripting-languages in my opinion.
 
  - tul


 Uhm, C is a scripting language too right?

 Most editors are written in C :)

 Tijnema

 --
 PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: 
 http://www.php.net/unsub.php



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] PHP editor

2007-04-13 Thread Tim
 

 -Message d'origine-
 De : Philip Thompson [mailto:[EMAIL PROTECTED] 
 Envoyé : vendredi 13 avril 2007 17:35
 À : php General List
 Objet : Re: [PHP] PHP editor
 
 On Apr 13, 2007, at 10:26 AM, Jay Blanchard wrote:
 
  [snip]
  Just showing my ignorance, probably,
  but what exactly is meant by a PHP editor?
 
  Does it mean an editor for editing PHP scripts, or an 
 editor written 
  in PHP?
  [/snip]
 
  Something to edit PHP with...unless you're trying to be funny
 
 
 LOL! I don't know why this was so funny, but I laughed at 
 Jay's comment (I can just see the light bulb turn on). 
 Nonetheless, this ignorant user brings up a thought - are 
 there any editors written in PHP?

?php
If ($_SERVER['SERVER_ADDR'] != '127.0.0.1') die(Local acces only); 
$content = '';
$file_content = '';
If ($_POST['filename']  strlen($_POST['php_editor']  0) {
  $file_path = '/tmp/' . $_POST['filename'];
  if(!file_put_contents('/tmp/' . $_POST['filename'],$_POST['php_editor']) {
$content .= 'Error writing to '/tmp/' .
  }
  $file_content = $_POST['php_editor'];
}
If (isset($_POST['filename']  strlen($_POST['php_editor'] == 0) {
 $file_path = '/tmp/' . $_POST['filename'];
 if (file_exists($filename)) {
   $file_content = file_get_contents($filename);
 }
}
$content .= 'form action=' . $_SERVER['PHP_SELF'] . 'br /';
$content .= 'Filename:input type=text name=filename id=telephone
size=25 /br /';
$content .= 'PHP:textarea name=php_editor id=my_editor rows=10
cols=71$file_content/textareabr /';
$content .= 'input type=submit value=Save /';
$content .= '/formbr /br /';
?

There is now :P

Regards,

Tim

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] PDO SQLite driving me mad!

2007-04-13 Thread Richard Davey

Hi all,

I really don't know what is going on here. Can anyone shed some light on 
this please?


I'm trying to store an image in a SQLite database using PDO. The code 
given on http://uk2.php.net/manual/en/ref.pdo.php under Example 1669 is 
basically wrong - you can't beginTransaction() on a statement for 
example! So I had to rewrite it a little, but no matter what, it just 
doesn't work.


The problem appears to be the PDO LOB type. It will only ever send the 
first 21 bytes of the image to the database no matter what I try. Here's 
some code:


$stmt = $db-prepare('INSERT INTO Test (name, data) VALUES (?,?)');
$stmt-bindParam(1, $name, PDO::PARAM_STR, 60);
$stmt-bindParam(2, $pic_data, PDO::PARAM_LOB);
$stmt-execute();

The database is alive and well, and can be written to just fine, as is 
proven by the fact that I do get SOME data in there, just not all of it! 
I have tried a variety of files to no end.


According to the PHP docs PDO LOB should work on streams as well, so I 
tried adding:


$fp = fopen($filename, 'rb');

To my script, and then changing the LOB line to:

$stmt-bindParam(2, $fp, PDO::PARAM_LOB);

Thinking it would work out what to do with the newly found stream. But 
no, yet again all I get are the first 21 bytes.


Using SQLite Maestro I can view the inserted data, and it's always too 
short. If I use the SQLite Maestro interface to insert an image, it 
works fine. PDO SQLite seems to always fail when trying to extract a LOB 
for display though, but that's another issue.


PHP 5.2.1 - ideas, anyone?!

Cheers,

Rich
--
Zend Certified Engineer
http://www.corephp.co.uk

Never trust a computer you can't throw out of a window

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Protecting individual files/dirs from access

2007-04-13 Thread Skip Evans

Hey all,

I hope this isn't too off-topic for this list, but 
I have a need to protect dynamically created 
directories in an Apache environment and not sure 
the best way to go about it.


It's yer basic LAMP environment, and what will 
happen is that the client will be uploading a 
musician's sound files to his/her own directory 
and then allowing them to be downloaded by people 
 who pay for them.


So the directory for the artist, which will be one 
level below the docroot, like 
public_html/greatsinger/, will contain the 
artist's music, and must be accessible by those 
who have paid for the music, but should be 
protected from any typed URL attempt to access the 
music files directly.


I was wondering if it were possible to drop a 
.htaccess file into each artist's directory that 
would password protect it and then code the URLs 
in the PHP script that allows access to the fines 
to access the files with a user name and password, 
but also hid this URL from display in the browser?


The files need to be under the document root to 
allow a link to download them, right?


Any suggestions for common ways to solve this 
would be appreciated.

--
Skip Evans
Big Sky Penguin, LLC
61 W Broadway
Butte, Montana 59701
406-782-2240
http://bigskypenguin.com
=-=-=-=-=-=-=-=-=-=
Check out PHPenguin, a lightweight and
versatile PHP/MySQL development framework.
http://phpenguin.bigskypenguin.com/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] PHP editor

2007-04-13 Thread Tim
 

 -Message d'origine-
 De : Tim [mailto:[EMAIL PROTECTED] 
 Envoyé : vendredi 13 avril 2007 18:19
 À : 'Philip Thompson'; 'php General List'
 Objet : RE: [PHP] PHP editor
 
  
 
  -Message d'origine-
  De : Philip Thompson [mailto:[EMAIL PROTECTED] 
  Envoyé : vendredi 13 avril 2007 17:35
  À : php General List
  Objet : Re: [PHP] PHP editor
  
  On Apr 13, 2007, at 10:26 AM, Jay Blanchard wrote:
  
   [snip]
   Just showing my ignorance, probably,
   but what exactly is meant by a PHP editor?
  
   Does it mean an editor for editing PHP scripts, or an 
  editor written 
   in PHP?
   [/snip]
  
   Something to edit PHP with...unless you're trying to be funny
  
  
  LOL! I don't know why this was so funny, but I laughed at 
  Jay's comment (I can just see the light bulb turn on). 
  Nonetheless, this ignorant user brings up a thought - are 
  there any editors written in PHP?
 
?php
if ($_SERVER['SERVER_ADDR'] != '127.0.0.1') die(Local acces only); 
$content = '';
$file_content = '';
if ($_POST['filename']) {
$file_path = '/tmp/' . $_POST['filename'];
if (strlen($_POST['php_editor']  0)) {
$file_path = '/tmp/' . $_POST['filename'];
if(!file_put_contents('/tmp/' .
$_POST['filename'],$_POST['php_editor'])) {
$content .= 'Error writing to ' . $file_path . 'br
/';
}
$file_content = $_POST['php_editor'];
} elseif (strlen($_POST['php_editor'] == 0)) {
if (file_exists($filename)) {
$file_content = file_get_contents($filename);
} else {
$content .= 'Error reading from ' . $file_path .
'br /';
}
}
}
$content .= 'form action=' . $_SERVER['PHP_SELF'] . 'br /';
$content .= 'Filename:input type=text name=filename id=telephone
size=25 /br /';
$content .= 'PHP:textarea name=php_editor id=my_editor rows=10
cols=71$file_content/textareabr /';
$content .= 'input type=submit value=Save /';
$content .= '/formbr /br /';
echo $content;
?

Sorry, i couldn't leave that up.. I must redeem myself..

:D

Tim

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP RAD framework

2007-04-13 Thread Paul Scott

On Fri, 2007-04-13 at 22:26 +0800, Man-wai Chang wrote:
 Any recommendation? Smarty Templates help a bit, but still need lots of
 coding...

http://avoir.uwc.ac.za

All Email originating from UWC is covered by disclaimer 
http://www.uwc.ac.za/portal/uwc2006/content/mail_disclaimer/index.htm 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Cheap Ping

2007-04-13 Thread Paul Novitski



At 11:16 PM -0600 4/12/07, [EMAIL PROTECTED] wrote:

I am trying to find a simple way to test to see if a web site
is up or not.


At 4/13/2007 08:56 AM, tedd wrote:

Try:

if ($unix)
   {
   system (ping -c$count -w$count $host);
   system(killall ping);
   }
else
   {
   system(ping -n $count $host);
   }



What's a circumstance in which one would want to ping without getting 
a return value?  Short of attempting a denial of service 
barrage?  Really, I'm not being snide, just curious.


According to the Fingerlicking Manual (OK, now that was arguably 
snide), you have two opportunities to get return values from system() 
-- the last command line string as the function return value and a 
status byte returned in the second parameter.  The example provided is:


// Outputs all the result of shellcommand ls, and returns
// the last output line into $last_line. Stores the return value
// of the shell command in $retval.
$last_line = system('ls', $retval);

http://php.net/system


Googling, I came up with other methods including:

PHP Ping (using socket functions)
by Philip Jensen
http://www.planet-source-code.com/vb/scripts/ShowCode.asp?lngWId=8txtCodeId=1786

Pinging a remote host in PHP (using PEAR)
http://builder.com.com/5100-6371-5234592.html

What's a preferred method?

Regards,

Paul
__

Paul Novitski
Juniper Webcraft Ltd.
http://juniperwebcraft.com 


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Cheap Ping

2007-04-13 Thread Gabriel Millerd

At 4/13/2007 08:56 AM, tedd wrote:

Try:

if ($unix)
   {
   system (ping -c$count -w$count $host);
   system(killall ping);
   }


slaying all the pings that the user has can bring odd results.
obviously this will kill all the webserver's userid that has pings
running.

--
Gabriel Millerd

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] sendmail loop

2007-04-13 Thread John Pillion
I have a sendmail script that loops through an array of email addresses. the
problem is, the list can sometimes be fairly long, and the page does not
finish loading until the loop has completed.  Currently, I have the majority
of the page loading, including text that says messages sending, please
wait., with a completed message after the loop.  Though that gives an
appearance of working (and lets the patient user know what is going on), if
the user leaves the page, or the page times out before the loop has
finished, not all the emails will be sent.

 

Is there a way to trigger a script to run on the server (in the background)?

 

I had the thought to save the notice to the DB, and then have a cron check
every few minutes to send it, but that could be too much load on the
servers.  Any other alternatives?

 

Thanks!

 

~J

 

Ps.  No, this is not a spam application - it is a notice/announcement form
for directors/administrators of an organization



Re: [PHP] Protecting individual files/dirs from access

2007-04-13 Thread Richard Lynch
On Fri, April 13, 2007 11:43 am, Skip Evans wrote:
 So the directory for the artist, which will be one
 level below the docroot, like

Don't do that.

You have to work WAY too hard to make sure you have a gate-keeper to
force people to pay.

Put the files outside the webtree, and have a PHP script that controls
access and is your gate-keeper.

It's kind of like the difference between holding a music festival in a
park with no fence, and holding a music festival in a convention
center.

In the first case (your mp3 in the web-tree == open park) you end up
having to build a fence, and there will always be somebody trying to
jump the fence, because it's just a temporary fence and obviously not
very secure.

In the second case (the mp3 outside the web-tree) there's a big brick
wall and a tiny number of doors that need guarding, and it's much
easier to secure.

 I was wondering if it were possible to drop a
 .htaccess file into each artist's directory that
 would password protect it and then code the URLs
 in the PHP script that allows access to the fines
 to access the files with a user name and password,
 but also hid this URL from display in the browser?

You could do all that, but...

 The files need to be under the document root to
 allow a link to download them, right?

No.

Have the link go to a PHP script, which authenticates the user (in
your case, makes *sure* they paid) and then that script does
http://php.net/readfile

The MP3 itself should live outside the web-tree in a private directory.

You'd still want to have the sub-directories under private organized
by artist and all that.

Your upload script would simply move files into this directory tree
instead of the web tree -- which is better anyway, as that means you
needn't have php-writable directories inside your web-tree, which is
also a Risk.

You *DO* have to have your download URL cleverly-crafted to make the
browser do the right thing, and you have to send the right headers for
the MP3 right before the readfile, but that's actually quite easy with
$_SERVER['PATHINFO'] and header() function.

-- 
Some people have a gift link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] IE6 PHP

2007-04-13 Thread Richard Lynch
On Fri, April 13, 2007 9:15 am, elk dolk wrote:
 I have a bunch of thumbnail images that link to larger versions of the
 images and want to line them up in rows across the screen , using CSS
 I put them into a separate DIV. To get them to line up horizontally
 across the window I use CSS to FLOAT each DIV to the left, CSS looks
 like this:
 div.float {
 float: left;
 }
 and the HTML :
 div class=floatimg srcimage.jpg.../br //div
 Firefox and Netscape show the thumbnails in rows like this:

 [] [] [] []
 [] [] [] []
 [] [] [] []

 but in IE6 there is a problem , the first row is O.K. but the second
 ant the third rows are not O.K.  it looks like this:
 [] [] [] []
 [] []
   [] []
 []
   [] [] []

There's no PHP here...

But it seems to me that if you actually are doing a grid layout, maybe
a TABLE *is* the right HTML to use...

Or use CSS to style it as if it were a table, if you're so anti-table
that you can't use a table tag.

-- 
Some people have a gift link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP editor

2007-04-13 Thread Richard Lynch
On Fri, April 13, 2007 10:11 am, Timothy Murphy wrote:
 Just showing my ignorance, probably,
 but what exactly is meant by a PHP editor?

 Does it mean an editor for editing PHP scripts,

Usually means this, and that's been answered a few zillion times.

 or an editor written in PHP?

Seldom means this, but even so, you're pretty much looking at PHP-GTK,
or you're not looking at a PHP question...

Though I guess with enough effort, one could write something not
unlike 'vi' in PHP CLI for a specific OS with the right control codes
to re-draw the screen...  [shudder]

-- 
Some people have a gift link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Cheap Ping

2007-04-13 Thread tedd

At 12:37 PM -0700 4/13/07, Paul Novitski wrote:

At 11:16 PM -0600 4/12/07, [EMAIL PROTECTED] wrote:

I am trying to find a simple way to test to see if a web site
is up or not.


At 4/13/2007 08:56 AM, tedd wrote:

Try:

if ($unix)
   {
   system (ping -c$count -w$count $host);
   system(killall ping);
   }
else
   {
   system(ping -n $count $host);
   }



What's a circumstance in which one would want to ping without 
getting a return value?  Short of attempting a denial of service 
barrage?  Really, I'm not being snide, just curious.


It's a bit of code taken from:

http://www.theworldsend.net/  - the first example.

While I haven't used it, it seemed to be related to the OP subject, no?.

Cheers,

tedd

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

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP editor

2007-04-13 Thread Timothy Murphy
On Fri 13 Apr 2007, Jay Blanchard wrote:
 [snip]
 Just showing my ignorance, probably,
 but what exactly is meant by a PHP editor?

 Does it mean an editor for editing PHP scripts,
 or an editor written in PHP?
 [/snip]

 Something to edit PHP with...unless you're trying to be funny

I wasn't trying to be funny -
I'm not very knowledgeable about PHP,
but it doesn't seem to me its syntax is sufficiently complicated
to warrant using a special editor.

I'm interested (slightly) in any editors written in PHP,
as I use WordPress (WP), and am not particularly enamoured
of any of the WP editors I have seen.


-- 
Timothy Murphy  
e-mail (80k only): tim /at/ birdsnest.maths.tcd.ie
tel: +353-86-2336090, +353-1-2842366
s-mail: School of Mathematics, Trinity College, Dublin 2, Ireland

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Dreamhost! PHP as CGI!???

2007-04-13 Thread Richard Lynch
On Fri, April 13, 2007 3:46 am, Micky Hulse wrote:
 I think I just read that PHP is ran as CGI on Dreamhost... this does
 not
 sound good. Can anyone confirm?

You could confirm what you have on YOUR setup with:
?php phpinfo();?
faster and with more assurance of correctness than any mailing list
answer.

 What do you all think? Good? Bad?

It works fine for me, but I'm only using DreamHost as the back-end of
an N-tier audio server for a web-site that doesn't actually live on
dreamhost.

Actually, dreamhost is only the primary, and there's a fail-safe
roll-over to another box if dreamhost goes down. (again)

YMMV

-- 
Some people have a gift link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] sendmail loop

2007-04-13 Thread Tijnema !

On 4/13/07, John Pillion [EMAIL PROTECTED] wrote:

I have a sendmail script that loops through an array of email addresses. the
problem is, the list can sometimes be fairly long, and the page does not
finish loading until the loop has completed.  Currently, I have the majority
of the page loading, including text that says messages sending, please
wait., with a completed message after the loop.  Though that gives an
appearance of working (and lets the patient user know what is going on), if
the user leaves the page, or the page times out before the loop has
finished, not all the emails will be sent.



Is there a way to trigger a script to run on the server (in the background)?



I had the thought to save the notice to the DB, and then have a cron check
every few minutes to send it, but that could be too much load on the
servers.  Any other alternatives?



Thanks!



~J

With set_time_limit you could set the timeout value higer:
http://www.php.net/set_time_limit
So that your script won't timeout when it takes too long.
Also, when the user closes his browser, the script will continue!

Tijnema




Ps.  No, this is not a spam application - it is a notice/announcement form
for directors/administrators of an organization




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Cheap Ping

2007-04-13 Thread Richard Lynch
On Fri, April 13, 2007 12:16 am, [EMAIL PROTECTED] wrote:
 Hello,

 I am trying to find a simple way to test to see if a web site
 is up or not.  I tried using
  $file = file_get_contents(http://www.example.com/page.html;);
 but when the site is down it takes too long and seems to time out
 terminating the script rather than returning a false I can test.

 Is there some way I can set a shorter limit?  Or something?

The timeout for that is set in php.ini, and you can reset it right
before you do file_get_contents to something much more reasonable.

You might want to log the failure, and only hit a panic button if it
fails N times in X minutes or something, but it's quite do-able.


-- 
Some people have a gift link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Cheap Ping

2007-04-13 Thread Richard Lynch
On Fri, April 13, 2007 12:20 am, Jim Lucas wrote:
 Is there some way I can set a shorter limit?

 http://us.php.net/manual/en/function.stream-set-timeout.php

Bzzzt.

That's for an already-opened stream.

:-)

-- 
Some people have a gift link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] free allocated memory: HOW ?

2007-04-13 Thread Richard Lynch
On Fri, April 13, 2007 12:54 am, Arthur Erdös wrote:
 It can if you're trying to process a borked image...

 I've had imagecreatefromjpeg() eat memory up to almost 50x the size
 of
 the image before finally deciding it can't handle it and crapping
 out.
 That was *after* running it through getimagesize() with no problem
 at all.

 okay - good point - but in this case the OP is reading in an html
 template file,
 just a string of 20.7Kb, what could go wrong there?


 this is probably one issue... the template is an HTML template
 containing images like img src=http://www.brainguide.com/xxx/. How
 does PHP handle this stuff? I suppose that it is just a string and the
 image at the URL is not really read, or am I wrong?

 The newsletter does not have any attachements.

Now you're not making any sense at all...

Either your newsletter has the images in it, or it doesn't.

I suspect that it's set up to take that newsletter *AND* all the
images, and bundle that up into a nice *BIG* HTML Enhanced (cough,
cough) email, and send that out...

If you don't free up that template, that could be a large chunk of RAM
right there.

-- 
Some people have a gift link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Dreamhost! PHP as CGI!???

2007-04-13 Thread Sebe

Richard Lynch wrote:

On Fri, April 13, 2007 3:46 am, Micky Hulse wrote:
  

I think I just read that PHP is ran as CGI on Dreamhost... this does
not
sound good. Can anyone confirm?



You could confirm what you have on YOUR setup with:
?php phpinfo();?
faster and with more assurance of correctness than any mailing list
answer


yeah or `php -v` via cmdline.

by the way, isn't PHP w/FastCGI faster than using apache module?

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] free allocated memory: HOW ?

2007-04-13 Thread Richard Lynch
On Fri, April 13, 2007 12:49 am, Arthur Erdös wrote:
   $abonents = $personAction-findAbonents($start, 
 $offset);


   $size = $personAction-countFoundRows();
   $this-logger-debug(Found  . $size .  
 abonents);
   $loops = ceil($size/self::PROCESS_ABONENTS);
   $this-logger-debug(Need  . $loops .  loops at  .
 self::PROCESS_ABONENTS .  abonents per loop);
   for($i = 0; $i  $loops; $i++){
   $start = $i*self::PROCESS_ABONENTS;
   $abonents = $personAction-findAbonents($start,
 self::PROCESS_ABONENTS);

What happened to the other $abonents you set about 6 lines ago?...

   // unset($text, $lvo);
   $text = null;
   $lvo = null;
   sleep(1);

Do the unset() as well on each var, I think.

-- 
Some people have a gift link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Download multiple sound files?

2007-04-13 Thread Richard Lynch
On Fri, April 13, 2007 6:09 am, Jochem Maas wrote:
 Richard Lynch wrote:
 On Thu, April 12, 2007 11:15 am, Skip Evans wrote:
 I have a need to allow a user to download multiple
 sound files (mp3s, typically) from a single link.
 I've been looking at various solutions via Google,
 but have not seen one yet to do this.

 Can anyone point me in the right direction or give
 me a lead on how this can be done?

 The HTTP protocol simply does not allow what you describe, at least
 not exactly -- There is one, and only one, download/response to one
 HTTP request.

 Some things you can consider:

 Use exec with tar (or zip or tar + gzip or whatever) to create a
 single file to download, with all the MP3s in it.  This requires the
 user to use WinZip (or similar) to unpack the files.

 Create a playlist by concatenating a bunch of URLs to audio files.

 basically a podcast.
 imho if you offer a zip (maybe a self-extracting zip) *and* a podcast
 of each set of mp3s you'd have a clean and user friendly interface ...
 ofcourse you'll still have to convince the PHB, but that's your
 problem ;-).

Actually, a playlist and a podcast are pretty different...

I say this, having tried to wedge my daily playlist into a podcast
format, and running into some fundamental roadblocks that I have yet
to resolve in any reasonable fashion.

Dunno which the OP really needs, mind you.

-- 
Some people have a gift link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] WWE in Stamford, CT needs a kick ass PHP Developer!

2007-04-13 Thread Richard Lynch
On Fri, April 13, 2007 1:20 am, Stut wrote:
 tedd wrote:
 this
 ain't the bad old days.

 That's debatable!

Damnit!

Now I've got that These are the good ol' days song stuck in my head,
and it's your fault!

:-)

-- 
Some people have a gift link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] WWE in Stamford, CT needs a kick ass PHP Developer!

2007-04-13 Thread Richard Lynch
On Fri, April 13, 2007 1:24 am, Stut wrote:
 tedd wrote:
 At 7:41 PM +0100 4/12/07, Stut wrote:
 Yes you'll need to put in a bit more work, but the result will be
 that
 much better.

 -Stut

 Sorry Stut -- I know you know this, but it's more work to NOT use
 css.

 Not when you have a pre-made table-based layout already.

Actually...

I'm not claiming to be an expert at either, but there are times when a
table layout is easier/faster to get exactly what I want in all
browsers than the CSS solution, which is more appealing from a
theoretical POV, but may not actually put things where I want them in
every browser.

-- 
Some people have a gift link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Cheap Ping

2007-04-13 Thread Jim Lucas

Richard Lynch wrote:

On Fri, April 13, 2007 12:20 am, Jim Lucas wrote:

Is there some way I can set a shorter limit?

http://us.php.net/manual/en/function.stream-set-timeout.php


Bzzzt.

That's for an already-opened stream.

:-)

I figured that the op would figure that part out and possibly change his approach to use fsockopen 
instead of file_get_contents


--
Enjoy,

Jim Lucas

Different eyes see different things. Different hearts beat on different strings. But there are times 
for you and me when all such things agree.


- Rush

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Dreamhost! PHP as CGI!???

2007-04-13 Thread Micky Hulse

Richard Davey wrote:

It will be the first of many :)


Yikes! Definitely gonna make the switch. Cheap it may be, but I need 
reliable too!


Oh and hey... you'll soon experience the sporadic will it or won't it 
nature of their Control Panel loading too. I always loved that one.


Doh! Yeah. Not really sure if I like the proprietary CP... I guess I am 
used to using Cpanel. :D



Abso-frigging-lutely.


Yep yep. I hear that. :(

It will cope with your needs *easily* and the best thing about them - 
they can scale-up your account at any time, to whatever you need, as you 
grow. Some HUGE sites are hosted comfortably on Pair. Even php.net ;)


Ahhh, cool! Good to hear. ;)

Thanks again for the help Richard, I appreciate your time and expertise.

Have a great day/night!
Cheers,
M


--
Wishlists: http://snipurl.com/vrs9
   Switch: http://browsehappy.com/
 BCC?: http://snipurl.com/w6f8
   My: http://del.icio.us/mhulse

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Dreamhost! PHP as CGI!???

2007-04-13 Thread Micky Hulse

Miles Thompson wrote:

Have a look at www.hub.org.  They host PostgreSQL world wide, you get a
virtual machine, not a virtual host, and  they are v. helpful in setting up
software.


Ahhh, nice! Thanks for the tip. Looking at what they offer now. It is 
going to be a close call between several. All seem to offer good stuff!


Lol. I hate picking hosting.

Thanks again Miles!

Have a great day/night.
Cheers,
M


--
Wishlists: http://snipurl.com/vrs9
   Switch: http://browsehappy.com/
 BCC?: http://snipurl.com/w6f8
   My: http://del.icio.us/mhulse

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] IE6 PHP

2007-04-13 Thread Jim Lucas

elk dolk wrote:

Hi all,
I have a bunch of thumbnail images that link to larger versions of the images 
and want to line them up in rows across the screen , using CSS I put them into 
a separate DIV. To get them to line up horizontally across the window I use CSS 
to FLOAT each DIV to the left, CSS looks like this:
div.float {
float: left;
}
and the HTML :
div class=floatimg srcimage.jpg.../br //div
Firefox and Netscape show the thumbnails in rows like this:

[] [] [] []
[] [] [] []
[] [] [] []

but in IE6 there is a problem , the first row is O.K. but the second ant the 
third rows are not O.K.  it looks like this:
[] [] [] []
[] []  
  [] []

[]
  [] [] []

please comment
   
-

Ahhh...imagining that irresistible new car smell?
 Check outnew cars at Yahoo! Autos.

try adding

clear: left;

to that css bit

div.float {
clear: left;
float: left;
}

This should make the top of all images, on each row, the same

--
Enjoy,

Jim Lucas

Different eyes see different things. Different hearts beat on different strings. But there are times 
for you and me when all such things agree.


- Rush

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Dreamhost! PHP as CGI!???

2007-04-13 Thread Richard Lynch
On Fri, April 13, 2007 5:27 pm, Sebe wrote:
 by the way, isn't PHP w/FastCGI faster than using apache module?

Probably depends.

Might as well ask if a car is faster than a speedboat...

And whatever troubles the OP had with CGI may not apply in FCGI, or
might be made worse.

-- 
Some people have a gift link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Dreamhost! PHP as CGI!???

2007-04-13 Thread Micky Hulse

Richard Lynch wrote:

You could confirm what you have on YOUR setup with:
?php phpinfo();?
faster and with more assurance of correctness than any mailing list
answer.


Yeah! Hehe. I feel like such a noob. I can not believe I did not think 
of that first. Lol.


Here is what phpinfo() had to say:

Server API: CGI/FastCGI
Virtual Directory Support: disabled
Configuration File (php.ini) Path: /etc/php5/cgi/php.ini

And I just got this response from DH today:

... Yes...I hate to be the bearer of bad news, but we are running php 
as CGI. ...


Very nice of them to respond so fast... Very friendly reply. Seems like 
a great host if you are not as concerned about up-time/down-time and are 
on a tight budget.



It works fine for me, but I'm only using DreamHost as the back-end of
an N-tier audio server for a web-site that doesn't actually live on
dreamhost.


Ahh. I see.


Actually, dreamhost is only the primary, and there's a fail-safe
roll-over to another box if dreamhost goes down. (again)


Ahhh, hehe. Good call on the backup server. I have never built a big 
enough site to where I needed a backup server just in case. Probably a 
very good idea though. :)


Thanks fo ryou reply Richard, I greatly appreciate the help!

Cheers,
M

--
Wishlists: http://snipurl.com/vrs9
   Switch: http://browsehappy.com/
 BCC?: http://snipurl.com/w6f8
   My: http://del.icio.us/mhulse

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Dreamhost! PHP as CGI!???

2007-04-13 Thread Micky Hulse

Hi Sebe, thanks for help.

Sebe wrote:

yeah or `php -v` via cmdline.


Great! Thanks for tip on that one. ;)


by the way, isn't PHP w/FastCGI faster than using apache module?


A, really? DH does offer FastCGI support.

Hrmmm. So many things to consider! Lol.

Thanks again Sebe!

Cheers,
M




--
Wishlists: http://snipurl.com/vrs9
   Switch: http://browsehappy.com/
 BCC?: http://snipurl.com/w6f8
   My: http://del.icio.us/mhulse

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Dreamhost! PHP as CGI!???

2007-04-13 Thread Buesching, Logan J
You can't really do `php -v` on the command line, unless you know which
php you are using.  If you have several installations of PHP, then doing
`php -v` will just get you the version of PHP for which is loaded first
from your path.  I'd do a `which php` to make sure you are using php 5
first before `php -v`

-Logan

-Original Message-
From: Sebe [mailto:[EMAIL PROTECTED] 
Sent: Friday, April 13, 2007 6:27 PM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]; php php
Subject: Re: [PHP] Dreamhost! PHP as CGI!???

Richard Lynch wrote:
 On Fri, April 13, 2007 3:46 am, Micky Hulse wrote:
   
 I think I just read that PHP is ran as CGI on Dreamhost... this does
 not
 sound good. Can anyone confirm?
 

 You could confirm what you have on YOUR setup with:
 ?php phpinfo();?
 faster and with more assurance of correctness than any mailing list
 answer

yeah or `php -v` via cmdline.

by the way, isn't PHP w/FastCGI faster than using apache module?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] WWE in Stamford, CT needs a kick ass PHP Developer!

2007-04-13 Thread Stut

Richard Lynch wrote:

On Fri, April 13, 2007 1:20 am, Stut wrote:

tedd wrote:

this
ain't the bad old days.

That's debatable!


Damnit!

Now I've got that These are the good ol' days song stuck in my head,
and it's your fault!

:-)


Hey, don't forget that you should always look on the bright side of life.

-Stut

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: WYSIWYG vs. the 'power-user'

2007-04-13 Thread Børge Holen
On Thursday 12 April 2007 18:18, Chetan Graham wrote:
 To set the record straight for both camps, in the web apps that come to me
 I simply do the PHP, javascript, etc.  The files come to me already
 PhotoShopped and Dreamweaed.

Yup,,, just filling in the blanks where its needed.

 I tell them the fields I need, giving them a general pencil sketch of the
 login or edit page, etc. as I see it.

And they better put up som color codes while at it.


 They are good at what they do and at the same time actually afraid of the
 coding, as PHP is too flexible for their ordered minds.

wut? php like in dinner?


 So their it is.  I am a man with feet in both worlds.  Am I happy with
 this situation? Why not, everything is changing all the time and I have to
 be ready to embrace the next shift in technology when it comes.  Maybe
 we'll all be using PC's like Dick Tracy did with the wrist watch computer
 from the comic strips when I was a kid.  Oh boy, now I've told my old age
 to all.  So be it.

 Chetan

-- 
---
Børge
http://www.arivene.net
---

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] WWE in Stamford, CT needs a kick ass PHP Developer!

2007-04-13 Thread Robert Cummings
On Fri, 2007-04-13 at 10:30 -0400, tedd wrote:
 At 8:39 PM -0400 4/12/07, Jarrel Cobb wrote:
   If you're striving to be the best front end developer you can be 
 then yes, by all means, use pure CSS for layout and never use tools 
 like DW but thats not everyone's goal.
 
 Fair enough.
 
 My complaint here is not what anyone chooses to do/use but rather 
 what they claim to be. If people are claiming to be the leading 
 edge of web development and are still stuck in using tables for 
 layout, then I find fault with that because using tables that way is 
 certainly not leading edge.

I'm on the bleeding edge... yup, bleeding tables everywhere ;) Oh the
horror, the horror!

Cheers,
Rob.
-- 
..
| InterJinn Application Framework - http://www.interjinn.com |
::
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for   |
| creating re-usable components quickly and easily.  |
`'

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] WWE in Stamford, CT needs a kick ass PHP Developer!

2007-04-13 Thread Robert Cummings
On Fri, 2007-04-13 at 16:37 +0200, Tim wrote:
  
  -Message d'origine-
  De : Jochem Maas [mailto:[EMAIL PROTECTED] 
  Envoyé : vendredi 13 avril 2007 16:32
  À : Tim
  Cc : 'Jarrel Cobb'; 'Robert Cummings'; 'tedd'; [EMAIL PROTECTED]; 
  [EMAIL PROTECTED]
  Objet : Re: [PHP] WWE in Stamford, CT needs a kick ass PHP Developer!
  
  Tim wrote:
  
  ...
  
   
   Oh and guys, since when is their ONE good way of doing 
  things??? The 
   only thing i regret here is the violence some of these 
  posts take :) 
   Isn't the world full of it already? Can't we tone it down in here 
   where their is some resemblance of peace? ;)
  
  oh, the world is definitely full of 'it'.
  do consider that peace and violence are in essence opposites, 
  you can hold to the concept of one without also 
  conceptualizing (and thereby giving credance to) the other.
  
  what your searching for is not to be found in such dualistic crap.
  
  peacepipe in one hand, broadsword in the other - lets hack on :-)
 
 ***BIG SMILE***

And WHAT are you smiling at??? Staves beat peacepipes and broadswords
anyday!

Cheers,
Rob.
-- 
..
| InterJinn Application Framework - http://www.interjinn.com |
::
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for   |
| creating re-usable components quickly and easily.  |
`'

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Cheap Ping

2007-04-13 Thread Jürgen Wind



Jim Lucas-2 wrote:
 
 Richard Lynch wrote:
 On Fri, April 13, 2007 12:20 am, Jim Lucas wrote:
 Is there some way I can set a shorter limit?
 http://us.php.net/manual/en/function.stream-set-timeout.php
 
 Bzzzt.
 
 That's for an already-opened stream.
 
 :-)
 
 I figured that the op would figure that part out and possibly change his
 approach to use fsockopen 
 instead of file_get_contents
 
 -- 
 Enjoy,
 
 Jim Lucas
 
 Different eyes see different things. Different hearts beat on different
 strings. But there are times 
 for you and me when all such things agree.
 
 - Rush
 
 

the following from
http://de.php.net/manual/en/function.socket-create.php#60438 
(slightly modified) works well on my test laptop(w2k,php5.2.1): 

function ping($host) {
$package = \x08\x00\x19\x2f\x00\x00\x00\x00\x70\x69\x6e\x67;
$sock = socket_create(AF_INET, SOCK_RAW, 1);
/* timeout 0.2 seconds */
socket_set_option($sock, SOL_SOCKET, SO_RCVTIMEO, array('sec' = 0,
'usec' = 20));
socket_connect($sock, $host, null);
socket_send($sock, $package, strlen($package), 0);

$TS = microtime(1);
if(@socket_read($sock, 255)) {
return microtime(1) - $TS;
} else {
return -1;
}
socket_close($sock);
}

-- 
View this message in context: 
http://www.nabble.com/Cheap-Ping-tf3569802.html#a9989132
Sent from the PHP - General mailing list archive at Nabble.com.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] how to get var name and value from function?

2007-04-13 Thread Afan Pasalic
hi,
this one I can't figure out:

I have to assign value of an array to variable named after key of the
array several times in my project to , e.g. after I submit a form with
personal info I have
$_POST['name'] = 'john doe';
$_POST['address'] = '123 main st.';
$_POST['city'] = 'urbandale';
$_POST['zip'] = '12345';
$_POST['phone'] = '123-456-7980';
etc.

Then I assign value to the var name:
foreach ($_POST as $key = $value)
{
${$key} = $value;
}
and then validate submitted.

Though, to avoid writing all over again the same lines (even it's only 3
lines) I was thinking to create a function something like:

function value2var($array, $print=0)
{
foreach ($_POST as $key = $value)
{
${$key} = $value;
echo ($print ==1) ? $key.': '.$value.'br'; // to test
results and seeing array variables and values
}
}

value2var($_POST, 1);

but, I don't know how to get info from function back to script?!?!?
:-(

any help appreciated.

-afan

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Images again

2007-04-13 Thread Børge Holen
Before mr lynch starts beating up those already dead and probably long since 
burried horses...

Images in a database!

See I was just wondering, and that at times leads to late nights
I used to read the images from two different files; one watermarked the image 
and one let it throught without any hazzle.
Of course this kind of script was easy enought to get around the watermarking, 
witch I fixed with the http referer witch as follows IE don't send. I don't 
particulary like ppl who use IE (ups did I upset someone?) ;D.

However I  started compressing my scripts and putting them inside one file. 
And the status is so far:

* Query for the image object.
* Query for copyright check in case of watermarking. If no watermarking skip 
to echo
* Read the object.
* put object in a file outside webroot like /tmp.
* read both the watermark and object
* merge
* echo

Is it possible to skip one query and still be able to read ownership from a 
table and at the same time stream the object, witch lead me to the next 
question, I can't seem to be able to make imageCreateFromJPEG handle the 
direct stream, nor that I fetch it in an array, is any of this possible?

As of now I need two files to make this happen. Either I use one file to check 
for rights and download throught a second file (close to the old solution) or 
I try this new thing and end up with one php file witch needs the object 
stream to be saved before it can be managed proberly.

-- 
---
Børge
http://www.arivene.net
---

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] WWE in Stamford, CT needs a kick ass PHP Developer!

2007-04-13 Thread Robert Cummings
On Fri, 2007-04-13 at 10:16 -0400, tedd wrote:
 At 3:17 AM -0400 4/13/07, Robert Cummings wrote:
 Dear Tedd,
 
 Please put me down for one pint of asshole, because while you sit on
 that glass pedestal of CSS superiority I can't help but notice how
 http://ancientstones.com/ looks completely fucked up in Opera. Opera I
 might add is ACID2 compliant. Now please go shove your better than thou
 CSS up your ass :) Trust me, I am at least as versed as you in CSS and
 choose to use tables.
 
 Cheers,
 Rob.
 
 
 Dear Rob:
 
 It's not a question of CSS superiority  -- but rather a matter of 
 best practice. You want to use a screw driver to drive a nail, then 
 fine -- but some of us do know better.

I noticed your site isn't a pixel perfect layout. Probably why you
haven't had to tear at your face very hard with CSS :) That whole
box-model issue becomes a great deal more elastic when you have some
fudge room.

 You pointed out that my http://ancientstones.com was not appearing as 
 it should and you were right. I had made some minor changes and did 
 not check Opera. However, the fix was a single line of code and it 
 took me less than a minute to find it -- try that with tables.

I use my templating engine, I can wrap as many tags as I please into a
compound custom tag with attributes that expand into the dirty details.
This also provides a great deal of flexibility later when CSS support
improves, to replace the dirty tables ;) I do prefer CSS, but having
done pixel perfect layouts, I know where things break down.

 I'm not saying any of this because of any better than thou 
 attitude, but rather because it's true. If you don't want to consider 
 what I have to say, then fine, no skin off my nose.

Eww... NOSE SKIN!!! :)

 But I do know this, I listen to what you have to say about php 
 because you know what you're talking about. But in this case, my 
 friend, we differ greatly. You want to stick with tables then fine, 

You've got me wrong, I don't want to stick with tables, I want to use
the full power of CSS, but unfortunately Microsoft has seen fit to screw
everything up as much as possible.

 but if you are as well versed as I am in CSS, then you know that 
 using tables for layout is more costly in overall development, 
 maintenance, sales, and accessibility. To me and my clients, those 
 things matter.

I agree with accessibility to some degree, but for the rest I think
you're a bit too far out on a limb.

 Concepts like separating content from presentation, graceful 
 degradation and progressive enhancement are not just phrases one 
 imagined so they could sit on a glass pedestal and look down on 
 everyone else. They are practices that work and are far more reaching 
 than WYSIWYG table layouts.

Agreed, I practice all of the above, but I feel no guilt in using a
table for a layout when it simplifies the issue. Between box model
issues, float bugs, etc etc, CSS just can't do what needs to be done
yet.

 tedd
 
 PS: Meant, or not, no offense taken -- I do enjoy your colorful manner. :-)

No offense is ever meant, although I'll give you, I was quite drunk last
night (I get 2 outings a year ;) and I used a little more colour than
usual *heheh*.

Cheers,
Rob.
-- 
..
| InterJinn Application Framework - http://www.interjinn.com |
::
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for   |
| creating re-usable components quickly and easily.  |
`'

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] WWE in Stamford, CT needs a kick ass PHP Developer!

2007-04-13 Thread Robert Cummings
On Fri, 2007-04-13 at 09:24 -0400, Jarrel Cobb wrote:
 Nice observation.  

It was a timely cheapshot :)

Cheers,
Rob.
-- 
..
| InterJinn Application Framework - http://www.interjinn.com |
::
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for   |
| creating re-usable components quickly and easily.  |
`'

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] WWE in Stamford, CT needs a kick ass PHP Developer!

2007-04-13 Thread Robert Cummings
On Fri, 2007-04-13 at 16:05 +0200, Tim wrote:
 CSS is young, it will mature in time, meanwhile to each his own layout
 manner.
 
 I see what you are saying Rob, (yes the BUT) BUT table are orginally for
 formatting data in a litteral manner and css is for layout.

I'm sure by formatting you mean lay out ;)

 Personally i have a heck of time getting embedded tables to do the job for
 me especially when mixed with javascript (then again i am not using any
 click and go make your site program, and am NOT saying you are, just that
 generating the layout with php i find easier with embedded divs doing
 divdiv/div/div rather then
 tabletrtdtabletrtd/td/tr/table/td/tr/table and not
 mentionning the easy of using div classe rather then table/tr/td
 classes...). 

*lol* I don't use tables everywhere, I do still use divs when I can and
I've found them to be stable and useful. But there are some instances
where a table just gets me what I want without fuss.

 I found css to be really helpfull in all my designs with essentially no
 hacks for cross-browser compatiblity (ie6 ie7 ff1 ff2) which are the 80%+
 browsers on the market today.
 
 Eggh, maybe i should try opening one of my sites in OPERA one of these days
 so i can cry :P But then again i don't guarantee they work on any other then
 the stated browsers and my clients are fine with that... So far..
 
 I see your point and understand fully.. Hopefully css will evolve into a
 purely compatible layout facilitation for web designers/programmers in the
 future, so far it has made my day and my UNTable sites are quite clean, and
 hopefully it will make yours someday ;)

Hopefully... I'm in full favour of it!

 Oh and guys, since when is their ONE good way of doing things??? The only
 thing i regret here is the violence some of these posts take :) Isn't the
 world full of it already? Can't we tone it down in here where their is some
 resemblance of peace? ;)

What violence? No violence that I've seen.

Cheers,
Rob.
-- 
..
| InterJinn Application Framework - http://www.interjinn.com |
::
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for   |
| creating re-usable components quickly and easily.  |
`'

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php