Daily Archives

Articles indexed Thursday January 13 2011

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

  • php mail() function painfully slow on local development machine

    - by Michael B
    Background: If you have set up a local apache server for development purposes you may have run into the problem where sendmail takes a long time (at least one minute) to send emails. This is extremely frustrating if you are trying to debug a problem with an email you have generated. There are several forum posts on the internet that discuss this problem. However, none of theme described what to do in enough detail for my limited knowledge. Here are the steps that worked for me: 1) find your hostname (in case you've forgotten it) using this command: :~$ cat /hosts/hostname myhostname 2) edit the file /etc/hosts and make sure the first line is the following: 127.0.0.1 localhost.localdomain localhost myhostname 3) edit the sendmail configuration file ( /etc/mail/sendmail.cf in Ubuntu) and Uncomment the line #O HostsFile=/etc/hosts 4) Restart the computer. The computer should boot up much faster now and the mail() function should return almost immediately. HOWEVER, the emails won't actually be sent unless you follow step 5. 5) You must new use the sendmail '-f' option whenever using the mail function. For example: mail('[email protected]', 'the subject', 'the message', null, '[email protected]'); My question for my fellow serverfaulters is: What further changes can be made so that I don't have to use the sendmail -f option? Although it's not very hard to add the -f option, it is a problem when your CMS (such as Drupal) does not use the -f option when sending mail. You would need to hack a core module to add this option.

    Read the article

  • No input file specified with nginx

    - by user66700
    I'm getting "No input file specified." when I attempt to browse to the phpmyadmin domain, not sure what I'm doing wrong.. using both php-fpm and php-cgi, php-fpm is currently working another directory fine..Had to change the port number to 8888 since -fpm was already using 9000 http://pastebin.com/kdEckiL3 from nginx.conf: server { listen 80; server_name phpmyadmin.domain.com; access_log /home/fanboy/logs/phpmyadmin.access_log; error_log /home/fanboy/logs/phpmyadmin.error_log; location / { root /usr/share/phpmyadmin; index index.php; } location ~ \.php$ { fastcgi_pass 127.0.0.1:8888; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME /usr/share/phpmyadmin$fastcgi_script_name; include /usr/local/nginx/conf/fastcgi.conf; } }

    Read the article

  • HTTPS is not working in transparent proxy with Squid

    - by Supratik
    Hi I am using Squid proxy 3.1, all systems in the LAN connects to the internet through proxy. Direct connection is blocked using the iptables from the gateway server. There are some devices which does not have options for auto proxy or manual proxy and can only connect to the internet directly. So I enabled transparent proxy in Squid and redirected packets for port 80 and 443 to Squid proxy using iptables. Now the problem is it is working fine for HTTP port but HTTPS is not working. It is throwing "ssl_error_rx_record_too_long" error. If it is not possible through transparent proxy can you please suggest me another solution. Warm Regards Supratik

    Read the article

  • Wireless 802.11x Disconnects

    - by BillP3rd
    I've looked at (and read) all of the similar questions and none of them get exactly to the issue I'm having at home. I have an 802.11g access point (two, actually, with different SSIDs and on different channels). One is an Airlink AR525W. The other is a Linksys WRT54G v.2. The issue is that at random times, my laptop will lose its wireless connection. This occurs regardless of which access point I'm connected to. When I lose the connection, the affected AP no longer appears in the list of available APs. Also, it doesn't have anything to do with walls or distance. It can happen within 30' and when my laptop is literally within line-of-sight. When it loses the signal, it can take from 10 to 30 minutes to reconnect and it always will without intervention. I've done all the “standard” things to troubleshoot the problem and it has improved. For example, I surveyed other access points in my vicinity and have selected a different channel for each of my APs that no one else nearby is using. Both APs are configured WPA2/AES. I'm down to wondering [Note: This is not a shopping question. I'm not buying a new AP] if the fact that I didn't drop two bills on my APs and instead opted for more modest solutions has anything to do with it? I've oft wondered why anyone would go for the high-end AP when they didn't have to. Also, I am aware of DD-WRT and have chosen not to go there because only one of my APs is supported. Oh, and one final thing. It an HP x64 laptop running Windows 7 Ultimate. The wireless interface is an Atheros AR9285 802.11b/g/n WiFi Adapter. All the latest drivers and service packs have been applied. It did the same thing with my old laptop (a Lenovo) so I don't the problem is in the laptop. It's really annoying when this happens and suggestions of things I haven't thought of or may have overlooked (No, really. As unlikely as it is, I admit that I may have overlooked something :-)) are appreciated.

    Read the article

  • How do I install Flash for just one browser on Mac?

    - by ridogi
    How can I install Flash for just Firefox and not Safari? I would like to have Flash not load at all, so the Click to Flash extension is not good enough. I've looked at the Safari plist and don't see any way to disable it. Alternatively, updating the Flash plugin that is built into Chrome would solve this. I used to use Chrome for my flash only browsing, but Google is not updating the embedded flash player. I found the way to force Chrome to ignore it's built in plugin in this Adobe KB article, but then Chrome just uses the plugin installed for the system.

    Read the article

  • Super slow time machine backup on my mac

    - by lowellk
    I just got a new 2TB drive which I'm trying to use as a time machine drive for my mac which has a 1TB drive. On my first time trying to back it up, I'm getting terrible throughput, not even 1GB per day (it's been running for 36 hours now). I erased the disk and tried to copy a large file to it and got the same slow speed. What can I do to diagnose this? Are there any tools which can inspect the disk and tell me if it's messed up? Thanks!

    Read the article

  • Client Side Form Validation vs. Server Side Form Validation

    In my opinion, it is mandatory to validate data using client side and server side validation as a fail over process. The client side validation allows users to correct any error before they are sent to the web server for processing, and this allows for an immediate response back to the user regarding data that is not correct or in the proper format that is desired. In addition, this prevents unnecessary interaction between the user and the web server and will free up the server over time compared to doing only server side validation. Server validation is the last line of defense when it comes to validation because you can check to ensure the user’s data is correct before it is used in a business process or stored to a database. Honestly, I cannot foresee a scenario where I would only want to use one form of validation over another especially with the current cost of creating and maintaining data. In my opinion, the redundant validation is well worth the overhead.

    Read the article

  • Transmitting Form Data from the Client to the Web Server

    The steps involved in transmitting form data from the client to the web server User loads web form User enters data in to web form fields User clicks submit On submit page validates fields using JavaScript. If validation errors are found then the validation script stops the browser from canceling posting the data to the web server and displays error messages as needed If the form passes the data validation process then the browser will URL encode the values of every field and post it to the server.  The server reads the posted data from the query string and then again validates the data just to ensure data consistency and to prevent any non-validated data because JavaScript was turned off on the clients browser from being inserted in to a database or passed on to other process If the data passes the second validation check then the server side code will continue with the requested processes

    Read the article

  • Book: Dependency Injection in .NET

    - by CoffeeAddict
    Does anyone find this odd that this is a book from mid 2010 on a pretty popular topic and there is no "see inside" but even worse no reviews!?!?! I want to buy it but this extremely odd that for such a popular topic there isn't at least 2 or more reviews. I'd expect a ton of reviews on a book on a subject such as this. Dependency Injection in .NET (Manning) Anyone have this book that can tell me if it's worth my money? the date incorrectly states 2001 on Amazon and I've notified the author on that.

    Read the article

  • Why no client-side HTML include tag?

    - by Xepoch
    I had a question posed to me the other day by another programmer. I remember (a very long time ago) wondering the very same. Why was a browser-side include tag never considered? Or was it? Specifically with a tag that instructed the browser to include additional HTML from other sources. e.g. <include src="http://server/foo/bar.html">. Many folks will make javascript calls and fill innerHTML to accomplish the same, when the same outside a the javascript engine could be accomplished by the browser. It would have been painful to have nested <HTML>s <BODY>s (i.e.) but we have to consider that aspect anywhere anyway.

    Read the article

  • Changing Palette for Day/Light Mode using GIMP

    - by J.C.
    Hello, Suppose I've a picture, which want to achieve day/light mode by changing 8bpp color palette. If I want the pixel index of my picture is always fixed for both day mode and night mode. For example, the 1st pixel index is 100. Which I can look up index 100 in day mode palette and night mode palette. How can I use GIMP to do so? My goal is to not update my pixel index of my picture. Also, as you see in two palette, they are not one one mapping. That is index 1 of the day mode palette and index 1 of the night mode palette may not used in the same pixel of the picture, how can I tackle this problem? Actually, my use case is as follow I want to use one 8bpp picture to achieve day/night mode by update only the color palette (without updating the pixel index). The advantage is I only have to prepare 2 256 byte palette rather than saving 2 big pictures in my limited data ram. Thanks a lot

    Read the article

  • How to inject a key string to andoid device through ADB?

    - by Nandi
    Hi, Can somebody help me for the following. I want to select a perticular string in the list displayed in android phone. If i take example of phone book. i want to pass a person name to the device using adb interface and that name should get highlighted in the list. I tried all adb commands for this but could pass string and key events to the screen but not able to select the respective string. please help. Thanks in advance.

    Read the article

  • Format decimal to currency, should be in cents for values $0 to $1

    - by Spongeboy
    I have a decimal variable which represents a donation amount. Currently I am displaying it on screen as a currency like so- DonationAmount.ToString("C"); This gives the following output (given a US locale) 1 -> $1.00 2 -> $2.00 0.5 -> $0.50 I am happy with the first two example, but want to have "0.5" show as "50c". My current solution is with a conditional- if (DonationAmount > 1) return (DonationAmount * 100m).ToString() + "c"; else return DonationAmount.ToString("C"); Is there a better way?

    Read the article

  • Java, how to trace functions called

    - by user435657
    Hi all, I want to trace the beginning [& ending] of functions called in Java, like the following code: public void foo() { System.out.println("begin of foo()"); ... System.out.println("e-n-d of foo()"); } But maintaining of the dump code System.out.println is something tedious and error-prone, for there may be tens of thounds of function in an class. Any good idea can ease this work? I don't want dump statements all over the file. Implementation of both or one of the beginning & ending traces is perferd. But, if impossible, recordings of that the function has been called is also helpful. I mean not care the exact beginnig and ending, just tell that the function has been called.

    Read the article

  • VB.NET: Scrollbar "button"?

    - by Omega
    I plan on using a scrollbar for, well, scrolling an image. The image is 200x500, however, the only visible area is 200x250. So I set the max value to 250, and the min value to 0. The idea is that if I drag the scrollbar's button to the bottom, 250 pixels will have moved for the image, right? But wait, the scrollbar's button is.... very small. And the scrollbar is actually pretty long. Is there a way to make the scrollbar's button longer?

    Read the article

  • problem with MANIFEST.MF in jar

    - by dhananjay
    I have created my jar file in the following folder: /usr/local/bin/niidle.jar And I have one jarfile which is in the following folder /Projects/EnwelibDatedOct13/Niidle/lib/hector-0.6.0-17.jar And this file 'hector-0.6.0-17.jar' I have to include in MANIFEST.MF in jar. And when I mention class path in MANIFEST.MF as follows: Manifest-Version: 1.0 Main-Class: com.ensarm.niidle.web.scraper.NiidleScrapeManager Class-Path: /Projects/EnwelibDatedOct13/Niidle/lib/hector-0.6.0-17.jar When I run this using command: java -jar /usr/local/bin/niidle.jar It works properly.. But I dont want to give full Class-Path name, I have to give Class-Path as follows: Manifest-Version: 1.0 Main-Class: com.ensarm.niidle.web.scraper.NiidleScrapeManager Class-Path: lib/hector-0.6.0-17.jar And when I run this using command: java -jar /usr/local/bin/niidle.jar It is showing error message: Exception in thread "main" java.lang.NoClassDefFoundError: me/prettyprint/hector/api/Serializer at com.ensarm.niidle.web.scraper.NiidleScrapeManager.main(NiidleScrapeManager.java:21) Caused by: java.lang.ClassNotFoundException: me.prettyprint.hector.api.Serializer at java.net.URLClassLoader$1.run(URLClassLoader.java:200) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at java.lang.ClassLoader.loadClass(ClassLoader.java:307) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) at java.lang.ClassLoader.loadClass(ClassLoader.java:252) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320) ... 1 more Please tell me solution for that...

    Read the article

  • Multiple sessions for one user?

    - by ganuke
    Hi I have host web application which is developed using java and jsp. In client side each client give five ajax calls to the server to retrieve data from the server in every 30 seconds. My problem is can one user who use one browser to log in to the system have multiple session at a time. Reason is when i use the tool to use monitor the firewall I can see more than 10 sessions are active for one IP. How this can happen? any comments

    Read the article

  • "tail -f" alternate which doesn't scroll the terminal window

    - by Jagtesh Chadha
    I want to check a file at continuous intervals for contents which keep changing. "tail -f" doesn't suffice as the file doesn't grow in size. I could use a simple while loop in bash to the same effect: while [ 1 ]; do cat /proc/acpi/battery/BAT1/state ; sleep 10; done It works, although it has the unwanted effect of scrolling my terminal window. So now I'm wondering, is there a linux/shell command that would display the output of this file without scrolling the terminal?

    Read the article

  • rails not recognizing project

    - by tipu
    I can create a new project using rails and I can use stuff like rails migration ... and i (correctly) get a error because the sqlite gem is missing. but when i try using rails migration ... with a project i checked out from github, it doesn't recognize that it is a rails project i get: Usage: rails new APP_PATH [options] Options: -d, [--database=DATABASE] # Preconfigure for selected database (options: mysql/oracle/postgresql/sqlite3/frontbase/ibm_db) # Default: sqlite3 -O, [--skip-active-record] # Skip Active Record files [--dev] # Setup the application with Gemfile pointing to your Rails checkout -J, [--skip-prototype] # Skip Prototype files -T, [--skip-test-unit] # Skip Test::Unit files -G, [--skip-git] # Skip Git ignores and keeps -b, [--builder=BUILDER] # Path to an application builder (can be a filesystem path or URL) [--edge] # Setup the application with Gemfile pointing to Rails repository -m, [--template=TEMPLATE] # Path to an application template (can be a filesystem path or URL) -r, [--ruby=PATH] # Path to the Ruby binary of your choice # Default: /usr/bin/ruby1.8 [--skip-gemfile] # Don't create a Gemfile and it goes on. any ideas? edit: it's probably an important detail that earlier my rails wasn't working at all. i had to cp /usr/bin/ruby to /usr/bin/local/ruby

    Read the article

  • How to properly assign a value to the member of a struct that has a class data type?

    - by sasayins
    Hi, Please kindly see below for the codes. Its compiling successfully but the expected result is not working. Im very confused because my initialization of the array is valid, //cbar.h class CBar { public: class CFoo { public: CFoo( int v ) : m_val = v {} int GetVal() { return m_val; } private: int m_val; }; public: static const CFoo foo1; static const CFoo foo2; public: CBar( CFoo foo ) m_barval( foo.GetVal() ){} int GetFooVal() { return m_barval; } private: int m_barval; }; //cbar.cpp const CBar::CFoo foo1 = CBar::CFoo(2); const CBar::CFoo foo2 = CBar::CFoo(3); //main.cpp struct St { CBar::CFoo foo; }; St st[] = { CBar::foo1, CBar::foo2 }; for( int i=0; i<sizeof(st)/sizeof(St); i++ ) { CBar cbar( st[i].foo ); std::cout << cbar.GetFooVal() << std::endl; } But then when I change the St::foo to a pointer. And like assign the address of CBar::foo1 or CBar::foo2, its working, like this, //main.cpp struct St { const CBar::CFoo *foo; }; St st[] = { &CBar::foo1, &CBar::foo2 }; for( int i=0; i<sizeof(st)/sizeof(St); i++ ) { CBar cbar( *st[i].foo ); std::cout << cbar.GetFooVal() << std::endl; } The real problem is. The app should output 2 3 Please advice. Many thanks.

    Read the article

  • Easiest way to retrofit retry logic on LINQ to SQL migration to SQL Azure

    - by Pat James
    I have a couple of existing ASP .NET web forms and MVC applications that currently use LINQ to SQL with a SQL Server 2008 Express database on a Windows VPS: one VPS for both IIS and SQL. I am starting to outgrow the VPS's ability to effectively host both SQL and IIS and am getting ready to split them up. I am considering migrating the database to SQL Azure and keeping IIS on the VPS. After doing initial research it sounds like implementing retry logic in the data access layer is a must-do when adopting SQL Azure. I suspect this is even more critical to implement in my situation where IIS will be on a VPS outside of the Azure infrastructure. I am looking for pointers on how to do this with the least effort and impact on my existing code base. Is there a good retry pattern that can be applied once at the LINQ to SQL data access layer, as opposed to having to wrap all of my LINQ to SQL operations in try/catch/wait/retry logic?

    Read the article

  • Is it possible to customize @synthesized properties?

    - by Dan K.
    I'm probably just being a bit lazy here, but bear with me. Here's my situation. I have a class with two nonatomic, retained properties. Let's say: @property (nonatomic, retain) UITextField *dateField; @property (nonatomic, retain) NSDate *date; I synthesize them as expected in the implementation. What I want to happen is that whenever the setter on date is invoked, it also does something to the dateField (i.e. it sets the text property on the dateField to be a nicely formatted version of the date). I realize I can just manually override the setter for date in my implementation by doing the following: - (void) setDate:(NSDate *)newDate { if (date != newDate) { [date release]; date = [newDate retain]; // my code to touch the dateField goes here } } What would be awesome is if I could let Objective C handle the retain/release cycle, but still be able to "register" (for lack of a better term) a custom handler that would be invoked after the retain/release/set happens. My guess is that isn't possible. My google-fu didn't come up with any answer to this, though, so I thought I'd ask.

    Read the article

  • WPF ClickOnce Bootstrap Dection Failure on One Machine

    - by Dexter Morgan
    Hello Friend, I've decided to use ClickOnce technology to deploy my new WPF application. By and large, ClickOnce works as advertised but I've hit a minor glitch regarding Bootstrapping and framework detection. Some background: - I'm using the standard Visual Studio-generated publish.htm page as my launch page. - The only prerequisite is the .NET Framework 4.0 Client Profile. - All clients using IE 8. - All clients already have the .NET 4.0 Client Profile installed. ClickOnce works as advertised on the vast majority of machines. The VS-generated JScript correctly detects that the framework is installed and presents the user with a Run button. The app launches just fine. I'm getting odd results on one of the machines, however. On the offending machine, the VS-generated JScript tells the user that the prereqs may not be installed -- or rather, it FAILS to detect that the framework is already installed. The "launch" link successfully launches the application but the Run link points to the bootstrapper setup.exe. Why is it failing to detect the framework on this one machine? It occurred to me that framework detection is largely a matter of examining the useragent string that's submitted by the browser. So, what you see below are two UserAgent strings. The first is from a machine where things are working properly. The second is from the offending machine. THIS ONE WORKS: 2011-01-11 15:14:14 W3SVC1 192.168.0.36 GET /publish.htm - 80 - 72.130.187.100 Mozilla/4.0+(compatible;+MSIE+8.0;+Windows+NT+6.0;+Trident/4.0;+SLCC1;+.NET+CLR+2.0.50727;+Media+Center+PC+5.0;+.NET+CLR+3.5.21022;+.NET+CLR+3.5.30729;+.NET+CLR+3.0.30729;+.NET4.0C) 304 0 0 THIS ONE DOESN'T: 2011-01-11 18:49:12 W3SVC1 192.168.0.36 GET /publish.htm - 80 - 76.212.204.169 Mozilla/4.0+(compatible;+MSIE+8.0;+Windows+NT+6.1;+WOW64;+Trident/4.0;+GTB6.6;+SLCC2;+.NET+CLR+2.0.50727;+.NET+CLR+3.5.30729;+.NET+CLR+3.0.30729;+Media+Center+PC+6.0;+.NET4.0C) 200 0 0 The useragent string of both machines clearly states, "hey the .NET 4.0 client profile is installed here" -- yet the second machine seems unable to detect it. I don't know enough about useragent strings to understand why the former works and the latter fails. The only difference as far as I can tell is that the offending machine is running 64bit. But that shouldn't make a difference. Should it? Any ideas? Dexter Morgan

    Read the article

  • Is there any other way of using signed applets

    - by 640KB
    Hi There, If I want to deploy high privileged applets they need to be signed. For that a certificate is created and then a jar file is signed with a jarsigner. After that in the HTML code one has to specify code,codebase AND archive (jar) which we signed before. However I wrote a servlet which acts as two things: it sits at the URL pointed by the codebase and serves class bytecode to the applet. The same servlet also uses serialization to communicate with the applet whereby whenever the applet gets a class it does not know it goes to the codebase which ends up back at the servlet. Almost like a mini RMI setup but simpler. I hope you can see the power in this. Unfortunately for signed applets one needs the archive. Now the servlet is also able to load a Certificate object and can send it to the applet too. So here is the setup: At one point the applet receives class bytecode and it also has the Certificate. It would be nice if the applet could instantiate all received classes using that certificate (otherwise code from jar is signed and outside is not which prompts nasty messages to the user). So my question to you fine Java aficionados: Would there by any way for me to use the bytecode data and the Certificate to instantiate the class as a signed object so that the plugin pops the Security dialog, accepts teh certificate and elevates the object's privileges. What I could find is that the there is a class CodeSource that accepts codebase URL and certificate and is essential to the signing process. What I am not sure is how one could intercept the class loading inside applets to install additional certificates not obtained through a JAR file via archive. What do you say? Thanks a bunch.

    Read the article

  • pound sign is not working in mail content using java.mail package?

    - by kumar kasimala
    HI all, I am using javax.mail packaage MINEMESSAGE,MimeMultipart class to send a mail, but even though I mention type utf-8, unicode characters are not working in body text. like pound sign is not working. please help what to do. here is my message headers To: [email protected] Message-ID: <875158456.1.1294898905049.JavaMail.root@nextrelease> Subject: My Site Free Trial - 5 days left MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_0_1733237863.1294898905008" MyHeaderName: myHeaderValue Date: Thu, 13 Jan 2011 06:08:25 +0000 (UTC) ------=_Part_0_1733237863.1294898905008 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

    Read the article

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