Re: [PHP] window.open access parent's JS?

2010-07-07 Thread Skip Evans

Yup, window.opener it is.

Much thanks. I was surprised how much Googling I did and 
didn't find that.


On 07/07/2010 04:31 AM, Ashley Sheridan wrote:


Not really anything to do with PHP there :p



Well, given the breadth the topics I've seen discussed on this 
list I thought it would slide by.


But for my penance I'll ask the following:

Is there a way to have a window opened with window.open()
inherit the parent windows JS environment... when it resides 
in a much larger PHP/MySQL application?


How's that for a qualifier! :)

Skip

--

Skip Evans
PenguinSites.com, LLC
503 S Baldwin St, #1
Madison WI 53703
608.250.2720
http://penguinsites.com

Those of you who believe in
telekinesis, raise my hand.
 -- Kurt Vonnegut

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



[PHP] window.open access parent's JS?

2010-07-06 Thread Skip Evans

Hey all,

Is there a way to have a window opened with window.open()
inherit the parent windows JS environment?

In other words, I call window.open() with a URL that displays
a form created by a PHP script.

JS code has already been loaded by the parent, and I need to
be able to access that code via mouse overs and onclick calls
from the code in the newly opened window.

Is this possible?

Thanks,
Skip

--

Skip Evans
PenguinSites.com, LLC
503 S Baldwin St, #1
Madison WI 53703
608.250.2720
http://penguinsites.com

Those of you who believe in
telekinesis, raise my hand.
 -- Kurt Vonnegut

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



[PHP] Converting funky characters

2010-03-28 Thread Skip Evans

Hey all,

What's the best way to filter/convert characters that don't
translate properly from say news stories to HTML?

For example, I have a form that people cut and paste the lead
in paragraph from news stories they want to link to from their
sites to the original. And of course things like long dashes,
double quotes, single quotes, etc, always translate is wacky
unprintables when they are rendered, and the user needs to
edit them to replace them with standard characters.

Is there way to filter this text through a function that will
convert them to web friendly chars?

Thanks,
Skip

--

Skip Evans
PenguinSites.com, LLC
503 S Baldwin St, #1
Madison WI 53703
608.250.2720
http://penguinsites.com

Those of you who believe in
telekinesis, raise my hand.
 -- Kurt Vonnegut

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



[PHP] SSL and multiple host names

2010-03-11 Thread Skip Evans

Hey all,

Just wanted to let you know what I find out about this and how 
I solved the problem.


First, name based SSL is, as one person told me, only good for 
one IP address in an Apache installation. I'll let Apache 
explain it themselves because they are better at it than I am.


The reason is that the SSL protocol is a separate layer which 
encapsulates the HTTP protocol. So the SSL session is a 
separate transaction, that takes place before the HTTP session 
has begun. The server receives an SSL request on IP address X 
and port Y (usually 443). Since the SSL request does not 
contain any Host: field, the server has no way to decide which 
SSL virtual host to use. Usually, it will just use the first 
one it finds, which matches the port and IP address specified.


http://httpd.apache.org/docs/2.0/ssl/ssl_faq.html#vhosts2

So the solution is that each host name has to have its own IP 
address if you're going to do both port 80 for HTTP and port 
443 for HTTPS.


You can assign different ports for your different SSL host 
names, but that can get messy, and because these are paying 
customers for an account on our system it was a no brainer to 
go with separate IPs per host name.


So my process now is to leave them on the shared virtual host 
name configuration until they require SSL, which our clients 
only do when they start processing credit card transactions, 
and once they do that they get their own IP and we configure 
them accordingly.


So I hope this little nugget helps anyone who comes across 
this same issue. And incidentally, if you need to configure 
IP-based SSL on FreeBSD I'm you're guy; I'm now a whiz at it :)


Skip


Skip Evans
PenguinSites.com, LLC
503 S Baldwin St, #1
Madison WI 53703
608.250.2720
http://penguinsites.com

Those of you who believe in
telekinesis, raise my hand.
 -- Kurt Vonnegut

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



[PHP] Anyone good with multiple SSL on Apache?

2010-03-08 Thread Skip Evans

Hey all,

I have an Apache virtual config running a bunch of sites, one 
with SSL. I finally have a need to add SSL to one more, but 
when I do the first one (which is further down the file) comes 
up untrusted.


Since this is pretty far off topic I'd be obliged if someone 
who has configured this before can email me off list for some 
assistance.


Much thanks!
Skip

--

Skip Evans
PenguinSites.com, LLC
503 S Baldwin St, #1
Madison WI 53703
608.250.2720
http://penguinsites.com

Those of you who believe in
telekinesis, raise my hand.
 -- Kurt Vonnegut

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



Re: [PHP] Anyone good with multiple SSL on Apache?

2010-03-08 Thread Skip Evans

D'oh!

...and I suppose there is just no way around that, eh?

Skip

Frank M. Kromann wrote:
You can only have one SSL per IP address. The SSL connection between the 
client and server is done before the host header name is made available 
to Apache.


- Frank

On 3/8/10 2:13 PM, Skip Evans wrote:

Hey all,

I have an Apache virtual config running a bunch of sites, one with 
SSL. I finally have a need to add SSL to one more, but when I do the 
first one (which is further down the file) comes up untrusted.


Since this is pretty far off topic I'd be obliged if someone who has 
configured this before can email me off list for some assistance.


Much thanks!
Skip



--

Frank M. Kromann, M.Sc.E.E.

Web by Pixel, Inc.


Phone: +1 949 742 7533

Cell: +1 949 702 1794

Denmark: +45 88 33 64 80



--

Skip Evans
PenguinSites.com, LLC
503 S Baldwin St, #1
Madison WI 53703
608.250.2720
http://penguinsites.com

Those of you who believe in
telekinesis, raise my hand.
 -- Kurt Vonnegut

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



[PHP] Replacing accented characters

2010-03-04 Thread Skip Evans

Hey all,

Does anyone have a function that replaces accented characters
with the non-accent equals?

I can't figure out how to get them out of the Ubuntu keyboard
the way it is configured so I've just tried three different
functions off the Internet and none of them have worked.

Thanks,
Skip
--

Skip Evans
PenguinSites.com, LLC
503 S Baldwin St, #1
Madison WI 53703
608.250.2720
http://penguinsites.com

Those of you who believe in
telekinesis, raise my hand.
 -- Kurt Vonnegut

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



Re: [PHP] HTML plain text in Outlook 2007

2010-02-14 Thread Skip Evans

Ashley Sheridan wrote:
That last reason could be why your email is failing! HTML email is the 
one place where it is actually better to code the old way with tables 
for markup, font tags, and very little (if any) CSS. If you do use any 
CSS, it's best left inline as well, as some email clients strip out 
anything within the head tags of your email.


Yes, that's exactly what I took away from the conversation. 
HTML emails should be coded using the old way.


Skip


--

Skip Evans
PenguinSites.com, LLC
503 S Baldwin St, #1
Madison WI 53703
608.250.2720
http://penguinsites.com

Those of you who believe in
telekinesis, raise my hand.
 -- Kurt Vonnegut

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



Re: [PHP] HTML plain text in Outlook 2007

2010-02-12 Thread Skip Evans

Hey Guys,

Thanks for all the info on this. Sorry for the late reply, but 
I got sidetracked writing the module that will send out all 
these nasty emails.


I do have the text going on top, and I think I said, looks 
perfect in Evolution and Thunderbird in both text and HTML.


I also read about MS ripping out the IE renderer and going 
back in time basically.


I thought the solution of converting a Word document into HTML 
with open office is interesting. I'll run that by the client 
and test it out.


Bottom line is, HTML is just a total pain, and yes, the email 
the client created in HTML using the most update to date CSS 
and HTML!


Thanks!

Skip

Robert Cummings wrote:

Ashley Sheridan wrote:

On Thu, 2010-02-04 at 13:44 -0500, Robert Cummings wrote:


What about signing yourself up to some newsletters to see how they do
it?

Looking at the ones I get from Facebook as an example, they use the
boundary codes you mentioned, and I can't see anything particularly
special that's been added. What order are you sending the two message
parts by the way? I think the traditional way is to send the plain/text
part first, so that UA's that don't understand or support multipart
messages only use the first one. As you mentioned that you're seeing
HTML code at the top, I'd hazard a guess that you're sending the HTML
first?
The problem is most likely NOT his email structure, but the fact that 
Microsoft in all their lock-in, make things difficult, non standard, 
monopolistic philosophy chose to switch out the IE HTML renderer 
(which was getting pretty decent with IE7 and IE8) with the Office 
HTML renderer... so now basic things like CSS padding of something as 
simple as a p tag is not possible. You now need to use margins 
instead. The full list of supported attributes / CSS can be found here:


 http://msdn.microsoft.com/en-us/library/aa338201.aspx

Obviously creating HTML emails was getting too easy (like it is with 
Thunderbird). Of course... I guess it could be as bad as Google 
stripping out the stylesheets entirely when viewing HTML content 
which forces you to put the styles on the tags themselves.


... actually I'm not sure what's worse... at least you can use 
standard styles with Google's gmail. Either way... making nice 
looking HTML emails that work across Outlook, Thunderbird, Gmail, 
Yahoo, and Hotmail is a pain in the ass.


Cheers,
Rob.



If he's getting HTML output at the top of the email, I would think that
did suggest that MS Word didn't like the structure. Making HTML emails
is now such a difficult job, as the email clients rendering engines tend
to not get updated as often as browsers, and there doesn't seem to be
any effort in bringing the rendering of the email clients together.

Whenever I create these emails I try to make sure I try no to get too
creative in the design, and use not only CSS styles, but properties of
the HTML tags themselves. It means I end up writing the CSS essentially
twice and backing it up with old deprecated HTML attributes, but it
usually does the trick.

Is there any effort by some standards group that email clients could
benefit from?


I think I skipped over some relevant information in the original post :)

Still... as you've said... email HTML sucks... and MS made it worse.

Cheers,
Rob.


--

Skip Evans
PenguinSites.com, LLC
503 S Baldwin St, #1
Madison WI 53703
608.250.2720
http://penguinsites.com

Those of you who believe in
telekinesis, raise my hand.
 -- Kurt Vonnegut

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



[PHP] HTML plain text in Outlook 2007

2010-02-04 Thread Skip Evans

Hey all,

First, let me say thanks for all the advice on Magento, and 
especially to Ryan who has used the beast and gave some great 
advice on skinning, links to some good docs and a book just 
for my designer. We'll be using and I'm looking forward to 
learning it.


But anyway...

I'm doing some maintenance work on a system that sends an 
email message using the multi-part boundaries to include both 
a plain text version and an HTML version of an email.


I've read up on this before, but never actually done it. So 
implementing the code was not a big issue, and in fact it 
works perfectly when tested on my Ubuntu machine using 
Thunderbird to test the HTML and Evolution to test the plain 
text version. In fact, I can switch formats on both of these 
and all looks great.


Enter Microsoft (Insert opening of Bach's Toccata and Fugue in 
D minor to send chills up my readers' spines.)


On Outlook 2007 in HTML mode it renders, how can I put this... 
half-assedly. In text mode the whole things a bust. There is 
the HTML code all stuffed up at the top, boundary codes are 
visible, just plain awful.


Googling around I see articles from 2007 when that version of 
Outlook came out lamenting the fact that MS pulled the IE 
rendering engine from it and replaced it with MS Word's 
renderer to plug security holes expoitable via email.


Does anyone have any experience with HTML  plain text 
multi-part messages and Outlook 2007, or any tips how I can 
get this working? Still Googling, but any tips would be 
greatly appreciated.


Skip
--

Skip Evans
PenguinSites.com, LLC
503 S Baldwin St, #1
Madison WI 53703
608.250.2720
http://penguinsites.com

Those of you who believe in
telekinesis, raise my hand.
 -- Kurt Vonnegut

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



Re: [PHP] Magento shopping cart

2010-02-02 Thread Skip Evans

Hey all,

So I'm more comfortable all the time with using Magento, more 
I read, and Ryan said, Its great, I have been using it for 
over 2 years very flexible platform very easy to manipulate, 
and the end user admin is second to none mate. ... Mate?...


Are there Aussies on this list? ;)

Anyway, what about skinning this animal. If I install it will 
our designer be able to put the site's custom look and feel 
into it?


Ryan, what do you think?

Skip

Nathan Nobbe wrote:

On Mon, Feb 1, 2010 at 3:22 PM, Skip Evans s...@bigskypenguin.com wrote:


I'm not totally opposed to using Magento, though I can see my comments,
especially if it's what the client wants.

I have been looking over the site and it does have a lot of features so I
can see it saving some serious time, especially given the extras he wants.

So Nathan, having used it, do you have any tips for a Magento newbie when
it comes to integrating it with a custom site?



I havent used it yet, but we are considering using it as a second-gen
platform at my new place of biz.  initial glimpses are promising, but it
appears to be a somewhat complex offering compared to say wordpress w/ an
e-commerce plugin.

i imagine there may be other tradeoffs as well, like a number of general
purpose plugins and probly more look  feel options in wordpress than
magento.



I haven't found any integration documentation for programmers yet.



google for magento extension and it looks like you may have to hit the
appropriate mailing list for more details.

fwiw, afaik, x-cart is one of those older e-commerce platforms circa
os-commerce / zencart days.  the code is ass, but frankly that damn thing
has installations up all over the net (or did once upon a time, lol).

-nathan



--

Skip Evans
PenguinSites.com, LLC
503 S Baldwin St, #1
Madison WI 53703
608.250.2720
http://penguinsites.com

Those of you who believe in
telekinesis, raise my hand.
 -- Kurt Vonnegut

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



[PHP] Magento shopping cart

2010-02-01 Thread Skip Evans

Hey all,

Anyone ever use the Magento shopping cart? Pluses, minuses, 
opinions? I have a client that is pretty adamant about using 
it, but I've found over just about any I've used I can do a 
better service to the client by writing them from scratch. 
It's easy and they always get exactly what they want.


I see they seem to have a lot of plug ins, but I think someone 
just told him it is the best cart to use so he's sort of 
fixated on it.


