Daily Archives

Articles indexed Sunday July 1 2012

Page 4/15 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • error reporting issues

    - by SunnyOne
    I'm still entangled in error handling problems. After having read and tried lots of different scripts, I still do not have an overall insight on the problem. I made a syntax error on purpose and get the following error message : Parse error: syntax error, unexpected '{' in /home/directory/public_html/mypage.php on line 10 To understand how it work, as a first step, I'd like to remove this message(which I'am able to do) and replace it by a custom one. How can I customize this message ? Thanks a lot.

    Read the article

  • Using NavigationService without XAML files

    - by UnclePaul
    I'm trying to create some pages in my Windows Phone application without the use of any XAML. Everything is working, however, I'm failing to use NavigationService/ Journal with this approach and all my attempts to utilize it are answered by the usual "No XAML was found at the location {0}'" response. Yes, I can add an almost empty XAML file to get everything working, but is this kind of boiler plate code really necessary? Is it maybe possible to use the UriMapping to map certain Uris to specific classes instead of *.xaml files?

    Read the article

  • Access to nested methods when DSL

    - by Vyacheslav Loginov
    class Warcraft def initialize &block instance_eval &block end def method_missing name, *args, &block instance_variable_set("@#{name}".to_sym, args[0]) self.class.send(:define_method, name, proc { instance_variable_get("@#{name}")}) end def game &block @game = Game.new &block end class Game def initialize &block instance_eval &block end def method_missing name, *args, &block instance_variable_set("@#{name}".to_sym, args[0]) self.class.send(:define_method, name, proc { instance_variable_get("@#{name}")}) end end end warcraft = Warcraft.new do name "Warcraft III" battle_net :iccup game do side :sentinels hero "Furion" rune_appear_every 2 end end puts warcraft.inspect # => #<Warcraft:0x00000000be3e80 @name="Warcraft III", @battle_net=:iccup, @game=#<Warcraft::Game:0x000000009c6c38 @side=:sentinels, @hero="Furion", @rune_appear_every=2>> How to access nested methods? puts warcraft.battle_net # => iccup puts warcraft.side #=> #<Proc:[email protected]:9 (lambda)> puts warcraft.game #=> dsl.rb:18:in `instance_eval': block not supplied (ArgumentError) puts warcraft.game.side #=> dsl.rb:18:in `instance_eval': block not supplied (ArgumentError)

    Read the article

  • How do I find where id does not match any of an array?

    - by Nick5a1
    I have a Workout model that has and belongs to many Equipment models. I have an array of some Equipment IDs. I want to find all Workouts that don't have any Equipment assigned that matches any of the array of Equipment IDs. So, if my array = [2,3,5] I want to find all workouts where the assigned equipment ids does not include 2, 3 or 5. EDIT: Workout.joins(:equipment).where("equipment.id not in(?)",[2,3,5]).uniq Assuming five instances of Equipment, the code above returns workouts with equipment.ids 1 and 4 (good), but also returns partial matches for example Workouts with equipment.id = [1,2], [1,2,3].

    Read the article

  • What database strategy to choose for a large web application

    - by Snoopy
    I have to rewrite a large database application, running on 32 servers. The hardware is up to date, each machine has two quad core Xeon and 32 GByte RAM. The database is multi-tenant, each customer has his own file, around 5 to 10 GByte each. I run around 50 databases on this hardware. The app is open to the web, so I have no control on the load. There are no really complex queries, so SQL is not required if there is a better solution. The databases get updated via FTP every day at midnight. The database is read-only. C# is my favourite language and I want to use ASP.NET MVC. I thought about the following options: Use two big SQL servers running SQL Server 2012 to serve the 32 servers with data. On the 32 servers running IIS hosting providing REST services. Denormalize the database and use Redis on each webserver. Use booksleeve as a Redis client. Use a combination of SQL Server and Redis Use SQL Server 2012 together with Hadoop Use Hadoop without SQL Server What is the best way for a read-only database, to get the best performance without loosing maintainability? Does Map-Reduce make sense at all in such a scenario? The reason for the rewrite is, the old app written in C++ with ISAM technology is too slow, the interfaces are old fashioned and not nice to use from an website, especially when using ajax. The app uses a relational datamodel with many tables, but it is possible to write one accerlerator table where all queries can be performed on, and all other information from the other tables are possible by a simple key lookup.

    Read the article

  • Advantages of GitHub over Bitbucket for Git Repositories [closed]

    - by rolve
    Now that Bitbucket also supports Git repositories, it seams to me that it is a good alternative to GitHub, especially since its free plan includes unlimited private repositories, which is not available on GitHub. Yet, GitHub seams much more popular. Are there any major reasons to choose GitHub as the hosting site for Git repositories instead of Bitbucket? (Although I have no problems with making my personal projects publicly available in general, I like the idea of being able to make the switch from public to private or vice versa any time I want. But if there are some good reasons to use GitHub, I would be willing to give up this freedom.)

    Read the article

  • php: fopen() of an URL breaks for domain names, not for numerical addresses

    - by b0fh
    After hours of trying to debug a third-party application having trouble with fopen(), i finally discovered that php -r 'echo(file_get_contents("http://www.google.com/robots.txt"));' fails, but php -r 'echo(file_get_contents("http://173.194.32.81/robots.txt"));' Succeeds. Note that as the webserver user, I can ping www.google.com and it resolves just fine. I straced both executions of PHP, and they diverge like this: For the numerical v4 URL: socket(PF_INET, SOCK_STREAM, IPPROTO_IP) = 3 fcntl(3, F_GETFL) = 0x2 (flags O_RDWR) fcntl(3, F_SETFL, O_RDWR|O_NONBLOCK) = 0 connect(3, {sa_family=AF_INET, sin_port=htons(80), sin_addr=inet_addr("173.194 poll([{fd=3, events=POLLOUT}], 1, 0) = 0 (Timeout) ...[bunch of poll/select/recvfrom]... close(3) = 0 For the domain name: socket(PF_INET6, SOCK_DGRAM, IPPROTO_IP) = 3 close(3) = 0 PHP didn't even try to do anything with that socket, it seems. Or even resolve the domain, for that matter. WTF ? Recompiling PHP with or without ipv6 support did not seem to matter. Disabling ipv6 on this system is not desirable. Gentoo Linux, PHP 5.3.14, currently giving a try to PHP 5.4 and see if it helps. Anyone has an idea ? EDIT: php -r 'echo gethostbyname("www.google.com");' Works and yield an ipv4, while php -r 'echo(file_get_contents("http://[2a00:1450:4007:803::1011]/"));' Seems to return a blank result. EDIT 2: I didn't even notice the first time, that the v6 socket opened when the name is used is a SOCK_DGRAM.

    Read the article

  • ClassCastException in webclient

    - by narendra
    I am using web client for getting page source. First time i am getting page source. After i use the same object for getting page source for different URL it's showing an Exception like: java.lang.ClassCastException: com.gargoylesoftware.htmlunit.UnexpectedPage cannot be cast to com.gargoylesoftware.htmlunit.html.HtmlPage This is the code which i am using. HtmlPage firstPage = webClient.getPage("firsturl"); HtmlPage downloadPage = null; try { webClient.setJavaScriptEnabled(true); downloadPage = (HtmlPage) webClient.getPage("secondurl"); } catch (Exception e) { e.printStackTrace(); } Thx in advance

    Read the article

  • Failed opening 'SiteTest: Firefox.php' when running Yii Functional Test

    - by Phelios
    Warning: include(): Failed opening 'SiteTest: Firefox.php' for inclusion ... \yii\framework\YiiBase.php on line 418 Yii v1.1.10 PHPUnit v3.6.10 PHPUnit_Selenium v 1.2.6 I get this error when trying to run the example on the book "Agile Web Development with Yii 1.1 and PHP5" I kind of feel that there is a problem with the phrase SiteTest:, it shouldn't be there. But, how do I fix this? UPDATE (SOLVED): Apparently, the problem is not the warning shown above, but there is another error down the road. It says that "curl_init()" is undefined. I already enabled the php_curl extension, but the PHP from CLI is not using the same .ini file as the apache one. So, after I enabled the php_curl in the CLI version of the ini, it works fine now (still giving the warning, but the test is running).

    Read the article

  • Google I/O 2012 - Google Compute Engine -- Technical Details

    Google I/O 2012 - Google Compute Engine -- Technical Details Joe Beda, Evan Anderson This session will provide an in depth overview of Google Compute Engine. Google Compute provides Virtual Machines optimized for large scale data processing and analytics. We will dive into the core concepts, API, unique features and architectural best practices in the context of concrete examples. For all I/O 2012 sessions, go to developers.google.com From: GoogleDevelopers Views: 2497 88 ratings Time: 01:01:39 More in Science & Technology

    Read the article

  • Google I/O 2012 - Data Driven Storytelling

    Google I/O 2012 - Data Driven Storytelling Michael Fink, Yinnon Haviv, Dani Bacon From a single chart to elaborate data driven storytelling, Google Chart Tools now provides a crisp and accessible experience based on our new HTML5 gallery. Come and learn how you can use animations, annotations and other visual semantics and to take user-interaction with rich data, to the next level. For all I/O 2012 sessions, go to developers.google.com From: GoogleDevelopers Views: 563 10 ratings Time: 53:05 More in Science & Technology

    Read the article

  • jQuery Mobile Download Builder

    - by Yousef_Jadallah
    Now you can customize your jQuery Mobile download by selecting the specific modules you need by using jQuery Mobile Download Builder that was released yesterday June 30, 2012. You can select specific form element, transition type, widget and some core functionalities and Utilites.. Here you can find jQuery Mobile Download Builder RC1. http://jquerymobile.com/download-builder Thanks for jQuery Mobile team for there efforts....(read more)

    Read the article

  • Kendo UI Mobile with Knockout for Master-Detail Views

    - by Steve Michelotti
    Lately I’ve been playing with Kendo UI Mobile to build iPhone apps. It’s similar to jQuery Mobile in that they are both HTML5/JavaScript based frameworks for buildings mobile apps. The primary thing that drew me to investigate Kendo UI was its innate ability to adaptively render a native looking app based on detecting the device it’s currently running on. In other words, it will render to look like a native iPhone app if it’s running on an iPhone and it will render to look like a native Droid app if it’s running on a Droid. This is in contrast to jQuery Mobile which looks the same on all devices and, therefore, it can never quite look native for whatever device it’s running on. My first impressions of Kendo UI were great. Using HTML5 data-* attributes to define “roles” for UI elements is easy, the rendering looked great, and the basic navigation was simple and intuitive. However, I ran into major confusion when trying to figure out how to “correctly” build master-detail views. Since I was already very family with KnockoutJS, I set out to use that framework in conjunction with Kendo UI Mobile to build the following simple scenario: I wanted to have a simple “Task Manager” application where my first screen just showed a list of tasks like this:   Then clicking on a specific task would navigate to a detail screen that would show all details of the specific task that was selected:   Basic navigation between views in Kendo UI is simple. The href of an <a> tag just needs to specify a hash tag followed by the ID of the view to navigate to as shown in this jsFiddle (notice the href of the <a> tag matches the id of the second view):   Direct link to jsFiddle: here. That is all well and good but the problem I encountered was: how to pass data between the views? Specifically, I need the detail view to display all the details of whichever task was selected. If I was doing this with my typical technique with KnockoutJS, I know exactly what I would do. First I would create a view model that had my collection of tasks and a property for the currently selected task like this: 1: function ViewModel() { 2: var self = this; 3: self.tasks = ko.observableArray(data); 4: self.selectedTask = ko.observable(null); 5: } Then I would bind my list of tasks to the unordered list - I would attach a “click” handler to each item (each <li> in the unordered list) so that it would select the “selectedTask” for the view model. The problem I found is this approach simply wouldn’t work for Kendo UI Mobile. It completely ignored the click handlers that I was trying to attach to the <a> tags – it just wanted to look at the href (at least that’s what I observed). But if I can’t intercept this, then *how* can I pass data or any context to the next view? The only thing I was able to find in the Kendo documentation is that you can pass query string arguments on the view name you’re specifying in the href. This enabled me to do the following: Specify the task ID in each href – something like this: <a href=”#taskDetail?id=3></a> Attach an “init method” (via the “data-show” attribute on the details view) that runs whenever the view is activated Inside this “init method”, grab the task ID passed from the query string to look up the item from my view model’s list of tasks in order to set the selected task I was able to get all that working with about 20 lines of JavaScript as shown in this jsFiddle. If you click on the Results tab, you can navigate between views and see the the detail screen is correctly binding to the selected item:   Direct link to jsFiddle: here.   With all that being done, I was very happy to get it working with the behavior I wanted. However, I have no idea if that is the “correct” way to do it or if there is a “better” way to do it. I know that Kendo UI comes with its own data binding framework but my preference is to be able to use (the well-documented) KnockoutJS since I’m already familiar with that framework rather than having to learn yet another new framework. While I think my solution above is probably “acceptable”, there are still a couple of things that bug me about it. First, it seems odd that I have to loop through my items to *find* my selected item based on the ID that was passed on the query string - normally, with Knockout I can just refer directly to my selected item from where it was used. Second, it didn’t feel exactly right that I had to rely on the “data-show” method of the details view to set my context – normally with Knockout, I could just attach a click handler to the <a> tag that was actually clicked by the user in order to set the “selected item.” I’m not sure if I’m being too picky. I know there are many people that have *way* more expertise in Kendo UI compared to me – I’d be curious to know if there are better ways to achieve the same results.

    Read the article

  • Solr gives CorruptIndexException codec header mismatch

    - by Alaa Alomari
    I have Solr 3.5 (Jetty). suddenly it starts giving java.lang.RuntimeException: org.apache.lucene.index.CorruptIndexException: codec header mismatch: actual header=448 vs expected header=1071082519 at org..[SomeText]... Caused by: org.apache.lucene.index.CorruptIndexException: codec header mismatch: actual header=448 vs expected header=1071082519 at org..[SomeText]... Anybody faced the same problem before? any idea of how to fix it? Thanks

    Read the article

  • No apparent reason for high load average

    - by Oz.
    We have several web servers running on Amazon (ec2) c1.xlarge, over Amazon AMI. The servers are duplicates of each other, running the exact same hardware and software. Each server spec is: 7 GB of memory 20 EC2 Compute Units (8 virtual cores with 2.5 EC2 Compute Units each) 1690 GB of instance storage 64-bit platform I/O Performance: High API name: c1.xlarge A couple of weeks ago we have run a yum upgrade on one of the servers. Starting on this upgrade the upgraded server started showing a high load average. Needless to say, we did not update the other servers and we can not do so until we understand the reason for this behavior. The strange thing is that when we compare the servers using top or iostat, we can not find the reason for the high load. Note that we have moved traffic from the "problematic" server to the others, which have made the "problematic" server less crowded in terms of requests, and still his load is higher. Do you have any idea what could it be, or where else can we check? Many thanks for the help! Oz. # # proper server # w command # 00:42:26 up 2 days, 19:54, 2 users, load average: 0.41, 0.48, 0.49 USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT pts/1 82.80.137.29 00:28 14:05 0.01s 0.01s -bash pts/2 82.80.137.29 00:38 0.00s 0.02s 0.00s w # # proper server # iostat command # Linux 3.2.12-3.2.4.amzn1.x86_64 _x86_64_ (8 CPU) avg-cpu: %user %nice %system %iowait %steal %idle 9.03 0.02 4.26 0.17 0.13 86.39 Device: tps Blk_read/s Blk_wrtn/s Blk_read Blk_wrtn xvdap1 1.63 1.50 55.00 367236 13444008 xvdfp1 4.41 45.93 70.48 11227226 17228552 xvdfp2 2.61 2.01 59.81 491890 14620104 xvdfp3 8.16 14.47 94.23 3536522 23034376 xvdfp4 0.98 0.79 45.86 192818 11209784 # # problematic server # w command # 00:43:26 up 2 days, 21:52, 2 users, load average: 1.35, 1.10, 1.17 USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT pts/0 82.80.137.29 00:28 15:04 0.02s 0.02s -bash pts/1 82.80.137.29 00:38 0.00s 0.05s 0.00s w # # problematic server # iostat command # Linux 3.2.20-1.29.6.amzn1.x86_64 _x86_64_ (8 CPU) avg-cpu: %user %nice %system %iowait %steal %idle 7.97 0.04 3.43 0.19 0.07 88.30 Device: tps Blk_read/s Blk_wrtn/s Blk_read Blk_wrtn xvdap1 2.10 1.49 76.54 374660 19253592 xvdfp1 5.64 40.98 85.92 10308946 21612112 xvdfp2 3.97 4.32 93.18 1087090 23439488 xvdfp3 10.87 30.30 115.14 7622474 28961720 xvdfp4 1.12 0.28 65.54 71034 16487112

    Read the article

  • Packet flooding while configuring a Debian L2TP/IPSec client?

    - by Joseph B.
    I'm currently at my wits end trying to configure an L2TP over IPSec VPN connection on my Debian using openswan and xl2tp box connecting to a server of unknown configuration. I've managed to successfully establish the connection and everything appears to be working well until I attempt to set the VPN connection as my default route, at which point I see a massive flood of packets simultaneously being transmitted (on the tune of ~1.5 GB in about 2min) until the server drops my connection. Prior to this network traffic on all my interfaces is minimal. According to iftop the majority of this traffic appears to be coming out of port 12, although I can't seem to figure out how to finger a specific process. If I instead just route traffic destined for 74.0.0.0/8 through it I'm able to access Google's servers through the VPN without issue. My xl2tp.conf file is: [lac vpn-nl] lns = example.vpn.com name = myusername pppoptfile = /etc/ppp/options.l2tpd.client My options.l2tpd.client file is: ipcp-accept-local ipcp-accept-remote refuse-eap require-mschap-v2 noccp noauth idle 1800 mtu 1410 mru 1410 usepeerdns lock name myusername password mypassword connect-delay 5000 And my routing table looks like: Destination Gateway Genmask Flags Metric Ref Use Iface 10.5.2.1 * 255.255.255.255 UH 0 0 0 ppp0 10.0.50.0 * 255.255.255.0 U 0 0 0 eth0 10.50.0.0 * 255.255.0.0 U 0 0 0 eth0 10.0.0.0 * 255.255.0.0 U 0 0 0 eth0 192.168.0.0 * 255.255.0.0 U 0 0 0 eth0 loopback * 255.0.0.0 U 0 0 0 lo default * 0.0.0.0 U 0 0 0 ppp0 I'm seeing absolutely nothing in auth.log and syslog during this time and can't seem to find any other log files it might be writing to. Any suggestions would be appreciated!

    Read the article

  • Access Amazon Linux EC2 over VNC using Guacamole

    - by Neon Flash
    I have a t1.micro Amazon Linux AMI instance running. Now, I want to access it using VNC so that I get the GUI. I came across Guacamole and the installation instructions for the server side configuration. So, I get it that we need to setup Apache Tomcat on the Linux machine and then install all the required dependencies, edit the configuration files for Tomcat. But, how do I access it from Windows? What is the client side configuration? From what I understood so far, instead of using a VNC Client like TightVNC or VNCViewer, we can use the Web Browser to access the Amazon EC2 instance. I am using Windows 7 as the client. I would like to access the Amazon Linux AMI (t1.micro instance) over VNC so that I get the GUI.

    Read the article

  • How do I deploy Java code on an EC2 instance?

    - by Marianna
    I just started with Amazon web services, and I have an EC2 instance. I downloaded the JAVA SDK and the Eclipse toolbox. I am able to run a sample program locally on my PC and connect to the Amazon databases, etc. My question is, what do I need to do to get this working on my EC2 instance? This may not even be specific to AWS. On Eclipse, I can just "Run as Application" and run any code. On the server side, what do I need to do? Should I ftp over my .java files? Should I export it to a jar and upload that? Do I need to install anything special to actually run it?

    Read the article

  • Is it necessary to have firewalls rules between trusted nodes communicating on their backend interfaces?

    - by Tom
    I have 6 nodes that have internet access on eth1 and private access to one another on eth0. Currently I have firewall rules for eth0, for things like memcached and NFS. Is this necessary? It's a real headache as NFS for example communicates on loads of different ports, and I recently introduced glusterfs which needs more still. Is the headache of figuring out what backend ports to unblock worth the security enhancement? I should mention that I will of course still have a firewall rule on eth0 to block servers owned by others in the same datacenter. Thanks

    Read the article

  • Dovecot authentification not working

    - by user1488723
    I run a Ubuntu 10.04 VPS with Postfix and Dovecot installed. For a while I had problems with the mailserver itself (Postfix) but now it runs ok. I can telnet into it from localhost (telnet localhost 25 while logged in) and Im blocked if I try to do it from the outside (telnet mail.example.org 25). This is as it should be according to my main.cf However when I try to log in using Dovecot (openssl s_client -connect mail.example.com:993) I'm allowed in but denied when trying to identify myself as a user: Excerpt from Dovecot log in: Key-Arg : None Start Time: 1341074622 Timeout : 300 (sec) Verify return code: 18 (self signed certificate) OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE AUTH=PLAIN AUTH=LOGIN] Dovecot ready. When I continue and try to log in to a specific user with the command: A001 login user password I get: A001 NO [AUTHENTICATIONFAILED] Authentication failed. I've reset the password to ensure it is correct and I know the user (user) exists on the system. When I do /etc/init.d/dovecot reload I get: /etc/init.d/dovecot: 29: maildir:~/Maildir: not found * Reloading IMAP/POP3 mail server dovecot [ OK ] Could it be that the mailboxes isn't found? Postfix main.cf: home_mailbox = Maildir/ mailbox_command = recipient_delimiter = + inet_interfaces = all smtpd_use_tls = yes smtpd_tls_auth_only = no smtpd_tls_loglevel = 1 smtpd_tls_cert_file = /etc/postfix/ssl/smtpd.crt smtpd_tls_key_file = /etc/postfix/ssl/smtpd.key smtpd_tls_CAfile = /etc/postfix/ssl/cacert.pem smtpd_sasl_auth_enable = yes smtpd_client_restrictions = permit_sasl_authenticated, permit_mynetworks, reject_unauth_destination smtpd_sender_restrictions = permit_sasl_authenticated, permit_mynetworks smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination broken_sasl_auth_clients = yes smtpd_sasl_type = dovecot smtpd_sasl_path = private/auth smtpd_sasl_security_options = noanonymous smtpd_sasl_local_domain = $mydomain Dovecot.conf: protocols = imap imaps disable_plaintext_auth = no log_timestamp = "%b %d %H:%M:%S " ssl = yes ssl_cert_file = /etc/postfix/ssl/smtpd.crt ssl_key_file = /etc/postfix/ssl/smtpd.key mail_location = maildir:~/Maildir auth_verbose = yes mail_access_groups = mail auth_username_chars = abcdefghijklmnopqrstuvwxyz0123456789 protocol imap { imap_client_workarounds = delay-newmail tb-extra-mailbox-sep } auth default { mechanisms = plain login passdb pam { } userdb passwd { } socket listen { client { path = /var/spool/postfix/private/auth user = postfix group = postfix mode = 0660 } } }

    Read the article

  • Cygwin creates files with special (shared) icons on windows

    - by barjonah
    I use cygwin to transfer files between linux and windows machines. Everytime I transfer a file to a windows machine it adds an extra shared user icon on the file's or folder's icon itself. This also happens if I create a file from cygwin on windows using pretty much any command: echo, vim, nano, cat. This is what the cygwin-created folders (and files) look like. This is what a normal folder (or file) looks like. I'm thinking it has to do with permission, because I'd have to chmod it everytime if I want other applications to access the files or folders on windows. How can I tell cygwin to create regular ol' files just like a user or any program would?

    Read the article

  • nginx & php-fpm and custom header

    - by nixer
    I would like to pass some custom header (ACCESS_TOKEN) from client RESTful application (JS) to application server (php-fpm). I had read that nginx should pass all http headers to php, but somehow it does not come to my php :( I can see it in firebug http://o7.no/N6DM7q but can't see it in $_SERVER variable. it just does not exist in $_SERVER array. I'm thinking that i need to pass it manually. Now my config looks like that: location @php-fpm { include /etc/nginx/fastcgi_params; fastcgi_pass unix:/tmp/php5-fpm.sock; fastcgi_param REQUEST_URI /index.php$request_uri; fastcgi_param SCRIPT_FILENAME /htdocs/index.php; fastcgi_param PATH_INFO $fastcgi_script_name; fastcgi_param DOCUMENT_ROOT /htdocs; } } and when I add new line in location definition: location @php-fpm { include /etc/nginx/fastcgi_params; ... fastcgi_param ACCESS_TOKEN $http_access_token; } } or even if i will add it into fastcgi_params file it does not help :( if I put into location part next line: fastcgi_param ACCESS_TOKEN $http_access_token; then in php it has empty value :( how I can pass custom header from client to backend (php) via nginx ?

    Read the article

  • Anyone else experiencing high rates of Linux server crashes during a leap second day?

    - by Bron Gondwana
    POSTMORTEM Anticlimax: only thing that died was my VPN (openvpn) link to the cluster, so there was an exciting few seconds while it re-established. Everything else was fine. Starting back ntp everywhere. If you look at Marco's blog at http://my.opera.com/marcomarongiu/blog/2012/06/01/an-humble-attempt-to-work-around-the-leap-second - he has a solution for phasing the time change over 24 hours using ntpd -x to avoid the 1 second skip. Give that a go if it matters to you. For the systems I run, the jump isn't a problem. Just today, Sat June 30th - starting soon after the start of the day GMT. We've had a handful of blades in different datacentres as managed by different teams all go dark - not responding to pings, screen blank. They're all running Debian Squeeze - with everything from stock kernel to custom 3.2.21 builds. Most are Dell M610 blades, but I've also just lost a Dell R510 and other departments have lost machines from other vendors too. There was also an older IBM x3550 which crashed and which I thought might be unrelated, but now I'm wondering. The one crash which I did get a screen dump from said: [3161000.864001] BUG: spinlock lockup on CPU#1, ntpd/3358 [3161000.864001] lock: ffff88083fc0d740, .magic: dead4ead, .owner: imapd/24737, .owner_cpu: 0 Unfortunately the blades all supposedly had kdump configured, but they died so hard that kdump didn't trigger - and they had console blanking turned on. I've disabled console blanking now, so fingers crossed I'll have more information after the next crash. Just want to know if it's a common thread or "just us". It's really odd that they're different units in different datacentres bought at different times and run by different admins (I run the FastMail.FM ones)... and now even different vendor hardware. Most of the machines which crashed had been up for weeks/months and were running 3.1 or 3.2 series kernels. The most recent crash was a machine which had only been up about 6 hours running 3.2.21. THE WORKAROUND Ok people, here's how I worked around it. disabled ntp: /etc/init.d/ntp stop created http://linux.brong.fastmail.fm/2012-06-30/fixtime.pl (code stolen from Marco, see blog posts in comments) ran fixtime.pl without an argument to see that there was a leap second set ran fixtime.pl with an argument to remove the leap second NOTE: depends on adjtimex. I've put a copy of the squeeze adjtimex binary at http://linux.brong.fastmail.fm/2012-06-30/adjtimex - it will run without dependencies on a squeeze 64 bit system. If you put it in the same directory as fixtime.pl, it will be used if the system one isn't present. Obviously if you don't have squeeze 64 bit... find your own. I'm going to start ntp again tomorrow. As an anonymous user suggested - an alternative to running adjtimex is to just set the time yourself, which will presumably also clear the leapsecond counter.

    Read the article

  • Using FlashCache on /var on startup

    - by WinkyWolly
    I would like to have FlashCache cache my /var partition however I can't seem to get it to play nice upon bootup (IE: not really sure how to do it). I'm not sure if I need to modify the initramfs/use DKMS or if I can do it in user-land during bootup. The issue I'm running into is /var mounts early and therefore the device is busy (whether it by generally by syslogd). I'm positive this can be resolved by modifying the initramfs although I simply haven't fiddled with it enough to get it working. They have instructions on how to boot your root partition however I'm not sure if these instructions would apply to my use case. Any help / pointers in the right direction would be absolutely splendid.

    Read the article

  • How do I enable PHP apache_request_headers() or change PHP into an apache module

    - by inac
    PHP, WHM, and several other services are already installed on a CentOS x64 server I am trying to migrate data to. Many of my existing PHP scripts are dependent on PHP's apache_request_headers() function, which the current server's PHP configuration does not support. Apparently, compiling PHP as an Apache module is one solution, but are there other ways to enable this (without uninstalling PHP, reinstalling, etc., and all dependent services), perhaps as easy as modifying php.ini, somehow?

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >