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

2007-04-14 Thread Tijnema !

On 4/14/07, Heiko Sudar <[EMAIL PROTECTED]> wrote:

Hi,

thx fort he fast infos. the solution is clear for .swf files.

does someone have a workaround for flash-video files .flv?



Heiko


AFAIK, there's not a direct function for that.

So, you have a few options, but depend on what you're going to do with
it. Are you planning to parse a lot and large .flv files? If so, you
should write some code that reads the FLV header. I didn't see someone
else already doing, but you should be looking for Metadata in the FLV
file, and it seems that the metadata isn't in all FLV files, so then
you need to use such tools as FLV Metdata Injector, but i didn't find
a linux alternative.

If you're only doing a few .flv files, and quite small ones, you might
want to convert the FLV files first to another format with ffmpeg.
Then use some tools on that.

Tijnema

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



[PHP] Json.php

2007-04-14 Thread Otto Wyss
I've seen a json.php file somewhere in a project for cases where the 
json module isn't installed (e.g. PHP4), yet I can't find that project 
again. Is there an official or unofficial download site for json.php?


Why isn't this available in the PHP manual 
(http://ch2.php.net/manual/de/ref.json.php)?


O. Wyss

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



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

2007-04-14 Thread Tijnema !

On 4/14/07, Afan Pasalic <[EMAIL PROTECTED]> wrote:

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.


Are you sure you want to do this? You never know what a hacker inserts
to your POST data, so he could easily define variables inside your
script, especially when you're using more dangerous functions like
system().



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)