Like I said, I typically find I can custom write one with 
better results. I found xCart, for example, to contain some of 
the worst code I had ever seen and it turned me off to third 
party carts.


Skip

--

Skip Evans
PenguinSites.com, LLC
503 S Baldwin St, #1
Madison WI 53703
608.250.2720
http://penguinsites.com

Those of you who believe in
telekinesis, raise my hand.
 -- Kurt Vonnegut

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



Re: [PHP] Magento shopping cart

2010-02-01 Thread Skip Evans

Ashley Sheridan wrote:

Why spend ages reinventing the wheel?



I've come across so many clients using third party carts who 
have been unhappy with the final results. I hear so often It 
does eighty percent of what we need, but we do things like 
this [insert idiosyncratic business practice here].


And then getting a third party cart to do what they wanted was 
often either incredibly frustrating/time consuming, or often 
just not doable.


Yes, writing a cart takes time, but I've found I can whip them 
out pretty easily, and I have a lot of code I reuse all the 
time. I pretty much have a complete basic cart stored away, 
but I intentionally keep its functionality to a minimum so 
that I can expand on it to their specifications.


To date the results have been pretty good.

Skip
--

Skip Evans
PenguinSites.com, LLC
503 S Baldwin St, #1
Madison WI 53703
608.250.2720
http://penguinsites.com

Those of you who believe in
telekinesis, raise my hand.
 -- Kurt Vonnegut

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



Re: [PHP] Magento shopping cart

2010-02-01 Thread Skip Evans
I'm not totally opposed to using Magento, though I can see my 
comments, especially if it's what the client wants.


I have been looking over the site and it does have a lot of 
features so I can see it saving some serious time, especially 
given the extras he wants.


So Nathan, having used it, do you have any tips for a Magento 
newbie when it comes to integrating it with a custom site?


I haven't found any integration documentation for programmers yet.

Skip

Nathan Nobbe wrote:
On Mon, Feb 1, 2010 at 2:25 PM, Skip Evans s...@bigskypenguin.com 
mailto:s...@bigskypenguin.com wrote:


Ashley Sheridan wrote:

Why spend ages reinventing the wheel?


i whole heartedly agree.
 


I've come across so many clients using third party carts who have
been unhappy with the final results. I hear so often It does eighty
percent of what we need, but we do things like this [insert
idiosyncratic business practice here].


thats why a lot of the modern incarnations have embraced the concept of 
modularization, eg. plugins / skins etc. etc.


just look back a os-commerce / zen-cart; the notion of skins they had 
was horrific, basically since the ui was intertwined w/ logic, skins 
were tied to revs of the application - ouch!  the community has matured 
a lot since then from what i gather.
 


And then getting a third party cart to do what they wanted was often
either incredibly frustrating/time consuming, or often just not doable.


i think in most cases, anymore, youre mainly looking at ramp-up time on 
how to use / customize / extend an existing third party system.  while 
that can be sucky, you should really weigh the trade-off between that 
and getting beaten over the head w/ requests to develop the most common 
place look-and-feel customization crap / features.  ive started to lean 
towards the former in my personal career, having come from zealous 
devotion to the later in my initial years in the industry.
 


Yes, writing a cart takes time, but I've found I can whip them out
pretty easily, and I have a lot of code I reuse all the time. I
pretty much have a complete basic cart stored away, but I
intentionally keep its functionality to a minimum so that I can
expand on it to their specifications.


ok, well, when your custom cart has all the features of magento / [your 
fav e-commerce platform here] let me know.  ill have finished up the 
proprietary plugins that make my site unique and have forgotten pretty 
much everything about silly crap id never want to write - like custom 
look at feel, crm, reports etc etc.


o and also, when you have as many users / devs hitting your codebase as 
some of the popular platforms, im interested in hearing about that as 
well, lol.


-nathan


--

Skip Evans
PenguinSites.com, LLC
503 S Baldwin St, #1
Madison WI 53703
608.250.2720
http://penguinsites.com

Those of you who believe in
telekinesis, raise my hand.
 -- Kurt Vonnegut

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



Re: [PHP] SQL question

2010-01-27 Thread Skip Evans

Kim Madsen wrote:


But Skip, as the others say, use a date class, since you're passing a 
php var on to the SQL anyway, then you could determine the exact days 
from start to end of donation. Combine this with to_days and you have 
your solution




Yes, this sounds like the best way to go.

Thanks everyone!

Skip

--

Skip Evans
PenguinSites.com, LLC
503 S Baldwin St, #1
Madison WI 53703
608.250.2720
http://penguinsites.com

Those of you who believe in
telekinesis, raise my hand.
 -- Kurt Vonnegut

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



[PHP] Replacing accented characters?

2010-01-27 Thread Skip Evans

Hey all,

I'm looking for recommendations on how to replace accented 
characters, like e and u with those two little dots above 
them, with the regular e and u characters.


I'm finding some solutions via Google, but would like to hear 
from some of you to hear how you handle those situations.


Thanks,
Skip

--

Skip Evans
PenguinSites.com, LLC
503 S Baldwin St, #1
Madison WI 53703
608.250.2720
http://penguinsites.com

Those of you who believe in
telekinesis, raise my hand.
 -- Kurt Vonnegut

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



Re: [PHP] Replacing accented characters?

2010-01-27 Thread Skip Evans

Looks like strtr() is the way to go?

Skip

Skip Evans wrote:

Hey all,

I'm looking for recommendations on how to replace accented characters, 
like e and u with those two little dots above them, with the regular e 
and u characters.


I'm finding some solutions via Google, but would like to hear from some 
of you to hear how you handle those situations.


Thanks,
Skip



--

Skip Evans
PenguinSites.com, LLC
503 S Baldwin St, #1
Madison WI 53703
608.250.2720
http://penguinsites.com

Those of you who believe in
telekinesis, raise my hand.
 -- Kurt Vonnegut

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



[PHP] SQL question

2010-01-25 Thread Skip Evans

Hey all,

I have an SQL query that's stumping me.

I have two date variables, $start and $end that are in 
mm/dd/ format and two database fields, start_date and 
no_donations. The start date is mm/dd/ format and 
no_donations is an integer that represents the number of 
months from start_date that donations will be made.


So if start date is say 02/01/2010 and no_dations is 4 then 
donations will be made four times from the start date for four 
months.


What I need to do is come up with a query that will determine 
if the start_date + no_donations falls within $start and $end.


But I'm pretty stumped. How can I convert start_date + 
no_donations in the database to the date when the last 
donation will take place so I'll now if the donations fall 
between $start and $end?


Any suggestions would be very help and appreciated,
Skip

--

Skip Evans
PenguinSites.com, LLC
503 S Baldwin St, #1
Madison WI 53703
608.250.2720
http://penguinsites.com

Those of you who believe in
telekinesis, raise my hand.
 -- Kurt Vonnegut

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



[PHP] Subversion Ubuntu client

2010-01-22 Thread Skip Evans

Hey all,

Can anyone recommend a good Subversion client for Ubuntu?

Thanks,
Skip

--

Skip Evans
PenguinSites.com, LLC
503 S Baldwin St, #1
Madison WI 53703
608.250.2720
http://penguinsites.com

Those of you who believe in
telekinesis, raise my hand.
 -- Kurt Vonnegut

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



[PHP] Shipping calculator

2010-01-16 Thread Skip Evans

Hey all,

I've written a few shopping carts, but not one that calculated 
shipping charges. So I did a bit of Googling and found 
SONICODE that looks pretty good here.


http://www.sonicode.com/php_shipping_rates_calculator.php

It's a PHP library that handles the calls to the carries USPS, 
UPS and FedEx and then returns the shipping charges back to 
you. It's only 50 bucks and I figure for saving time writing 
the XML code, etc, this might be a good route for me to go.


It's a pretty big app so this is a small investment. Also 
comes with full source.


I'm wondering if anyone has used this one, or others and can 
toss out some opinions and thoughts to someone who hasn't done 
this before.


Thanks,
Skip

--

Skip Evans
PenguinSites.com, LLC
503 S Baldwin St, #1
Madison WI 53703
608.250.2720
http://penguinsites.com

Those of you who believe in
telekinesis, raise my hand.
 -- Kurt Vonnegut


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



[PHP] Passing HTML array index to JS?

2009-12-07 Thread Skip Evans

Hey all,

I have an HTML field like this

input type=text name=qty[] value=!!quantity!! size=4 
style=text-align: right; onblur=calculateBidUnit();


... and what I need to do is pass to the calculateBidUnit 
function the value of quantity, do a calculation on it and 
plug into this field.


input type=text name=bid_unit_value[] value= size=4

Which of course I know how to do for non-array values, but not 
sure how to get the values to do the calculation on the JS 
side if the fields are in an array.


Any help, as always, is greatly appreciated,
Skip

--

Skip Evans
PenguinSites.com, LLC
503 S Baldwin St, #1
Madison WI 53703
608.250.2720
http://penguinsites.com

Those of you who believe in
telekinesis, raise my hand.
 -- Kurt Vonnegut

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



Re: [PHP] Passing HTML array index to JS?

2009-12-07 Thread Skip Evans

Hey Philip,

But will that ID value identify the right member of each 
array? I thought about that but just assumed that it would not.


Skip

Philip Thompson wrote:

On Dec 7, 2009, at 5:02 PM, Skip Evans wrote:


Hey all,

I have an HTML field like this

input type=text name=qty[] value=!!quantity!! size=4 style=text-align: right; 
onblur=calculateBidUnit();

... and what I need to do is pass to the calculateBidUnit function the value of 
quantity, do a calculation on it and plug into this field.

input type=text name=bid_unit_value[] value= size=4

Which of course I know how to do for non-array values, but not sure how to get 
the values to do the calculation on the JS side if the fields are in an array.

Any help, as always, is greatly appreciated,
Skip


This question is probably more appropriate for a JS list... but I'm not mean, 
so I'll let you know. The easiest way would be to update the blur event qty 
input:

onblur=calculateBidUnit(this.value);

Now you have the value sent to that function. Another way would be to give your 
input and output an id each - let's say 'qty' and 'bid_unit_value', 
respectively. Then reference those ids in your function. This gives you the 
following:

input type=text name=qty[] value=!!quantity!! onblur=calculateBidUnit(); 
id=qty /
input type=text name=bid_unit_value[] value= id=bid_unit_value /

script type=text/javascript
function calculateBidUnit () {
var qty = document.getElementById('qty');
var buv = document.getElementById('bid_unit_value');
buv.value = qty.value;
}
/script

I'll give you a small warning. All browsers are not alike, so my recommendation 
would be to use a library that handles the cross-browser compatibility portion 
of javascript (I use Mootools). Nonetheless, the above *should* work. Learning 
the bare bones of javascript will help with the more complicated stuff and 
you'll be smarter for it! =P

Hope that helps,
~Philip


--

Skip Evans
PenguinSites.com, LLC
503 S Baldwin St, #1
Madison WI 53703
608.250.2720
http://penguinsites.com

Those of you who believe in
telekinesis, raise my hand.
 -- Kurt Vonnegut

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



Re: [PHP] Disabling button onclick in IE

2009-12-02 Thread Skip Evans

Yup. That was it. I found that Googling around as well.

Eesh.

Skip

Andrew Ballard wrote:

On Tue, Dec 1, 2009 at 4:06 PM, Skip Evans s...@bigskypenguin.com wrote:

Hey all,

You probably remember me asking about disabling a submit button when it is
clicked to prevent double clicks submitting  a form for CC processing.

I put the following code into the submit button and it works fine on
FireFox, but... hold your breath... not on IE.

The button gets disabled but the form just sits there, not submitting. At
first I just had

onclick=this.disabled=true;

and that worked in FF also, but not in IE. Then I added the

document.ticket_form.submit();

But even that doesn't work with IE.

Below is the whole snippet for the button.

input type=submit name=submit value=Purchase Ticket(s)
id=submit_tickets onclick=this.disabled=true;
document.ticket_form.submit();

Any suggestions would be greatly appreciated.



It looks like IE has an issue with your button being named submit,
and is replacing the submit() method of the form with the element
named submit. Try changing the name of the button.

Andrew




--

Skip Evans
PenguinSites.com, LLC
503 S Baldwin St, #1
Madison WI 53703
608.250.2720
http://penguinsites.com

Those of you who believe in
telekinesis, raise my hand.
 -- Kurt Vonnegut

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



Re: [PHP] Disabling button onclick in IE

2009-12-02 Thread Skip Evans

Hey all,

Tedd  Ash, yes, I'm definitely looking into solving it server 
side, but I need this quick fix while I come with a solution 
more along the lines of what you've both suggested.


Ash, how do you store the time stamp when the first request 
comes through? Do you use a session variable or something like 
that and when each request comes through compare the data with 
any previous request within the half second or so?


Skip

tedd wrote:

At 9:16 PM + 12/1/09, Ashley Sheridan wrote:

On Tue, 2009-12-01 at 15:06 -0600, Skip Evans wrote:
wow, i really think you're going about this all the wrong way.


Ash:

I thought the same thing considering that I went through the exact same 
problem and provided a solution, which he never mentioned.


Cheers,

tedd



--

Skip Evans
PenguinSites.com, LLC
503 S Baldwin St, #1
Madison WI 53703
608.250.2720
http://penguinsites.com

Those of you who believe in
telekinesis, raise my hand.
 -- Kurt Vonnegut

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



Re: [PHP] Disabling button onclick in IE

2009-12-02 Thread Skip Evans
Okay, I'll work on something along those lines. In the 
meantime, the JS will work better than nothing.


Thanks,
Skip

Ashley Sheridan wrote:


I'll tell you about the problem I had.

One site was offering up contact details for sale on a contract basis. 
The names were presented in a list of links, and clicking through 
purchased those details for a 24-hour period.


When a visitor clicked on a link, it added an entry into a database 
along with the current time. Because links are all GET data, the process 
was performed twice by some browsers. Each time a details page was 
displayed it checked to see if these details were requested by the same 
user (using the login details) within a certain time period. If no 
record was found, then a new purchase entry was made.


You could use this sort of thing on your own system as a general idea.

Thanks,
Ash
http://www.ashleysheridan.co.uk




