Need to convert all CFquery tags to lowercase
Hello, I do need to migrate from Access to MySQL on a Windows and shared server environment. All existing queries (approx 2000) are failing because they are not lowercased. Does anyone know of a script that would look into every files for the CFquery tag and lowercase its content between? This is the only solution that comes to me but maybe there is a easier way? Thanks in advance for any feedbacks. Phil ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:331158 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Need to convert all CFquery tags to lowercase
Do you need all of the query lowercased or is there part that you want to keep uppercased? If you don't care then this regex will do the job: (cfquery[^]+.+?/cfquery) \L\1 The first line grabs all cfquery tags and their content and the second like converts it to lower case. I'd test the regex against all of your templates first to see if there are any cases that you want to avoid. You can use just about any regex tool to do the job, including writing a fast tool in CF to do the job. -- Michael Dinowitz On Fri, Feb 26, 2010 at 4:57 AM, phil phil arantxa...@gmail.com wrote: Hello, I do need to migrate from Access to MySQL on a Windows and shared server environment. All existing queries (approx 2000) are failing because they are not lowercased. Does anyone know of a script that would look into every files for the CFquery tag and lowercase its content between? This is the only solution that comes to me but maybe there is a easier way? Thanks in advance for any feedbacks. Phil ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:331159 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Need to convert all CFquery tags to lowercase
As far as I know there is no requirement in MySQL for queries to be lowercase. I just ran one in all uppercase and it worked fine. There has to be something else causing this problem. On Fri, Feb 26, 2010 at 1:57 AM, phil phil arantxa...@gmail.com wrote: Hello, I do need to migrate from Access to MySQL on a Windows and shared server environment. All existing queries (approx 2000) are failing because they are not lowercased. Does anyone know of a script that would look into every files for the CFquery tag and lowercase its content between? This is the only solution that comes to me but maybe there is a easier way? Thanks in advance for any feedbacks. Phil ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:331160 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Need to convert all CFquery tags to lowercase
Thanks Michael, Ideally I would like to keep the comments in Uppercase but can do without it. You can use just about any regex tool to do the job, including writing a fast tool in CF to do the job. I am not sure how to use it but will play with it. (cfquery[^]+.+?/cfquery) \L\1 ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:331161 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: Need to convert all CFquery tags to lowercase
As far as I know there is no requirement in MySQL for queries to be lowercase. I just ran one in all uppercase and it worked fine. There has to be something else causing this problem. Are you on Linux? It is not the case for Windows with my hosting company which is unable to change system variables in the shared environment. Or Am I missing something? I would love to be proved wrong... ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:331162 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Need to convert all CFquery tags to lowercase
It cost me to make the below code to work. Should I use a Rereplace expression? (cfquery[^]+.+?/cfquery) \L\1 Thanks in advance for your feedbacks Do you need all of the query lowercased or is there part that you want to keep uppercased? If you don't care then this regex will do the job: (cfquery[^]+.+?/cfquery) \L\1 The first line grabs all cfquery tags and their content and the second like converts it to lower case. I'd test the regex against all of your templates first to see if there are any cases that you want to avoid. You can use just about any regex tool to do the job, including writing a fast tool in CF to do the job. -- Michael Dinowitz ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:331163 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Need to convert all CFquery tags to lowercase
If I recall right, you have to switch case sensitivity on, are you saying that is what your host has done? -Original Message- From: phil phil [mailto:arantxa...@gmail.com] Sent: Friday, 26 February 2010 8:58 PM To: cf-talk Subject: Need to convert all CFquery tags to lowercase Hello, I do need to migrate from Access to MySQL on a Windows and shared server environment. All existing queries (approx 2000) are failing because they are not lowercased. Does anyone know of a script that would look into every files for the CFquery tag and lowercase its content between? This is the only solution that comes to me but maybe there is a easier way? Thanks in advance for any feedbacks. Phil ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:331164 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Custom 404 Page
Actually, the better solution, in my opinion, is a basic HTML page. Unless you plan on doing something fancy each time a 404 is encountered, there is no need to create a CF request. Just set the custom 404 error template within IIS as you have already done and also set the Missing Template Handler within the CF Administrator. For instance, my Missing Template Handler within CF Admin is set to /customErrors/404.html. /customErrors is a CF mapping that points to a location where I keep my custom error templates. 404, 500, 500;100, etc... -Original Message- From: Andy Matthews [mailto:li...@commadelimited.com] Sent: Thursday, February 25, 2010 10:12 AM To: cf-talk Subject: RE: Custom 404 Page I think your best bet is to change your 404 handler to point to a coldfusion page. Then it can handle everything. 404.cfm -Original Message- From: Robert Harrison [mailto:rob...@austin-williams.com] Sent: Thursday, February 25, 2010 8:37 AM To: cf-talk Subject: Custom 404 Page Hi, I put a custom 404 error page in IIS. I works for everything, except CF pages. How do I also cf pages which are not found to display my 404 page? Robert B. Harrison Director of Interactive Services Austin Williams 125 Kennedy Drive, Suite 100 Hauppauge NY 11788 P : 631.231.6600 Ext. 119 F : 631.434.7022 http://www.austin-williams.com Great advertising can't be either/or.? It must be?. Plug in to our blog:?AW Unplugged http://www.austin-williams.com/unplugged __ Information from ESET Smart Security, version of virus signature database 4895 (20100225) __ The message was checked by ESET Smart Security. http://www.eset.com ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:331165 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Need to convert all CFquery tags to lowercase
It seems that the table name is case sensitive but not the columns. For e.g if I change the name of the table to 'company' from 'Company' then it cannot find the table because in MYSQL it is referred as 'Company'. BTW, we are on Linux which I understand is case sensitive. If I recall right, you have to switch case sensitivity on, are you saying that is what your host has done? Hello, I do need to migrate from Access to MySQL on a Windows and shared server environment. All existing queries (approx 2000) are failing because they are not lowercased. Does anyone know of a script that would look into every files for the CFquery tag and lowercase its content between? This is the only solution that comes to me but maybe there is a easier way? Thanks in advance for any feedbacks. Phil ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:331166 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Need to convert all CFquery tags to lowercase
yes. REReplace. The pattern your trying to match is the first line. It says that we're looking to capture something that starts with a cfquery tag, has content, and then ends with a closing cfquery tag. The replace has a \L before the content returned from the pattern (the query tag). \L means that everything that comes after it will be lower cased. End result is a whole cfquery tag along with body converted to lower case. -- Michael Dinowitz On Fri, Feb 26, 2010 at 7:07 AM, phil phil arantxa...@gmail.com wrote: It cost me to make the below code to work. Should I use a Rereplace expression? (cfquery[^]+.+?/cfquery) \L\1 Thanks in advance for your feedbacks Do you need all of the query lowercased or is there part that you want to keep uppercased? If you don't care then this regex will do the job: (cfquery[^]+.+?/cfquery) \L\1 The first line grabs all cfquery tags and their content and the second like converts it to lower case. I'd test the regex against all of your templates first to see if there are any cases that you want to avoid. You can use just about any regex tool to do the job, including writing a fast tool in CF to do the job. -- Michael Dinowitz ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:331167 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: Need to convert all CFquery tags to lowercase
Have you tried talking to your hosting provider, and switch case sensitivity off for your database? -Original Message- From: phil phil [mailto:arantxa...@gmail.com] Sent: Friday, 26 February 2010 11:40 PM To: cf-talk Subject: Re: Need to convert all CFquery tags to lowercase It seems that the table name is case sensitive but not the columns. For e.g if I change the name of the table to 'company' from 'Company' then it cannot find the table because in MYSQL it is referred as 'Company'. BTW, we are on Linux which I understand is case sensitive. ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:331168 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: cfcomponent inheritance path
Lets say for example I have a component called baseapp.cfc sitting in the web root. I also have an application.cfc in a directory named /blog. If I want the application.cfc to extend the baseapp.cfc, I have to use the following syntax: extends=/.baseapp You shouldn't need the slash or the dot, just extends=baseapp, if it's in the web root. Along the same lines of thought, is there a way to extend a component without knowing it's exact location? Lets say that the blog directory is now a subdirectory of /myapps. I want an application.cfc that is in /myapps/blog/admin to extend the application.cfc sitting one level up in /myapps/blog. I don't know if the blog directory is in the root of the site, in myapps, or in some other location. All I know is that the application.cfc I want to extend is one directory up. Is there a way to do relative inheritance? I expect the answer is no. The answer is no, as you expected. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ http://training.figleaf.com/ Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on GSA Schedule, and provides the highest caliber vendor-authorized instruction at our training centers, online, or onsit ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:331169 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Building Hierarchal Lists using CF
Hello Gang, This one, I have to say, eludes me. There is probably a very easy way of doing this that I just don't see, but a little help would be awesome. I have a list of categories from a query where I have parent-child relationships going on, where my ID can also be associated within a column called 'PARENT'. Something like this: IDNameParent_ID 1 Category A 0 2 Category B 0 3 Category A1 1 4 Category A2 1 5 Category B12 6 Category B22 7 Category A3 1 .. and so on, to be displayed like this: Category A Category A1 Category A2 Category A3 Category B Category B1 Category B2 Anyways, I'm not quite sure how to handle this. Somehow I know a CFLOOP has to come into all of this (or several)? I'd like to be able to make this modular so that even 5 or 6 nests deep that every category in my query would show (without, of course, getting repetitive and redundant in coding). Any thoughts or hints? Cheers, S. ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:331170 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Need to convert all CFquery tags to lowercase
On Fri, Feb 26, 2010 at 2:01 PM, Andrew Scott wrote: Have you tried talking to your hosting provider, and switch case sensitivity off for your database? That is not a per-database setting. Once you have it set to some setting and have clients on it, a hosting provider is committed and can not change it anymore. But why not do the conversion on the Access side before migrating to MySQL? In Access you can simply rename the tables to the case you use in your queries before you convert them. Jochem -- Jochem van Dieten http://jochem.vandieten.net/ ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:331171 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Apache AXIS version in CF9 and CF8?
Anyone know for sure what versions of Axis are in CF8 and CF9? Or how to get Cf to expose that info? Am having parsing problems with a third party XML file, and they're curious as to what version is having the problems. They're putting a line like this after the first line of the file (ie, after the ?XML line): ?bulk application=mr_xml? which is supposed to indicate that the code is machine readable (not sure exactly what that really means, but that's what the third part says. If I remove that line from the file, then it parses ok via CF's xmlParse() function thanks, -reed ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:331172 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: Need to convert all CFquery tags to lowercase
But why not do the conversion on the Access side before migrating to MySQL? In Access you can simply rename the tables to the case you use in your queries before you convert them. IIRC there is a setting in my.cnf that will automatically lower case table names. To turn it off you have to set it to 0 --lower-case-table-names=0 I think that the default setting is to lower case table names... It was a while back so forgive me if I am hazy on the details. More details can be found here: http://www.heidisql.com/forum.php?t=667#p3653 http://dev.mysql.com/doc/refman/5.5/en/identifier-case-sensitivity.html The way I got a round it was to either do a search and replace and lower case the table names in the code or to change the table names in the database using a MySQL GUI. Again, I forget the details, I was in a bit of a rage at the time. ;) HTH G! On Fri, Feb 26, 2010 at 10:05 AM, Jochem van Dieten joch...@gmail.comwrote: On Fri, Feb 26, 2010 at 2:01 PM, Andrew Scott wrote: Have you tried talking to your hosting provider, and switch case sensitivity off for your database? That is not a per-database setting. Once you have it set to some setting and have clients on it, a hosting provider is committed and can not change it anymore. But why not do the conversion on the Access side before migrating to MySQL? In Access you can simply rename the tables to the case you use in your queries before you convert them. Jochem -- Jochem van Dieten http://jochem.vandieten.net/ ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:331173 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: Apache AXIS version in CF9 and CF8?
Anyone know for sure what versions of Axis are in CF8 and CF9? Or how to get Cf to expose that info? Am having parsing problems with a third party XML file, and they're curious as to what version is having the problems. They're putting a line like this after the first line of the file (ie, after the ?XML line): According to /META-INF/MANIFEST.MF within the axis.jar file on CF 9: Manifest-Version: 1.0 Ant-Version: Apache Ant 1.5.3 Created-By: 1.4.2_05-b04 (Sun Microsystems Inc.) Name: org/apache/axis Implementation-Title: Apache Axis Implementation-Version: 1.2.1 2243 June 14 2005 Implementation-Vendor: Apache Web Services ?bulk application=mr_xml? which is supposed to indicate that the code is machine readable (not sure exactly what that really means, but that's what the third part says. If I remove that line from the file, then it parses ok via CF's xmlParse() function I don't think CF uses Axis to parse XML generally, it's a web service library. The line in question is a directive that specific applications could use to do something particular with that XML file, but other applications should ignore the directive. I don't know why CF isn't ignoring it, but I hope that helps a bit. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ http://training.figleaf.com/ Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on GSA Schedule, and provides the highest caliber vendor-authorized instruction at our training centers, online, or onsi ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:331174 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Building Hierarchal Lists using CF
I would do this in a recursive function that takes a depth parameter that will indent the presented data in some form (margin,table cells,tabs) and return the formatted output. I have one that is kind of extensive that builds a hierarchal output of almost any value given to it, kinda like cfdump but it evaluates the objects. I can post it if you like. -Original Message- From: Steve Keator [mailto:skea...@mlinc.com] Sent: Friday, February 26, 2010 9:24 AM To: cf-talk Subject: Building Hierarchal Lists using CF Hello Gang, This one, I have to say, eludes me. There is probably a very easy way of doing this that I just don't see, but a little help would be awesome. I have a list of categories from a query where I have parent-child relationships going on, where my ID can also be associated within a column called 'PARENT'. Something like this: IDNameParent_ID 1 Category A 0 2 Category B 0 3 Category A1 1 4 Category A2 1 5 Category B12 6 Category B22 7 Category A3 1 .. and so on, to be displayed like this: Category A Category A1 Category A2 Category A3 Category B Category B1 Category B2 Anyways, I'm not quite sure how to handle this. Somehow I know a CFLOOP has to come into all of this (or several)? I'd like to be able to make this modular so that even 5 or 6 nests deep that every category in my query would show (without, of course, getting repetitive and redundant in coding). Any thoughts or hints? Cheers, S. ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:331175 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
ColdFusion 8 CPU Spiking
Summary We are looking for tools to help us better troubleshoot this issue and/or a consultant that can help us track it down. Details We are using ColdFusion 8 with Windows Server 2003 in a clustered environment with 4 web servers. Over the last 2 weeks a random web server has begun spiking to 100% instantly and the running requests jumps to the maximum requests allows and ColdFusion basically stalls. The servers typically average less than 5%. We are using SeeFusion, Uptime and some homegrown tools to help troubleshoot this issue but we have been unable to resolve it. We have also reviewed all IIS log hits during the timeframe, checked all ColdFusion server and runtime logs and event viewer. We have rolled back all code and database changes. Any help would be greatly appreciated ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:331176 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Need to convert all CFquery tags to lowercase
Problem is that in my code over the years the table name can be as 'Company' or 'company' so just changing the table names in mysql to lowercase is not enough but yes a necessary step (can do it from the GUI: PHPadmin) Then as you wrote changing all occurrences of the table names (1500 cfquery tags) to lowercase. I choose lowercase but it could be also uppercase as long as everything on the code and db is coherent. Anyway that is the only solution that I find at this time. Changing the db to0 be case non sensitive because as someone already mentioned it is a shared environment so other clients would get in troubles. Thanks guys for the great feedbacks! But why not do the conversion on the Access side before migrating to MySQL? In Access you can simply rename the tables to the case you use in your queries before you convert them. IIRC there is a setting in my.cnf that will automatically lower case table names. To turn it off you have to set it to 0 --lower-case-table-names=0 I think that the default setting is to lower case table names... It was a while back so forgive me if I am hazy on the details. More details can be found here: http://www.heidisql.com/forum.php?t=667#p3653 http://dev.mysql.com/doc/refman/5.5/en/identifier-case-sensitivity.html The way I got a round it was to either do a search and replace and lower case the table names in the code or to change the table names in the database using a MySQL GUI. Again, I forget the details, I was in a bit of a rage at the time. ;) HTH G! On Fri, Feb 26, 2010 at 10:05 AM, Jochem van Dieten joch...@gmail.comwrote: ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:331177 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
cfquery return datatypes
Hello. Is there a way to return a datatype list from your query along with the column list? Example: cfquery name=qryTest datasource=test SELECT * FROM tblTest; /cfquery cfoutput #qryTest.columnlist#br #qryTest.datatypes# /cfoutput Thanks! ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:331178 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: cfquery return datatypes
Hello. Is there a way to return a datatype list from your query along with the column list? Example: IIRC, there is no direct method. But you could certainly extract that information using getMetaData() cfdump var=#getMetaData(qryTest)# ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:331179 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: ColdFusion 8 CPU Spiking
What does the SeeFusion stack traces show the requests are waiting on? Also, is SQL running on this same box, or is the CPU spike coming from JRun? As far as consulting, you can check out Webapper.com-- they make SeeFusion and have several consulting plans. ~Brad Original Message Subject: ColdFusion 8 CPU Spiking From: WebMastesr Smarte webmastersma...@gmail.com Date: Fri, February 26, 2010 10:33 am To: cf-talk cf-talk@houseoffusion.com Summary We are looking for tools to help us better troubleshoot this issue and/or a consultant that can help us track it down. Details We are using ColdFusion 8 with Windows Server 2003 in a clustered environment with 4 web servers. Over the last 2 weeks a random web server has begun spiking to 100% instantly and the running requests jumps to the maximum requests allows and ColdFusion basically stalls. The servers typically average less than 5%. We are using SeeFusion, Uptime and some homegrown tools to help troubleshoot this issue but we have been unable to resolve it. We have also reviewed all IIS log hits during the timeframe, checked all ColdFusion server and runtime logs and event viewer. We have rolled back all code and database changes. Any help would be greatly appreciated ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:331180 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: Need to convert all CFquery tags to lowercase
On 2/26/10, phil phil wrote: Problem is that in my code over the years the table name can be as 'Company' or 'company' so just changing the table names in mysql to lowercase is not enough but yes a necessary step (can do it from the GUI: PHPadmin) Then as you wrote changing all occurrences of the table names (1500 cfquery tags) to lowercase. I choose lowercase but it could be also uppercase as long as everything on the code and db is coherent. Anyway that is the only solution that I find at this time. How invested are you in MySQL? If your hoster offers PostgreSQL you could use that and have your case insensitive table names? Jochem -- Jochem van Dieten http://jochem.vandieten.net/ ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:331181 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: Need to convert all CFquery tags to lowercase
I tried this but as you can see I am REgex illiterate and more... REReplaceNoCase(TheFile,(cfquery[^]+.+?/cfquery),(cfquery[^]+.+?/cfquery\L\1),all) It will return the content of the cfquery but I am cannot find a way to lowercase it properly. Thanks yes. REReplace. The pattern your trying to match is the first line. It says that we're looking to capture something that starts with a cfquery tag, has content, and then ends with a closing cfquery tag. The replace has a \L before the content returned from the pattern (the query tag). \L means that everything that comes after it will be lower cased. End result is a whole cfquery tag along with body converted to lower case. -- Michael Dinowitz ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:331182 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Apache AXIS version in CF9 and CF8?
Right Dave, I got my wires crossed there. I remember reading something a few years ago about being to replace the xml parser that comes with CF with one of a couple of others - do you know which parse is the one the comes with CF9 (or Cf8, I doubt that it has changed)? thanks -reed Anyone know for sure what versions of Axis are in CF8 and CF9? Or how to get Cf to expose that info? Am having parsing problems with a third party XML file, and they're curious as to what version is having the problems. They're putting a line like this after the first line of the file (ie, after the ?XML line): According to /META-INF/MANIFEST.MF within the axis.jar file on CF 9: Manifest-Version: 1.0 Ant-Version: Apache Ant 1.5.3 Created-By: 1.4.2_05-b04 (Sun Microsystems Inc.) Name: org/apache/axis Implementation-Title: Apache Axis Implementation-Version: 1.2.1 2243 June 14 2005 Implementation-Vendor: Apache Web Services ?bulk application=mr_xml? which is supposed to indicate that the code is machine readable (not sure exactly what that really means, but that's what the third part says. If I remove that line from the file, then it parses ok via CF's xmlParse() function I don't think CF uses Axis to parse XML generally, it's a web service library. The line in question is a directive that specific applications could use to do something particular with that XML file, but other applications should ignore the directive. I don't know why CF isn't ignoring it, but I hope that helps a bit. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ http://training.figleaf.com/ Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on GSA Schedule, and provides the highest caliber vendor-authorized instruction at our training centers, online, or onsi ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:331183 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: ColdFusion 8 CPU Spiking
We have not been able to catch the SeeFusion stack traces while the problem is happening, we will do that. SQL is not running on the same box, JRUN is spiking. Good suggestion, we will contact the SeeFusion folks to see if they can help. Lincoln What does the SeeFusion stack traces show the requests are waiting on? Also, is SQL running on this same box, or is the CPU spike coming from JRun? As far as consulting, you can check out Webapper.com-- they make SeeFusion and have several consulting plans. ~Brad Summary We are looking for tools to help us better troubleshoot this issue and/or a consultant that can help us track it down. Details We are using ColdFusion 8 with Windows Server 2003 in a clustered environment with 4 web servers. Over the last 2 weeks a random web server has begun spiking to 100% instantly and the running requests jumps to the maximum requests allows and ColdFusion basically stalls. The servers typically average less than 5%. We are using SeeFusion, Uptime and some homegrown tools to help troubleshoot this issue but we have been unable to resolve it. We have also reviewed all IIS log hits during the timeframe, checked all ColdFusion server and runtime logs and event viewer. We have rolled back all code and database changes. Any help would be greatly appreciated ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:331184 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: ColdFusion 8 CPU Spiking
Set up your Active Monitoring Rules in SeeFusion to E-mail you when There are long-running requests, or when the number of active requests reaches a threshold. The E-mails will have a stack trace in them for you to look at even if you were at lunch when the server started bogging down. ~Brad Original Message Subject: Re: ColdFusion 8 CPU Spiking From: WebMastesr Smarte webmastersma...@gmail.com Date: Fri, February 26, 2010 12:15 pm To: cf-talk cf-talk@houseoffusion.com We have not been able to catch the SeeFusion stack traces while the problem is happening, we will do that. SQL is not running on the same box, JRUN is spiking. ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:331185 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
re: cfquery return datatypes
You can usually get that info from the database's system tables, depending on your RDBMS. (In the following queries, 'typename' will give you the datatype.) MSSQL: SELECT syscolumns.colid, syscolumns.name, syscolumns.colorder AS sortorder, syscolumns.prec AS collen, syscolumns.xtype, syscolumns.typestat, syscolumns.xusertype, syscolumns.isnullable, systypes.name AS typename, ( SELECT COUNT(*) FROM sysindexkeys WHERE id = syscolumns.id AND indid = 1 AND colid = syscolumns.colid ) AS isPrimary FROM syscolumns LEFT JOIN systypes ON syscolumns.xtype = systypes.xtype AND syscolumns.xusertype = systypes.xusertype WHERE id = OBJECT_ID(cfqueryparam cfsqltype=CF_SQL_VARCHAR value=#arguments.tableName#) ORDER BY colorder Oracle: SELECT table_name colid, column_name name, column_id sortorder, data_length collen, nullable isnullable, data_type typename, ( SELECT COUNT(*) FROM user_constraints c INNER JOIN user_cons_columns cc ON c.constraint_name = cc.constraint_name WHERE c.table_name = cfqueryparam cfsqltype=CF_SQL_VARCHAR value=#UCase(arguments.tableName)# AND c.constraint_type = cfqueryparam cfsqltype=CF_SQL_VARCHAR value=P AND cc.column_name = user_tab_columns.column_name ) AS isPrimary FROM user_tab_columns WHERE table_name = cfqueryparam cfsqltype=CF_SQL_VARCHAR value=#UCase(arguments.tableName)# ORDER BY column_id ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:331186 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Apache AXIS version in CF9 and CF8?
Hi Reed, I believe ColdFusion uses the JAXP (Java API For XML Parsing) which uses Apache Xerces on Java 1.5, 1.6 as the default DOM parser. Java 1.4 uses Apache Crimson as the default DOM parser. I have found the current versions of Java 1.6 use Xerces 2.6.2 You can run this code to find out what version of Xerces is being used by a Sun JVM cfset ver = CreateObject(java, com.sun.org.apache.xerces.internal.impl.Version) cfoutputversion = #ver.getVersion()#/cfoutput The JAXP API is pluggable so you can actually plugin a different DOM Parser if you wanted by setting the Java system property: -Djavax.xml.parsers.DocumentBuilderFactory=org.some.other.Factory But given the problem you have, I would simply just strip out the ?bulk application=mr_xml? tag from the XML document, that way you are not so tied to the server environment specifics. I was able to parse a document containing ?bulk application=mr_xml? with XmlParse using Java 1.5, are you running Java 1.4, and thus using crimson? (you can find out what version of java you are using by running this: http://www.petefreitag.com/item/743.cfm) Hope that helps. -- Pete Freitag http://foundeo.com/ - ColdFusion Consulting Products http://petefreitag.com/ - My Blog http://hackmycf.com - Is your ColdFusion Server Secure? On Fri, Feb 26, 2010 at 12:50 PM, Reed Powell r...@powellgenealogy.com wrote: Right Dave, I got my wires crossed there. I remember reading something a few years ago about being to replace the xml parser that comes with CF with one of a couple of others - do you know which parse is the one the comes with CF9 (or Cf8, I doubt that it has changed)? thanks -reed Anyone know for sure what versions of Axis are in CF8 and CF9? Or how to get Cf to expose that info? Am having parsing problems with a third party XML file, and they're curious as to what version is having the problems. They're putting a line like this after the first line of the file (ie, after the ?XML line): According to /META-INF/MANIFEST.MF within the axis.jar file on CF 9: Manifest-Version: 1.0 Ant-Version: Apache Ant 1.5.3 Created-By: 1.4.2_05-b04 (Sun Microsystems Inc.) Name: org/apache/axis Implementation-Title: Apache Axis Implementation-Version: 1.2.1 2243 June 14 2005 Implementation-Vendor: Apache Web Services ?bulk application=mr_xml? which is supposed to indicate that the code is machine readable (not sure exactly what that really means, but that's what the third part says. If I remove that line from the file, then it parses ok via CF's xmlParse() function I don't think CF uses Axis to parse XML generally, it's a web service library. The line in question is a directive that specific applications could use to do something particular with that XML file, but other applications should ignore the directive. I don't know why CF isn't ignoring it, but I hope that helps a bit. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ http://training.figleaf.com/ Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on GSA Schedule, and provides the highest caliber vendor-authorized instruction at our training centers, online, or onsi ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:331187 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Local DEV setup, multiple projects/websites
I just setup my hosts file to direct me: 1.) C:\Windows\System32\drivers\etc\hosts\ (In Vista. Not sure about win7) write the following: 127.0.0.1/devprojectA/ [tab] dev.projectA.com Also, if you are going to push to a windows server with IIS, I suggest you use the IIS web server instead of the built in version locally so you can mimic the same mapping as you would use in production. This is strictly a preference. There isn't anything wrong with your current setup at all. ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:331188 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: Apache AXIS version in CF9 and CF8?
Thanks for all the info Pete. I'm running CF9, so that's Java 1.6, and it uses Xerces 2.9.1, which seems to be the latest. Interesting that you were able to parse the xml using java 1.5 - maybe I'll give this a try on a CF8 box. I'll probably end up doing the stripping of that line, but it's a pain to do that because some of the files are big (400MB+) and don't have any line breaks in them, so first I need to make a pass over the file just to get line breaks before each XML tag, so that I can then use CFLOOP to go through it a second time on a line by line basis. If I try to read that whole file in at once CF (JVM actually) will roll over. thanks again for all the info, still digesting it, -reed ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:331189 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: Local DEV setup, multiple projects/websites
Yeah, what Charlie said. It is very easy to set up local sub domains with Apache. VirtualHost * ServerName site1.localhost DocumentRoot C:/xampp/htdocs/site1 /VirtualHost VirtualHost * ServerName site2.localhost DocumentRoot C:/xampp/htdocs/site2 /VirtualHost I find that it cuts down on a lot of chores like having to dynamically create urls and paths to cfcs. And Scott Stroz set up is great idea. As Forest Gump would say: One less thing. G! On Thu, Feb 25, 2010 at 9:52 PM, Charlie Griefer charlie.grie...@gmail.comwrote: While I do advocate keeping your development setup as close to the production setup as possible, I've always used Apache locally, even if I was using IIS remotely. Made it easier to do things like multiple sites and setting up the .dev sites as outlined above and in the blog entry i linked above. I believe that nowadays IIS does the multiple sites thing. If that's the case, you should still be able to set up the foo.dev and bar.dev sites in IIS, which gives you the equivalent of top level domains, even though they're subdirectories within your webroot. On Thu, Feb 25, 2010 at 6:34 PM, Jeff U j...@uspokerdirectory.com wrote: Definitely should have included that. WinXP, IIS, CF9 Development Server, used built-in webserver. Prefer to keep it that way for simplicity sake. Thanks guys. ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:331190 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Local DEV setup, multiple projects/websites
I do something similar but use the host headers in IIS. I think they call it host name in the latest IIS. So my Hosts files looks like: 127.0.0.1 foo 127.0.0.1 moo Then the host header in IIS is foo and moo for each site. So you type in http://foo/ the hosts file routes it to IIS and IIS then routes it to the proper web site. Works really well. -Original Message- From: Tony Bentley [mailto:t...@tonybentley.com] Sent: Friday, February 26, 2010 2:47 PM To: cf-talk Subject: Re: Local DEV setup, multiple projects/websites I just setup my hosts file to direct me: 1.) C:\Windows\System32\drivers\etc\hosts\ (In Vista. Not sure about win7) write the following: 127.0.0.1/devprojectA/ [tab] dev.projectA.com Also, if you are going to push to a windows server with IIS, I suggest you use the IIS web server instead of the built in version locally so you can mimic the same mapping as you would use in production. This is strictly a preference. There isn't anything wrong with your current setup at all. ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:331191 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Cleaning Microsoft .docx special chars
On Thu, Feb 25, 2010 at 6:32 AM, Kevin Pepperman ... We need it to be raw text, and we have specific filtering for Meta descriptions, page titles etc..(eg. no in meta description tags so the XHTML will validate) --so our CMS limits what can be entered with a combination of jQuery and server side validations after submitting to a XHR. So I probably wont be able to use a full RTE for this situation. I've seen this come up enough to toss another possible solution out there: We're starting to use the Jericho HTML library for parsing tags in CFEclipse, there is an example of cleaning bad markup there on the site. There's also an example of changing HTML into plain text, but with at least some formatting, which could work as well. I haven't really experimented with the HTML text conversion, but the cleaning stuff seems to be a pretty viable solution. Just tossing it out there, as you could do the cleaning as part of a custom tag or whatnot. :den -- The future belongs to those who prepare for it today. Malcolm ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:331192 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: cfquery return datatypes
In CF8 there is cfdbinfo This function below will return a query object the following fields (see below). http://www.cfquickdocs.com/cf8/?getDoc=cfdbinfo#cfdbinfo If you don't have CF 8 you will have to query the metadata based on the SQL dialect for that particular database. You can look at the source code for Brian Rinaldi's Illudium cfcgenerator. Last time I looked he had cfcs for MySQL, MSSQL, Oracle and Postges. http://code.google.com/p/cfcgenerator/ cffunction name=GetTableMetaData access=public output=false returntype=query hint=I return column metadata cfargument name=MyDSN required=true type=string / cfargument name=MyTable required=true type=string / cfdbinfo type=columns datasource=#arguments.MyDSN# name=TableMetaData table = #Arguments.MyTable# cfreturn TableMetaData / /cffunction COLUMN_NAME Name of the column. TYPE_NAME SQL data type of the column. IS_NULLABLE Whether the column allows nulls. IS_PRIMARYKEY Whether the column is a primary key. IS_FOREIGNKEY Whether the column is a foreign key. REFERENCED_PRIMARYKEY If the column is a foreign key, the name of the table it refers to. REFERENCED_PRIMARYKEY_TABLE If the column is a foreign key, the key name it refers to. COLUMN_SIZE Size of the column DECIMAL_DIGITS Number of digits to the right of the decimal point. COLUMN_DEFAULT_VALUE Default value of column. CHAR_OCTET_LENGTH Maximum length in bytes of a character or integer data type column. ORDINAL_POSITION Ordinal position of the column. REMARKS Remarks of the column. On Fri, Feb 26, 2010 at 12:13 PM, Joshua Rowe joshua.r...@varimereweb.comwrote: Hello. Is there a way to return a datatype list from your query along with the column list? Example: cfquery name=qryTest datasource=test SELECT * FROM tblTest; /cfquery cfoutput #qryTest.columnlist#br #qryTest.datatypes# /cfoutput Thanks! ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:331193 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Local DEV setup, multiple projects/websites
I just setup my hosts file to direct me: 1.) C:\Windows\System32\drivers\etc\hosts\ (In Vista. Not sure about win7) write the following: 127.0.0.1/devprojectA/ [tab] dev.projectA.com Also, if you are going to push to a windows server with IIS, I suggest you use the IIS web server instead of the built in version locally so you can mimic the same mapping as you would use in production. This is strictly a preference. There isn't anything wrong with your current setup at all. Well, this works, but I'm pretty sure it works by accident - to the best of my knowledge, all the HOSTS file resolves is IP addresses, not directory paths. This will route requests for dev.projectA.com to 127.0.0.1, where your web server can distinguish between them using host header mappings. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ http://training.figleaf.com/ Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on GSA Schedule, and provides the highest caliber vendor-authorized instruction at our training centers, online, or onsite. ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:331194 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Local DEV setup, multiple projects/websites
On Thu, Feb 25, 2010 at 9:05 PM, Jeff U j...@uspokerdirectory.com wrote: I'm hoping I can create all links RELATIVE and that way they work both locally as well as on production with no code changes what-so-ever. By far, the easiest solution is to make your links relative to the current page/directory rather than the root. Instead of this: a href=/somepath/somefile.cfm do this: a href=somefile.cfm or this: a href=../../somefile.cfm This avoids having to know what the root root directory is entirely. This may not be practical in your case, but in most cases it works just fine. -Cameron -- Cameron Childress Sumo Consulting Inc http://www.sumoc.com --- cell: 678.637.5072 aim: cameroncf email: camer...@gmail.com ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:331195 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4