I think you should change above line to :

   foreach ($array as $key => $value)

   {
   ${$key} = $value;
   echo ($print ==1) ? $key.': '.$value.''; // 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?!?!?
:-(


Uhm, it's not even possible when you don't know the keys i believe.

Tijnema


any help appreciated.

-afan


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



Re: [PHP] Images again

2007-04-14 Thread Tijnema !

On 4/14/07, Børge Holen <[EMAIL PROTECTED]> wrote:

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.


Hmm, nearly I use IE, NOT because i like it, but because i hate
the others more (On windows platform).



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?


You should fetch the stream manually in a string, and then use
imagecreatefromstring, http://www.php.net/imagecreatefromstring



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


For the rest of your message, i don't understand what you're trying to
do. Show us (parts of) the code you have now, and then explain what
you've wanted to do, and what it does now.

Tijnema

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



Re: [PHP] Json.php

2007-04-14 Thread Tijnema !

On 4/14/07, Otto Wyss <[EMAIL PROTECTED]> wrote:

I've seen a json.php file somewhere in a project for cases where the
json module isn't installed (e.g. PHP4), yet I can't find that project
again. Is there an official or unofficial download site for json.php?

Why isn't this available in the PHP manual
(http://ch2.php.net/manual/de/ref.json.php)?

O. Wyss


*ROFLMFAO*...Did you actually try google for json.php?
Second result:
http://mike.teczno.com/JSON/JSON.phps

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] Json.php

2007-04-14 Thread Satyam

www.json.org lists all json resources in any language you care to think of.

Satyam

- Original Message - 
From: "Otto Wyss" <[EMAIL PROTECTED]>

To: <[EMAIL PROTECTED]>
Sent: Saturday, April 14, 2007 10:11 AM
Subject: [PHP] Json.php


I've seen a json.php file somewhere in a project for cases where the json 
module isn't installed (e.g. PHP4), yet I can't find that project again. 
Is there an official or unofficial download site for json.php?


Why isn't this available in the PHP manual 
(http://ch2.php.net/manual/de/ref.json.php)?


O. Wyss

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



--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.446 / Virus Database: 269.4.0/760 - Release Date: 13/04/2007 
20:04





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



[PHP] Problems installing php with pdflib

2007-04-14 Thread Merlin

Hi there,

I am moving to a new box and want to install php with pdflib again.
After configure I get an error saying:
pdflib.h not found! Check the path passed to --with-pdflib

The path is just fine:
'--with-pdflib=/usr/local/lib'

ls /usr/local/lib/pdflib.*
/usr/local/lib/pdflib.h

ls /usr/local/lib/libpdf.*
/usr/local/lib/libpdf.a  /usr/local/lib/libpdf.la 
/usr/local/lib/libpdf.so  /usr/local/lib/libpdf.so.1 
/usr/local/lib/libpdf.so.1.1.3


I do run the same version on the old box which is php 4.4.6 and pdflib 
4.03. I do not want to upgrade to a new pdflib since I was totaly 
satisfied with the installation which runs perfectly. The php version 
seems also not to be the problem since I tried to configure with 4.2.1 
and it failed the same way.


I did with pdflib:
./configure
make
make install

Then configured php

Has anybody an idea what is wrong? The only difference I do see, is that 
the other box runs suse 9.0 while this one runs suse 9.3


Thank you for any hint or help,

Best regards,

Merlin

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



Re: [PHP] Problems installing php with pdflib

2007-04-14 Thread Tijnema !

On 4/14/07, Merlin <[EMAIL PROTECTED]> wrote:

Hi there,

I am moving to a new box and want to install php with pdflib again.
After configure I get an error saying:
pdflib.h not found! Check the path passed to --with-pdflib

The path is just fine:
'--with-pdflib=/usr/local/lib'

ls /usr/local/lib/pdflib.*
/usr/local/lib/pdflib.h


How did you get header files in the lib dir? pdflib.h(and all other
header files from pdflib) should be in /usr/local/include or
/usr/include.

then your command should be
'--with-pdflib=/usr/local'

or just remove it at all, as PHP will find it automatically (i think)



ls /usr/local/lib/libpdf.*
/usr/local/lib/libpdf.a  /usr/local/lib/libpdf.la
/usr/local/lib/libpdf.so  /usr/local/lib/libpdf.so.1
/usr/local/lib/libpdf.so.1.1.3


That's fine.

PHP will search for the headers in pdflibdir (--with-pdflib=...)
/include, and for the libraries in pdflibdir/lib

Tijnema


I do run the same version on the old box which is php 4.4.6 and pdflib
4.03. I do not want to upgrade to a new pdflib since I was totaly
satisfied with the installation which runs perfectly. The php version
seems also not to be the problem since I tried to configure with 4.2.1
and it failed the same way.

I did with pdflib:
./configure
make
make install

Then configured php

Has anybody an idea what is wrong? The only difference I do see, is that
the other box runs suse 9.0 while this one runs suse 9.3

Thank you for any hint or help,

Best regards,

Merlin

--
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-14 Thread David Robley
Stut wrote:

> 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

Oh, that is so low... You evil b_d :-)



Cheers
-- 
David Robley

Catscan: searching for kitty.
Today is Prickle-Prickle, the 31st 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] how to get var name and value from function?

2007-04-14 Thread Afan Pasalic
Tijnema ! wrote:
> On 4/14/07, Afan Pasalic <[EMAIL PROTECTED]> wrote:
>> 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.
>
> Are you sure you want to do this? You never know what a hacker inserts
> to your POST data, so he could easily define variables inside your
> script, especially when you're using more dangerous functions like
> system().
I do validation after this step. :)
>
>>
>> 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)
>
> I think you should change above line to :
>
>foreach ($array as $key => $value)
yup! it's print error. I meant $array.
>>{
>>${$key} = $value;
>>echo ($print ==1) ? $key.': '.$value.''; // 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?!?!?
>> :-(
>
> Uhm, it's not even possible when you don't know the keys i believe.
after 2 hours of testing and research I realized this too, but want to
be sure.
:-(

thanks.

-afan


>
> Tijnema
>>
>> any help appreciated.
>>
>> -afan
>

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



[PHP] warning message to hide

2007-04-14 Thread Alain Roger

Hi,

Today i discovered that when my host webserver has some issue with
PostgreSQL database, my code displays the following error message :
*"Warning*: pg_connect()
[function.pg-connect]:
Unable to connect to PostgreSQL server: could not connect to server:
Connection refused Is the server running on host "pgsql.exohosting.sk" and
accepting TCP/IP connections on port 5432? in */www/.php* on line yyy."

I would like instead of that, to display my own error message... in fact, i
would like to display something like : "We are sorry but temporary we have
some technical issues. Please try again later".
how can i do that ?

i tried to do :
$conn = pg_connect($conn_string);

if ($conn) // check if database is online
{
   // close database connection
   pg_close($conn);
}
else
{
   // impossible to connect to DB
   die('Maintenance in progress... Try later.');
}

but it still display the previous warning message.
thanks for your help.


--
Alain

Windows XP SP2
PostgreSQL 8.1.4
Apache 2.0.58
PHP 5


Re: [PHP] warning message to hide

2007-04-14 Thread Tom Chubb

Look at http://devzone.zend.com/node/view/id/652
It explains it there.


On 14/04/07, Alain Roger <[EMAIL PROTECTED]> wrote:


Hi,

Today i discovered that when my host webserver has some issue with
PostgreSQL database, my code displays the following error message :
*"Warning*: pg_connect()
[function.pg-connect]:
Unable to connect to PostgreSQL server: could not connect to server:
Connection refused Is the server running on host "pgsql.exohosting.sk" and
accepting TCP/IP connections on port 5432? in */www/.php* on line
yyy."

I would like instead of that, to display my own error message... in fact,
i
would like to display something like : "We are sorry but temporary we have
some technical issues. Please try again later".
how can i do that ?

i tried to do :
$conn = pg_connect($conn_string);

if ($conn) // check if database is online
{
   // close database connection
   pg_close($conn);
}
else
{
   // impossible to connect to DB
   die('Maintenance in progress... Try later.');
}

but it still display the previous warning message.
thanks for your help.


--
Alain

Windows XP SP2
PostgreSQL 8.1.4
Apache 2.0.58
PHP 5





--
Tom Chubb
[EMAIL PROTECTED]


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

2007-04-14 Thread tedd

At 9:07 PM -0400 4/13/07, Robert Cummings wrote:

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.


Rob:

My site (http://sperling.com) is designed to optimize the area 
provided it by the browser/user. I realize that the web is not 
traditional print and I am attempting to find the "best" way to 
present content in this medium.


I have done pixel perfect web pages for clients where they show me a 
Photoshop image and say "That's the way we want it to look in all 
browsers AND we don't want tables." That's what absolute position is 
used for. There isn't a Photoshop image that anyone can show me that 
I can't make a "pixel perfect" AND compliant web site out of using 
css.


As for the box-model issue, I've faced that, such as in:

http://www.symboldomains.com/

While the site is a bit dated (first release in 2003), it still holds 
together. The placement of the border handles IE's difficulty in 
understanding the box model (just where does M$ get these browser 
developers?).


For more "typical" sites, may I present my past life:

http://www.geophysics.com/

I've been putting up web sites for the last ten years. I went through 
the table phase a few years back and I haven't had a reason to go 
back. Like documentation and semantic makeup, it just makes sense.


In short, I am a recovering tableholic, but I've been table 
independent for five years, eight months, and seven days.


---


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.


Yes, there is always difficulty in the world, but realize that we 
prosper from it. If web stuff was easy, then everyone would be doing 
it correctly.


---


 > 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.


To me, being disabled, accessibility is paramount. Granted I don't 
always live up to my mouth, but I try and that's the point.


As for the rest of my claim, my experience is that css reduces cost 
for over all development -- it takes *me* less time to develop an 
entire site using css than using tables.


Site maintenance is certainly easier -- no reason to dwell on the obvious.

Sales are better for several reason: a) accessibility brings up-to 
another 12 percent more customers to the table; b) sites built with 
css load faster bringing more people; c) better SEO considerations 
brings even more people; d) faster site alteration to cycle products 
allows more exposure and makes for a more interesting sites, which 
brings back even more people.