--

Skip Evans
PenguinSites.com, LLC
503 S Baldwin St, #1
Madison WI 53703
608.250.2720
http://penguinsites.com

Those of you who believe in
telekinesis, raise my hand.
 -- Kurt Vonnegut

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



[PHP] Powerpoint from PHP?

2009-12-02 Thread Skip Evans

Hey all,

I have a client who creates PowerPoint presentations to sell 
their clients on projects. What he would like his site to do 
is allow his clients to arrange their own PP presentations 
from an existing collection of slides with images, but then 
add their own text.


So the problem I need to solve is to take a set of PP slides 
with images, and then insert text into each one below the 
image and then assemble a .ppt file consisting of the selected 
slides.


I'm Googling around now for a solution, but if anyone has 
tackled this before and can point me in a productive direction 
heaps of praise will be orated at my next heap praise on 
people party.


...in other words, thanks,
Skip

--

Skip Evans
PenguinSites.com, LLC
503 S Baldwin St, #1
Madison WI 53703
608.250.2720
http://penguinsites.com

Those of you who believe in
telekinesis, raise my hand.
 -- Kurt Vonnegut

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



Re: [PHP] Powerpoint from PHP?

2009-12-02 Thread Skip Evans
Yeah, from Googling around I'm getting the impression there is 
not a PHP library capable of doing this. I guess the next best 
thing we can do is just let them download files with 
collections of slides and create the presentation themselves.


Skip

Ashley Sheridan wrote:


I don't think that's possible. You could look at the Microsoft XML 
formats to see if you can take that apart, but it would be tricky. It 
might be far easier to do it with the Open Office presentation format, 
but again, I don't know of any libraries that are capable of doing this.


Thanks,
Ash
http://www.ashleysheridan.co.uk




--

Skip Evans
PenguinSites.com, LLC
503 S Baldwin St, #1
Madison WI 53703
608.250.2720
http://penguinsites.com

Those of you who believe in
telekinesis, raise my hand.
 -- Kurt Vonnegut

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



Re: [PHP] Powerpoint from PHP?

2009-12-02 Thread Skip Evans
I wonder what other alternatives to PP might exist for a 
possible solution to this. I don't know squat about Flash, but 
 the client is not married to PP, just needs some kind of 
presentation the side can assemble, again basically put images 
and text into something that can be displayed to potential 
clients.


The OpenOffice API suggestion from Leonard sounds a bit 
intriguing but the client doesn't have a huge budget for me to 
spend a lot of time experimenting.


I'm wondering what can be done with images and either 
ImageMagick or perhaps GD and then something.


Skip

Ashley Sheridan wrote:

On Wed, 2009-12-02 at 11:41 -0500, Ryan Sun wrote:


php on windows server may have the capability...

On Wed, Dec 2, 2009 at 11:30 AM, Skip Evans s...@bigskypenguin.com wrote:


Yeah, from Googling around I'm getting the impression there is not a PHP
library capable of doing this. I guess the next best thing we can do is just
let them download files with collections of slides and create the
presentation themselves.

Skip


Ashley Sheridan wrote:


I don't think that's possible. You could look at the Microsoft XML formats
to see if you can take that apart, but it would be tricky. It might be far
easier to do it with the Open Office presentation format, but again, I don't
know of any libraries that are capable of doing this.

Thanks,
Ash
http://www.ashleysheridan.co.uk




--

Skip Evans
PenguinSites.com, LLC
503 S Baldwin St, #1
Madison WI 53703
608.250.2720
http://penguinsites.com

Those of you who believe in
telekinesis, raise my hand.
 -- Kurt Vonnegut

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





I think for COM stuff to work, you'd have to have MS Office installed on
the server. I wouldn't recommend that to anyone; that would be just
another way into the server should someone wish it. Windows and MS
Office are just about the most popular bits of software around, and
Windows is inherently insecure, such that I'd be unsurprised if their
Office software was as insecure.

Thanks,
Ash
http://www.ashleysheridan.co.uk





--

Skip Evans
PenguinSites.com, LLC
503 S Baldwin St, #1
Madison WI 53703
608.250.2720
http://penguinsites.com

Those of you who believe in
telekinesis, raise my hand.
 -- Kurt Vonnegut

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



Re: [PHP] Powerpoint from PHP?

2009-12-02 Thread Skip Evans

Shawn McKenzie wrote:

1. If they're not married to PP, why not just use HTML?  You can do all
of the same things on your own in PHP/HTML.  Also, this looks pretty
cool: http://meyerweb.com/eric/tools/s5/



Bingo. That's what I'm going to propose. I can do a nice 
slide-like presentation in HTML the people can just log onto 
the web site to view.


Thanks all!

Skip

--

Skip Evans
PenguinSites.com, LLC
503 S Baldwin St, #1
Madison WI 53703
608.250.2720
http://penguinsites.com

Those of you who believe in
telekinesis, raise my hand.
 -- Kurt Vonnegut

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



[PHP] Disabling button onclick in IE

2009-12-01 Thread Skip Evans

Hey all,

You probably remember me asking about disabling a submit 
button when it is clicked to prevent double clicks submitting 
 a form for CC processing.


I put the following code into the submit button and it works 
fine on FireFox, but... hold your breath... not on IE.


The button gets disabled but the form just sits there, not 
submitting. At first I just had


onclick=this.disabled=true;

and that worked in FF also, but not in IE. Then I added the

document.ticket_form.submit();

But even that doesn't work with IE.

Below is the whole snippet for the button.

input type=submit name=submit value=Purchase Ticket(s) 
id=submit_tickets onclick=this.disabled=true; 
document.ticket_form.submit();


Any suggestions would be greatly appreciated.

Thanks,
Skip

--

Skip Evans
PenguinSites.com, LLC
503 S Baldwin St, #1
Madison WI 53703
608.250.2720
http://penguinsites.com

Those of you who believe in
telekinesis, raise my hand.
 -- Kurt Vonnegut




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



[PHP] Wiki recommendation?

2009-11-25 Thread Skip Evans

Hey all,

I'm looking for a good Wiki to maintain documentation on a 
large commercial web site that is always growing.


DokuWiki is the only one I've installed and used at any 
length, so before I just use that one again I'd like to hear 
from the peanut gallery what other suggestions you'd have.


Remember, this will be for end user documentation for a large 
commercial CMS type system, something site admins will go to 
for information on site features, updates, etc.


Let the shouting begin!

Thanks, all, and a very happy eating-charred-dead-bird-flesh 
day to you all!!!


Skip

--

Skip Evans
PenguinSites.com, LLC
503 S Baldwin St, #1
Madison WI 53703
608.250.2720
http://penguinsites.com

Those of you who believe in
telekinesis, raise my hand.
 -- Kurt Vonnegut

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



[PHP] Recognizing double clicks

2009-11-21 Thread Skip Evans

Hey all,

Every site I've ever stuck a credit card into said only click 
 once I just this requirement from a client.


a.System should recognize a duplicated click, so the message 
in red “only click once” should be unnecessary.


Is this doable???

Has anyone on the list ever done this???
--

Skip Evans
PenguinSites.com, LLC
503 S Baldwin St, #1
Madison WI 53703
608.250.2720
http://penguinsites.com

Those of you who believe in
telekinesis, raise my hand.
 -- Kurt Vonnegut

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



Re: [PHP] Recognizing double clicks

2009-11-21 Thread Skip Evans
It just dawned on me the button may be disabled right when 
it's clicked to prevent a double submit?


Is that doable?

Skip

Skip Evans wrote:

Hey all,

Every site I've ever stuck a credit card into said only click 
 once I just this requirement from a client.


a.System should recognize a duplicated click, so the message in red 
“only click once” should be unnecessary.


Is this doable???

Has anyone on the list ever done this???


--

Skip Evans
PenguinSites.com, LLC
503 S Baldwin St, #1
Madison WI 53703
608.250.2720
http://penguinsites.com

Those of you who believe in
telekinesis, raise my hand.
 -- Kurt Vonnegut

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



[PHP] Re: Netbeans IDE 6.5

2009-10-28 Thread Skip Evans

Hey,

No import button in NetBeans 6.5 on Ubuntu.

Skip

Tom Calpin wrote:

If you go ToolsOptions Keymap tab, you can click the 'Import' button at
the bottom. It just imports the zip file.
I'm new to Netbeans myself and decided to install this colour scheme,
however I can't get it to display correctly.


I'm also missing word wrap and a more simple one-click FTP upload interface,
so I'm still in half a mind as to whether I abandon NuSphere (which we sort
of grew up with) just yet.
Unless anyone out there knows any plugins that add the functionality to
Netbeans?



-Original Message-
From: Skip Evans [mailto:s...@bigskypenguin.com] 
Sent: 28 October 2009 00:50

To: php-general@lists.php.net
Subject: Netbeans IDE 6.5

Hey all,

I just downloaded the Netbeans 6.5 IDE to use as a code 
editor, installed the PHP plugin for syntax highlighting and 
it didn't look so good, so I find on the forum a guy who has 
made a collection of files, starting in a directory called 
config, that will apparently change the highlighting more in 
line to what I'm used to.


But he gave no instructions how this is to be installed and I 
can't find anywhere in the documentation how to install this 
stuff.


Any Netbeaners out there know how to install syntax 
highlighting stuff?


I found it here.

http://forums.netbeans.org/post-46850.html

Downloaded and unzipped the archive and then I stopped like 
the robot on Lost in Space when they pulled out his power pack.


Any help would be great!

Thanks,
Skip


--

Skip Evans
PenguinSites.com, LLC
503 S Baldwin St, #1
Madison WI 53703
608.250.2720
http://penguinsites.com

Those of you who believe in
telekinesis, raise my hand.
 -- Kurt Vonnegut

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



[PHP] Apache file order

2009-10-28 Thread Skip Evans

Hey all,

I modified an Apache config file to list the HTML file first, 
after the PHP file, it still pulls up the PHP file first.


Is there another setting in Apache I should be looking for?

I need it to check for the HTML file first.

Thanks,
Skip

IfModule dir_module
DirectoryIndex index.html index.php
/IfModule


--

Skip Evans
PenguinSites.com, LLC
503 S Baldwin St, #1
Madison WI 53703
608.250.2720
http://penguinsites.com

Those of you who believe in
telekinesis, raise my hand.
 -- Kurt Vonnegut

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



Re: [PHP] Netbeans IDE 6.5

2009-10-28 Thread Skip Evans

Bob McConnell wrote:


Three questions.

1. Why did you install an obsolete version? 6.7.1 is current and 6.8 is
now in beta.


Because that what Ubuntu installs with apt-get install 
netbeans and I like to stick with Ubuntu tested stuff.




2. You just asked this question on the NetBeans mailing list, which is
more likely to result in a useable answer. Can't you wait for them?


No.



3. Did you try reading the help section on Configuring IDE Settings?


Yes.



Once again you forgot to include that you installed this on Ubuntu.



You mean people still use Windows? Talk about obsolete!

--

Skip Evans
PenguinSites.com, LLC
503 S Baldwin St, #1
Madison WI 53703
608.250.2720
http://penguinsites.com

Those of you who believe in
telekinesis, raise my hand.
 -- Kurt Vonnegut

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



Re: [PHP] Netbeans IDE 6.5

2009-10-28 Thread Skip Evans

Greg Maruszeczka wrote:

Download NB 6.7.1 (or even better, 6.8 Beta which looks pretty good to
me), run the install script and you're done. It's built-in updater will
handle the rest. Then if you're still feeling antsy about the choice of
syntax colors you can choose any of five different theme profiles under
Tools-Options-FontsColors or customize any one of them to your
heart's content.



I took Greg's advice and downloaded 6.7.1, installed no 
problem, and now there is an import button, but when I try to 
import the new style from the NetBeans Forum it doesn't have 
any affect.


So, taking Greg's advice again I'll restyle it myself.

Now, if I can just get rid of that red line at the 80 column 
mark. I haven't bothered with 80 columns since I wrote 
assembly on a terminal connected to a PDP-11 in college.


Skip

Thanks,
Skip
--

Skip Evans
PenguinSites.com, LLC
503 S Baldwin St, #1
Madison WI 53703
608.250.2720
http://penguinsites.com

Those of you who believe in
telekinesis, raise my hand.
 -- Kurt Vonnegut

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



[PHP] Netbeans IDE 6.5

2009-10-27 Thread Skip Evans

Hey all,

I just downloaded the Netbeans 6.5 IDE to use as a code 
editor, installed the PHP plugin for syntax highlighting and 
it didn't look so good, so I find on the forum a guy who has 
made a collection of files, starting in a directory called 
config, that will apparently change the highlighting more in 
line to what I'm used to.


But he gave no instructions how this is to be installed and I 
can't find anywhere in the documentation how to install this 
stuff.


Any Netbeaners out there know how to install syntax 
highlighting stuff?


I found it here.

http://forums.netbeans.org/post-46850.html

Downloaded and unzipped the archive and then I stopped like 
the robot on Lost in Space when they pulled out his power pack.


Any help would be great!

Thanks,
Skip
--

Skip Evans
PenguinSites.com, LLC
503 S Baldwin St, #1
Madison WI 53703
608.250.2720
http://penguinsites.com

Those of you who believe in
telekinesis, raise my hand.
 -- Kurt Vonnegut

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



[PHP] Little perl help?

2009-09-09 Thread Skip Evans

Hey all,

I know this is a PHP list, but I could use a bit of Perl help, 
a language which just does not fit in my C/C++/Java/PHP 
trained brain.


A directory is created with the following:

mkdir($img_dir,$CHMOD_ON_FOLDER_CREATE);

I need to replace spaces with the underscore character so the 
directory name contains no spaces, so I tried preceding it with


$img_dir =~ s/ /_/g;

Which did nothing.

Can someone help here?

Much thanks,
Skip

--

Skip Evans
Big Sky Penguin, LLC
503 S Baldwin St, #1
Madison WI 53703
608.250.2720
http://bigskypenguin.com

Those of you who believe in
telekinesis, raise my hand.
 -- Kurt Vonnegut

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



[PHP] Re: [SPAM] [PHP] Little perl help?

2009-09-09 Thread Skip Evans
My Bad. It looks like I had some code in the wrong place. Will 
try again.


Skip

m...@elysianfieldssoftware.com wrote:

Skip,

That *should* work.  The below works on my Linux box.

$img_dir=This is an dir name with spaces;
$img_dir =~ s/ /_/g;
printf(%s\n,$img_dir);
mkdir($img_dir,$CHMOD_ON_FOLDER_CREATE);

Is there something else you're not posting, or maybe I'm not understanding?

Always glad to help a fellow cheesehead.

Regards,

Matt Flaig
Elysian Fields Software, L.L.C.


 Original Message 
Subject: [SPAM] [PHP] Little perl help?
From: Skip Evans s...@bigskypenguin.com
Date: Wed, September 09, 2009 3:35 pm
To: php-general@lists.php.net php-general@lists.php.net

Hey all,

I know this is a PHP list, but I could use a bit of Perl help,
a language which just does not fit in my C/C++/Java/PHP
trained brain.

A directory is created with the following:

mkdir($img_dir,$CHMOD_ON_FOLDER_CREATE);

I need to replace spaces with the underscore character so the
directory name contains no spaces, so I tried preceding it with

$img_dir =~ s/ /_/g;

Which did nothing.

Can someone help here?

Much thanks,
Skip

-- 


Skip Evans
Big Sky Penguin, LLC
503 S Baldwin St, #1
Madison WI 53703
608.250.2720
http://bigskypenguin.com

Those of you who believe in
telekinesis, raise my hand.
-- Kurt Vonnegut

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

To unsubscribe, visit: http://www.php.net/unsub.php



--

Skip Evans
Big Sky Penguin, LLC
503 S Baldwin St, #1
Madison WI 53703
608.250.2720
http://bigskypenguin.com

Those of you who believe in
telekinesis, raise my hand.
 -- Kurt Vonnegut

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



Re: [PHP] Displaying image paths with spaces

2009-09-07 Thread Skip Evans

Ashley Sheridan wrote:


How are you outputting those URLs? PHP won't just automatically converty
'%20' to a '\ '.

What is the raw URL format you're getting from FCKEditor?

Thanks,
Ash
http://www.ashleysheridan.co.uk



The raw code in the FCKeditor looks like this:

src=/clients/client_118/images//Event%20images/Show%20ads/catspaw1compressed.jpg

(withing an img... tag of course)

But when the page displays and the images do not appear, 
viewing the image's properties shows this: (Notice the %5C). 
That %5C is what I think is being converted to a slash. Why it 
shows up is baffling me.


http://penguinsites.com/clients/client_118/images//Event%5C%20images/Show%5C%20ads/catspaw1compressed.jpg

I simply output the code from the FCKeditor with a plain echo 
to the browser.


But then if I right-click the image to view it, that's when I 
see this


The requested URL /clients/client_118/images//Event\ 
images/Show\ ads/catspaw1compressed.jpg was not found on this 
server.


So it seems it's not preserving the %20 as coded spaces, and 
also converting that %5C to a slash!


Wh

Thanks,
Skip

--

Skip Evans
Big Sky Penguin, LLC
503 S Baldwin St, #1
Madison WI 53703
608.250.2720
http://bigskypenguin.com

Those of you who believe in
telekinesis, raise my hand.
 -- Kurt Vonnegut

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



Re: [PHP] Displaying image paths with spaces

2009-09-07 Thread Skip Evans

HallMarc Websites wrote:
Actually, %5C is a \ character, % is %25 
Why it is adding a character that is used in local address strings is

baffling and I think a clue as to what is going on. Is it possible it is
mashing a local file address into a web address? 


Aha! I think that might be it. In the database it is stored as

src=/clients/client_118/images//Event%20images/Show%20ads/catspaw1compressed.jpg

But somehow it is converting this to a local file address 
before it is displayed.




BTW, IMHO using spaces in folder and/or file names is bad practice and
should be avoided.


I totally agree and the code I write I always replace user's 
spaces with '_' characters, but this is FCKeditor's directory 
creation code.


Maybe I should look into modifying it to do the same. I 
actually have already modified FCK to store images in client 
specific directories and found the code to be pretty well 
written so maybe I need to do the same and solve the problem 
that way.


I'll check that out.

Thanks Ash and Marc for the input. I think we're on the right 
path ;)


Skip

--

Skip Evans
Big Sky Penguin, LLC
503 S Baldwin St, #1
Madison WI 53703
608.250.2720
http://bigskypenguin.com

Those of you who believe in
telekinesis, raise my hand.
 -- Kurt Vonnegut

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



[PHP] Displaying image paths with spaces

2009-09-06 Thread Skip Evans

Hey all,

I have a CMS system that uses the FCKeditor to allow users to 
create directories in which to store images. FCK allows users 
to create directories with spaces in them, and it's pretty 
deep in the JavaScript code so modifying that is not a simple 
option, so at this point I'm trying to work from the 
assumption that the users will continue to be allowed to 
create directory names with spaces.


All that said, the CMS outputs data in two ways. I'll start 
with the second method because it works and then move on to 
the problem.


What the user has created in the FCKeditor is a path to an 
image that appears like this:


src=/clients/client_118/images//Event%20images/Show%20ads/catspaw1compressed.jpg

Notice the '%20' codes for the spaces in the directory names 
like 'Event images' and 'Show ads'.


The first way the code is displayed is with an AJAX call. It's 
read on the PHP side, echo'd back out to the JavaScript code 
and inserted into an ID with an innerHTML assignment. This 
method works.


The first way the code is loaded is pure PHP. It's read from 
the database just as it appears above and then echo'd back to 
the browser. However, in the browser it appears like this:


/clients/client_118/images//Event\ images/Show\ 
ads/catspaw1compressed.jpg


And of course the browser can't display the image with those 
'\ ' combinations.


So my task is to get it to display the image properly on the 
pure PHP side the same way it does via the AJAX call.


I should also say that the code the image path resides in 
contains a text, etc, so it's a block of content, containing 
both text and image paths.


Is there a way to read and echo this on the PHP side and 
preserve a properly displayable path like the AJAX call, but 
that also won't interfere with the rest of the HTML and text 
code contained within the block of content?


I'm stumped on this one, so any help would be greatly, 
wonderfully, blissfully even... appreciated.


Thanks,
Skip
--

Skip Evans
Big Sky Penguin, LLC
503 S Baldwin St, #1
Madison WI 53703
608.250.2720
http://bigskypenguin.com

Those of you who believe in
telekinesis, raise my hand.
 -- Kurt Vonnegut

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



[PHP] Sending email w/ attachments

2009-08-10 Thread Skip Evans

Hey all,

Trying to send emails with attachments, first try at this. And 
am trying to adapt sample code I found here:


http://www.webcheatsheet.com/PHP/send_email_text_html_attachment.php

Trying this:

($data contains the contents of the file; I've verified this)

$hash = md5(date('r', time()));
$attachment = chunk_split(base64_encode($data));
$body_attachment = --PHP-mixed-$hash--\n .
Content-Type: application/octet-stream; name=\$filename\\r\n .
Content-Transfer-Encoding: base64\n .
Content-Disposition: attachment\n.
$attachment . \n .
--PHP-mixed-$hash--\n;

I then append $attachment this to the end of the email body 
and send it on. I've verified it is reading the file properly, 
in this test case it is a place text file. But I've tried a 
PDF and that did not work as well.


What happens is the email comes through and shows an 
attachment paper clip icon in Thunderbird, but when the email 
is clicked on the icon disappears and the email is empty, even 
the body is not there and no attachment either.


A final question I have is does the content-type value need to 
change for text files, Word Docs, PDFs, Excel files, etc, or 
is there one type that can handle any file type?


Any help would be great. I'm rather stuck and floundering here.

Thanks,
Skip

--

Skip Evans
Big Sky Penguin, LLC
503 S Baldwin St, #1
Madison WI 53703
608.250.2720
http://bigskypenguin.com

Those of you who believe in
telekinesis, raise my hand.
 -- Kurt Vonnegut

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



Re: [PHP] Sending email w/ attachments

2009-08-10 Thread Skip Evans

Bastien Koert wrote:


Use PHPMailer or one of the other classes available...makes life
so much easier



eric cartman
Kick Ass!!!
/eric cartman

Yes! Wow! Was that a breeze! That class rocks!

Thanks tons, Bastien!

I have to admit when I first saw your reply I thought, Oh, 
man, another class to learn? But I know this is so close to 
working.


I look at the sample and thought, This looks easy, and had 
it working in no time.


Big thanks again!

Attachments were a big deal here and this makes it a breeze, 
AND it looks like multiple attachments would be no problem?


Very cool!

Skip

--

Skip Evans
Big Sky Penguin, LLC
503 S Baldwin St, #1
Madison WI 53703
608.250.2720
http://bigskypenguin.com

Those of you who believe in
telekinesis, raise my hand.
 -- Kurt Vonnegut

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



Re: [PHP] Asterisk anyone?

2009-07-30 Thread Skip Evans
I'm looking at this page now that shows working with the 
database through socket type stuff, but now the ball is in the 
client's court what they want to do. Not sure, so I'm just 
reading up.


http://www.voip-info.org/tiki-index.php?page=Web+based+Asterisk+Database+maintenance

But thanks all for the pointers. It has been helpful. I've 
looked up Trixbox, thanks.


Skip

--

Skip Evans
Big Sky Penguin, LLC
503 S Baldwin St, #1
Madison WI 53703
608.250.2720
http://bigskypenguin.com

Those of you who believe in
telekinesis, raise my hand.
 -- Kurt Vonnegut

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



[PHP] Formatting plain text file

2009-07-30 Thread Skip Evans

Hey all,

Am I brain fading or what? I'm so used to formatting text in 
tables for HTML display I can't think of how to do it for a 
plain text file.


I just need to create a columned table of names and addresses 
type stuff... sprintf?

--

Skip Evans
Big Sky Penguin, LLC
503 S Baldwin St, #1
Madison WI 53703
608.250.2720
http://bigskypenguin.com

Those of you who believe in
telekinesis, raise my hand.
 -- Kurt Vonnegut

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



Re: [PHP] Formatting plain text file

2009-07-30 Thread Skip Evans

Jim Lucas wrote:

Skip Evans wrote:

Hey all,

Am I brain fading or what? I'm so used to formatting text in tables for
HTML display I can't think of how to do it for a plain text file.

I just need to create a columned table of names and addresses type
stuff... sprintf?


or a little str_pad on each variable...



Sure, that will do it. But isn't there some way to construct 
formatted tables similar to HTML?



--

Skip Evans
Big Sky Penguin, LLC
503 S Baldwin St, #1
Madison WI 53703
608.250.2720
http://bigskypenguin.com

Those of you who believe in
telekinesis, raise my hand.
 -- Kurt Vonnegut

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



[PHP] Asterisk anyone?

2009-07-29 Thread Skip Evans

Hey,

I've been asked to write a simple couple of public pages that 
would let an Asterisk customer modify their account 
configuration, but the client has no idea how Asterisk stores 
its data, apparently not in MySQL.


Anyone know of any resources for accessing Asterisk from PHP?

If anyone has done this can you tell me if I'm on the right 
track here?


http://www.voip-info.org/wiki/view/Asterisk+AGI+php#PHPTipsandExamples

--

Skip Evans
Big Sky Penguin, LLC
503 S Baldwin St, #1
Madison WI 53703
608.250.2720
http://bigskypenguin.com

Those of you who believe in
telekinesis, raise my hand.
 -- Kurt Vonnegut

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



Re: [PHP] Asterisk anyone?

2009-07-29 Thread Skip Evans

Per Jessen wrote:

Depends on which data we're talking about.  Asterisk is very flexible.



For example, the first screen they want people to be able to 
change data on is:


call waiting,do not disturb
and then it looks like numbers (forwarding?)
unconditional,unavailable,busy

I'm trying to figure out now are these values stored in a 
regular relational database like MySQL.


But so far the documentation I see is really all about how to 
handle calls, not manage customer data.


--

Skip Evans
Big Sky Penguin, LLC
503 S Baldwin St, #1
Madison WI 53703
608.250.2720
http://bigskypenguin.com

Those of you who believe in
telekinesis, raise my hand.
 -- Kurt Vonnegut

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



Re: [PHP] JS alert that links to a file

2009-07-27 Thread Skip Evans

Hey all,

With LinuxMan's help I got this working. It was a bit tricky 
as it's an AJAX environment, but what I did was create a 
separate page with code similar to what he has below and then 
call it from the JS side and it works great.


Thanks all, and especially LinuxManMikeC for the key!

Skip

Skip Evans wrote:

LinuxManMikeC wrote:


?php
header('Content-type: text/csv');
header('Content-Disposition: attachment; filename=file.csv');
echo 'field1,field2,field3,field4';
?



Okay, right, I remember this.

But it has to be in it's own file, otherwise you get the 'headers 
already sent error', right?


Is there any way around that? Any way to get it right at the end of 
where the file is created???


Thanks!
Skip



--

Skip Evans
Big Sky Penguin, LLC
503 S Baldwin St, #1
Madison WI 53703
608.250.2720
http://bigskypenguin.com

Those of you who believe in
telekinesis, raise my hand.
 -- Kurt Vonnegut

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



[PHP] JS alert that links to a file

2009-07-26 Thread Skip Evans

Okay, I know I've done this before, but now I'm blanking out.

I have code that creates a CSV file, and when it's done I want 
a JS alert to pop up and let them save the file.


Isn't this some kind of alert() type call on the JS side???

I know I've done this before and I've been on Google an hour now!

--

Skip Evans
Big Sky Penguin, LLC
503 S Baldwin St, #1
Madison WI 53703
608.250.2720
http://bigskypenguin.com

Those of you who believe in
telekinesis, raise my hand.
 -- Kurt Vonnegut

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



[PHP] Saving server side file to local machine with JS

2009-07-26 Thread Skip Evans

Sorry, I should have been clearer.

When PHP finishes creating the file I need one of the JS alert 
type windows to appear that says..


Your file has completed, would you like to save it to your 
machine?


Like you get when you download a file.

If I knew the JS code to do this I perhaps could embed it in 
the PHP at the end of the function that creates the file???


Is that clearer?

Thanks,
Skip


Paul M Foster wrote:
 On Sun, Jul 26, 2009 at 09:55:14PM -0500, Skip Evans wrote:

 Okay, I know I've done this before, but now I'm blanking out.

 I have code that creates a CSV file, and when it's done I want
 a JS alert to pop up and let them save the file.

 Isn't this some kind of alert() type call on the JS side???

 I know I've done this before and I've been on Google an 
hour now!


 Not sure I understand your question, but there is a 
function called
 alert() in javascript. It opens a window with your error 
message in it.


 I don't know of a way to trigger this from PHP, since PHP 
is server-side
 and Javascript is client-side. You might be able to have 
javascript scan
 for the existence/closing of the file in question and then 
alert the
 user. Or you could have PHP, when the file is complete, 
launch a new

 page which contains the javascript code to alert the user.

 Paul


--

Skip Evans
Big Sky Penguin, LLC
503 S Baldwin St, #1
Madison WI 53703
608.250.2720
http://bigskypenguin.com

Those of you who believe in
telekinesis, raise my hand.
 -- Kurt Vonnegut

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



Re: [PHP] JS alert that links to a file

2009-07-26 Thread Skip Evans

LinuxManMikeC wrote:


?php
header('Content-type: text/csv');
header('Content-Disposition: attachment; filename=file.csv');
echo 'field1,field2,field3,field4';
?



Okay, right, I remember this.

But it has to be in it's own file, otherwise you get the 
'headers already sent error', right?


Is there any way around that? Any way to get it right at the 
end of where the file is created???


Thanks!
Skip

--

Skip Evans
Big Sky Penguin, LLC
503 S Baldwin St, #1
Madison WI 53703
608.250.2720
http://bigskypenguin.com

Those of you who believe in
telekinesis, raise my hand.
 -- Kurt Vonnegut

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



[PHP] Language translation

2009-07-25 Thread Skip Evans

Hey all,

We got a new project and language translation of content is a 
major priority. I've googled around and seen lots of options, 
but I'd like to hear from the list about more real world 
experiences about what some of you found and what both you as 
a coder and the client were most satisfied with.


Big Hugs,
Skip

--

Skip Evans
Big Sky Penguin, LLC
503 S Baldwin St, #1
Madison WI 53703
608.250.2720
http://bigskypenguin.com

Those of you who believe in
telekinesis, raise my hand.
 -- Kurt Vonnegut

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



Re: [PHP] PEAR Spreadsheet_Excel_Writer setLocked method

2009-06-19 Thread Skip Evans

Thodoris wrote:
I've used it for some time but never needed to lock a cell. Here is a 
piece of code that shows how to apply a format to a cell:

  Hope it helps. I think that by doing something like this:


$format_bold-setLocked();

while creating the format could do the trick but it is not tested.



No, this didn't do it. I already have some formats I've 
created for dollar amounts, right align, etc, and applying the 
setLocked() method to them had no affect.


Skip

--

Skip Evans
Big Sky Penguin, LLC
503 S Baldwin St, #1
Madison WI 53703
608.250.2720
http://bigskypenguin.com

Those of you who believe in
telekinesis, raise my hand.
 -- Kurt Vonnegut

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



[PHP] PEAR Spreadsheet_Excel_Writer setLocked method

2009-06-18 Thread Skip Evans

Hey all,

Any one use the PEAR Spreadsheet_Excel_Writer package?

I need to know how to implement the setLocked method to lock 
out a cell, but can't figure out how this would be done.


Do you add it as a format? But then how is it applied to a 
cell. It's not documented on the PEAR pages.


Any help as always is greatly appreciated.

Also, what about making a cell span more than one cell below 
and above it? I can't find a way to do this either.


Thanks,
Skip


--

Skip Evans
Big Sky Penguin, LLC
503 S Baldwin St, #1
Madison WI 53703
608.250.2720
http://bigskypenguin.com

Those of you who believe in
telekinesis, raise my hand.
 -- Kurt Vonnegut

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



Re: [PHP] aesthetic beauty in conception, execution

2009-06-18 Thread Skip Evans

Okay, had to chime in here...

Jesus Christ, Vampire Hunter

See the trailer here

http://www.youtube.com/watch?v=4LRIypcaIX4

Skip

Bastien Koert wrote:

On Thu, Jun 18, 2009 at 1:34 PM, teddtedd.sperl...@gmail.com wrote:

At 1:16 PM -0400 6/18/09, Paul M Foster wrote:

On Thu, Jun 18, 2009 at 12:39:35PM -0400, PJ wrote:

snip


 American movies, for the most part and what goes with them, are
 pollution of the senses. My take, of course. ;-) :-P

