Daily Archives

Articles indexed Sunday June 10 2012

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

  • Why PHP (script) serves more requests than CGI (compiled)?

    - by Lucas Batistussi
    I developed the following CGI script and run on Apache 2 (http://localhost/test.chtml). I did same script in PHP (http://localhost/verifica.php). Later I performed Apache benchmark using Apache Benchmark tool. The results are showed in images. include #include <stdlib.h> int main(void) { printf("%s%c%c\n", "Content-Type:text/html;charset=iso-8859-1",13,10); printf("<TITLE>Multiplication results</TITLE>\n"); printf("<H3>Multiplication results</H3>\n"); return 0; } Someone can explain me why PHP serves more requests than CGI script?

    Read the article

  • Initializing a char array through passed pointer segfaults

    - by Bitgarden
    Ie., why does the following work: char* char_array(size_t size){ return new char[size]; } int main(){ const char* foo = "foo"; size_t len = strlen(foo); char* bar=char_array(len); memset(bar, 0, len+1); } But the following segfaults: void char_array(char* out, size_t size){ out= new char[size]; } int main(){ const char* foo = "foo"; size_t len = strlen(foo); char* bar; char_array(bar, len); memset(bar, 0, len+1); }

    Read the article

  • simple php script

    - by Nerdysyntax
    New to php and taking a class for it. Bought php6 and mysql 6 bible to get started. Of course the hello world script is the first you get and it doesn't show. It just reads part of my script and I'm not sure the problem. Link to test - http://harden6615.com/ I am using a hosted server I bought for class, but I have also check it using MAMP. I figured my script is wrong, but I have copied and pasted and still no Hello World. Any suggestions? What I copied: <?php print("Hello, World<BR />\n"); phpinfo(); ?>

    Read the article

  • Looping through array in PHP to post several multipart form-data

    - by Léon Pelletier
    I'm trying in an asp web application to code a function that would loop through a list of files in a multiple upload form and send them one by one. Is this something that can be done in ASP? Because I've read some posts about how to attach several files together, but saw nothing about looping through the files. I can easily imagine it in C# via HttpWebRequest or with socket, but in php, I guess there are already function designed to handle it? // This is false/pseudo-code :) for (int index = 0; index < number_of_files; index++) { postfile(file[index]); } And in each iteration, it should send a multipart form-data POST. postfile(TheFileInfos) should make a POST like it: POST /afs.aspx?fn=upload HTTP/1.1 [Header stuff] Content-Type: multipart/form-data; boundary=----------Ef1Ef1cH2Ij5GI3ae0gL6KM7GI3GI3 [Header stuff] ------------Ef1Ef1cH2Ij5GI3ae0gL6KM7GI3GI3 Content-Disposition: form-data; name="Filename" myimage1.png ------------Ef1Ef1cH2Ij5GI3ae0gL6KM7GI3GI3 Content-Disposition: form-data; name="fileid" 58e21ede4ead43a5201206101806420000007667212251 ------------Ef1Ef1cH2Ij5GI3ae0gL6KM7GI3GI3 Content-Disposition: form-data; name="Filedata"; filename="myimage1.png" Content-Type: application/octet-stream [Octet Stream] [Edit] I'll try it: <html> <head> <title>Untitled Document</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body> <form name="form1" enctype="multipart/form-data" method="post" action="processFiles.php"> <p> <? // start of dynamic form $uploadNeed = $_POST['uploadNeed']; for($x=0;$x<$uploadNeed;$x++){ ?> <input name="uploadFile<? echo $x;?>" type="file" id="uploadFile<? echo $x;?>"> </p> <? // end of for loop } ?> <p><input name="uploadNeed" type="hidden" value="<? echo $uploadNeed;?>"> <input type="submit" name="Submit" value="Submit"> </p> </form> </body> </html>

    Read the article

  • The return value should be a list but doesn't return as expected?! - Python newbie

    - by user1432941
    Hi this must be a very simple solution that has eluded me this last hour. I've tried to build this test function where the return value of the test_cases list should match the values in the test_case_answers list but for some reason, test case 1 and test case 2 fail. When i print the return values for the test cases they return the correct answers, but for some reason test case 1 and test case 2 return False. Thanks for your help! import math test_cases = [1, 9, -3] test_case_answers = [1, 3, 0] def custom_sqrt(num): for i in range(len(test_cases)): if test_cases[i] >= 0: return math.sqrt(test_cases[i]) else: return 0 for i in range(len(test_cases)): if custom_sqrt(test_cases[i]) != test_case_answers[i]: print "Test Case #", i, "failed!" custom_sqrt(test_cases)

    Read the article

  • Returning a CSS element

    - by TMP
    Is there a way to return a CSS element? I was using Adobe Edge and adding some of my own code in their code tab, but in order to create boundaries I would need to keep track of margin-top or margin-left. The following code works to move the element "woo" but I'm not sure how to call the elements to add something like "|| sym.$("woo").css({"margin-left"0px"}) to the move left code. //Move RIGHT if (e.which == 39) { sym.$("woo").css({"margin-left":"+=10px"}); } //Move UP else if (e.which == 38) { sym.$("woo").css({"margin-top":"-=10px"}); } //Move Left else if (e.which == 37) { sym.$("woo").css({"margin-left":"-=10px"}); } //Move DOWN else if (e.which == 40) { sym.$("woo").css({"margin-top":"+=10px"}); } EDIT: I changed the Left if statement to the following: else if (e.which == 37 && ($("woo").css("margin-left")>0)) { It seems to be working to some extent except for now it won't move left at all! I tried doing <0 too in case I was screwing up a sign but it won't let me move the element left either.

    Read the article

  • Seed has_many relation using mass assignment

    - by rnd
    Here are my two models: class Article < ActiveRecord::Base attr_accessible :content has_many :comments end class Comment < ActiveRecord::Base attr_accessible :content belongs_to :article end And I'm trying to seed the database in seed.rb using this code: Article.create( [{ content: "Hi! This is my first article!", comments: [{content: "It sucks"}, {content: "Best article ever!"}] }], without_protection: true) However rake db:seed gives me the following error message: rake aborted! Comment(#28467560) expected, got Hash(#13868840) Tasks: TOP => db:seed (See full trace by running task with --trace) It is possible to seed the database like this? If yes a follow-up question: I've searched some and it seems that to do this kind of (nested?) mass assignment I need to add 'accepts_nested_attributes_for' for the attributes I want to assign. (Possibly something like 'accepts_nested_attributes_for :article' for the Comment model) Is there a way to allow this similar to the 'without_protection: true'? Because I only want to accept this kind of mass assignment when seeding the database.

    Read the article

  • ASP.NET JSON Binding data with RadiobuttonList

    - by user1385570
    I'm trying to bind JSON data into the RadioButtonList on client side. I know how to do the in code behind, it works fine. Someone please provide more details, How do I bind the JSON data RadioButtionList in VB.NET. rblregions.DataTextField = "Value" rblregions.DataValueField = "Key" rblregions.DataSource = items The data looks like: [regions:{regionID:US,regionName:USA}] main.aspx <asp:RadioButtonList ID="rblregions" runat="server"> $.getJSON("Map/loadMySites.aspx?" + query, function (data) { if (data.regionid && data.region) { //I want to bind the data here with RadioButtonList } } );

    Read the article

  • SQLiteOpenHelper getWritableDatabse() fails with no Exception

    - by Michal K
    I have a very strange problem. It only shows from time to time, on several devices. Can't seem to reproduce it when I want, but had it so many times, that I think I know where I get it. So I have a Loader which connects to sqlite through a singleton SQLiteOpenHelper: try{ Log.i(TAG, "Get details offline / db helper: "+DatabaseHelper.getInstance(getContext())); SQLiteDatabase db=DatabaseHelper.getInstance(this.getContext()).getWritableDatabase(); Log.i(TAG, "Get details offline / db: "+db); //doing some work on the db //... } catch(SQLiteException e){ e.printStackTrace(); return null; } catch(Exception e){ e.printStackTrace(); return null; //trying everything to grab some exception or whatever } My SQLIteOpenHelper looks something like this: public class DatabaseHelper extends SQLiteOpenHelper { private static DatabaseHelper mInstance = null; private static Context mCxt; public static DatabaseHelper getInstance(Context cxt) { //using app context ass suggested by CommonsWare Log.i("DBHELPER1", "cxt"+mCxt+" / instance: "+mInstance); if (mInstance == null) { mInstance = new DatabaseHelper(cxt.getApplicationContext()); } Log.i("DBHELPER2", "cxt"+mCxt+" / instance: "+mInstance); mCxt = cxt; return mInstance; } //private constructor private DatabaseHelper(Context context) { super(context, DATABASE_NAME, null, DATABASE_VERSION); this.mCxt = context; } @Override public void onCreate(SQLiteDatabase db) { //some tables created here } @Override public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { //upgrade code here } It really works great in most cases. But from time to time I get a log similar to this: 06-10 23:49:59.621: I/DBHELPER1(26499): cxtcom.bananout.Bananout@407152c8 / instance: com.bananout.helpers.DatabaseHelper@40827560 06-10 23:49:59.631: I/DBHELPER2(26499): cxtcom.bananout.Bananout@407152c8 / instance: com.bananout.helpers.DatabaseHelper@40827560 06-10 23:49:59.631: I/DetailsLoader(26499): Get event details offline / db helper: com.bananout.helpers.DatabaseHelper@40827560 06-10 23:49:59.631: I/DBHELPER1(26499): cxtcom.bananout.Bananout@407152c8 / instance: com.bananout.helpers.DatabaseHelper@40827560 06-10 23:49:59.651: I/DBHELPER2(26499): cxtcom.bananout.Bananout@407152c8 / instance: com.bananout.helpers.DatabaseHelper@40827560 This line Log.i(TAG, "Get details offline / db: "+db); never gets called! No Exceptions, silence. Plus, the thread with the Loader is not running anymore. So nothing past this line SQLiteDatabase db=DatabaseHelper.getInstance(this.getContext()).getWritableDatabase(); gets executed. What can possibly go wrong on this line?

    Read the article

  • C++ function not found during compilation

    - by forthewinwin
    For a homework assignment: I'm supposed to create randomized alphabetial keys, print them to a file, and then hash each of them into a hash table using the function "goodHash", found in my below code. When I try to run the below code, it says my "goodHash" "identifier isn't found". What's wrong with my code? #include <iostream> #include <vector> #include <cstdlib> #include "math.h" #include <fstream> #include <time.h> using namespace std; // "makeKey" function to create an alphabetical key // based on 8 randomized numbers 0 - 25. string makeKey() { int k; string key = ""; for (k = 0; k < 8; k++) { int keyNumber = (rand() % 25); if (keyNumber == 0) key.append("A"); if (keyNumber == 1) key.append("B"); if (keyNumber == 2) key.append("C"); if (keyNumber == 3) key.append("D"); if (keyNumber == 4) key.append("E"); if (keyNumber == 5) key.append("F"); if (keyNumber == 6) key.append("G"); if (keyNumber == 7) key.append("H"); if (keyNumber == 8) key.append("I"); if (keyNumber == 9) key.append("J"); if (keyNumber == 10) key.append("K"); if (keyNumber == 11) key.append("L"); if (keyNumber == 12) key.append("M"); if (keyNumber == 13) key.append("N"); if (keyNumber == 14) key.append("O"); if (keyNumber == 15) key.append("P"); if (keyNumber == 16) key.append("Q"); if (keyNumber == 17) key.append("R"); if (keyNumber == 18) key.append("S"); if (keyNumber == 19) key.append("T"); if (keyNumber == 20) key.append("U"); if (keyNumber == 21) key.append("V"); if (keyNumber == 22) key.append("W"); if (keyNumber == 23) key.append("X"); if (keyNumber == 24) key.append("Y"); if (keyNumber == 25) key.append("Z"); } return key; } // "makeFile" function to produce the desired text file. // Note this only works as intended if you include the ".txt" extension, // and that a file of the same name doesn't already exist. void makeFile(string fileName, int n) { ofstream ourFile; ourFile.open(fileName); int k; // For use in below loop to compare with n. int l; // For use in the loop inside the below loop. string keyToPassTogoodHash = ""; for (k = 1; k <= n; k++) { for (l = 0; l < 8; l++) { // For-loop to write to the file ONE key ourFile << makeKey()[l]; keyToPassTogoodHash += (makeKey()[l]); } ourFile << " " << k << "\n";// Writes two spaces and the data value goodHash(keyToPassTogoodHash); // I think this has to do with the problem makeKey(); // Call again to make a new key. } } // Primary function to create our desired file! void mainFunction(string fileName, int n) { makeKey(); makeFile(fileName, n); } // Hash Table for Part 2 struct Node { int key; string value; Node* next; }; const int hashTableSize = 10; Node* hashTable[hashTableSize]; // "goodHash" function for Part 2 void goodHash(string key) { int x = 0; int y; int keyConvertedToNumber = 0; // For-loop to produce a numeric value based on the alphabetic key, // which is then hashed into hashTable using the hash function // declared below the loop (hashFunction). for (y = 0; y < 8; y++) { if (key[y] == 'A' || 'B' || 'C') x = 0; if (key[y] == 'D' || 'E' || 'F') x = 1; if (key[y] == 'G' || 'H' || 'I') x = 2; if (key[y] == 'J' || 'K' || 'L') x = 3; if (key[y] == 'M' || 'N' || 'O') x = 4; if (key[y] == 'P' || 'Q' || 'R') x = 5; if (key[y] == 'S' || 'T') x = 6; if (key[y] == 'U' || 'V') x = 7; if (key[y] == 'W' || 'X') x = 8; if (key[y] == 'Y' || 'Z') x = 9; keyConvertedToNumber = x + keyConvertedToNumber; } int hashFunction = keyConvertedToNumber % hashTableSize; Node *temp; temp = new Node; temp->value = key; temp->next = hashTable[hashFunction]; hashTable[hashFunction] = temp; } // First two lines are for Part 1, to call the functions key to Part 1. int main() { srand ( time(NULL) ); // To make sure our randomization works. mainFunction("sandwich.txt", 5); // To test program cin.get(); return 0; } I realize my code is cumbersome in some sections, but I'm a noob at C++ and don't know much to do it better. I'm guessing another way I could do it is to AFTER writing the alphabetical keys to the file, read them from the file and hash each key as I do that, but I wouldn't know how to go about coding that.

    Read the article

  • Sending some byte at time

    - by user1417815
    I'm trying to figure out way to send some amount of text from the string ech time until it reach the end of the string, example: const char* the_string = "hello world, i'm happy to meet you all. Let be friends or maybe more, but nothing less" Output: hello world Output: , i'm happy to meet you all. Output: Let be friends or maybe more Output: , but nothing less stop: no more bytes to send. the problem i have searched google, but didn't understand the examples, i spent 4 days trying find a good way, also that sendt 5 bytes at time, but in case there is less, then send them until you are at the end of the string. please help me out guys, i will accept a C or C++ way, as long it works and well explained.

    Read the article

  • in Rails, with check_box_tag, how do I keep the checkboxes checked after submitting query?

    - by Sebastien Paquet
    Ok, I know this is for the Saas course and people have been asking questions related to that as well but i've spent a lot of time trying and reading and I'm stuck. First of all, When you have a model called Movie, is it better to use Ratings as a model and associate them or just keep Ratings in an array floating in space(!). Second, here's what I have now in my controller: def index @movies = Movie.where(params[:ratings].present? ? {:rating => (params[:ratings].keys)} : {}).order(params[:sort]) @sort = params[:sort] @ratings = Ratings.all end Now, I decided to create a Ratings model since I thought It would be better. Here's my view: = form_tag movies_path, :method => :get do Include: - @ratings.each do |rating| = rating.rating = check_box_tag "ratings[#{rating.rating}]" = submit_tag "Refresh" I tried everything that is related to using a conditional ternary inside the checkbox tag ending with " .include?(rating) ? true : "" I tried everything that's supposed to work but it doesn't. I don't want the exact answer, I just need guidance.Thanks in advance!

    Read the article

  • ArrayAdapter throwing ArrayIndexOutOfBoundsException

    - by alex
    I am getting an error of an array out of bounce error when i am using my custom array adapter. I am wondering if there are any coding errors I have overlooked. Here is the error log 06-10 20:21:53.254: E/AndroidRuntime(315): FATAL EXCEPTION: main 06-10 20:21:53.254: E/AndroidRuntime(315): java.lang.RuntimeException: Unable to start activity ComponentInfo{alex.android.galaxy.tab.latest/alex.android.galaxy.tab.latest.Basic_db_output}: java.lang.ArrayIndexOutOfBoundsException 06-10 20:21:53.254: E/AndroidRuntime(315): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2663) 06-10 20:21:53.254: E/AndroidRuntime(315): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679) 06-10 20:21:53.254: E/AndroidRuntime(315): at android.app.ActivityThread.access$2300(ActivityThread.java:125) 06-10 20:21:53.254: E/AndroidRuntime(315): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033) 06-10 20:21:53.254: E/AndroidRuntime(315): at android.os.Handler.dispatchMessage(Handler.java:99) 06-10 20:21:53.254: E/AndroidRuntime(315): at android.os.Looper.loop(Looper.java:123) 06-10 20:21:53.254: E/AndroidRuntime(315): at android.app.ActivityThread.main(ActivityThread.java:4627) 06-10 20:21:53.254: E/AndroidRuntime(315): at java.lang.reflect.Method.invokeNative(Native Method) 06-10 20:21:53.254: E/AndroidRuntime(315): at java.lang.reflect.Method.invoke(Method.java:521) 06-10 20:21:53.254: E/AndroidRuntime(315): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868) 06-10 20:21:53.254: E/AndroidRuntime(315): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626) 06-10 20:21:53.254: E/AndroidRuntime(315): at dalvik.system.NativeStart.main(Native Method) 06-10 20:21:53.254: E/AndroidRuntime(315): Caused by: java.lang.ArrayIndexOutOfBoundsException 06-10 20:21:53.254: E/AndroidRuntime(315): at alex.android.galaxy.tab.latest.Basic_db_output.onCreate(Basic_db_output.java:44) 06-10 20:21:53.254: E/AndroidRuntime(315): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047) 06-10 20:21:53.254: E/AndroidRuntime(315): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627) I am basing my code example on this How to use ArrayAdapter<myClass> ArrayList list = new ArrayList(); for(int i=1; i <= 3; i++) { Reader reader = new ResultsReader("android_galaxy_tab_latest/src/quiz"+i+".txt"); reader.read(); String str = ((ResultsReader)reader).getInput(); String data[] = str.split("<.>"); Question q = new Question(); q.question = data[0]; q.answer = Integer.parseInt(data[1]); q.choice1 = data[2]; q.choice2 = data[3]; q.choice3 = data[4]; list.add(q); }

    Read the article

  • Trigger JavaScript action after Datatable is loaded

    - by perissf
    In a JSF 2.1 + PrimeFaces 3.2 web application, I need to trigger a JavaScript function after a p:dataTable is loaded. I know that there is no such event in this component, so I have to find a workaround. In order to better understand the scenario, on page load the dataTable is not rendered. It is rendered after a successful login: <p:commandButton value="Login" update=":aComponentHoldingMyDataTable" action="#{loginBean.login}" oncomplete="handleLoginRequest(xhr, status, args)"/> As you can see from the above code, I have a JavaScript hook after the successful login, if it can be of any help. Immediately after the oncomplete action has finished, the update attribute renders the dataTable: <p:dataTable var="person" value="#{myBean.lazyModel}" rendered="#{p:userPrincipal() != null}" /> After the datatable is loaded, I need to run a JavaScript function on each row item, in order to subscribe to a cometD topic. In theory I could use the oncomplete attribute of the login Button for triggering a property from myBean in order to retrieve once again the values to be displayed in the dataTable, but it doesn't seem very elegant. The JavaScript function should do something with the rowKey of each row of the dataTable: function javaScriptFunctionToBeTriggered(rowKey) { // do something }

    Read the article

  • Prevent printing -0

    - by fishinear
    If I do the following in Objective-C: NSString *result = [NSString stringWithFormat:@"%1.1f", -0.01]; It will give result @"-0.0" Does anybody know how I can force a result @"0.0" (without the "-") in this case? EDIT: I tried using NSNumberFormatter, but it has the same issue. The following also produces @"-0.0": double value = -0.01; NSNumberFormatter *numberFormatter = [[NSNumberFormatter alloc] init]; [numberFormatter setNumberStyle:NSNumberFormatterDecimalStyle]; [numberFormatter setMaximumFractionDigits:1]; [numberFormatter setMinimumFractionDigits:1]; NSString *result = [numberFormatter stringFromNumber:[NSNumber numberWithDouble:value]];

    Read the article

  • Troubleshooting "Parse error: syntax error, unexpected T_STRING" in echo statement

    - by dramaticlook
    I am back to php after like 5 years and I need help with the following please:) It keeps telling me the error: Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in header.php (in the first echo invoke) <?php $result = mysql_query("SELECT * FROM menu WHERE disabled=0 ORDER BY orderx ASC") or die(mysql_error()); $i=1; while($row = mysql_fetch_array($result)) { echo "<li class='sddm'.$i.' '.$row[extra].'"><a href="'.link_text($row[link]).'" onmouseover=\"mopen('m2')\" onmouseout=\"mclosetime()\">'.link_text($row[link]).'</a>"; echo "<div id='m2' onmouseover='mcancelclosetime()' onmouseout='mclosetime()'>"; echo "<a href='#'>ASP Dropdown</a>"; echo "<a href='#'>Pulldown menu</a>"; echo "<a href='#'>AJAX dropdown</a>"; echo "<a href='#'>DIV dropdown</a>"; echo "</div>"; echo "</li>"; <!--echo '<li class="sddm'.$i.' '.$row[extra].'"><a href="'.link_text($row[link]).'">'.$row[title.langfix()].'</a>';--> echo'</li>'; $i++; } ?>

    Read the article

  • Facebook social reading plugin for Wordpress?

    - by Alexey
    As you know, a lot of bigger news websites have intorduced "social readers" for Facebook (e.g. https://apps.facebook.com/wpsocialreader/), which log what the user has read into the activity stream ("Michael read..."). Is it possible to integrate similar functionality into a Wordpress blog? Are the relevant API's open? Are there any plugins available? Thanks. UPD: http://trac.ahwebdev.fr/projects/facebook-awd The plugin seems to do the trick. Will have to try it out!

    Read the article

  • JSIL - a Dot Net to JavaScript translator

    - by TATWORTH
    JSI is described at http://jsil.org/ as:"JSIL is a compiler that transforms .NET applications and libraries from their native executable format - CIL bytecode - into standards-compliant, cross-browser JavaScript. You can take this JavaScript and run it in a web browser or any other modern JavaScript runtime. Unlike other cross-compiler tools targeting JavaScript, JSIL produces readable, easy-to-debug JavaScript that resembles the code a developer might write by hand, while still maintaining the behavior and structure of the original .NET code. Because JSIL transforms bytecode, it can support most .NET-based languages - C# to JavaScript and VB.NET to JavaScript work right out of the box."

    Read the article

  • Disk IO slow on ESXi, even slower on a VM (freeNAS + iSCSI)

    - by varesa
    I have a server with ESXi 5 and iSCSI attached network storage(4x1Tb Raid-Z on freenas 8.0.4). Those two machines are connected to each other with Gigabit ethernet. The raid-z volume is divided into three parts: two zvols, shared with iscsi, and one directly on top of zfs, shared with nfs and similar. I ssh'd into the freeNAS box, and did some testing on the disks. I used ddto test the third part of the disks (straight on top of ZFS). I copied a 4GB (2x the amount of RAM) block from /dev/zero to the disk, and the speed was 80MB/s. Other of the iSCSI shared zvols is a datastore for the ESXi. I did similar test with time dd .. there. Since the dd there did not give the speed, I divided the amount of data transfered by the time show by time. The result was around 30-40 MB/s. Thats about half of the speed from the freeNAS host! Then I tested the IO on a VM running on the same ESXi host. The VM was a light CentOS 6.0 machine, which was not really doing anything else at that time. There were no other VMs running on the server at the time, and the other two "parts" of the disk array were not used. A similar dd test gave me result of about 15-20 MB/s. That is again about half of the result on a lower level! Of course the is some overhead in raid-z - zfs - zvolume - iSCSI - VMFS - VM, but I don't expect it to be that big. I belive there must be something wrong in my system. I have heard about bad performance of freeNAS's iSCSI, is that it? I have not managed to get any other "big" SAN OS to run on the box (NexentaSTOR, openfiler). Can you see any obvious problems with my setup?

    Read the article

  • IPv6 Addresses causing Exchange Relay whitelists to fail

    - by makerofthings7
    Several of our new Exchange servers are failing to relay messages because it is communicating over IPv6 and not matching any receive connector I previously set up. I'm not sure how we are using IP6 since we only have a IPv4 network and we are routing across subnets. I discovered this by typing helo in from the source to the server that is confused by my IP6 address. I saw the IPv6 message and the custom message I gave this receive connector. (connectors with more permission have a different helo) 220 HUB01 client helo asdf 250 HUB01.nfp.com Hello [fe80::cd8:6087:7b1e:99d4%11] More info about my environment: I have two dedicated Exchange forests each with a distinct purpose. They have no trust and only communicate by SMTP. They both share the same DNS infrastructure via stub zones. What are my options? This is my guess, but I'm no IPv6 expert so I don't know which one is the best option Disable IPv6 Add the IPv6 address to the whitelist (isn't that IP dynamic?) Tell Exchange to use IPv4 instead Figure out why we are using IPv6 instead of IP4

    Read the article

  • centos: su silently fails

    - by matteo
    On a CentOS server where I'm logged via SSH as root, I do: su otherusername where 'otherusername' is the user name of another user, which exists. It does nothing. After that, I'm still root. whoami returns root, any file I create belongs to root, that is, su just doesn't su. However it does not give any error message. If I try to su with an invalid user name it does give an error message. What am I missing??

    Read the article

  • PHP-FPM issue on LEMP Stack and WordPress

    - by jw60660
    I'm very much a NGINX and Server Admin beginner. I used this tutorial to install NGINX / PHP / mySQL / WordPress: C3M Digital Tutorial In this tutorial the backend php-cgi setup is configured using fastcgi. php5-fpm was installed during this tutorial: apt-get install nginx-full php5-fpm php5 php5-mysql php5-apc php5-mysql php5-xsl php5-xmlrpc php5-sqlite php5-snmp php5-curl After reading that the NGINX configuration on the WordPress codec was more secure than most tutorials, I decided to use the codex configuration: WordPress NGINX configuration in Codex The Codex configuration uses php-fpm for backend php-cgi. When opening the browser I got a 502 Bad Gateway error. The error log was: "2012/06/10 21:18:27 [crit] 14009#0: *4 connect() to unix:/tmp/php-fpm.sock failed (2: No such file or directory) while connecting to upstream, client: 12.3.456.789, server: mywebsite.com, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/tmp/php-fpm.sock:", hos t: "mywebsite.com"" In the main NGINX configuration file supplied by the codex I noticed the line starting "server unix:" in the upstream php block which point to the empty directory: # Upstream to abstract backend connection(s) for PHP. upstream php { server unix:/tmp/php-fpm.sock; # server 127.0.0.1:9000; } I checked the folder at /tmp and it was empty. Seems I missed configuring php-fpm to play with NGINX. Can someone point me in the right direction? Much appreciated!

    Read the article

  • Remote Desktop AND monitor fail on restart (Win2008R2)

    - by Wesley
    I am in the process of building a small 3 server farm. Each machine is running Window Server 2008 R2. As is normal, I am in the process of installing patch after patch to bring the machine up to snuff. Every time I restart the machine, or most every time, when I try to remote in to the machine I get the Log In window, but then almost immediately I get the message that my remote session was ended. If I physically walk over to the machine and plug in a monitor and keyboard, I see nothing. If I leave the keyboard and monitor in and restart the machine by force, the computer reboots just fine. When windows starts, I get no error message about windows not starting or being shut off unexpectedly. Once I log into the machine physically by the keyboard, I can then remote in to the machine at that point. Very confused. This happens on all 3 machines, these machines have different hardware.

    Read the article

  • Router used as ethernet bridge wont show up

    - by user1255271
    I have a Netgear router in my living room that has the wireless signal. It is connected to a Powerline plug that goes up to my bedroom. That is plugged into another router that is used as an ethernet hub. It's cables go into my PS3 and my server. The second router shows up as a hidden network on my laptop, and I can connect to it. But it is not listed as an attached device on my main router, and my laptop says that it connects straight to the main router, not the second one. How can I connect to this router? Aside from swapping the two? Thanks in advance.

    Read the article

  • php.ini date.timezone usefulness?

    - by Buttle Butkus
    I'm not sure if this is a question for serverfault or stackoverflow but it seems like it has a lot to do with server config. We have a server in chicago and the server's clock is on chicago time. But since the business is located in California, it would seem to make sense to use pacific time. What happens when server time is Chicago, and php.ini directive date.timezone is set to "America/Los_Angeles"? How will that affect logs written to mysql, error logs, etc? I've looked at the Apache error log and, as I expected, the php directive does not affect it. Times are all servertime. Thanks.

    Read the article

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