The whole point of making a web site is to sell something -- ether a 
product, a service, an opinion, yourself, or whatever. The larger the 
audience, the more successful you will be. Using css brings in more 
people.


---

 > 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.


On this we disagree. I have found nothing that tables can do that I 
can't do with css AND do it more effectively and efficiently.


The box-model problem and float considerations can be easily dealt 
with IF you truly understand the problem they present. There are 
things you can use to illustrate the problems just like in php.


For example, we all use pint_r() to show us what values our variables 
hold -- it helps in debugging. The same goes for css, try using the 
rule "border: 1px solid red;" the next time you're wondering about 
why something isn't placed where you want it. Once you see where/how 
everything fits together, it's simple to fix it.


Look, you're a competent programmer and php is far more complex than 
css will ever be. You're doing yourself a disservice by letting 
simple stumbling blocks deter you from using css because you have a 
misconception that css isn't ready yet, because it is.


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] sendmail loop

2007-04-14 Thread tedd

At 4:54 PM -0600 4/13/07, John Pillion 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)?


Google cron and php.

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-14 Thread Robert Cummings
On Sat, 2007-04-14 at 10:35 -0400, tedd wrote:
> At 9:07 PM -0400 4/13/07, Robert Cummings wrote:
> >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.
>
> Rob:
> 
> My site (http://sperling.com) is designed to optimize the area 
> provided it by the browser/user. I realize that the web is not 
> traditional print and I am attempting to find the "best" way to 
> present content in this medium.
> 
> I have done pixel perfect web pages for clients where they show me a 
> Photoshop image and say "That's the way we want it to look in all 
> browsers AND we don't want tables." That's what absolute position is 
> used for. There isn't a Photoshop image that anyone can show me that 
> I can't make a "pixel perfect" AND compliant web site out of using 
> css.


Who said pixel perfect image? Absolute pixel perfection is easy as
you've mentioned. Now make pixel perfect stretchy pages where the widths
expand to fill the available horizontal and heights expand to fill the
available vertical.

> As for the box-model issue, I've faced that, such as in:
> 
> http://www.symboldomains.com/

This is a simplistice layout. It doesn't have the same issues as 3
column layouts. Also, you are using CSS hacks... just as bad as tables
IMHO.

> While the site is a bit dated (first release in 2003), it still holds 
> together. The placement of the border handles IE's difficulty in 
> understanding the box model (just where does M$ get these browser 
> developers?).
> 
> For more "typical" sites, may I present my past life:
> 
> http://www.geophysics.com/

Again, a simplistic layout... with CSS hacks.

> I've been putting up web sites for the last ten years. I went through 
> the table phase a few years back and I haven't had a reason to go 
> back. Like documentation and semantic makeup, it just makes sense.
> 
> In short, I am a recovering tableholic, but I've been table 
> independent for five years, eight months, and seven days.

I know how to do layouts without tables, but not without resorting to
hacks, or not getting pixel perfection a stretchy design. I'm am well
aware of CSS. I am not a table-aholic, I am a pragmatist.

> >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.
> 
> Yes, there is always difficulty in the world, but realize that we 
> prosper from it. If web stuff was easy, then everyone would be doing 
> it correctly.

"Correctly" is a moving target... shouldn't you be moving away from
HTML4.01 strict to XHTML already? ;)

> >  > 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.
> 
> To me, being disabled, accessibility is paramount. Granted I don't 
> always live up to my mouth, but I try and that's the point.

To me, undisabled as I am, accessibility is important, but what's
important to me, isn't always important to my paying customers. There's
a middle ground between accessibility, time, and cost.

> As for the rest of my claim, my experience is that css reduces cost 
> for over all development -- it takes *me* less time to develop an 
> entire site using css than using tables.
> 
> Site maintenance is certainly easier -- no reason to dwell on the obvious.
> 
> Sales are better for several reason: a) accessibility brings up-to 
> another 12 percent more customers to the table; b) sites built with 
> css load faster bringing more people; c) better SEO considerations 
> brings even more people; d) faster site alteration to cycle products 
> allows more exposure and makes for a more interesting sites, which 
> brings back even more people.

Are you implied 12% of the population visiting websites are disabled in
such a way as to benefit from CSS? That's seems a tad high. Maybe 1%...
if that.

> The whole point of making a web site is to sell something -- ether a 
> product, a service, an opinion, yourself, or whatever. The larger the 
> audience, the more successful you will be. Using css brings in more 
> people.

Please back up that claim with real statistics.

> ---
> >  > 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
> >

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

2007-04-14 Thread Edward Vermillion


On Apr 13, 2007, at 8:07 PM, Robert Cummings wrote:
[snip]



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.



[snip]


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.




And here-in lies the problem with most web designers/coders who think  
they *have* to have tables...


"Pixel perfect layouts" are *not* what the web is about. A browser  
window is not a piece of paper and until "web designers" get that  
through their heads then we will all have trouble making things work.  
No matter what the browser makers do.


Designers need to start designing for the medium and not for what  
they want the medium to be, or what medium fits their knowledge base  
or familiar problem space.


You don't have to have that much control over a web page... loosen up  
a bit and let things be what they are.




Sorry, that just builds up over time and needs to be let out every  
once in a while


Ed