Clear proof you are insane. The Matrix. Alien. Terminator. Star Wars.
Star Trek II: The Wrath of Khan. Cannibal Women in the Avacado Jungle of
Death.

And don't forget my favorite Queen of Outer Space staring Zsa Zsa Gabore
and a bunch of her friends -- real camp.

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





Jane Fonda as Barbarella remains a cult classic though ;-P


--

Skip Evans
Big Sky Penguin, LLC
503 S Baldwin St, #1
Madison WI 53703
608.250.2720
http://bigskypenguin.com

Those of you who believe in
telekinesis, raise my hand.
 -- Kurt Vonnegut

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



[PHP] Cross site scripting

2009-06-09 Thread Skip Evans

Hey all,

You may have seen my earlier message about a current client 
whose site I've taken over maintenance on that is trying to 
get PCI Compliance from Security Metrics. I've put all the 
forms behind https and a couple of other things, but this one 
I don't know how to solve. I'll read up on cross site 
scripting, but could someone help me understand what they 
believe the vulnerability is in their notes below?


Thanks,
Skip

Possible cross site scripting on 
http://www.ranghart.com/index.php


Use the following commands to verify this: wp --inject

http://www.ranghart.com/index.php?action=searchkw=SEARCH%22%3E%3Cscript%3Ealert%28123%29%3C%
TCP http/https 4
 curl -L

http://www.ranghart.com/index.php?action=searchkw=SEARCH%22%3E%3Cscript%3Ealert%28123%29%3C%
 grep 123 This website may have other 
injection related vulnerabilities.


--

Skip Evans
Big Sky Penguin, LLC
503 S Baldwin St, #1
Madison WI 53703
608.250.2720
http://bigskypenguin.com

Those of you who believe in
telekinesis, raise my hand.
 -- Kurt Vonnegut

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



[PHP] Automated form generation?

2009-06-08 Thread Skip Evans

Hey guys  gals  all ships at sea,

We've been approached by a central office of a relatively 
large religious denomination that collects data from their 
member churches in the form of an 11 page questionnaire with a 
diverse set of questions ranging from multiple choice, essay 
type, to financial statements.


It's currently all hand filled out and then hand typed in to a 
MS Access database (shudder...).


They want to webify it so I'm wondering if anyone has any 
recommendations on PHP based form generation tools that would 
speed up the process of form creation and perhaps even the 
inserts into MySQL.


So far I'm looking at phpFormGenerator here

http://phpformgen.sourceforge.net/

But it says beta which gives me some small pause, and I'm 
actively browsing for others.


Any experience or advice others have here would be greatly 
appreciated.


Any CMS out there that might have a tool for this that would 
be quick to install and get up and going? Codeigniter have 
one, any others???


Much thanks,

Skip
--

Skip Evans
Big Sky Penguin, LLC
503 S Baldwin St, #1
Madison WI 53703
608.250.2720
http://bigskypenguin.com

Those of you who believe in
telekinesis, raise my hand.
 -- Kurt Vonnegut

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



[PHP] Re: Automated form generation?

2009-06-08 Thread Skip Evans

Hey all,

I've read through the cakePHP docs for a potential project 
once and thought it looked pretty well put together, and liked 
it, but didn't get any hands on with it.


Sounds promising...

...any other comments on Cake for this solution?

Skip

Shawn McKenzie wrote:

Skip Evans wrote:

Hey guys  gals  all ships at sea,

We've been approached by a central office of a relatively large
religious denomination that collects data from their member churches in
the form of an 11 page questionnaire with a diverse set of questions
ranging from multiple choice, essay type, to financial statements.

It's currently all hand filled out and then hand typed in to a MS Access
database (shudder...).

They want to webify it so I'm wondering if anyone has any
recommendations on PHP based form generation tools that would speed up
the process of form creation and perhaps even the inserts into MySQL.

So far I'm looking at phpFormGenerator here

http://phpformgen.sourceforge.net/

But it says beta which gives me some small pause, and I'm actively
browsing for others.

Any experience or advice others have here would be greatly appreciated.

Any CMS out there that might have a tool for this that would be quick to
install and get up and going? Codeigniter have one, any others???

Much thanks,

Skip


My first thought was CakePHP. Setup your database and run the cake bake
script and you will get all the forms, create, retrieve, update and
delete, as well as the PHP models and controllers to do it.  Then you
just start customizing.




--

Skip Evans
Big Sky Penguin, LLC
503 S Baldwin St, #1
Madison WI 53703
608.250.2720
http://bigskypenguin.com

Those of you who believe in
telekinesis, raise my hand.
 -- Kurt Vonnegut

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



[PHP] Web friendly file names

2009-06-03 Thread Skip Evans

Hey all,

I have a file uploader module that allows users to upload 
documents and of course people are using all kinds of file 
names that are not web friendly.


I guess the best solution is to replace any non alphanumeric 
with maybe '_' the underscore? How does that sound?


Unfortunately, after 20+ years of coding I cannot get my brain 
around regular expressions to any decent level of proficiency, 
I know sad.


I'd like to hear other solutions for this problem, I am 
thinking of a regexp that replaces special chars with the 
underscore; sounds pretty robust and globally acceptable?


Opinions, witticisms, flames, quotations by famous débutantes?

(The last is optional)
--

Skip Evans
Big Sky Penguin, LLC
503 S Baldwin St, #1
Madison WI 53703
608.250.2720
http://bigskypenguin.com

Those of you who believe in
telekinesis, raise my hand.
 -- Kurt Vonnegut

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



Re: [PHP] Web friendly file names

2009-06-03 Thread Skip Evans
You mean like this? This would work as a good file name to be 
on the server and link to?


$filename = urlencode($_FILES['myfile']['name']);
move_uploaded_file($_FILES['myfile']['tmp_name'], $filename);

Think that would do the trick?

Skip

Eddie Drapkin wrote:
Why not just urlencode() the filename? (and suggest people use a URL 
shortening service and/or provide one)


On Wed, Jun 3, 2009 at 12:31 PM, Richard Heyes rich...@php.net 
mailto:rich...@php.net wrote:


Hi,

  I have a file uploader module that allows users to upload
documents and of
  course people are using all kinds of file names that are not web
friendly.
 
  I guess the best solution is to replace any non alphanumeric with
maybe '_'
  the underscore? How does that sound?
 
  Unfortunately, after 20+ years of coding I cannot get my brain around
  regular expressions to any decent level of proficiency, I know sad.
 
  I'd like to hear other solutions for this problem, I am thinking
of a regexp
  that replaces special chars with the underscore; sounds pretty
robust and
  globally acceptable?

