Daily Archives

Articles indexed Thursday November 22 2012

Page 11/15 | < Previous Page | 7 8 9 10 11 12 13 14 15  | Next Page >

  • Objective-c class initializer executes multiple times

    - by apisip
    Unless I misunderstood it, this LINK from Apple's documentation clearly states that the class initializer, "+ (void)initialize)", only executes once per class. Here is the excerpt: Special Considerations initialize it is invoked only once per class. If you want to perform independent initialization for the class and for categories of the class, you should implement load methods. However, I'm getting a weird behavior on my project and the initializer is being executed twice. So I have to check if _classContext is null. I only got one class that has this method. What are the possible reasons why this is happening? I'm using XCode 4.5.2 and OS X 10.8.2. I got multiple iOS simulators, iPhone 5.1 and 6.0. + (void) initialize { num++; NSLog([NSString stringWithFormat:@"Times: %i", num]); if(_classContext == nil) _classContext = [[myClass alloc] init]; }

    Read the article

  • Tabs.url is undefined

    - by Notionwork
    I have no clue what I'm doing wrong here! This should be working I believe. I'm writing a chrome extension and this should get the current tab's url and set the html of #current-tab to the url (for testing purposes). The code successfully gets to the callback, but it says that tab.url is undefined when I put it in an alert box, and it does not put it's value in #current-tab. Here's the code I have: $('#get-tab').click(function(){ chrome.tabs.query({"active" : true}, function(tab){ for (var i = 0; i < tab.length; i++) { alert(tab.url); $('#current-tab').append(tab.url); }; }); });

    Read the article

  • C# BackgroundWorker skips DoWork and goes straight to RunWorkerCompleted

    - by mr_man
    I'm new with C# so go easy on me! So far - I have a console app that listens for client connections and replies to the client accordingly. I also have a WPF form with a button and a text box. The button launches some code to connect to the server as a BackgroundWorker, which then waits for a response before appending it to the end of the text box. This works great, once. Sometimes twice. But then it kept crashing - turns out that the DoWork block wasn't being called at all and it was going straight to RunWorkerCompleted. Of course, the .result is blank so trying to convert it to a string fails. Is this a rookie mistake? I have tried searching the internet for various ways of saying the above but haven't come across anything useful... This is the code so far: http://pastebin.com/ZQvCFqxN - there are so many debug outputs from me trying to figure out exactly what went wrong. This is the result of the debug outputs: http://pastebin.com/V412mppX Any help much appreciated. Thanks! EDIT: The relevant code post-fix (thanks to Patrick Quirk below) is: public void dorequest(string query) { request = new BackgroundWorker(); request.WorkerSupportsCancellation = true; request.WorkerReportsProgress = true; request.ProgressChanged += request_ProgressChanged; request.DoWork += request_DoWork; request.RunWorkerCompleted += request_RunWorkerCompleted; request.RunWorkerAsync(query); }

    Read the article

  • undefined method `output_data' for #<EventManager:0x007fa4220320c8> (NoMethodError)

    - by Roger Camps
    I keep getting this error: event_manager.rb:83:in': undefined method output_data' for #<EventManager:0x007fc5018320c0> (NoMethodError) I am following the exercise on this website: Here is my code (My error comes towards the end with DEF OUTPUT_DATA ...): # Dependencies require "csv" # Class Definition class EventManager INVALID_PHONE_NUMBER = "0000000000" INVALID_ZIPCODE = "00000" def initialize puts "EventManager Initialized." filename = "event_attendees.csv" @file = CSV.open(filename, {:headers => true, :header_converters => :symbol}) end def print_names @file.each do |line| puts line.inspect puts line[2] + " " + line[3] end end #printing home phone number method def print_numbers @file.each do |line| number = clean_number(line[:homephone]) puts number end end #cleaning numbers method def clean_number(number) cleaner= number.delete('.' + ')' + '(' + '-') if cleaner.length == 10 # Do Nothing elsif cleaner.length == 11 if cleaner.start_with?("1") cleaner = cleaner[1..-1] else cleaner = INVALID_PHONE_NUMBER end else cleaner = INVALID_PHONE_NUMBER end return cleaner end def clean_zipcode(original) if original.nil? zipcode = INVALID_ZIPCODE elsif original.length < 5 while original.length < 5 original = original.insert(0, "0") end else return original end return zipcode end def print_zipcodes @file.each do |line| zipcode = clean_zipcode(line[:zipcode]) puts zipcode end def output_data output = CSV.open("event_attendees_clean.csv", "w") @file.each do |line| output << line end end end end # Script manager = EventManager.new #manager.print_numbers #manager.print_zipcodes manager.output_data I've tried several things, checked all through the internet and I just can't figure it out myself. I will really appreciate any help. Thank you in advance!

    Read the article

  • how to cancel an awaiting task c#

    - by user1748906
    I am trying to cancel a task awaiting for network IO using CancellationTokenSource, but I have to wait until TcpClient connects: try { while (true) { token.Token.ThrowIfCancellationRequested(); Thread.Sleep(int.MaxValue); //simulating a TcpListener waiting for request } } any ideas ? Secondly, is it OK to start each client in a separate task ?

    Read the article

  • External Javascript file fails to receive variables from previous javascript block

    - by Franc
    I've been searching the net for several hours and can't find an answer in the whole "external js file"-jungle. I hope you guys can help! In short: My external javascript file doesn't seem to get the variables which I defined in the main.php file.. On main.php I define php variables and "transform" them into javascript variables <head>... <script type="text/javascript"> var phpmain_img = <?php echo json_encode($main_img); ?>; var phpvar1_large = <?php echo json_encode($var1_large); ?>; var phpvar2_large = <?php echo json_encode($var2_large); ?>; var phpvar3_large = <?php echo json_encode($var3_large); ?>; var phpvar4_large = <?php echo json_encode($var4_large); ?>; </script> ... <script language="javascript" type="text/javascript" src="/wshop/ext.js"></script> </head> In my ext.js file I want to process those variables. In the ext.js file I defined a the function swapImage() that will be used back in the main PHP: var imgArray = new Array( phpmain_img, phpvar1_large, phpvar2_large, phpvar3_large ); function swapImage(imgID) { var theImage = document.getElementById('theImage'); var newImg; newImg = imgArray[imgID]; theImage.src = newImg; } function preloadImages() { for(var i = 0; i < imgArray.length; i++) { var tmpImg = new Image; tmpImg.src = imgArray[i]; } } Result: The swapImage() in the main.php... doesnt work <div id="image"> <img id="theImage" src="<?=$main_img; ?>" alt="" /> </div> <div id="thumbs"> <?php echo "<img src=\"<$main_img_small\" alt=\"\" onmouseover=\"swapImage(0);\">"; echo "<img src=\"$var1_small\" alt=\"\" onmouseover=\"swapImage(1);\">"; echo "<img src=\"$var2_small\" alt=\"\" onmouseover=\"swapImage(2);\">"; echo "<img src=\"$var3_small\" alt=\"\" onmouseover=\"swapImage(3);\">"; ?> <br /> </div> Any help is greatly appreciated! UPDATE: I don't get a specific error, the swapImage functions doesn't work at mouseover. However, I tried to output the variables with e.g. document.write(phpimg_main) but nothing appears which makes me believe that there's something wrong with the handing over of the variables... here's the source code browser output `<html> <head> <link href="../demo.css" rel="stylesheet" type="text/css" /> <style type="text/css"> .... </style> <script type="text/javascript"> var phpmain_img = {"0":"http:\/\/path\/to\/main\/image.jpg"}; var phpvar1_large = {"0":"http:\/\/path\/to\/image1.jpg"}; var phpvar2_large = {"0":"http:\/\/path\/to\/image2.jpg"}; var phpvar3_large = null; var phpvar4_large = null; </script> <script language="javascript" type="text/javascript" src="/wshop/ext.js"></script> </head> <body onload="preloadImages()"> <div id="image"> <img id="theImage" src="http://path-to-main-image.jpg" alt="" /> </div> <div id="thumbs"> <img src="http://path-to-main-image.jpg" alt="" onmouseover="swapImage(0);"><img src="http://path-to-image1.jpg" alt="" onmouseover="swapImage(1);"><img src="http://path-to-image2.jpg" alt="" onmouseover="swapImage(2);"> <br /> </div> </body> `

    Read the article

  • How to call a method on UIButton in NSArray?

    - by user1792818
    I'm trying to enable a button but the button that I would enable in this function changes. I have an array of the buttons but when I use the .enabled on the array index I want it says that this doesn't work for IDs. I have used this array to set the text of each button before using: [[ButtonArray objectAtIndex: Index] setTitle:(@"blahblahblah") forState: UIControlStateNormal]; is there any way to use a similar function call to enable and disable?

    Read the article

  • Delaying in VB.net

    - by Reece Tilley
    my issue is i need to wait 3-4 seconds after a button has been pressed before i can check for it, here is my code under button1_click: While Not File.Exists(LastCap) Application.DoEvents() MsgBox("testtestetstets") End While PictureBox1.Load(LastCap) I think i'm doing something really simple wrong, i'm not the best at VB as i'm just learning so any explaining would be great! ~Thanks

    Read the article

  • VB.Net Memory Issue

    - by Skulmuk
    We have an application that has some interesting memory usage issues. When it first opens, the program uses aroun 50-60MB of memory. This stays consistent on 32-bit machines. On 64-bit machines, however, re-activating the form in any way (clicking, dragging, alt-tabbing, etc.) adds around another 50MB to it's memory usage. It repeats this process several times before resetting back to around 45MB, at which point the cycle begins again. I've done some research and a lot of people have said that VB in general has pretty poor garbage collection, which could be affecting the software in some way. However, I've yet to find a solution. There are no events fired when the application is activated (as shown by 32-bit usage) - the applications is merely sitting awaiting the user's actions. At load, the system pulls some data into a tree view, but that's the only external connection, and it only re-fires the routine when the user makes a change to something and saves the change. Has anyone else experienced anything this strange, and if so, does anyone know of what might fix it? It seems strange that it only occurs under x64 systems. Thanks

    Read the article

  • Raphael how to get last path and last circle, if i have 2 elements in the paper?

    - by 3gwebtrain
    I need to find the last path or circle in a paper, in order to perform further calculations to draw more elements, and calling 'paper.bottom' only gets the last element. Is there any way to get shapes of specific types, e.g. bottom.path, bottom.circle or traverse for the n'th child? I want to avoid using jQuery selectors, as i can't retrieve any properties from those. An example of a paper populated with shapes: var paper = Raphael('paper',500,500); var c1 = paper.circle(100,100,50) var p1 = paper.path("M10 20l70 0") var c2 = paper.circle(200,100,50)

    Read the article

  • Spring security request matcher is not working with regex

    - by Felipe Cardoso Martins
    Using Spring MVC + Security I have a business requirement that the users from SEC (Security team) has full access to the application and FRAUD (Anti-fraud team) has only access to the pages that URL not contains the words "block" or "update" with case insensitive. Bellow, all spring dependencies: $ mvn dependency:tree | grep spring [INFO] +- org.springframework:spring-webmvc:jar:3.1.2.RELEASE:compile [INFO] | +- org.springframework:spring-asm:jar:3.1.2.RELEASE:compile [INFO] | +- org.springframework:spring-beans:jar:3.1.2.RELEASE:compile [INFO] | +- org.springframework:spring-context:jar:3.1.2.RELEASE:compile [INFO] | +- org.springframework:spring-context-support:jar:3.1.2.RELEASE:compile [INFO] | \- org.springframework:spring-expression:jar:3.1.2.RELEASE:compile [INFO] +- org.springframework:spring-core:jar:3.1.2.RELEASE:compile [INFO] +- org.springframework:spring-web:jar:3.1.2.RELEASE:compile [INFO] +- org.springframework.security:spring-security-core:jar:3.1.2.RELEASE:compile [INFO] | \- org.springframework:spring-aop:jar:3.0.7.RELEASE:compile [INFO] +- org.springframework.security:spring-security-web:jar:3.1.2.RELEASE:compile [INFO] | +- org.springframework:spring-jdbc:jar:3.0.7.RELEASE:compile [INFO] | \- org.springframework:spring-tx:jar:3.0.7.RELEASE:compile [INFO] +- org.springframework.security:spring-security-config:jar:3.1.2.RELEASE:compile [INFO] +- org.springframework.security:spring-security-acl:jar:3.1.2.RELEASE:compile Bellow, some examples of mapped URL path from spring log: Mapped URL path [/index] onto handler 'homeController' Mapped URL path [/index.*] onto handler 'homeController' Mapped URL path [/index/] onto handler 'homeController' Mapped URL path [/cellphone/block] onto handler 'cellphoneController' Mapped URL path [/cellphone/block.*] onto handler 'cellphoneController' Mapped URL path [/cellphone/block/] onto handler 'cellphoneController' Mapped URL path [/cellphone/confirmBlock] onto handler 'cellphoneController' Mapped URL path [/cellphone/confirmBlock.*] onto handler 'cellphoneController' Mapped URL path [/cellphone/confirmBlock/] onto handler 'cellphoneController' Mapped URL path [/user/update] onto handler 'userController' Mapped URL path [/user/update.*] onto handler 'userController' Mapped URL path [/user/update/] onto handler 'userController' Mapped URL path [/user/index] onto handler 'userController' Mapped URL path [/user/index.*] onto handler 'userController' Mapped URL path [/user/index/] onto handler 'userController' Mapped URL path [/search] onto handler 'searchController' Mapped URL path [/search.*] onto handler 'searchController' Mapped URL path [/search/] onto handler 'searchController' Mapped URL path [/doSearch] onto handler 'searchController' Mapped URL path [/doSearch.*] onto handler 'searchController' Mapped URL path [/doSearch/] onto handler 'searchController' Bellow, a test of the regular expressions used in spring-security.xml (I'm not a regex speciality, improvements are welcome =]): import java.util.Arrays; import java.util.List; public class RegexTest { public static void main(String[] args) { List<String> pathSamples = Arrays.asList( "/index", "/index.*", "/index/", "/cellphone/block", "/cellphone/block.*", "/cellphone/block/", "/cellphone/confirmBlock", "/cellphone/confirmBlock.*", "/cellphone/confirmBlock/", "/user/update", "/user/update.*", "/user/update/", "/user/index", "/user/index.*", "/user/index/", "/search", "/search.*", "/search/", "/doSearch", "/doSearch.*", "/doSearch/"); for (String pathSample : pathSamples) { System.out.println("Path sample: " + pathSample + " - SEC: " + pathSample.matches("^.*$") + " | FRAUD: " + pathSample.matches("^(?!.*(?i)(block|update)).*$")); } } } Bellow, the console result of Java class above: Path sample: /index - SEC: true | FRAUD: true Path sample: /index.* - SEC: true | FRAUD: true Path sample: /index/ - SEC: true | FRAUD: true Path sample: /cellphone/block - SEC: true | FRAUD: false Path sample: /cellphone/block.* - SEC: true | FRAUD: false Path sample: /cellphone/block/ - SEC: true | FRAUD: false Path sample: /cellphone/confirmBlock - SEC: true | FRAUD: false Path sample: /cellphone/confirmBlock.* - SEC: true | FRAUD: false Path sample: /cellphone/confirmBlock/ - SEC: true | FRAUD: false Path sample: /user/update - SEC: true | FRAUD: false Path sample: /user/update.* - SEC: true | FRAUD: false Path sample: /user/update/ - SEC: true | FRAUD: false Path sample: /user/index - SEC: true | FRAUD: true Path sample: /user/index.* - SEC: true | FRAUD: true Path sample: /user/index/ - SEC: true | FRAUD: true Path sample: /search - SEC: true | FRAUD: true Path sample: /search.* - SEC: true | FRAUD: true Path sample: /search/ - SEC: true | FRAUD: true Path sample: /doSearch - SEC: true | FRAUD: true Path sample: /doSearch.* - SEC: true | FRAUD: true Path sample: /doSearch/ - SEC: true | FRAUD: true Tests Scenario 1 Bellow, the important part of spring-security.xml: <security:http entry-point-ref="entryPoint" request-matcher="regex"> <security:intercept-url pattern="^.*$" access="ROLE_SEC" /> <security:intercept-url pattern="^(?!.*(?i)(block|update)).*$" access="ROLE_FRAUD" /> <security:access-denied-handler error-page="/access-denied.html" /> <security:form-login always-use-default-target="false" login-processing-url="/doLogin.html" authentication-failure-handler-ref="authFailHandler" authentication-success-handler-ref="authSuccessHandler" /> <security:logout logout-url="/logout.html" success-handler-ref="logoutSuccessHandler" /> </security:http> Behaviour: FRAUD group **can't" access any page SEC group works fine Scenario 2 NOTE that I only changed the order of intercept-url in spring-security.xml bellow: <security:http entry-point-ref="entryPoint" request-matcher="regex"> <security:intercept-url pattern="^(?!.*(?i)(block|update)).*$" access="ROLE_FRAUD" /> <security:intercept-url pattern="^.*$" access="ROLE_SEC" /> <security:access-denied-handler error-page="/access-denied.html" /> <security:form-login always-use-default-target="false" login-processing-url="/doLogin.html" authentication-failure-handler-ref="authFailHandler" authentication-success-handler-ref="authSuccessHandler" /> <security:logout logout-url="/logout.html" success-handler-ref="logoutSuccessHandler" /> </security:http> Behaviour: SEC group **can't" access any page FRAUD group works fine Conclusion I did something wrong or spring-security have a bug. The problem already was solved in a very bad way, but I need to fix it quickly. Anyone knows some tricks to debug better it without open the frameworks code? Cheers, Felipe

    Read the article

  • Submit pdf form fields to a HTTP POST request

    - by Josjojo
    I've made a pdf form in Adobe Acrobat. Now I want to make a button that submits the form to a HTTP POST request. I have searched for about 4 hours, but I have not found an example to do this. Here I read that it is possible to send the pdf form fields with a HTTP submission, but there's also no example given: http://acrobatusers.com/tutorials/form-submit-e-mail-demystified I'm looking for a JavaScript example that I can link to the submit button.

    Read the article

  • Django forms I cannot save picture file

    - by dana
    i have the model: class OpenCv(models.Model): created_by = models.ForeignKey(User, blank=True) first_name = models.CharField(('first name'), max_length=30, blank=True) last_name = models.CharField(('last name'), max_length=30, blank=True) url = models.URLField(verify_exists=True) picture = models.ImageField(help_text=('Upload an image (max %s kilobytes)' %settings.MAX_PHOTO_UPLOAD_SIZE),upload_to='jakido/avatar',blank=True, null= True) bio = models.CharField(('bio'), max_length=180, blank=True) date_birth = models.DateField(blank=True,null=True) domain = models.CharField(('domain'), max_length=30, blank=True, choices = domain_choices) specialisation = models.CharField(('specialization'), max_length=30, blank=True) degree = models.CharField(('degree'), max_length=30, choices = degree_choices) year_last_degree = models.CharField(('year last degree'), max_length=30, blank=True,choices = year_last_degree_choices) lyceum = models.CharField(('lyceum'), max_length=30, blank=True) faculty = models.ForeignKey(Faculty, blank=True,null=True) references = models.CharField(('references'), max_length=30, blank=True) workplace = models.ForeignKey(Workplace, blank=True,null=True) the form: class OpencvForm(ModelForm): class Meta: model = OpenCv fields = ['first_name','last_name','url','picture','bio','domain','specialisation','degree','year_last_degree','lyceum','references'] and the view: def save_opencv(request): if request.method == 'POST': form = OpencvForm(request.POST, request.FILES) # if 'picture' in request.FILES: file = request.FILES['picture'] filename = file['filename'] fd = open('%s/%s' % (MEDIA_ROOT, filename), 'wb') fd.write(file['content']) fd.close() if form.is_valid(): new_obj = form.save(commit=False) new_obj.picture = form.cleaned_data['picture'] new_obj.created_by = request.user new_obj.save() return HttpResponseRedirect('.') else: form = OpencvForm() return render_to_response('opencv/opencv_form.html', { 'form': form, }, context_instance=RequestContext(request)) but i don't seem to save the picture in my database... something is wrong, and i can't figure out what :(

    Read the article

  • How do I send/receive windows messages between VB6 and c#?

    - by cabgef
    I know I can receive messages with the code below in c#, how do I send to vb6, and receive in vb6, and send from vb6? [System.Security.Permissions.PermissionSet(System.Security.Permissions.SecurityAction.Demand, Name = "FullTrust")] protected override void WndProc(ref Message m) { int _iWParam = (int)m.WParam; int _iLParam = (int)m.LParam; switch ((ECGCardioCard.APIMessage)m.WParam) { // handling code goes here } base.WndProc(ref m); }

    Read the article

  • How to replace plain URLs with links?

    - by Sergio del Amo
    I am using the function below to match URLs inside a given text and replace them for HTML links. The regular expression is working great, but currently I am only replacing the first match. How I can replace all the URL? I guess I should be using the exec command, but I did not really figure how to do it. function replaceURLWithHTMLLinks(text) { var exp = /(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/i; return text.replace(exp,"<a href='$1'>$1</a>"); }

    Read the article

  • A verdade sobre o NuGet e seu futuro (pt-BR)

    - by srecosta
    Há uma série de mal-entendidos sobre o NuGet e sobre o ecossistema do qual ele faz parte: ele é da Microsoft ou ele é da comunidade; ele é open source ou ele não é; ele existe fora do Visual Studio ou só nele? Neste post, que é uma tradução de um post do Phil Haack (o @haacked) que eu pedi pra traduzir, ele tenta responder alguns deles e deixar claro qual é a missão do NuGet e o que a comunidade pode fazer para torná-lo melhor.O post continua no meu blog: http://www.srecosta.com/2012/11/19/a-verdade-sobre-o-nuget-e-seu-futuro/Abraços,Eduardo Costa

    Read the article

  • Which ports for IPSEC/LT2P?

    - by Matt
    I have a firewall/router (not doing NAT). I've googled and seen conflicting answers. It seems UDP 500 is the common one. But the others are confusing. 1701, 4500. And some say I need to also allow gre 50, or 47, or 50 & 51. Ok, which ports are the correct ones for IPSec/L2TP to work in a routed environment without NAT? i.e. I want to use the built in windows client to connect to a VPN behind this router/firewall.

    Read the article

  • Loadbalancing with nginx and tomcat

    - by London
    Hello this should be fairly easy to answer for any system admin, the problem is that I'm not server admin but I have to complete this task, I'm very close but still not managing to do it. Here is what I mean, I have two tomcat instance running on machine1 and machine2. People usually access those by visiting urls : http://machine1:8080/appName http://machine2:9090/appName The problem is when I setup nginx with domain name i.e domain.com, nginx sends requests to http://machine1:8080/ and http://machine2:9090/ instead of http://machine1:8080/ and http://machine2:9090/appName Here is my configuration (very basic as it can be noted) : upstream backend { server machine1:8080; server machine2:9090; } server { listen 80; server_name www.mydomain.com mydomain.com; location / { # needed to forward user's IP address to rails proxy_set_header X-Real-IP $remote_addr; # needed for HTTPS proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Host $http_host; proxy_redirect off; proxy_max_temp_file_size 0; proxy_pass http://backend; } #end location } #end server What changes must I do to do the following : - when user visits mydomain.com - transfer him to either machine1:8080/appName or machine2:9090 Thank you

    Read the article

  • Shared mailbox - users cannot create or view subfolders

    - by carlpett
    I've setup a shared mailbox on our Exchange 2010/SBS2011 server. I've added some users as Full permission-users on this mailbox, and when they open Outlook/login to OWA the mailbox is automatically opened. Great stuff. However, only the Inbox folder is visible, and the alternative to create a folder is grayed out. If they open the mailbox explicitly (for instance in OWA by clicking open other user's mailbox) they can see other folders, as well as create new ones. What configuration is needed to be able to view and create subfolders directly?

    Read the article

  • Reverse proxy - how should it be done?

    - by Thomas M.
    I have a currently running server with Apache that is working great! However, I want to buy a VPS and use that as a proxy between the user and the "old" server. So the new server's only job is actually to just forward the traffic from the VPS to the old Apache server. How can I achieve this the best way? I've read something about nginx proxy, but don't know if that's what I should use? The IDEAL way (for me) would be to now even touch the running server. I just want to setup the VPS as proxy, forward the DNS to the proxy instead, and let the proxy take over the connection to the primary server. Is that possible? I would really like to hear your opinions about this, and how you would do this (would be happy if you could link me to some tutorial)! :) The VPS is running CentOS and the running/primary is running Debian. Thanks in advance.

    Read the article

  • Long running php script hangs/terminates on IIS 7.5

    - by Rich
    I'm a bit of nube when it comes to configuring IIS 7.5 and Php so apologies if this is a silly question but I've been wrestling with this for over half the day and need some fresh input. I have a php application running on IIS 7.5 , php 5.4 running as fastcgi. The application works absolutley fine with the exception that long running php scripts seem to hang; no 500 error they simply seem never complete and return the results to the browser. I've written a simple test script below to eliminate the possibility of programming error in the main app : <?php /* test timeout */ /*set_time_limit(110);*/ echo "Testing time out in seconds\n"; for ($i = 0; $i < 175; $i++) { echo $i." -- "; if(sleep(1)!=0) { echo "sleep failed script terminating"; break; } } ?> If I run the script beyond 175 seconds it hangs. Below that it will return the results to the browser. Here are the time out parameters that I've set for php and fastcgi. I've also played around setting these really low in order to get various time out errors and have succeeded which brings me to the conclusion that there's another setting that I'm missing .. perhaps. fastcgi activity timeout=800 Idle Timeout = 900 request Timeout 800 Php max_execution_time=700 Any solutions or pointers in the right direction would be very ... very welcome. Thanks

    Read the article

  • switchless Infiniband between two servers on RHEL 6.3

    - by exfizik
    I have 2 servers running RHEL 6.3 which have 2 port Infiniband cards >lspci | grep -i infini 07:00.0 InfiniBand: QLogic Corp. IBA7322 QDR InfiniBand HCA (rev 02) I'm interested in connecting them directly to each other bypassing an Infiniband switch (which I don't have). Quick googling showed that at least in some configurations it's possible. I installed all RedHat Infiniband packages with yum groupinstall "Infiniband Support". However, ibv_devinfo shows that both ports in each card are down, which indicates that cables are not connected. But the cable is connected, although the LEDs are off on the cards (not a good sign). Another source of confusion for me is that according to this, RedHat doesn't come with OFED packages and I'm slightly hesitant to install them from source due to the lack of RedHat support for them... So where am I going with this? The questions I have are: is it possible to have a switchless/direct Infiniband connection between two servers the way I described above? If it's possible, do I have to use the OFED packages or can I configure everything with just the packages coming with RHEL. Why are the LEDs off on my servers even though the cable is connected? Any additional input/advice/pointers would be appreciated. P.S. I followed this guide for installation instructions. The Infiniband cards are clearly recognized by my OS and the rdma service is running. Update: I have opensm installed. When I run it it says: OpenSM 3.3.13 Command Line Arguments: Log File: /var/log/opensm.log ------------------------------------------------- OpenSM 3.3.13 Entering DISCOVERING state Using default GUID 0x1175000076e4c8 SM port is down and stays at that point.

    Read the article

  • Kerberos: Running an app with a parameter using krenew

    - by Mihai Todor
    I need to run an application with krenew, but the application also needs to receive a parameter via command line and I need to send its output to a file. From the documentation, it looks like this should do the trick: krenew -t -- sh -c 'compute-job > /afs/local/data/output' but, unfortunately, when I run the command below: krenew -s -- sh -c './my_app config.xml > results/test.txt &' the application just dies after a while and I can see from the output of ps aux that krenew is not running along with my_app. I am not sure what the parameter -t does, and as far as I can see, if I run krenew -s ./my_app, it works properly. I hope someone can clarify this.

    Read the article

  • Windows server 2008 R2 nas connection

    - by Msmit1993
    I am a student and i'm experimenting with my own home server running windows server 2008 R2. Now i have a NAS in my network an i can connect with it trough my server but only if i am on the administrator account. My own account is in the administrators group but can't establish a connection with the NAS unless the administrator account has already connected. How do i make my own account connect with the NAS without first connecting with the admin account. The error message on my account: An error occurred while reconnecting Y: to \NAS\Download Microsoft Windows Network: The user name could not be found. This connection has not been restored.

    Read the article

  • setting my mysql server - limiting domains that can connect

    - by Alex
    I am trying to setup a mysql server on my machine. I would like to limit the domains that it listens for connections to. My understanding is that you can either have it listen to 1 ip or all ip's. Therefore, if i want to connect remotely I have to say all ips. Then I would like to block all domains but the ones I know should actually be connecting.. I believe this is done through windows firewall. However, how do i do this by domain instead of IP?

    Read the article

< Previous Page | 7 8 9 10 11 12 13 14 15  | Next Page >