--
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-14 Thread Robert Cummings
On Sat, 2007-04-14 at 10:14 -0500, Edward Vermillion wrote:
> On Apr 13, 2007, at 8:07 PM, Robert Cummings wrote:
> [snip]
> 
> >
> > 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.
> >
> 
> [snip]
> 
> > 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.
> 
> 
> 
> And here-in lies the problem with most web designers/coders who think  
> they *have* to have tables...
> 
> "Pixel perfect layouts" are *not* what the web is about. A browser  
> window is not a piece of paper and until "web designers" get that  
> through their heads then we will all have trouble making things work.  
> No matter what the browser makers do.
> 
> Designers need to start designing for the medium and not for what  
> they want the medium to be, or what medium fits their knowledge base  
> or familiar problem space.
> 
> You don't have to have that much control over a web page... loosen up  
> a bit and let things be what they are.
> 
> 
> 
> Sorry, that just builds up over time and needs to be let out every  
> once in a while

Sure, but designers head the beck and call of paying customers. Just
like we coders do. Sometime you just can't win the argument with a
suit :)

BTW, why can't a browser window be pixel perfect? I think you're
dwelling on what you think it should be, and what others want it to be.
The more interactive the web becomes, the more we see web applications
mimicking desktop solutions, the more we need pixel perfection.
Regardless of whether you think the web should be used for these kinds
of applications is irrelevant, because others do think it can and should
be used in this way. Throwing cups of water back into the ocean to
prevent the tide from coming in just doesn't work.

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] Protecting individual files/dirs from access

2007-04-14 Thread tedd

At 4:56 PM -0500 4/13/07, Richard Lynch wrote:

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


Richard:

How secure is this:

http://sperling.com/a/pw

There are seven files there, namely:

http://sperling.com/a/pw/.htaccess
http://sperling.com/a/pw/a.php
http://sperling.com/a/pw/b.php
http://sperling.com/a/pw/auth.php
http://sperling.com/a/pw/index.php
http://sperling.com/a/pw/girl.gif<-- not protected.
http://sperling.com/a/pw/girl.jpg   <-- protected, but well worth the effort.

Are any of these files accessible, even when you know the path? And 
by "accessible" I mean can you obtain any information that the files 
contain?


For example, if I were to tell people to store their user id and 
password in a configuration php file with a known path, would it be 
safe? I realize that if the server is breached then nothing is safe, 
but barring that -- how safe would that be?


Thanks,

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-14 Thread Edward Vermillion


On Apr 14, 2007, at 10:37 AM, Robert Cummings wrote:


On Sat, 2007-04-14 at 10:14 -0500, Edward Vermillion wrote:

On Apr 13, 2007, at 8:07 PM, Robert Cummings wrote:
[snip]



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.



[snip]

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.




And here-in lies the problem with most web designers/coders who think
they *have* to have tables...

"Pixel perfect layouts" are *not* what the web is about. A browser
window is not a piece of paper and until "web designers" get that
through their heads then we will all have trouble making things work.
No matter what the browser makers do.

Designers need to start designing for the medium and not for what
they want the medium to be, or what medium fits their knowledge base
or familiar problem space.

You don't have to have that much control over a web page... loosen up
a bit and let things be what they are.



Sorry, that just builds up over time and needs to be let out every
once in a while


Sure, but designers head the beck and call of paying customers. Just
like we coders do. Sometime you just can't win the argument with a
suit :)


Yeah I know... thus the bottled up frustrations... ;)



BTW, why can't a browser window be pixel perfect? I think you're
dwelling on what you think it should be, and what others want it to  
be.

The more interactive the web becomes, the more we see web applications
mimicking desktop solutions, the more we need pixel perfection.
Regardless of whether you think the web should be used for these kinds
of applications is irrelevant, because others do think it can and  
should

be used in this way. Throwing cups of water back into the ocean to
prevent the tide from coming in just doesn't work.



I think there's a fundamental difference between a web application  
and a web page. (That's another one of those areas where folks expect  
what they shouldn't. Like a web application must adhere to the web  
paradigm and ensure the "back" button retains it's meaning throughout  
the applications processes, even though there's no real "back"  
concept to an application.)


I'm really finding that the older I get, and the more my eyesight  
diminishes, the more websites I just don't go to or that I have to  
fight with if I *have* to get some info from them, just because the  
designer wasn't designing for the web.


But eh, we all do what we have to to get the pay check sometimes...

Ed

--
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-14 Thread Robert Cummings
On Sat, 2007-04-14 at 11:28 -0500, Edward Vermillion wrote:
>
> I think there's a fundamental difference between a web application  
> and a web page. (That's another one of those areas where folks expect  
> what they shouldn't. Like a web application must adhere to the web  
> paradigm and ensure the "back" button retains it's meaning throughout  
> the applications processes, even though there's no real "back"  
> concept to an application.)
> 
> I'm really finding that the older I get, and the more my eyesight  
> diminishes, the more websites I just don't go to or that I have to  
> fight with if I *have* to get some info from them, just because the  
> designer wasn't designing for the web.
> 
> But eh, we all do what we have to to get the pay check sometimes...

I can understand where you're coming from, but to draw the line further
back, are you also suggesting we remove images, flash, applets,
javascript? These things didn't exist when the web was born... The web
evolved and in so doing opened up new opportunities. Web applications
that don't work like conventional pages are merely another step in the
Web's evolution. I'm not going to call it Web 2.0 or Web 3.0 or any
other dumb branding gibberish, but truth be told, the web is still
evolving into what visionaries see for its potential.

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] warning message to hide

2007-04-14 Thread siavash1979
Quoting Alain Roger <[EMAIL PROTECTED]>:

