Daily Archives

Articles indexed Monday January 3 2011

Page 13/33 | < Previous Page | 9 10 11 12 13 14 15 16 17 18 19 20  | Next Page >

  • Apache2: How do I restrict access to a directory, but allow access to one file within it?

    - by Nick
    I've inherited a poorly designed web app, which has a certain file that needs to be publicly accessible, but that file is inside a directory which should not. In other words, I need a way to block all files and sub-directories within a directory, but over-ride it for a single file. I'm trying this: # No one needs to access this directly <Directory /var/www/DangerousDirectory/> Order Deny,allow Deny from all # But this file is OK: <Files /var/www/DangerousDirectory/SafeFile.html> Allow from all </Files> </Directory> But it's not working- it just blocks everything including the file I want to allow. Any suggestions?

    Read the article

  • cPanel IPTables custom rules

    - by James Haigh
    Hi, I'm trying to allow a host access to port 3306 by IP. I've added the rule and ran an iptables-save and also service iptables save. These commands show as "OK" with no reported errors. And this works absolutely fine. Now, the server hasn't been restarted at all since I've been having this problem, but every day when I start developing on the server that needs mySQL access, it reports that the connection is refused. Back on the mySQL server, all I need to do is service iptables restart and everything then works as normal. The mySQL server is a CentOS cPanel VPS running on OpenVZ. Anyone know how I can make these rules persist? Is it something cPanel is doing overnight that is messing with my config? Thanks.

    Read the article

  • Running phpmyadmin and suphp

    - by thor
    I have a Debian Lenny web server. It is running apache2 with libapache2-mod-suphp. Unfortunately, suphp makes impossible to use phpmyadmin, as phpmyadmin is installed in /usr/share/phpmyadmin and owned by root, and suphp disables it's enging in this direcory: $ cat /etc/apache2/mods-enabled/suphp.conf <IfModule mod_suphp.c> AddType application/x-httpd-php .php .php3 .php4 .php5 .phtml suPHP_AddHandler application/x-httpd-php <Directory /> suPHP_Engine on </Directory> # By default, disable suPHP for debian packaged web applications as files # are owned by root and cannot be executed by suPHP because of min_uid. <Directory /usr/share> suPHP_Engine off </Directory> </IfModule> Is there a possibility to enable system phpmyadmin (may be through standard libapache2-mod-php5) while using suphp? How?

    Read the article

  • Microsoft met en garde contre l'exploitation de failles de sécurité dans Office et recommande d'effectuer au plus tôt la mise à jour de sécurité

    Microsoft met en garde contre l'exploitation de failles de sécurité dans Office Et recommande d'effectuer au plus tôt la mise à jour de sécurité Microsoft alerte sur une nouvelle vulnérabilité jugée critique dans le traitement de texte Microsoft Office Word. La faille permet l'exécution de code distant si un utilisateur ouvre ou pré-visualise un e-mail contenant des données RTF. L'exploitation de cette faille permet à un pirate d'obtenir les mêmes droits d'utilisateur que l'utilisateur local. La vulnérabilité avait déjà été corrigée dans un bulletin de sécurité (Pacht Tuesday) émis par Microsoft en novembre dernier. Mais une nouvelle exploitation de celle-ci sur internet v...

    Read the article

  • SAS unifie la vision des risques pour les banques avec SAS Risk Management for Banking

    SAS unifie la vision des risques pour les banques Avec SAS Risk Management for Banking SAS lance SAS Risk Management for Banking, une solution intégrée dédiée à la gestion des risques dans le secteur de la banque. Cette solution exploite les fonctionnalités de la plate-forme SAS Business Analytics dans le domaine de l'intégration des données, de l'analyse et du reporting. « Ses fonctionnalités de gestion des risques répondent aux exigences en matière de normes réglementaires et de besoins de performance des différentes entités métier », souligne l'éditeur. SAS Risk Management for Banking couvre le processus complet allant de la gestion des données au reportin...

    Read the article

  • Working Abroad Advice Needed

    - by RBA
    Hi, First of all, Happy New Year everybody! I wish you for 2011 all the best! For several years I was thinking about to work abroad, and I want to make this step(to work in a/several foreign countries, for several years). I am a Software Developer with a Bachelor of Engineering in Computer Science, with a +4 years of experience in Delphi(and small working experience in other programming languages). Until now I've applied at aprox. 100 positions over the world, and I've been contacted by 4-5 hiring managers. Our technical discussions went good, but then we reached at working visa 'problem'. I don't have legal/health problems, but I don't poses a working permit in other countries except Romania. I've been reading several forums concerning the working visas (here I take out working visa for US or other 'hard to get visa' countries), and there are several steps which companies must do (so I can take out the bureaucracy problem) to make the papers. Concerning the cost of a visa, this goes up to one medium salary from that country(in most of the cases). I've been working for the last years with different clients, from a wide variety of countries, and I don't believe I will have problems with integration in a foreign country So, the problem is that the market don't need Delphi Developers (there is a small amount of open positions on the recruiting sites), and I should start learning other programming language(all the time is better to know other programming languages - but to master it, requires some time) with a higher market 'rank' (Java/C#/etc), OR the problem is only concerning the working visa, and maybe the reticence of the employer to foreign possible candidates? I'm asking this especially for those users who made this step in their life or they want to make it in the future. Best regards,

    Read the article

  • Automatizing the backup of my databases and files with cron

    - by Patrick
    hi, I want to automatize the backup of my databases and files with cron. Should I add the following lines to crontab ? mysqldump -u root -pPASSWORD database_name | gzip > /home/backup/database_`date +\%m-\%d-\%Y`.sql.gz svn commit -m "Committing the working copy containing the database dump" 1) First of all, is this a good approach? 2) It is not clear how to specify the repository and the working copy with svn. 3) How can I run svn only when the mysqldump is done and not before ? Avoiding conflicts Any other tip ? thanks

    Read the article

  • Is there any PDF parser written in objective-c or c?

    - by user549683
    I'm writing a pdf reader iPhone application. I know how to show pdf file in view using CGPDF** classes in iOS. What I want to do now is to search text in pdf file, and highlight the searched text. So, I need a library which can detect what text is in what position. Besides, I want the library able to handle unicode and Chinese characters. I've searched for a few days but still cannot find anything suitable. I've tried xpdf, but it is written in c++. I don't know how to use c++ code in iPhone app. I've also tried http://www.codeproject.com/KB/cpp/ExtractPDFText.aspx but it does not handle Chinese characters. I've tried to code by myself, but the encoding in PDF is really complicated. For example, I don't know what to refer to when I want to decode the text by the following font: 8 0 obj << /Type /Font /Subtype /Type0 /Encoding /Identity-H /BaseFont /RNXJTV+PMingLiU /DescendantFonts [ 157 0 R ] >> endobj 157 0 obj << /Type /Font /Subtype /CIDFontType2 /BaseFont /RNXJTV+PMingLiU /CIDSystemInfo << /Registry (Adobe) /Ordering (CNS1) /Supplement 0 >> /FontDescriptor 158 0 R /W 161 0 R /DW 1000 /CIDToGIDMap 162 0 R >> endobj 158 0 obj << /Type /FontDescriptor /Ascent 801 /CapHeight 711 /Descent -199 /Flags 32 /FontBBox [0 -199 999 801] /FontName /RNXJTV+PMingLiU /ItalicAngle 0 /StemV 0 /Leading 199 /MaxWidth 1000 /XHeight 533 /FontFile2 159 0 R >> endobj

    Read the article

  • How to .NET package JavaScript/bookmarklet as Interner Explorer 8/9 Plugin?

    - by Don
    How to .NET package JavaScript/bookmarklet as Interner Explorer 8/9 Plugin? I have recently finished writing JavaScript code for a browser addon, which basically (once the JS is included) runs on page-load, for given domains it then checks for certain elements in the DOM and adds new relevant elements(/information) to the page. Since the JavaScript only reads/affects the HTML DOM independently (and does not need any toolbar buttons or anything else) the JS purely needs adding to the browser's webpages. I have packaged the code to work with Firefox and Chrome and those are both working well, and I can run the code for IE in 'bookmarklet' form without problems, but I would like to learn how to package JavaScript as an actual .NET .MSI addon/plugin that will install for the current Internet Explorer 8/9. Does anyone know of a suitable guide or method I might refer to please? I have tried searching online for tutorials but most walkthroughs refer to writing the plugin body itself (which might involve unnecessary stages/includes) and are thus not regarding packing existing JS. I hope someone might have the solution please? Note: Someone packaged an old version for me as a MSI installer for Internet Explorer 7 a year ago, which installed into Program Files with a plugin.dll plugin.tlb and plugin.InstallState plus BandObjectLib.dll Interop.SHDocVw.dll and Microsoft.mshtml.dll if that is useful.

    Read the article

  • Multiset without Compare?

    - by nimcap
    I want to use multiset to count some custom defined keys. The keys are not comparable numerically, comparing two keys does not mean anything, but their equality can be checked. I see that multiset template wants a Compare to order the multiset. The order is not important to me, only the counts are important. If I omit Compare completely what happens? Does multiset work without any problems for my custom keys?

    Read the article

  • mysql join on two indexes takes long time!!

    - by Alaa
    Hi All I have a custom query in dripal, this query is: select count(distinct B.src) from node A, url_alias B where concat('node/',A.nid)= B.src; now, nid in node is primary key and i have made src as an index in url_alias table. after waiting for more than a minute i got this: +-----------------------+ | count(distinct B.src) | +-----------------------+ | 325715 | +-----------------------+ 1 row in set (1 min 24.37 sec) now my question is: why did this query take this long, and how to optimize it?? Thanks for your help

    Read the article

  • JAX-RS implementation of link/element expansion?

    - by Jimmy
    While reading documentation of Google Data API and Atlassian REST API, I found interesting functionality - link (or title, element expansion) - http://bit.ly/i3rKMw. I would like to implement this functionality in my Java project of web service server for our IS, but I can't find any proper solution or advices for implementation. My project is quite big with many services so I need some robust and most automated solution. I was thinking about how to implement it like an extension for RESTEasy and JAXB, but it seems to be very complicated. Do you know some opensource projects which implements this functionality or any advices which could help me?

    Read the article

  • EXC_BAD_ACCESS from AudioBuffer

    - by jfalexvijay
    I am trying to do the record using AudioUnit for iPhone app. Changes: (start) I have added the following code bufferList = (AudioBufferList *)malloc(sizeof(AudioBuffer)); bufferList-mNumberBuffers = 1; bufferList-mBuffers[0].mNumberChannels = 2; bufferList-mBuffers[0].mDataByteSize = 1024; bufferList-mBuffers[0].mData = calloc(256, sizeof(uint32_t)); Changes: (end) static OSStatus recordingCallback(void *inRefCon, AudioUnitRenderActionFlags *ioActionFlags, const AudioTimeStamp *inTimeStamp, UInt32 inBusNumber, UInt32 inNumberFrames, AudioBufferList *ioData) { OSStatus status; status = AudioUnitRender(appdelegate-audioUnit, ioActionFlags, inTimeStamp, inBusNumber, inNumberFrames, appdelegate-bufferList); if(status != 0) NSLog(@"AudioUnitRender status is %d", status); SInt16* samples = (SInt16*)(ioData-mBuffers[0].mData); ..... } fixed: (I am getting OSStatus -50 error code)- Because I didn't initialize the bufferList. I am EXC_BAD_ACCESS from AudioBuffer (ioData-mBuffers[0].mData). I am not sure with this error. Please help me to resolve it.

    Read the article

  • Check if a class is subclass of another class in Java

    - by craesh
    Hi! I'm playing around with Java's reflection API and trying to handle some fields. Now I'm stuck with identifying the type of my fields. Strings are easy, just do myField.getType().equals(String.class). The same applies for other non-derived classes. But how do I check derived classes? E.g. LinkedList as subclass of List. I can't find any isSubclassOf(...) or extends(...) method. Do I need to walk through all getSuperClass() and find my supeclass by my own? Thanks! craesh

    Read the article

  • BDD-testing using a UI driver (e.g. Selenium for a web-application)

    - by jonathanconway
    Can BDD (Behavior Driven Design) tests be implemented using a UI driver? For example, given a web application, instead of: Writing tests for the back-end, and then more tests in Javascript for the front-end Should I: Write the tests as Selenium macros, which simulate mouse-clicks, etc in the actual browser? The advantages I see in doing it this way are: The tests are written in one language, rather than several They're focussed on the UI, which gets developers thinking outside-in They run in the real execution environment (the browser), which allows us to Test different browsers Test different servers Get insight into real-world performance Thoughts?

    Read the article

  • Parsing tab delimited file with double quotes in Perl

    - by sfactor
    I have a data set that is tab delimited with the user-agent strings in double quotes. I need to parse each of these columns and based on the answer of my other post I used the Text::CSV module. 94410634 0 GET "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; GTB6.6; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; AskTB5.5)" 1 The code is a simple one. #!/usr/bin/perl use strict; use warnings; use Text::CSV; my $csv = Text::CSV->new(sep_char => "\t"); while (<>) { if ($csv->parse($_)) { my @columns = $csv->fields(); print "@columns\n"; } else { my $err = $csv->error_input; print "Failed to parse line: $err"; } } But i get the Failed to parse line: error when I try it on this dataset. what am I doing wrong? I need to extract the 4th column containing the user-agent strings for further processing.

    Read the article

  • SSRS Report problem in wpf

    - by Johnny
    DataTable reportData = this.GetReportData(startId, endId, empId, minAmount, reportType); ReportViewer reportViewer = new ReportViewer(); reportViewer.ProcessingMode = ProcessingMode.Local; reportViewer.LocalReport.ReportEmbeddedResource = "PDCL.ERP.Modules.Marketing.Reports.rptDoctorDetail.rdlc"; ReportDataSource ds = new ReportDataSource(); ds.Name = "DoctorDetail_Report"; ds.Value = reportData; reportViewer.LocalReport.DataSources.Add(ds); reportViewer.RefreshReport(); this.WindowsFrmHost.Child = reportViewer; this is my code.I'm using SSRS but the viewer only shows but not any data. Why..?

    Read the article

  • ExceptionHandling with Spring 3

    - by mjf
    I have this controller: @RequestMapping(value = "*.xls", method = RequestMethod.GET) public String excel(Model model) { return "excel"; The excel wiew opens actually a ExcelViewer, which is build in method protected void buildExcelDocument(Map<String, Object> map, WritableWorkbook ww, HttpServletRequest hsr, HttpServletResponse hsr1) throws Exception { Class.writecontent Class.writeMoreContent Called methods write content to the Excel sheet and they can throw e.g biffException. How can I show a certain error page when Exception is occured? I tried this @Controller public class ExcelController { @ExceptionHandler(BiffException.class) public String handleException(BiffException ex) { return "fail"; } @RequestMapping(value = "*.xls", method = RequestMethod.GET) public String excel(Model model) { return "excel"; } } But I'm getting the server's error message about Exceptions. Maybe a bean definition missing?

    Read the article

  • VS2010 - RiaServices - A project with that name is already opened in the solution

    - by andrecarlucci
    Hello, The problem started after installing RiaServices Toolkit Dec 2010. If I unload the project and reload it again, I get this message, even on an empty Silverlight project (no changes made to the project file). "error : A project with that name is already opened in the solution." The solution has only 2 projects: the host (web) and the silverlight one. Any help is appreciated :) UPDATE: It only happens if I give the Silverlight project the same name as the solution.

    Read the article

  • matrix = *((fxMatrix*)&d3dMatrix); //Evil?

    - by Xilliah
    I've been using matrix = *((fxMatrix*)&d3dMatrix); for quite a while. It worked fine until my screen turned black and received a bucket of frustration on my desk. fxMatrix contains 4 fxVectors. fxVector used to be 16 bytes, but now it was suddenly 20. This was because it inherited fxStreamable, which added the vTable. So one solution is of course just to not inherit fxStreamable, and leave a comment saying that it must always be 16 bytes and never more. Another solution would be to make conversion functions, and copy the matrix completely. This makes it more secure, but has an impact on the performance. I suppose this is the best idea. Another solution is to not convert at all, and stick to D3DXMATRIX, but this makes the engine inconsistent and I personally really dislike this idea. What is your opinion?

    Read the article

  • Use `require()` with `node --eval`

    - by rentzsch
    When utilizing node.js's newish support for --eval, I get an error (ReferenceError: require is not defined) when I attempt to use require(). Here's an example of the failure: $ node --eval 'require("http");' undefined:1 ^ ReferenceError: require is not defined at eval at <anonymous> (node.js:762:36) at eval (native) at node.js:762:36 $ Here's a working example of using require() typed into the REPL: $ node > require("http"); { STATUS_CODES: { '100': 'Continue' , '101': 'Switching Protocols' , '102': 'Processing' , '200': 'OK' , '201': 'Created' , '202': 'Accepted' , '203': 'Non-Authoritative Information' , '204': 'No Content' , '205': 'Reset Content' , '206': 'Partial Content' , '207': 'Multi-Status' , '300': 'Multiple Choices' , '301': 'Moved Permanently' , '302': 'Moved Temporarily' , '303': 'See Other' , '304': 'Not Modified' , '305': 'Use Proxy' , '307': 'Temporary Redirect' , '400': 'Bad Request' , '401': 'Unauthorized' , '402': 'Payment Required' , '403': 'Forbidden' , '404': 'Not Found' , '405': 'Method Not Allowed' , '406': 'Not Acceptable' , '407': 'Proxy Authentication Required' , '408': 'Request Time-out' , '409': 'Conflict' , '410': 'Gone' , '411': 'Length Required' , '412': 'Precondition Failed' , '413': 'Request Entity Too Large' , '414': 'Request-URI Too Large' , '415': 'Unsupported Media Type' , '416': 'Requested Range Not Satisfiable' , '417': 'Expectation Failed' , '418': 'I\'m a teapot' , '422': 'Unprocessable Entity' , '423': 'Locked' , '424': 'Failed Dependency' , '425': 'Unordered Collection' , '426': 'Upgrade Required' , '500': 'Internal Server Error' , '501': 'Not Implemented' , '502': 'Bad Gateway' , '503': 'Service Unavailable' , '504': 'Gateway Time-out' , '505': 'HTTP Version not supported' , '506': 'Variant Also Negotiates' , '507': 'Insufficient Storage' , '509': 'Bandwidth Limit Exceeded' , '510': 'Not Extended' } , IncomingMessage: { [Function: IncomingMessage] super_: [Function: EventEmitter] } , OutgoingMessage: { [Function: OutgoingMessage] super_: [Function: EventEmitter] } , ServerResponse: { [Function: ServerResponse] super_: [Circular] } , ClientRequest: { [Function: ClientRequest] super_: [Circular] } , Server: { [Function: Server] super_: { [Function: Server] super_: [Function: EventEmitter] } } , createServer: [Function] , Client: { [Function: Client] super_: { [Function: Stream] super_: [Function: EventEmitter] } } , createClient: [Function] , cat: [Function] } > Is there a way to use require() with node's --eval? I'm on node 0.2.6 on Mac OS X 10.6.5.

    Read the article

  • Spring annotation-based container configuration context:include & exclude filters

    - by lisak
    Hey, first off I point to the similar question. I spent more than an hour to set this up, but PathMatchingResourcePatternResolver still scans everything. I have one common.xml (that is imported from specific.xml) and a specific.xml bean definition file. The context is loaded from specific.xml. In common.xml there is this element: <context:component-scan base-package="cz.instance.transl"> <context:exclude-filter type="aspectj" expression="cz.instance.transl.model..* &amp;&amp; cz.instance.transl.service..* &amp;&amp; cz.instance.transl.hooks..*"/> </context:component-scan> Where classes in packages like cz.instance.transl.service.* should not be subject of scanning, but everything else in here cz.instance.transl.* should be scanned through. But PathMatchingResourcePatternResolver marks everything as matching resources. It is the same with regex. BTW: in xml style configuration, one can have many components that share a common.xml beans via "import resource" when loading context. How this is done when Annotation-based container configuration is used ?

    Read the article

  • Generating PDF Files With iTextSharp

    - by Ricardo Peres
    I recently had the need to generate a PDF file containing a table where some of the cells included images. Of course, I used iTextSharp to do it. Because it has some obscure parts, I decided to publish a simplified version of the code I used. using iTextSharp; using iTextSharp.text; using iTextSharp.text.pdf; using iTextSharp.text.html; //... protected void OnGeneratePdfClick() { String text = "Multi\nline\ntext"; String name = "Some Name"; String number = "12345"; Int32 rows = 7; Int32 cols = 3; Single headerHeight = 47f; Single footerHeight = 45f; Single rowHeight = 107.4f; String pdfName = String.Format("Labels - {0}", name); PdfPTable table = new PdfPTable(3) { WidthPercentage = 100, HeaderRows = 1 }; PdfPCell headerCell = new PdfPCell(new Phrase("Header")) { Colspan = cols, FixedHeight = headerHeight, HorizontalAlignment = Element.ALIGN_CENTER, BorderWidth = 0f }; table.AddCell(headerCell); FontFactory.RegisterDirectory(@"C:\WINDOWS\Fonts"); //required for the Verdana font Font cellFont = FontFactory.GetFont("Verdana", 6f, Font.NORMAL); for (Int32 r = 0; r SyntaxHighlighter.config.clipboardSwf = 'http://alexgorbatchev.com/pub/sh/2.0.320/scripts/clipboard.swf'; SyntaxHighlighter.brushes.CSharp.aliases = ['c#', 'c-sharp', 'csharp']; SyntaxHighlighter.all();

    Read the article

  • WordPress permalinks not working, everything seems fine

    - by javipas
    I have a WordPress blog I've migrated from another CMS, and I've being having a lot of problems with my permalinks structure: lots of articles give a 404, although they are there, somewhere, published. The site is www.muycomputerpro.com (MCP for short), and for example an article that should be found is: http://muycomputerpro.com/Actualidad/Especiales/2009-las-grandes-crecen-en-la-bolsa If I do a search on the search tool at MCP, the result is there (see EnlacesMCP-1.jpg) But when I click on the link, our 404 error page appears (see EnlacesMCP-2.jpg) The weird thing is, the article is published, and the permalink is the right one, as you can see on this screenshot of the WordPress CMS: The permalink (below the title) is correct (http://www.muycomputerpro.com/Actualidad/Especiales/2009-las-grandes-crecen-en-la-bolsa/) but it does not work. In fact, if I try to use the short link (http://www.muycomputerpro.com/?p=5023) the article does not show either. I've accessed my WordPress DB and I've search the article to see if there is something wrong there, but from what I can tell all the fields are OK, here's a screenshot: I really don't know what is causing this. The permalink structure should work (I'm using the "Custom permalink" plugin to preserve the old URLs that had a alphanumeric code at the end of the postname) and the permalink config on wordpress is "/%postname%/". I really need help :(

    Read the article

  • Finding how a hacked server was hacked

    - by sixtyfootersdude
    I was just browsing through the site and found this question: My server's been hacked EMERGENCY. Basically the question says: My server has been hacked. What should I do? The best answer is excellent but it raised some questions in my mind. One of the steps suggested is to: Examine the 'attacked' systems to understand how the attacks succeeded in compromising your security. Make every effort to find out where the attacks "came from", so that you understand what problems you have and need to address to make your system safe in the future. I have done no system admin work so I have no idea how I would start doing this. What would be the first step? I know that you could look in the server log files but as an attacker the first thing that I would do would be errasing the log files. How would you "understand" how the attacks succeeded?

    Read the article

< Previous Page | 9 10 11 12 13 14 15 16 17 18 19 20  | Next Page >