I replace any non alpha chat with a hyphen, then replace two or more
hyphens with one. Simple, but I would also include the date so that
naming clashes are less likely (if it's applicable). So you might end
up with something similar to this:

/product/2009/06/03/24ct-gold-earrings

Or if using the date is not applicable, you could get something like
this:

/product/24ct-gold-earrings

--
Richard Heyes
HTML5 graphing: RGraph (www.rgraph.net http://www.rgraph.net -
updated 23rd May)
PHP mail: RMail (www.phpguru.org/rmail http://www.phpguru.org/rmail)
PHP datagrid: RGrid (www.phpguru.org/rgrid
http://www.phpguru.org/rgrid)
PHP Template: RTemplate (www.phpguru.org/rtemplate
http://www.phpguru.org/rtemplate)
PHP SMTP: http://www.phpguru.org/smtp

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




--

Skip Evans
Big Sky Penguin, LLC
503 S Baldwin St, #1
Madison WI 53703
608.250.2720
http://bigskypenguin.com

Those of you who believe in
telekinesis, raise my hand.
 -- Kurt Vonnegut

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



Re: [PHP] Web friendly file names

2009-06-03 Thread Skip Evans
Oh, of course that makes sense, and I suppose the PHP 
move_uploaded_file() function has no problem with weird and 
crappy file names?


Skip

Eddie Drapkin wrote:

Well, erm, no.

I'd store the filename, etc. as-is in the database, and then link it 
with urlencode() and you should be able to serve a file called A non 
friendly name! site.com/A%20non%20friendly.. 
http://site.com/A%20non%20friendly and a modern webserver should 
be fine with that, and even most browsers will allow you to type 
site.com/A http://site.com/A non friendly... without the url escaped 
characters and it will url escape them in the request.  The only issue 
is that the urlencoded special characters are a lot uglier, which may or 
may not be a consideration for you.


On Wed, Jun 3, 2009 at 12:39 PM, Skip Evans s...@bigskypenguin.com 
mailto:s...@bigskypenguin.com wrote:




--

Skip Evans
Big Sky Penguin, LLC
503 S Baldwin St, #1
Madison WI 53703
608.250.2720
http://bigskypenguin.com

Those of you who believe in
telekinesis, raise my hand.
 -- Kurt Vonnegut

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



[PHP] PCI compliance issue

2009-06-02 Thread Skip Evans

Hey all,

Some may remember my question awhile back about ensuring all 
CC forms are behind https. I've always put them so, but I've 
taken over maintenance on a site that did not and have since 
corrected the problem.


Now the client is going for PCI compliance as a requirement by 
their credit card processor and we have been dealing with 
issues determined risks by Security Metrics, most which were 
legit (except one thinking IIS was running on a Linux 
server!), but this one has me scratching my head.


The original programmer created the following in the system's 
.htaccess file:


RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* index.php

...which sends any incorrect URL to the home page, correct? 
But Security Metrics, as part of their test ran two URLs 
through the system that while both displaying the home page 
had different things in the header, which they flagged as an 
issue. Here is there explanation below, but my question is, 
why is this considered a security risk, and what suggestions 
might some of you have to correct it?


Thanks much!
Skip

--
The reason why this issue is being flagged is simply that both 
links should bring you to the same page but if look at the 
HTTP header response (http://www.ranghart.com/cgi-bin/?D=A) it 
returns a 403 forbidden even though it still takes you to the 
main site page, with the other URL 
(http://www.ranghart.com/cgi-bin/%3fD=A) it is returning a 200 
OK when it is the same page as the URL that is returning a 
403. You will need to make sure that the pages are responding 
in the same way to correct this issue.

-


--

Skip Evans
Big Sky Penguin, LLC
503 S Baldwin St, #1
Madison WI 53703
608.250.2720
http://bigskypenguin.com

Those of you who believe in
telekinesis, raise my hand.
 -- Kurt Vonnegut

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



[PHP] SQL help?

2009-05-17 Thread Skip Evans

Hey all,

I have a SQL requirement I'm not quite sure how to compose.

I have two tables, shows, and shows_dates. It's a one to many 
relationship where there is a single entry in shows and 
multiple entries in shows_dates that list each date and time 
for a play production for a run of entries in shows, like


I need a query that will read each record in shows, but I only 
want the first record from shows_dates, the first one sorted 
by date, so I can display all shows in order of their opening 
date.


Not sure how to grab just the first record from shows_dates 
though.


Hint, anyone?

Thanks,
Skip

--

Skip Evans
Big Sky Penguin, LLC
503 S Baldwin St, #1
Madison WI 53703
608.250.2720
http://bigskypenguin.com

Those of you who believe in
telekinesis, raise my hand.
 -- Kurt Vonnegut

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



[PHP] Software to read/write Excel to CD?

2009-05-14 Thread Skip Evans

Hey all,

I'm inheriting a project that was unsuccessfully off-shored 
and is now in such bad shape (I've seen the code. It's awful) 
that they are firing the off-shore company and starting over.


One of the things the other company said was possible, and I'm 
not familiar with... if I understand correctly, is to create a 
CD with not just an Excel spreadsheet, but software on that CD 
that when placed in another computer will open the 
spreadsheet, allow it to be modified and rewritten back to the CD.


This is part of the requirements.

Does anyone know of such software and its name?

Thanks,
Skip
--

Skip Evans
Big Sky Penguin, LLC
503 S Baldwin St, #1
Madison WI 53703
608.250.2720
http://bigskypenguin.com

Those of you who believe in
telekinesis, raise my hand.
 -- Kurt Vonnegut

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



[PHP] Problems with HTTPS and maybe an .htaccess???

2009-05-05 Thread Skip Evans

Hey all,

A while back I asked about forms that take credit card info 
and https. I have always put such forms behind SSL, but a site 
I have been asked to do maintenance work on did not, and after 
responses from the list and at my recommendation they 
installed an SSL and I modified the code to call https when it 
hits that form, so that part is okay.


But now I have a problem implementing this on their 
development site, which is just a duplicate code base inside a 
directory public_html/_dev and a domain name dev.sitename.com, 
instead of sitename.com.


The problem is, and I believe it may be the .htaccess file, 
redirecting the https pages to the live site. In other words, 
I'm trying to test something on the dev site in the shopping 
cart, but when I click a button that takes it to the CC form, 
hence https, although the URL says, 
https://dev.sitename.com/... I can tell it is actually on the 
live site because the code that executes is the old code on 
the live site, not the new code on the development server.


I suspect the .htaccess file, which looks thusly...

AddHandler application/x-httpd-php5 .php
Options +FollowSymLinks
IndexIgnore */*
# Turn on the RewriteEngine
RewriteEngine On
#  Rules
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.php

Now I'm no expert at these rewrite rules, and sometimes have 
to take several Valium, a shot of vodka, and weep for hours 
after working with them (okay, that was a bit of hyperbole), 
but it looks like any URL it cannot identify gets routed to 
index.php, and that is because index.php evaluates and 
processes URLs like


sitename.com/shirts/mens/

... and so forth.

Question is, am I on the right track suspecting the rewrite 
rule for redirecting the https pages to the live site, and if 
so, anyone see a fix for this? Again, hyperbole aside, I'm no 
expert at rewrite rules.


Much thanks. Any help, as always, is greatly appreciated.

Skip
--

Skip Evans
Big Sky Penguin, LLC
503 S Baldwin St, #1
Madison WI 53703
608.250.2720
http://bigskypenguin.com

Those of you who believe in
telekinesis, raise my hand.
 -- Kurt Vonnegut

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



Re: [PHP] Problems with HTTPS and maybe an .htaccess???

2009-05-05 Thread Skip Evans

Hey all,

No, adding * after the period had no affect at all. Still goes 
to the live site.


Any other ideas? I'm stumped, desperate and on the verge of 
requiring medication.


Skip

Alex S Kurilo aka Kamazee wrote:

RewriteRule . index.php


Add an asterisk after the dot:
RewriteRule .* index.php





--

Skip Evans
Big Sky Penguin, LLC
503 S Baldwin St, #1
Madison WI 53703
608.250.2720
http://bigskypenguin.com

Those of you who believe in
telekinesis, raise my hand.
 -- Kurt Vonnegut

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



[PHP] Expression Engine

2009-04-24 Thread Skip Evans

Hey all,

Anyone have any experience with Expression Engine? I have a 
new client that wants me to use it to build a site and I must 
say I am rather underwhelmed.


But I happen to be one of those people that believe in 
developing your own lightweight framework you know yourself 
inside and out and building upon that for new sites.


I find the learning curve, combined with inherent limitations 
of systems like this to take all the fun out of coding and 
project development... and make me want to become an insurance 
salesman.


Thoughts on Expression Engine for those of you with exposure 
to it?


Thanks,
Skip
--

Skip Evans
Big Sky Penguin, LLC
503 S Baldwin St, #1
Madison WI 53703
608.250.2720
http://bigskypenguin.com

Those of you who believe in
telekinesis, raise my hand.
 -- Kurt Vonnegut

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



[PHP] https and Credit Cards

2009-04-13 Thread Skip Evans

Hey all,

I've always put any forms that collect credit card information 
behind a secure connection, https, figuring that sending that 
information from the client browser to the server should be 
secure, but I'm having convincing a client that it is necessary.


He instead insists that only the call to the credit card 
processor's server needs to be secure and of course the 
processor supplies the connection there.


But doesn't also the form need to be secure since you're 
sending CC information from that form back to the web site's 
server?


That's what I've always assumed.

I need some opinions on this, and if I'm right I think the 
client will defer to a few more votes.


--

Skip Evans
Big Sky Penguin, LLC
503 S Baldwin St, #1
Madison WI 53703
608.250.2720
http://bigskypenguin.com

Those of you who believe in
telekinesis, raise my hand.
 -- Kurt Vonnegut

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



[PHP] file_get_contents for URLs?

2009-04-07 Thread Skip Evans

Hey all,

I'm doing some maintenance work on an existing system and 
there is a piece of code that uses file_get_contents() to read 
data from a URL, which is fine in theory I suppose.


But the problem is sometimes the server where that URL lives 
is not available, and the system hangs indefinitely.


Shouldn't this be done with curl, and if so can it be done so 
that the call will time out and return control back when the 
server is not available?


Any other recommendations?

I just came across this code and it's one of the client's 
biggest complaints.


--

Skip Evans
Big Sky Penguin, LLC
503 S Baldwin St, #1
Madison WI 53703
608.250.2720
http://bigskypenguin.com

Those of you who believe in
telekinesis, raise my hand.
 -- Kurt Vonnegut

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



[PHP] Submitting URLs in IE

2009-04-04 Thread Skip Evans

Hey all,

I have an application that uses AJAX to submit a page created 
in the FCKeditor. It builds a URL and then submits that to the 
server with a JavaScript call like this:


req.open('GET', url, false);

In Firefox it works great for just about any size page you 
could want, but IE just stops on even medium size pages.


Is this some kind of limitation in IE that can be increased 
with a registry setting or something?


Any suggestions would be helpful, as I am a bit perplexed.

Would using POST rather than get to submit the URL to the 
server handle more data?


--

Skip Evans
Big Sky Penguin, LLC
503 S Baldwin St, #1
Madison WI 53703
608.250.2720
http://bigskypenguin.com

Those of you who believe in
telekinesis, raise my hand.
 -- Kurt Vonnegut

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



[PHP] AJAX with POST

2009-04-04 Thread Skip Evans

Hey all,

At the risk of being told this is a PHP and not a JS list, but 
also knowing the discussions on this list, to the benefit of 
all I believe, very wildly, I'm posting this JS code snippet 
for some advice.


As I posted earlier, my AJAX app that uses a GET to post to 
the server (and get a response), fails on IE with larger data, 
so I thought I'd take a shot at writing a POST function, but 
so far I can get it to get the data back, but the problem is 
by the time the data has come back the function has already 
returned null back to the calling function. What I need this 
function to do is wait for the data to come back and then send 
it back to caller. Here's the function. Any advice would be 
greatly appreciated. (The code to get the appropriate object 
per browser has been omitted.)


http.open(POST, url, true);

//Send the proper header information along with the request
http.setRequestHeader(Content-type, 
application/x-www-form-urlencoded);

http.setRequestHeader(Content-length, url.length);
http.setRequestHeader(Connection, close);

http.send(url);

http.onreadystatechange = function() {//Call a function when 
the state changes.

if(http.readyState == 4  http.status == 200) {
alert('['+http.responseText+']');
return (http.responseText);
}
}
--

Skip Evans
Big Sky Penguin, LLC
503 S Baldwin St, #1
Madison WI 53703
608.250.2720
http://bigskypenguin.com

Those of you who believe in
telekinesis, raise my hand.
 -- Kurt Vonnegut

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



Re: [PHP] AJAX with POST

2009-04-04 Thread Skip Evans

Hey Bastien  all,

...D'oh! Thanks for the catch, yes, I am sending args on the 
URL. But more to my problem, if I switch to POST will IE be 
able to submit more data? If so, I can parse the URL down in 
the function and build a proper post transaction, but my real 
problem is IE can't submit, apparently, more than 2K through a 
GET.


Do you know if POST can handle more?

Thanks tons for your reply!

Skip

PS. I'd very interested in seeing your set of functions.


Phpster wrote:



On Apr 4, 2009, at 17:30, Skip Evans s...@bigskypenguin.com wrote:


Hey all,

At the risk of being told this is a PHP and not a JS list, but also 
knowing the discussions on this list, to the benefit of all I believe, 
very wildly, I'm posting this JS code snippet for some advice.


As I posted earlier, my AJAX app that uses a GET to post to the server 
(and get a response), fails on IE with larger data, so I thought I'd 
take a shot at writing a POST function, but so far I can get it to get 
the data back, but the problem is by the time the data has come back 
the function has already returned null back to the calling function. 
What I need this function to do is wait for the data to come back and 
then send it back to caller. Here's the function. Any advice would be 
greatly appreciated. (The code to get the appropriate object per 
browser has been omitted.)


http.open(POST, url, true);

//Send the proper header information along with the request
http.setRequestHeader(Content-type, 
application/x-www-form-urlencoded);

http.setRequestHeader(Content-length, url.length);
http.setRequestHeader(Connection, close);

http.send(url);

http.onreadystatechange = function() {//Call a function when the state 
changes.

if(http.readyState == 4  http.status == 200) {
   alert('['+http.responseText+']');
   return (http.responseText);
   }
}
--

Skip Evans
Big Sky Penguin, LLC
503 S Baldwin St, #1
Madison WI 53703
608.250.2720
http://bigskypenguin.com

Those of you who believe in
telekinesis, raise my hand.
-- Kurt Vonnegut

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



Skip,

You didn't show the code to build the url variable but I would assume 
that since you started with a get method you are tacking data onto the 
end of the URL that is the called Ajax page.


I had the same issue at work correcting the VP's mistake of mixing up 
post and get in his ajax call. The trick is to build the data separately 
from the URL and pass it.


I do an ajax.open(URL) then an Ajax. Send(data) to send just the data.

I can post my entire function set if you want.

Bastien


--

Skip Evans
Big Sky Penguin, LLC
503 S Baldwin St, #1
Madison WI 53703
608.250.2720
http://bigskypenguin.com

Those of you who believe in
telekinesis, raise my hand.
 -- Kurt Vonnegut

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



Re: [PHP] RE: AJAX with POST

2009-04-04 Thread Skip Evans

But my function using GET does seem to wait.

Granted I cobbled it together from various samples and didn't 
author it from my own deep understanding of the exact process, 
but here's the snippet that does the real work.


req.open('GET', url, false);
req.send(null);

if(req.responseText) {
   if(req.responseText.substring(0,7) == 'debug!!') {
   alert(req.responseText.substring(7));
   }
}

return(req.responseText);

It seems to wait until it has data to return, because it works 
perfectly. I can send it a URL from another function and get 
the data back from server to the function as expected.


The only part of it I'm unsure of is this:

req.send(null);

What does that do? As I said, I cobbled this function from 
examples, got it working, and presto, was off and running.


Skip


Brad Broerman wrote:

Well, as the A in Ajax is asynchronous, there's no real way to make it
wait. What you would normally do is use a callback:

function createXHRObject( )
{
if (typeof XMLHttpRequest != undefined)
{
return new XMLHttpRequest();
}
else if (typeof ActiveXObject != undefined)
{
return new ActiveXObject(Microsoft.XMLHTTP);
}
else
{
throw new Error(XMLHttpRequest not supported);
}
}

function sendAjaxRequest( websvcurl , params, callbackFn )
{
var xhrObject = createXHRObject();

xhrObject.open(POST, websvcurl, true);
xhrObject.onreadystatechange = function()
{
if (xhrObject.readyState == 4)
{
if( xhrObject.responseXML != null )
{
callbackFn (xhrObject.responseXML);
}
}
}

xhrObject.setRequestHeader(Content-type,
application/x-www-form-urlencoded);
xhrObject.setRequestHeader(Content-length, params.length);
xhrObject.setRequestHeader(Connection, close);
xhrObject.send(params);
}


-Original Message-
From: Skip Evans [mailto:s...@bigskypenguin.com]
Sent: Saturday, April 04, 2009 5:30 PM
To: php-general@lists.php.net
Subject: AJAX with POST


Hey all,

At the risk of being told this is a PHP and not a JS list, but
also knowing the discussions on this list, to the benefit of
all I believe, very wildly, I'm posting this JS code snippet
for some advice.

As I posted earlier, my AJAX app that uses a GET to post to
the server (and get a response), fails on IE with larger data,
so I thought I'd take a shot at writing a POST function, but
so far I can get it to get the data back, but the problem is
by the time the data has come back the function has already
returned null back to the calling function. What I need this
function to do is wait for the data to come back and then send
it back to caller. Here's the function. Any advice would be
greatly appreciated. (The code to get the appropriate object
per browser has been omitted.)

http.open(POST, url, true);

//Send the proper header information along with the request
http.setRequestHeader(Content-type,
application/x-www-form-urlencoded);
http.setRequestHeader(Content-length, url.length);
http.setRequestHeader(Connection, close);

http.send(url);

http.onreadystatechange = function() {//Call a function when
the state changes.
if(http.readyState == 4  http.status == 200) {
alert('['+http.responseText+']');
return (http.responseText);
}
}
--

Skip Evans
Big Sky Penguin, LLC
503 S Baldwin St, #1
Madison WI 53703
608.250.2720
http://bigskypenguin.com

Those of you who believe in
telekinesis, raise my hand.
  -- Kurt Vonnegut




--

Skip Evans
Big Sky Penguin, LLC
503 S Baldwin St, #1
Madison WI 53703
608.250.2720
http://bigskypenguin.com

Those of you who believe in
telekinesis, raise my hand.
 -- Kurt Vonnegut

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



[PHP] Appending query result sets?

2009-02-08 Thread Skip Evans

Hey,

Is it possible to append a result query from one call to 
mysql_query() to the end of another if the specified fields 
are identical?


Something like that would accomplish ths?
$r1 = mysql_query('some sql');
$r2 = mysql_query('some sql');

$r3 = $r1.$r2;

I suppose they could be read into an array then output that 
way, but I was hoping to more easily just append the result sets.


Thanks,
Skip

--

Skip Evans
Big Sky Penguin, LLC
503 S Baldwin St, #1
Madison WI 53703
608.250.2720
http://bigskypenguin.com

Those of you who believe in
telekinesis, raise my hand.
 -- Kurt Vonnegut

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



Re: [PHP] Appending query result sets?

2009-02-08 Thread Skip Evans

Ashley Sheridan wrote:



Can you not take this to the SQL itself, like maybe using some form of
join on the query.



I've been trying that, and frankly gave up, being whipped into 
submission and having to admin I'm not an expert DBA, but I 
hesitated to post the queries lest I be flamed for posting 
off-topic.


--

Skip Evans
Big Sky Penguin, LLC
503 S Baldwin St, #1
Madison WI 53703
608.250.2720
http://bigskypenguin.com

Those of you who believe in
telekinesis, raise my hand.
 -- Kurt Vonnegut

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



Re: [PHP] Appending query result sets?

2009-02-08 Thread Skip Evans
Oh, yeah, that's fine. I knew I could od it with arrays, but 
also looked to see if there was any way to just do an append, 
and I also need to sort them as well, so maybe I better get 
back to figuring out a join.


Skip

Ashley Sheridan wrote:

On Sun, 2009-02-08 at 12:37 -0600, Skip Evans wrote:

Ashley Sheridan wrote:

Can you not take this to the SQL itself, like maybe using some form of
join on the query.

I've been trying that, and frankly gave up, being whipped into 
submission and having to admin I'm not an expert DBA, but I 
hesitated to post the queries lest I be flamed for posting 
off-topic.


--

Skip Evans
Big Sky Penguin, LLC
503 S Baldwin St, #1
Madison WI 53703
608.250.2720
http://bigskypenguin.com

Those of you who believe in
telekinesis, raise my hand.
  -- Kurt Vonnegut


Well if a join is not an option, what about something like this:

$r1 = mysql_query('some sql');
$r2 = mysql_query('some sql');
$results = Array();

while($row = mysql_fetch_array($r1))
{
$results[] = $row;
}
while($row = mysql_fetch_array($r2))
{
$results[] = $row;
}


Ash
www.ashleysheridan.co.uk




--

Skip Evans
Big Sky Penguin, LLC
503 S Baldwin St, #1
Madison WI 53703
608.250.2720
http://bigskypenguin.com

Those of you who believe in
telekinesis, raise my hand.
 -- Kurt Vonnegut

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



Re: [PHP] frameworks

2009-01-30 Thread Skip Evans

Nitsan Bin-Nun wrote:

I usually uses CI, just because it is written in PHP4 and in about 50% of
the servers in Israel there is no PHP5 :X


I am just curious. Why is PHP 5 so rare there?

--

Skip Evans
Big Sky Penguin, LLC
503 S Baldwin St, #1
Madison WI 53703
608.250.2720
http://bigskypenguin.com

Those of you who believe in
telekinesis, raise my hand.
 -- Kurt Vonnegut

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



Re: [PHP] frameworks

2009-01-30 Thread Skip Evans

Nitsan Bin-Nun wrote:

In Israel most of the servesr run centos


I first came across centos a few years back at a client's 
hosting facility and had never heard of it before, though it 
seems to have a large install base.


I heard it's a free version of Enterprise Redhat???

Not sure, though, didn't follow up.

Give me Debian or give me death!

Nah,not really, I jus' LOVES my FreeBSD... but Linux is cool 
too, what I run on workstations.



--

Skip Evans
Big Sky Penguin, LLC
503 S Baldwin St, #1
Madison WI 53703
608.250.2720
http://bigskypenguin.com

Those of you who believe in
telekinesis, raise my hand.
 -- Kurt Vonnegut

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



[PHP] Connection error on URI

2009-01-28 Thread Skip Evans

Hey all,

I'm working on someone else's code that tries to read an XML 
transaction from a remote server with the following code.
	 
$url=http://xx.xx.xx.xx:1972/csp/test/SASS.Web1.cls?soap_method=FindMemBySASSNumSNum=.$user_sass;

// $url = urlencode($url);
$xml_response = file_get_contents($url, true);

But this transaction times out and returns an empty 
transaction, even with the call to urlencode, which I tried as 
a quick fix.


If I paste the identical transaction into a browser it works fine.

Any suggestions would be greatly appreciated.

Peace, Love  Curly Fries,
Skip


--

Skip Evans
Big Sky Penguin, LLC
503 S Baldwin St, #1
Madison WI 53703
608.250.2720
http://bigskypenguin.com

Those of you who believe in
telekinesis, raise my hand.
 -- Kurt Vonnegut

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



Re: [PHP] Connection error on URI

2009-01-28 Thread Skip Evans

Here's the output with the call to error_reporting(255); in place.

Calling Sassnet...
Warning: 
file_get_contents(http://xx.xx.xx.xx:1972/csp/test/SASS.Web1.cls?soap_method=FindMemBySASSNumSNum=59) 
[function.file-get-contents]: failed to open stream: 
Connection timed out in 
/usr/sites/sassnet.com/members/www/url_test.php on line 6


I think the issue is not programming, but might be that the 
target server is not accepting requests from calling server.


Skip

Jan G.B. wrote:

2009/1/28 Skip Evans s...@bigskypenguin.com:

Hey all,
$url=http://xx.xx.xx.xx:1972/csp/test/SASS.Web1.cls?soap_method=FindMemBySASSNumSNum=.$user_sass;
$xml_response = file_get_contents($url, true);

But this transaction times out and returns an empty transaction, even with
the call to urlencode, which I tried as a quick fix.

If I paste the identical transaction into a browser it works fine.


Please call error_reporting(255); before your http-request starts,
then post the error message you get.
bye



--

Skip Evans
Big Sky Penguin, LLC
503 S Baldwin St, #1
Madison WI 53703
608.250.2720
http://bigskypenguin.com

Those of you who believe in
telekinesis, raise my hand.
 -- Kurt Vonnegut

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



Re: [PHP] Re: Opinions / Votes Needed

2009-01-18 Thread Skip Evans

I will be brief. Tony is a dick.

Peace  Love,
Skip

Tony Marston wrote:
Skip Evans s...@bigskypenguin.com wrote in message 
news:49723137.2010...@bigskypenguin.com...
Wow, Tony, do you think in the future you could try to express yourself 
with just a bit more civility and in a less condescending tone?


Nathan expressed some thoughts he had, politely, and when out of his way 
to come across in a non-critical and non-confrontational manner.


Tony Marston wrote:

Absolute rubbish!

There's just no need to insult other list members like this.


Saying that someone's ideas are absolute rubbish is not an insult. Calling 
him a moron would be, but I did not.


Frankly, it's this kind of treatment that make these lists less productive 
than they could be.


And you think that his ideas for changing PHP to suit his particular 
programming style would be productive? I think not.



It intimidates less experienced programmers from asking good questions,


What makes you think that he is an inexperienced programmer? What makes you 
think that these are good questions? He is saying that he doesn't like the 
way that PHP works and wants it changed to suit his personal needs.


lest they get treated the way Nathan was. And isn't helping out less 
experienced coders one of the reasons this list exists?


And it also makes others less inclined to participate, or drop off the 
list entirely.


If it stops feeble minded people from filling this forum with useless 
requests then surely that's a good thing? Personally I'm sick and tired from 
reading posts such as this which say I'm used to language X, and my feeble 
brain cannot cope with the differences, so why can't PHP be changed to 
behave like language X?


It's NOT just so we can blast each other and show off our highly dubiously 
assumed superiority.


With all the frustrations we put up with in our daily lives, I would hope 
a list like this, especially since we are among colleagues, could be a 
place we could at least cautiously expect to be treated with respect.


Then the OP should respect PHP for what it is, and not request changes that 
would make it unusable for 99.999% of  the millions of programmers who have 
already written millions of programs with it. PHP is successful because of 
the way it works, and changing the way it works, as suggested by the OP, 
would not make it more successful. On the contrary, I think that it would 
PHuck it up completely.


But that's just my opinion.



--

Skip Evans
Big Sky Penguin, LLC
503 S Baldwin St, #1
Madison WI 53703
608.250.2720
http://bigskypenguin.com

Those of you who believe in
telekinesis, raise my hand.
 -- Kurt Vonnegut

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



[PHP] Project management systems

2009-01-18 Thread Skip Evans

Hey all (except Tony),

I've been using dotProject for a few years now and have been 
quite happy with it, and have written my own invoicing module, 
and a few other mods for the way I track hours for 
subcontractors, etc.


But it has trouble with MySQL 5 and from the Googling I've 
done it doesn't seem likely it will be fixed soon. Besides, 
I've hacked my install up quite a bit and if I were to upgrade 
there'd trouble 'a foot, ya'll.


I'm considering switching to something else, and the start of 
a new year would be a good time since my subs have all been 
given their 10-99s so I can start fresh.


Suggestions for a PHP based PM system? I'd like to be able to 
make mods so PHP is the logical choice since it's the language 
I know best, and as Tony will tell you, it's perfect and 
doesn't need no feeble minded Java guys trying to improve it.


Basic requirements are time tracking for multiple coders, 
generating invoices per project based on start and end date (I 
bill the 15th and last day of each month).


Gee, I guess that's the basics.

Thoughts, opinions, corrections to grammar?
--

Skip Evans
Big Sky Penguin, LLC
503 S Baldwin St, #1
Madison WI 53703
608.250.2720
http://bigskypenguin.com

Those of you who believe in
telekinesis, raise my hand.
 -- Kurt Vonnegut

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



Re: [PHP] Re: Opinions / Votes Needed

2009-01-18 Thread Skip Evans
You're right, and as soon as you apologize to Nathan for 
calling him feeble minded (and promise to adjust your 
attitude) I will apologize to you.


I also think it would be a good idea for you to address the 
rest of the list and assure everyone you will try to be more 
polite in the future.


Skip

PS. And then adopt an abandoned puppy.

Tony Marston wrote:
Skip Evans s...@bigskypenguin.com wrote in message 
news:49733d18.6080...@bigskypenguin.com...

I will be brief. Tony is a dick.


To quote your own words: There's just no need to insult other list members 
like this.




--

Skip Evans
Big Sky Penguin, LLC
503 S Baldwin St, #1
Madison WI 53703
608.250.2720
http://bigskypenguin.com

Those of you who believe in
telekinesis, raise my hand.
 -- Kurt Vonnegut

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



Re: [PHP] Project management systems

2009-01-18 Thread Skip Evans

Hey Pfffster  all,

D'oh! Should have gone there first. Found this one that looks 
interesting.


IT Project Guide- Project Management

http://sourceforge.net/projects/itpgpm/

Web based Client and Team project management tool. Utilizes 
PHP, MySQL and JQuery. Has Company, Project, Task, Forum and 
Files modules and associated Gantt charts. Based on dotProject 
and Web2Project. Reduced complexity with the focus on ease of use.


I'll download it and give it a spin. Hope this baby handles 
good in town.


Skip


Phpster wrote:

There are a number on sourceforge.net that are worth looking at

Bastien

Sent from my iPod




--

Skip Evans
Big Sky Penguin, LLC
503 S Baldwin St, #1
Madison WI 53703
608.250.2720
http://bigskypenguin.com

Those of you who believe in
telekinesis, raise my hand.
 -- Kurt Vonnegut

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



[PHP] Re: Project management systems

2009-01-18 Thread Skip Evans

Hey Nathan and all, (even Tony, kisses big T!)

I decided, rather quickly, on this one.

http://itprojectguide.org/

It's dotProject based with apparent upgrades to work with 
MySQL 5 and jQuery so that it has some nice AJAX functionality 
where dP would keep you waiting on whole page refreshes.


The developer is very responsive to the minor issues I've had, 
so I'm going to probably keep it and import my custom modules 
from dP into it.


Skip

Nathan Rixham wrote:

Skip Evans wrote:

Hey all (except Tony),


treat others how you want them to treat you *passes all his biscuits* - 
yet lol.


I've been using dotProject for a few years now and have been quite 
happy with it, and have written my own invoicing module, and a few 
other mods for the way I track hours for subcontractors, etc.


condolences

But it has trouble with MySQL 5 and from the Googling I've done it 
doesn't seem likely it will be fixed soon. Besides, I've hacked my 
install up quite a bit and if I were to upgrade there'd trouble 'a 
foot, ya'll.


maybe you'd be best fixing it yourself OR not upgrading to mysql 5?

I'm considering switching to something else, and the start of a new 
year would be a good time since my subs have all been given their 
10-99s so I can start fresh.


really.. good luck and please let me know what you choose

Suggestions for a PHP based PM system? I'd like to be able to make 
mods so PHP is the logical choice since it's the language I know best, 
and as Tony will tell you, it's perfect and doesn't need no feeble 
minded Java guys trying to improve it.


.

Basic requirements are time tracking for multiple coders, generating 
invoices per project based on start and end date (I bill the 15th and 
last day of each month).


Gee, I guess that's the basics.

Thoughts, opinions, corrections to grammar?


not every ones cup of tea but rally agile development 
[http://www.rallydev.com/]


if you don't do anything else with this link please watch this:
http://www.rallydev.com/5601_Rally_15.html

than consider what you want from a project management system.

in all honesty though, no I can't - none seem to fit the bill completly 
and in every place I've ever worked, and personally, picking a good 
project management system has always been a major stumbling block / problem




--

Skip Evans
Big Sky Penguin, LLC
503 S Baldwin St, #1
Madison WI 53703
608.250.2720
http://bigskypenguin.com

Those of you who believe in
telekinesis, raise my hand.
 -- Kurt Vonnegut

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



Re: [PHP] Re: Opinions / Votes Needed

2009-01-17 Thread Skip Evans
Wow, Tony, do you think in the future you could try to express 
yourself with just a bit more civility and in a less 
condescending tone?


Nathan expressed some thoughts he had, politely, and when out 
of his way to come across in a non-critical and 
non-confrontational manner.


Tony Marston wrote:

Absolute rubbish!


There's just no need to insult other list members like this.

Frankly, it's this kind of treatment that make these lists 
less productive than they could be. It intimidates less 
experienced programmers from asking good questions, lest they 
get treated the way Nathan was. And isn't helping out less 
experienced coders one of the reasons this list exists?


And it also makes others less inclined to participate, or drop 
off the list entirely.


It's NOT just so we can blast each other and show off our 
highly dubiously assumed superiority.


With all the frustrations we put up with in our daily lives, I 
would hope a list like this, especially since we are among 
colleagues, could be a place we could at least cautiously 
expect to be treated with respect.



--

Skip Evans
Big Sky Penguin, LLC
503 S Baldwin St, #1
Madison WI 53703
608.250.2720
http://bigskypenguin.com

Those of you who believe in
telekinesis, raise my hand.
 -- Kurt Vonnegut

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



Re: [PHP] Zend (or other) Framework...where to start?

2009-01-14 Thread Skip Evans

John Corry wrote:


For the new-to-frameworks, is there a better/easier framework to use
that will streamline the development process from the beginning?



I've been using my own I developed from the ground up for the past 
couple years, but have recently looked at cakePHP and I think it might 
be good for some new to frameworks.


Drupal is awfully popular, but I've only glanced at it and get the 
impression there's a bit of a steep learning curve.


I'd be very interest to hear what others think of both of these.


--
==
Skip Evans
Big Sky Penguin, LLC
503 S Baldwin St, #1
Madison, Wisconsin 53703
608-250-2720
http://bigskypenguin.com

Those of you who believe in telekinetics, raise my hand.
-- Kurt Vonnegut

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



[PHP] FirePHP -- pretty cool

2009-01-11 Thread Skip Evans

Hey all,

I'm sure many of you use Firebug in Firefox for help debugging, and some 
of you also no doubt know about FirePHP, the PHP class that let's you 
write logs to the Firebug console.


In case you don't know about it, Joe Bob Briggs says, Check it out.

I just installed and it's pretty cool.

http://www.firephp.org/

Very easy install and set up: you basically include on PHP file and 
you're off to the races. I wrote a quick wrapper function that takes a 
string and outputs it to the Firebug console and am finding it pretty 
helpful.


I think it's especially useful if you write a lot of AJAX calls that 
don't allow easy output of debug statements.


Would like to hear other opinions of this little tool.
--

Skip Evans
Big Sky Penguin, LLC
503 S Baldwin St, #1
Madison, Wisconsin 53703
608-250-2720
http://bigskypenguin.com

Those of you who believe in telekinetics, raise my hand.

-- Kurt Vonnegut

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



Re: [PHP] FirePHP -- pretty cool

2009-01-11 Thread Skip Evans

Hey Nitsan  all,

I haven't been through it all, I just installed the plug in and download 
the file to include and started using it.


I would imagine you have to use their log function to get any output, 
but it seems like the kind of thing that could be left in the code 
without any ill-affect.


I wrote a wrapper in my global functions file, and I suppose if I wanted 
to turn it off I'd just have that function return at the top.


So far I'm finding it useful and easy enough to use.

If you don't want to change your code I would imagine something like 
xdebug would be the next step.


Skip

Nitsan Bin-Nun wrote:
I'm using FireBug 24/7/365 and I also knew FirePHP before but I never 
tried it or had any experience with it that I can share.
There are any other options and functions that FirePHP gives which not 
require you to involve changing your code?


Nitsan

On Sun, Jan 11, 2009 at 6:46 PM, Skip Evans s...@bigskypenguin.com 
mailto:s...@bigskypenguin.com wrote:


Hey all,

I'm sure many of you use Firebug in Firefox for help debugging, and
some of you also no doubt know about FirePHP, the PHP class that
let's you write logs to the Firebug console.

In case you don't know about it, Joe Bob Briggs says, Check it out.

I just installed and it's pretty cool.

http://www.firephp.org/

Very easy install and set up: you basically include on PHP file and
you're off to the races. I wrote a quick wrapper function that takes
a string and outputs it to the Firebug console and am finding it
pretty helpful.

I think it's especially useful if you write a lot of AJAX calls that
don't allow easy output of debug statements.

Would like to hear other opinions of this little tool.
-- 


Skip Evans
Big Sky Penguin, LLC
503 S Baldwin St, #1
Madison, Wisconsin 53703
608-250-2720
http://bigskypenguin.com

Those of you who believe in telekinetics, raise my hand.

-- Kurt Vonnegut

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

To unsubscribe, visit: http://www.php.net/unsub.php




--
==
Skip Evans
Big Sky Penguin, LLC
503 S Baldwin St, #1
Madison, Wisconsin 53703
608-250-2720
http://bigskypenguin.com

Those of you who believe in telekinetics, raise my hand.
-- Kurt Vonnegut

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



Re: [PHP] Re: hello

2009-01-08 Thread Skip Evans

Daniel Brown wrote:

In any case, as Nate R. mentioned, Linux is just as susceptible to
viruses, worms, and other malware.  My belief is that it's not so much
an attack on an Evil Empire[TM] of software, but that, if BeOS or RISC
were the single-most popular operating systems in the world, Windows
wouldn't get the misguided attention it gets.



Hey all,

From my reading I get the impression that the above statement, Linux 
is just as susceptible to viruses, worms, and other malware, is 
inaccurate.


Here are some links to good articles written by far more qualified 
individuals than myself.


http://nnucomputerwhiz.com/linux-virus.html

http://linuxmafia.com/~rick/faq/index.php?page=virus#virus3

Full disclosure: I run Ubuntu Linux for workstations, FreeBSD Unix for 
servers, and have a Mac running OS X for testing Safari, and use Windows 
only for testing IE and specific Windows software.


I much prefer a well set up *Nix system to Windows any day.

Skip



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



Re: [PHP] First steps towards unix and php

2009-01-08 Thread Skip Evans

Hey Frank,

My vote is for Ubuntu Linux, and the easiest way to get a PHP 
development environment going is by installing XAMPP.


http://www.ramanean.com/installing-xampp-on-ubuntu/

Keep in mind that XAMPP is not a production environment install, but 
good for development and educational purposes.


If you have other questions feel free to email me directly.

Skip

Frank Stanovcak wrote:
I've been a microshaft punk for some time now, and am just getting ready to 
try to step over to unix on one of my own boxes.


Does anyone have any suggestions on which flavor would be a good idea to 
start with?  I'm looking mostly for compatibility with php, mysql, and other 
web based programming languages.


Thanks in advance!

Frank 






--
===
Skip Evans
Big Sky Penguin, LLC
503 S Baldwin Street
Madison, Wisconsin 53703
608.250.2720
http://bigskypenguin.com

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



Re: [PHP] Re: hello

2009-01-08 Thread Skip Evans

Hey Daniel,

It seems that most of your points of disagreement stem from the 
potential for poor system administration by homo sapiens (and other 
primates who might have access to a console), but I still think that 
from a pure design and implementation perspective, *nix systems are more 
secure for the reasons the articles point out.


Certainly any system can suffer reduced security through laziness or 
poor administration. I mean, how many amateur system administrators 
respond to I have a permissions problem with chmod 777 *?


But do you not think the permissions issues with who can run what on 
*nix versus XP makes it more secure?



Daniel Brown wrote:
I certainly wish there were more like you!  


If only that woman who lives down the block would give me the 
opportunity to make her say that... *sigh*.

--
===
Skip Evans
Big Sky Penguin, LLC
503 S Baldwin Street
Madison, Wisconsin 53703
608.250.2720
http://bigskypenguin.com

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



Re: [PHP] Re: hello

2009-01-08 Thread Skip Evans

Hey,

Well, I find the points that *nix by default restricts users to their 
own executables and Windows allows anyone to run any program (has this 
changed with Vista? I don't follow MS too closely) to be a major reason 
by default, as installed, *nix systems are more secure.


I would also bet that as/if MS loses it's monopoly on the desktop the 
type of vulgar, socially dysfunctional people who should be viscously 
beat that write malware will begin to focus on *nix systems and it will 
become an issue for us cool people as well.


Incidentally, I think building their OS on FreeBSD was about the 
smartest thing the Apple/Mac people ever did.


Skip

Robert Cummings wrote:

On Thu, 2009-01-08 at 13:43 -0500, Daniel Brown wrote:

On Thu, Jan 8, 2009 at 13:41, Robert Cummings rob...@interjinn.com wrote:

On Thu, 2009-01-08 at 13:31 -0500, Daniel Brown wrote:

On Thu, Jan 8, 2009 at 13:24, Robert Cummings rob...@interjinn.com wrote:

Just as susceptible?? Please refer me to some resources where I can
verify this statement.

http://marc.info/?t=10016019247r=1w=2



Meaning, read the rest of the thread and send shortbread recipes
to your friend, Dan, instead of just reading the first couple of
messages and determining that you know the context of the entire
conversation.  ;-P


I've been reading the entire thread.

As for the shortbread recipe... my wife says she can't find it... but as
a consolation here's a tasty alternative shortbread recipe we really
like:

http://www.interjinn.com/download/recipe.shortbread_melts.png

Cheers,
Rob.


--
===
Skip Evans
Big Sky Penguin, LLC
503 S Baldwin Street
Madison, Wisconsin 53703
608.250.2720
http://bigskypenguin.com

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



Re: [PHP] Re: hello

2009-01-08 Thread Skip Evans
You could also fill all empty space in the case with a polyurethane 
sealing compound for added security, and then bury it in the back yard.


Dang, I could make big bucks as a security consultant!

I'm adding this to my resume!

Skip

c...@l-i-e.com wrote:

Fact is if you want to be secure just disconnect you're machine from
the internet, remove cd/dvd/floppy drives and unplug the keyboard.


You forgot to cut the internal USB cables.

:-)




--
===
Skip Evans
Big Sky Penguin, LLC
503 S Baldwin Street
Madison, Wisconsin 53703
608.250.2720
http://bigskypenguin.com

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



Re: [PHP] Re: hello

2009-01-08 Thread Skip Evans

Nathan Rixham wrote:
if it's a computer thats on, with an os, a keyboard and a network card 
connected to the internet it's insecure.


Well of course. That's like saying if it's alive it's dying.

But the question was are *nix systems more secure than Windows, and I 
think even Daniel agrees that out of the box installs *nix systems are 
inherently more secure because of the way they handle users and 
permissions to executables.


Daniel seemed, and he can correct me if I'm wrong, that more 
vulnerabilities are introduced via the human factor until any system can 
be rendered at risk.



--
===
Skip Evans
Big Sky Penguin, LLC
503 S Baldwin Street
Madison, Wisconsin 53703
608.250.2720
http://bigskypenguin.com

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



Re: [PHP] Re: hello

2009-01-08 Thread Skip Evans

Ashley Sheridan wrote:
think about it for a minute; an OS can either be secure (0 
vulnerabilities) or insecure (1 or more vulnerabilities); as all OS's 
have 1 or more vulnerabilities they are all equally insecure; because 
they are all insecure.




What you are saying, in real world terms, not your Binaryland, is that 
if OS A has 2 vulnerabilities that not many people now about, and OS B 
has a whole slew of the posted all over the web that they are both 
equally insecure.


Or, for another analogy, you're saying that because all cars can either 
be sitting still or moving then they are all equally fast.



--
===
Skip Evans
Big Sky Penguin, LLC
503 S Baldwin Street
Madison, Wisconsin 53703
608.250.2720
http://bigskypenguin.com

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



Re: [PHP] Re: First steps towards unix and php

2009-01-08 Thread Skip Evans

Ross McKay wrote:

You should also check out editors and IDEs - STFW for previous posts
made to this and other groups. Then pick Geany ;)



Hey Ross  all,

I used Kate on Ubuntu for a code editor. I just read through a bit about 
Geany (was not familiar with it), but don't see too much more it would 
do for me than Kate.


What are some of your favorite features of Geany I should be aware of?


--
===
Skip Evans
Big Sky Penguin, LLC
503 S Baldwin Street
Madison, Wisconsin 53703
608.250.2720
http://bigskypenguin.com

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



  1   2   >