> Hi,
> 
> Today i discovered that when my host webserver has some issue with
> PostgreSQL database, my code displays the following error message :
> *"Warning*: pg_connect()
> [function.pg-connect]:
> Unable to connect to PostgreSQL server: could not connect to server:
> Connection refused Is the server running on host "pgsql.exohosting.sk" and
> accepting TCP/IP connections on port 5432? in */www/.php* on line yyy."
> 
> I would like instead of that, to display my own error message... in fact, i
> would like to display something like : "We are sorry but temporary we have
> some technical issues. Please try again later".
> how can i do that ?
> 
> i tried to do :
> $conn = pg_connect($conn_string);


try putting an @ sign before this line. something like this:
@$conn = pg_connect($conn_string);

that should do the job for you in this case.

Siavash


> 
> if ($conn) // check if database is online
> {
> // close database connection
> pg_close($conn);
> }
> else
> {
> // impossible to connect to DB
> die('Maintenance in progress... Try later.');
> }
> 
> but it still display the previous warning message.
> thanks for your help.
> 
> 
> -- 
> Alain
> 
> Windows XP SP2
> PostgreSQL 8.1.4
> Apache 2.0.58
> PHP 5
> 

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



Re: [PHP] warning message to hide

2007-04-14 Thread Tijnema !

On 4/14/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:

Quoting Alain Roger <[EMAIL PROTECTED]>:

> Hi,
>
> Today i discovered that when my host webserver has some issue with
> PostgreSQL database, my code displays the following error message :
> *"Warning*: pg_connect()
> [function.pg-connect]:
> Unable to connect to PostgreSQL server: could not connect to server:
> Connection refused Is the server running on host "pgsql.exohosting.sk" and
> accepting TCP/IP connections on port 5432? in */www/.php* on line yyy."
>
> I would like instead of that, to display my own error message... in fact, i
> would like to display something like : "We are sorry but temporary we have
> some technical issues. Please try again later".
> how can i do that ?
>
> i tried to do :
> $conn = pg_connect($conn_string);


try putting an @ sign before this line. something like this:
@$conn = pg_connect($conn_string);


According to the manual:
http://www.php.net/manual/en/language.operators.errorcontrol.php
the @ should be placed before the function, so like this:
$conn = @pg_connect($conn_string);

And if you want also to generate your own error.
$conn = @pg_connect($conn_string) or die("My error here!");

This will show My error here! when the function can't connect.

Tijnema




--
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-14 Thread tedd

At 11:12 AM -0400 4/14/07, Robert Cummings wrote:

 > At 9:07 PM -0400 4/13/07, Robert Cummings wrote:
 >I noticed your site isn't a pixel perfect layout.



Who said pixel perfect image?


You did -- pixel perfect image or pixel perfect layout, what's the difference?


Now make pixel perfect stretchy pages where the widths
expand to fill the available horizontal and heights expand to fill the
available vertical.


Now, you introduce a "pixel perfect stretchy" term -- is this one of 
those moving targets where no one can provide a solution because the 
target keeps moving?


Just show me an example where you can do your "pixel perfect 
stretchy" thing with tables that can't be done by css.


---


 > As for the box-model issue, I've faced that, such as in:


 http://www.symboldomains.com/


This is a simplistice layout. It doesn't have the same issues as 3
column layouts.


You want three column layouts, there's plenty around. See:

http://css-discuss.incutio.com/?page=ThreeColumnLayouts

Or just Google "three column layout". It seems that others don't have 
the problems with it as you do.


---

Also, you are using CSS hacks... just as bad as tables
IMHO.



A couple of points:

1. If it's *just* as bad, then why not use the one that's at least accessible?

2. If you're against using hacks, then you're sounding like one of 
those "sitting on your glass pedestal better than thou" types you 
accused me of being.


Table supporters can't have it both ways. On hand some say that they 
are above using hacks and on the other hand they say it's OK to use 
tables. Tables were never designed for that and using them that way 
is a hack -- plain and simple!


If you want to use tables, that's fine -- but don't suggest that one 
of your reasons is that you are above using hacks.


---


"Correctly" is a moving target... shouldn't you be moving away from
HTML4.01 strict to XHTML already? ;)


Maybe, but what I do is still compliant.

---


Are you implied 12% of the population visiting websites are disabled in
such a way as to benefit from CSS? That's seems a tad high. Maybe 1%...
if that.


Aging seniors are in that group (myself included) -- you think that 
we are less than 1 percent of the population? I think not. As my 
baby-boomer group continues, the problem will become even more so.


Additionally, I think you grossly underestimate the number of people 
who have disability related problems with sites, that's unfortunate, 
but typical for people who don't.


---


 > The whole point of making a web site is to sell something -- ether a

 product, a service, an opinion, yourself, or whatever. The larger the
 audience, the more successful you will be. Using css brings in more
 people.


Please back up that claim with real statistics.


Likewise, back up your claim otherwise with real statistics. As you 
know there are no "real statistics" and that's a red herring.


---


 > On this we disagree. I have found nothing that tables can do that I

 can't do with css AND do it more effectively and efficiently.


Yes, I disagree, I trust that I'm far more productive to than you
*grin*.



You probably are -- and that's why you get paid the big bucks.

But, I trust that I am more compliant than you. :-)

---


 > The box-model problem and float considerations can be easily dealt

 with IF you truly understand the problem they present. There are
 things you can use to illustrate the problems just like in php.


Awww, see now you're trying to talk down to me as if I'm new to CSS.


My apologies -- it was not my intent to talk down to you, but to 
simply state a fact.



Awww, you really are treating me like an idiot now *lol*. I'm well aware
of using borders to reveal where things are.


Again, my apologies I'm not trying to treat you like an idiot -- 
there are other people reading this list and I don't want them to get 
the misconception you promote that css is flawed and tables are the 
only solution.


In any event, we have beat this to death -- you have your practice 
and I have mine. As always, there is more than one way to do anything.


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-14 Thread tedd

At 11:37 AM -0400 4/14/07, Robert Cummings wrote:

Sure, but designers head the beck and call of paying customers. Just
like we coders do. Sometime you just can't win the argument with a
suit :)


I didn't know you wore a suit.  :-)

---

BTW, why can't a browser window be pixel perfect?


What's "pixel perfect"?

---

The more interactive the web becomes, the more we see web applications
mimicking desktop solutions,


On that we agree -- however, desktop solutions are being influenced 
by web and vice versa. This is a dynamic process where ideas, needs, 
and solutions merge and continue to change.


But don't think that current desktop solutions are the end-all of all 
application development. I remember when DOS types claimed that using 
a mouse would never catch on. Everything is changing.


---

Regardless of whether you think the web should be used for these kinds
of applications is irrelevant, because others do think it can and should
be used in this way.


Nonsense. What he thinks, what I think, and what you think does 
influence change. You certainly don't have all the answers and 
neither do I, but our dialog, our practice, our methods, our post, do 
provide direction and example. What's the point of this dialog anyway 
-- to amuse ourselves? No offense, but I would rather be playing 
Ghost Recon than debating this issue with you.


I do this because I believe that this is the "right" way to educate 
and to give back for those who helped, and continue to help, me.


---

Throwing cups of water back into the ocean to
prevent the tide from coming in just doesn't work.


But, it sure helps to keep your boat afloat. :-)

Besides, what tide are you talking about, the css tide? Everyday, via 
my attendance to the css-discuss list, I would estimate that there 
are more people coming on board the css boat than choosing tables.


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-14 Thread tedd

At 12:37 PM -0400 4/14/07, Robert Cummings wrote:

but truth be told, the web is still
evolving into what visionaries see for its potential.


Agreed, but some are reluctant to listen to visionaries. :-)

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-14 Thread Robert Cummings
On Sat, 2007-04-14 at 13:57 -0400, tedd wrote:
> At 11:12 AM -0400 4/14/07, Robert Cummings wrote:
> >  > At 9:07 PM -0400 4/13/07, Robert Cummings wrote:
> >  >I noticed your site isn't a pixel perfect layout.
> 
> >Who said pixel perfect image?
> 
> You did -- pixel perfect image or pixel perfect layout, what's the difference?
> 
> >Now make pixel perfect stretchy pages where the widths
> >expand to fill the available horizontal and heights expand to fill the
> >available vertical.
> 
> Now, you introduce a "pixel perfect stretchy" term -- is this one of 
> those moving targets where no one can provide a solution because the 
> target keeps moving?

A stretchy website stretches it's content area to accomodate the width
of the browser. I'm quite sure you knew this, either that, or you're not
reading enough.

> Just show me an example where you can do your "pixel perfect 
> stretchy" thing with tables that can't be done by css.

Sorry, I do most of my work behind intranet firewalls. But see my
remarks below...

> ---
> 
> >  > As for the box-model issue, I've faced that, such as in:
> >>
> >>  http://www.symboldomains.com/
> >
> >This is a simplistice layout. It doesn't have the same issues as 3
> >column layouts.
> 
> You want three column layouts, there's plenty around. See:
> 
> http://css-discuss.incutio.com/?page=ThreeColumnLayouts

They ALL use some kind of hack or are not stretchy.

> Or just Google "three column layout". It seems that others don't have 
> the problems with it as you do.
> 
> ---
> >Also, you are using CSS hacks... just as bad as tables
> >IMHO.
> 
> 
> A couple of points:
> 
> 1. If it's *just* as bad, then why not use the one that's at least accessible?

There's a future cost to using hacks when the hacks no longer work...
this should be apparent to all those that used IE hacks and then
suddenly in IE7 only some worked, or only partially worked.

> 2. If you're against using hacks, then you're sounding like one of 
> those "sitting on your glass pedestal better than thou" types you 
> accused me of being.

Leveraging the effects of a bug is not a foundation upon which to build
anything. The web was practically built on tables to begin with, so the
foundations are already strong in that arena.

> Table supporters can't have it both ways. On hand some say that they 
> are above using hacks and on the other hand they say it's OK to use 
> tables. Tables were never designed for that and using them that way 
> is a hack -- plain and simple!

At one point, the only way to layout content was using tables. CSS
didn't exist at that time, plain and simple.

Besides... there's this from the W3C accessibility guidelines:


5.2 Tables for layout

Checkpoints in this section:
5.3 Do not use tables for layout unless the table makes sense when
linearized. Otherwise, if the table does not make sense, provide an
alternative equivalent (which may be a linearized version). [Priority 2]
5.4 If a table is used for layout, do not use any structural markup for
the purpose of visual formatting. [Priority 2]

Authors should use style sheets for layout and positioning. However,
when it is necessary to use a table for layout, the table must linearize
in a readable order. When a table is linearized, the contents of the
cells become a series of paragraphs (e.g., down the page) one after
another. Cells should make sense when read in row order and should
include structural elements (that create paragraphs, headings, lists,
etc.) so the page makes sense after linearization.

Also, when using tables to create a layout, do not use structural markup
to create visual formatting. For example, the TH (table header) element,
is usually displayed visually as centered, and bold. If a cell is not
actually a header for a row or column of data, use style sheets or
formatting attributes of the element.


They allow for the use of tables, and I follow that convention. I
currently feel it is "necessary" at times to use tables.

> If you want to use tables, that's fine -- but don't suggest that one 
> of your reasons is that you are above using hacks.

I don't use any CSS hacks based on bugs unless a client specifically
requests a feature that cannot be done otherwise. Event then I advise
against it.

> >"Correctly" is a moving target... shouldn't you be moving away from
> >HTML4.01 strict to XHTML already? ;)
> 
> Maybe, but what I do is still compliant.

Me too. I'm XHTML 1.0 strict compliant in new sites.

> >Are you implied 12% of the population visiting websites are disabled in
> >such a way as to benefit from CSS? That's seems a tad high. Maybe 1%...
> >if that.
> 
> Aging seniors are in that group (myself included) -- you think that 
> we are less than 1 percent of the population? I think not. As my 
> baby-boomer group continues, the problem will become even more so.
>
> Additionally, I think you grossly underestimate the number of people 
> who have disability rela

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

2007-04-14 Thread Robert Cummings
On Sat, 2007-04-14 at 14:16 -0400, tedd wrote:
> At 11:37 AM -0400 4/14/07, Robert Cummings wrote:
> >Sure, but designers head the beck and call of paying customers. Just
> >like we coders do. Sometime you just can't win the argument with a
> >suit :)
> 
> I didn't know you wore a suit.  :-)
> 
> ---
> >BTW, why can't a browser window be pixel perfect?
> 
> What's "pixel perfect"?

When an element must be arranged to an exact pixel of position. For
instance, cases where borders must have exactly 1 pixel margin between
the border and the edge of some other element. Sounds picky and it is,
but is something that is desired at times.

> ---
> >The more interactive the web becomes, the more we see web applications
> >mimicking desktop solutions,
> 
> On that we agree -- however, desktop solutions are being influenced 
> by web and vice versa. This is a dynamic process where ideas, needs, 
> and solutions merge and continue to change.
> 
> But don't think that current desktop solutions are the end-all of all 
> application development. I remember when DOS types claimed that using 
> a mouse would never catch on. Everything is changing.
> 
> ---
> >Regardless of whether you think the web should be used for these kinds
> >of applications is irrelevant, because others do think it can and should
> >be used in this way.
> 
> Nonsense. What he thinks, what I think, and what you think does 
> influence change. You certainly don't have all the answers and 
> neither do I, but our dialog, our practice, our methods, our post, do 
> provide direction and example. What's the point of this dialog anyway 
> -- to amuse ourselves? No offense, but I would rather be playing 
> Ghost Recon than debating this issue with you.

What he thinks matters to him just as each person's thoughts matter to
them. In the greater ocean of ideas, no single person can extinguish
another person's idea. As such, what he thinks is irrelevant when
someone else pushes from the other end and he is incapable of pushing
back. Why is he incapable of pushing back? Because he can't stop that
person from doing what they want to do. As such what he thinks (about
another's thoughts) is irrelevant to that person unless he can persuade
that person and every person who thinks the same thing to abandon that
thought.

I meant what he thinks is irrelevant in the above context... I thought
it would have been apparent.

> I do this because I believe that this is the "right" way to educate 
> and to give back for those who helped, and continue to help, me.
> 
> ---
> >Throwing cups of water back into the ocean to
> >prevent the tide from coming in just doesn't work.
> 
> But, it sure helps to keep your boat afloat. :-)

That's a sinking ship :|

> Besides, what tide are you talking about, the css tide? Everyday, via 
> my attendance to the css-discuss list, I would estimate that there 
> are more people coming on board the css boat than choosing tables.

The tide of change. The tide of people using the web for whatever they
see fit despite any original intentions of the Web's use. This wasn't
about CSS at all, it's about the medium as a whole :)

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-14 Thread Robert Cummings
On Sat, 2007-04-14 at 14:19 -0400, tedd wrote:
> At 12:37 PM -0400 4/14/07, Robert Cummings wrote:
> >but truth be told, the web is still
> >evolving into what visionaries see for its potential.
> 
> Agreed, but some are reluctant to listen to visionaries. :-)

Not all visionaries talk. Many just do. The merit of their foresight is
often seen in hindsight :)

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-14 Thread tedd

At 2:25 PM -0400 4/14/07, Robert Cummings wrote:

A stretchy website stretches it's content area to accomodate the width
of the browser. I'm quite sure you knew this, either that, or you're not
reading enough.


Is my site an example of a stretchy website? It's only two columns, 
but it could have been three -- I just don't like three.


http://sperling.com/


At one point, the only way to layout content was using tables. CSS
didn't exist at that time, plain and simple.


Yeah, I know how the bad practice came about, but that doesn't mean 
that we should continue it because of legacy issues. The founder 
fathers of the web also painted us into 7-bit technology corner that 
we now have to deal with, but we deal with it.



Besides... there's this from the W3C accessibility guidelines:


-snip-


They allow for the use of tables, and I follow that convention. I
currently feel it is "necessary" at times to use tables.


Yes, I never said that the use of tables was prohibited, but that 
it's use has been abused by WYSIWYG editors like Dreamweaver, which 
started this thread.



Statistics are easy to find:

http://www.frontpagewebmaster.com/m-281187/tm.htm#281187


Okay, so read them.

In the first post you'll find (from my old college CSUN) this:

http://www.imtc.gatech.edu/csun/stats.html

It states that 19.4 percent of the population is disabled -- that's 
about twenty times the number you cited.


However, that figure isn't current nor does it represent the world. 
Keep in mind that English speaking people, who usually have better 
health coverage, comprise only 4 percent of the world's population. I 
would estimate that Global disability figures are significantly 
higher.



Maybe Google isn't accessible enough for you (it uses tables after
all ;)


Nope, Google doesn't have it right either -- they still use graphic 
captcha's as well. And, they (like others) are not going to change 
until they understand what some of us are saying.


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-14 Thread Robert Cummings
On Sat, 2007-04-14 at 14:58 -0400, tedd wrote:
> At 2:25 PM -0400 4/14/07, Robert Cummings wrote:
> >A stretchy website stretches it's content area to accomodate the width
> >of the browser. I'm quite sure you knew this, either that, or you're not
> >reading enough.
> 
> Is my site an example of a stretchy website? It's only two columns, 
> but it could have been three -- I just don't like three.
> 
> http://sperling.com/

Yes, that is a stretchy site.

> >At one point, the only way to layout content was using tables. CSS
> >didn't exist at that time, plain and simple.
> 
> Yeah, I know how the bad practice came about, but that doesn't mean 
> that we should continue it because of legacy issues. The founder 
> fathers of the web also painted us into 7-bit technology corner that 
> we now have to deal with, but we deal with it.

I realize this, I never said don't use CSS *lol*. I advocate the use of
CSS. I don't generally advocate the use of tables for laying out data
either. This all came into focus when I said I use them when I feel it
necessary.

> >Besides... there's this from the W3C accessibility guidelines:
> >
> >
> >-snip-
> >
> >
> >They allow for the use of tables, and I follow that convention. I
> >currently feel it is "necessary" at times to use tables.
> 
> Yes, I never said that the use of tables was prohibited, but that 
> it's use has been abused by WYSIWYG editors like Dreamweaver, which 
> started this thread.
> 
> >Statistics are easy to find:
> >
> > http://www.frontpagewebmaster.com/m-281187/tm.htm#281187
> 
> Okay, so read them.

I did just before I posted the link :)

> In the first post you'll find (from my old college CSUN) this:
> 
> http://www.imtc.gatech.edu/csun/stats.html
> 
> It states that 19.4 percent of the population is disabled -- that's 
> about twenty times the number you cited.
>
> However, that figure isn't current nor does it represent the world. 
> Keep in mind that English speaking people, who usually have better 
> health coverage, comprise only 4 percent of the world's population. I 
> would estimate that Global disability figures are significantly 
> higher.
> 
> >Maybe Google isn't accessible enough for you (it uses tables after
> >all ;)
> 
> Nope, Google doesn't have it right either -- they still use graphic 
> captcha's as well. And, they (like others) are not going to change 
> until they understand what some of us are saying.

There are two types of accessibility at play. Google is meeting one
kind, you are advocating another. Both are valid, although yours plays
to the heart strings a little more :) Google is ensuring their content
looks the same in as many browsers as possible. To them that *is*
accessibility (I presume anyways, maybe it's some other reason :) Yours
is about usability accessibility.

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] Images again

2007-04-14 Thread Børge Holen
On Saturday 14 April 2007 09:45, you wrote:
> On 4/14/07, Børge Holen <[EMAIL PROTECTED]> wrote:
> > 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.
>
> Hmm, nearly I use IE, NOT because i like it, but because i hate
> the others more (On windows platform).
 
Sounds so unlikely, didn't know anyone used that crap anymore... I thought 
everyone switched to tiger linux opensolaris aros etc when viste came out. ;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?
>
> You should fetch the stream manually in a string, and then use
> imagecreatefromstring, http://www.php.net/imagecreatefromstring

YES FREAKIN PERFECT.

>
> > 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
>
> For the rest of your message, i don't understand what you're trying to
> do. Show us (parts of) the code you have now, and then explain what
> you've wanted to do, and what it does now.

Just me blabbering in frustration...
my code is now pretty simple. one connection, one query, two results,
checks if image is copyrighted.  Then with your contribution, prints with or 
without the watermark.

>
> Tijnema

Thanks

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

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



[PHP] isset

2007-04-14 Thread Richard Kurth
What do you do when isset does not work? If I send data in a
$_REQUEST['var'] like 
if (isset($_REQUEST['var'])) {
}
Put var has no data it still says it is set. Because $_REQUEST['var'] = ""
and isset thinks "" is set


Re: [PHP] isset

2007-04-14 Thread Jochem Maas
Richard Kurth wrote:
> What do you do when isset does not work? If I send data in a
> $_REQUEST['var'] like 
> if (isset($_REQUEST['var'])) {
> }
> Put var has no data it still says it is set. Because $_REQUEST['var'] = ""
> and isset thinks "" is set

php -r ' $r = array("foo" => ""); var_dump(isset($r["foo"]),empty($r["foo"]));'

so empty() should give you the result your looking for  ...
some tips:

1. generally use $_GET or $_POST in preference to $_REQUEST
2. be specific about your input validation, e.g.:

if (isset($_GET['var']) && ($_GET['var'] == 'foo')) {
echo "got it!";
}

> 

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



[PHP] preg_replace and regular expressions.

2007-04-14 Thread Travis Moore
Okay, so what I have is a BB code type of thing for a CMS, which I for 
obvious reasons can't allow HTML.


Here's the snippet of my function:


function bbCode($str)
 {
  $db = new _Mysql;
  $strOld = $str;
  $strNew = $str;
  $getRegexs = $db->query("SELECT `regex`,`replace`,`search` FROM 
`_bb_codes`");

  while ($getRegex = mysql_fetch_assoc($getRegexs))
   {
$search = base64_decode($getRegex['search']);
$regex = base64_decode($getRegex['regex']);
$replace = base64_decode($getRegex['replace']);
if (preg_match($search,$strNew) == 1)
 {
  for ($i = 1; $i < 20; $i++)
   {
$strNew = $strOld;
$strNew = preg_replace($regex,$replace,$strNew);
if ($strNew == $strOld)
 {
  break;
 }
else
 {
  $strOld = $strNew;
 }
   }
 }
   }
  $return = $strNew;
  return $return;
 }
**

But, for something like this:

[quote][quote]Quote #2[/quote]Quote #1[/quote]No quote.

I'll get:


[quote]Quote #2[/quote]Quote #1
No quote.

Despite being in the loop.

Regex is: /\[quote\]((.*|\n)*)\[\/quote\]/
Replace is: $1

Both are stored base64 encoded in a database.

Any help / suggestions much appreciated.

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