Daily Archives

Articles indexed Friday January 14 2011

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

  • Why is my django bulk database population so slow and frequently failing?

    - by bryn
    I decided I'd like to use django's model system rather than coding raw SQL to interface with my database, but I am having a problem that surely is avoidable. My models.py contains: class Student(models.Model): student_id = models.IntegerField(unique = True) form = models.CharField(max_length = 10) preferred = models.CharField(max_length = 70) surname = models.CharField(max_length = 70) and I'm populating it by looping through a list as follows: from models import Student for id, frm, pref, sname in large_list_of_data: s = Student(student_id = id, form = frm, preferred = pref, surname = sname) s.save() I don't really want to be saving this to the database each time but I don't know another way to get django to not forget about it (I'd rather add all the rows and then do a single commit). There are two problems with the code as it stands. It's slow -- about 20 students get updated each second. It doesn't even make it through large_list_of_data, instead throwing a DatabaseError saying "unable to open database file". (Possibly because I'm using sqlite3.) My question is: How can I stop these two things from happening? I'm guessing that the root of both problems is that I've got the s.save() but I don't see a way of easily batching the students up and then saving them in one commit to the database.

    Read the article

  • PHP create_function, function without semicolon?

    - by Ozzy
    hi all, basically, what i want to know is, for the second parameter in the create_function function, is there anyway to pass a string without a semicolon? or will it not work. example: taken from php.net create_function('$a,$b', 'return "CRCs: " . crc32($a) . " , ".crc32(b);'), notice that there is a semicolon in the string. is there any possible way someone can enter a function without a semicolon that will still run/evaluate?

    Read the article

  • Routing error when trying to use same view for update and create flows (Rails 3)

    - by Jamis Charles
    My overall use case: I have a Listing model that has many images. The Listing detail page lists all the fields that can be updated inline (through ajax). I want to be able to use the same view for both update listing and create new listing. My listing controller looks as follows: def detail @listing = Listing.find(params[:id]) @image = Image.new #should this link somewhere else? respond_to do |format| format.html # show.html.erb format.xml { render :xml => @listing } end end def create # create a new listing and save it immediately. Assign it to guest, with a status of "draft" @listing = Listing.new(:price_id => 1) # Default price id # save it to db # TODO add validation that it has to have a price ID, on record creation. So the view doesn't break. @listing.save @image = Image.new # redirect_to "/listings/detail/@listing.id" #this didn't work respond_to do |format| format.html # show.html.erb format.xml { render :xml => @listing } end end The PROBLEM I'm using a partial that shows the same form for the create view and the detail view. This works perfectly except for one thing: When I pull up http://0.0.0.0:3000/listings/detail/7, it works perfectly. When I pull up http://0.0.0.0:3000/listings/new, I get the following error: Showing /Applications/MAMP/htdocs/rails_testing/feedbackd/app/views/listings/_edit_form.html.erb where line #100 raised: No route matches {:action="show", :controller="images"} Extracted source (around line #100): 97: <!-- Form for new images --> 98: <div class="span-20 append-bottom"> 99: <!-- <%# form_for :image, @image, :url => image_path, :html => { :multipart => true } do |f| %> --> 100: <%= form_for @image, :url => image_path, :html => { :multipart => true } do |f| %> 101: <%= f.text_field :description %><br /> 102: <%= f.file_field :photo %> 103: <%= submit_tag "Upload" %> What I think the issue is: When I upload a new image (I'm using Paperclip), it requires the listing_id to create the image record. Since the listing_id isn't passed in with listings/new it can't find the listing_id. How can I pass in the id? Via a redirect? What's the best way to solve this? Thank you.

    Read the article

  • java.lang.NoClassDefFoundError when the file is there

    - by tsOverflow
    I've tried to look around for postings that might help me, cant find any. I am deploying an ear to JBoss4 server, and I started having this problem since I added a new project. this new project is defined as Java project in eclipse, and the EAR project has an EJB project that has the new Java project as one of the projects as its dependent upon - if deployed on JBoss locally through eclipse, there's no problem and everything goes smoothly But when being deployed to JBoss in test environment (outside eclipse), kept getting java.lang.NoClassDefFoundError on one of the classes that are defined in the new Java project. I looked inside the EAR file to get to the jar (EJB project), and then inside the jar, I can see the directory structure and all the class files from the new Java project - ie. The class that it complains about is right there inside the EAR-JAR and matching the exact structure that it's looking for. I am at lost to what else I can look at. Any pointers are greatly appreciated! Thanks

    Read the article

  • Weird exception with delayed_job

    - by Tam
    Trying to queue a job with delayed_job as follows: Delayed::Job.enqueue(BackgroundProcess.new(current_user, object)) current_user and object are not nil when I print them out. The weird thing is that sometimes refreshing the page or running the command again works! Here is the exception trace: Delayed::Backend::ActiveRecord::Job Columns (44.8ms) SHOW FIELDS FROM `delayed_jobs` TypeError (wrong argument type nil (expected Data)): /Users/.rvm/rubies/ruby-1.9.1-p378/lib/ruby/1.9.1/yaml.rb:391:in `emit' /Users/.rvm/rubies/ruby-1.9.1-p378/lib/ruby/1.9.1/yaml.rb:391:in `quick_emit' /Users/.rvm/rubies/ruby-1.9.1-p378/lib/ruby/1.9.1/yaml/rubytypes.rb:86:in `to_yaml' vendor/plugins/delayed_job/lib/delayed/backend/base.rb:65:in `payload_object=' activerecord (2.3.9) lib/active_record/base.rb:2918:in `block in assign_attributes' activerecord (2.3.9) lib/active_record/base.rb:2914:in `each' activerecord (2.3.9) lib/active_record/base.rb:2914:in `assign_attributes' activerecord (2.3.9) lib/active_record/base.rb:2787:in `attributes=' activerecord (2.3.9) lib/active_record/base.rb:2477:in `initialize' activerecord (2.3.9) lib/active_record/base.rb:725:in `new' activerecord (2.3.9) lib/active_record/base.rb:725:in `create' vendor/plugins/delayed_job/lib/delayed/backend/base.rb:21:in `enqueue'

    Read the article

  • Windows Platform Installer fails during Orchard Installation

    - by nullnvoid
    I'm attempting to install Orchard 1.0 on a Windows 7 box. It has only just been released. I downloaded and installed the Windows Platform Installer and attempted to install Orchard. The error message is just that the application has stopped working and asks if I want to debug or close the application. The event log contains a single error: "The event logging service encountered an error while processing an incoming event published from Microsoft-Windows-Security-Auditing." I tried installing MVC3 and it worked without issue. Has anyone experienced a similar problem?

    Read the article

  • Retrieving content of a txt file from URL to Android

    - by eightx2
    I would like to be able to retrieve contents of a .txt file from the internet, and load it in an EditText. I tried using the code on this page: Reading Text File From Server on Android It didn't work, as you might have guessed. I've read on numerous sites about this type of problem, but I can't get anything to work. Someone suggested AndroidHttpClient (http://developer.android.com/reference/android/net/http/AndroidHttpClient.html), but I simply can't find any examples with this. As I'm a newbie in Android programming, I would love if someone could please give me a small example.

    Read the article

  • C#: split a string into runs of characters, numbers and delimited strings and process it

    - by nrkn
    OK my regex is a bit rusty and I've been struggling with this particular problem... I need to split and process a string containing any number of the following, in any order: Chars (lowercase letters only) Quote delimited strings Ints The strings are pretty weird (I don't have control over them). When there's more than one number in a row in the string they're seperated by a comma. They need to be processed in the same order that they appeared in the original string. For example, a string might look like: abc20a"Hi""OK"100,20b With this particular string the resulting call stack would look a bit like: ProcessLetters( new[] { 'a', 'b', 'c' } ); ProcessInts( 20 ); ProcessLetters( 'a' ); ProcessStrings( new[] { "Hi", "OK" } ); ProcessInts( new[] { 100, 20 } ); ProcessLetters( 'b' ); What I could do is treat it a bit like CSV, where you build tokens by processing the characters one at a time, but I think it could be more easily done with a regex?

    Read the article

  • Changing the Settings item description text color in Android?

    - by Cori
    I use a Samsung Vibrant, and one of the annoying bits that Samsung tossed on their TouchWiz skin was changing the color of the Settings menu item description text from white (AOSP) to light blue. This looks okay as long as the skin is bluey-themed, but most ROMs seem to be leaning toward Gingerbread clones... doesn't look good with the green. How can I change that settings description font color back to white, or even the orange it is in actual Android 2.3? Which xml file is the color property located in? It seems to also spread to all apps you install, too... the blue text.

    Read the article

  • Connecting to Google app email servers in Python to send from an alias

    - by user575228
    I'm looking to send many emails via Python and would like to connect to Google's email servers to send it from my company email address (it's for work). I've got working code for sending the email through the old company email ([email protected]) which is our login, but can't figure out how to send it through the alias ([email protected]) we use frequently. Long story short, logging in with my regular Google Apps account won't do and I need to sign in with an alias (nickname) instead. Alternatively, I can sign with the regular account ([email protected]) but send via a different email ([email protected]). Working in python and pretty new to programming, but am a good listener! (It's like this question: Google Apps - Send email from a nickname but in Python).

    Read the article

  • Writing C# GUI over a C++ dll or C++ exe

    - by user97642
    Hi I have a C++ console Exe which does some progamming. Now i wanted to write a C# GUI which does some of the programming that the C++ exe does. I was thinking of few approaches, Write the C# GUI with all programming in C++ done from scratch.(I do not want to do this for the amount of rework it entails) Build a C++ dll which does the programming and have it imported in GUI app.(Now here i have a concern. How do i capture the output of the routines in c++ dll and display it in GUI? Should i return the output as string for every routine that the app calls.? Since i dont know managed c++ iam going to build an unmanaged C++ dll. )

    Read the article

  • preg_match_all confusing failing

    - by James
    $string = (string) file_get_contents($_FILES['file']['tmp_name']); echo $string; preg_match_all("/[\._a-zA-Z0-9-]+@[\._a-zA-Z0-9-]+/i", $string, $matches); print_r($matches); I am parsing text/csv files and grabbing email addresses from uploaded files. When parsing a Google Contact file I exported it weirdly fails. But when I simply copy the string that is echo'd and paste that instead of the file_get_contents result, it parses and works. Any idea why it is refusing to take the file_get_contents string, but if I paste in the raw data myself, it works?

    Read the article

  • is there any way to terminate UIImagePickerViewController while taking video?

    - by wadelim
    Hello! It's the first time to ask a question! until now, I don't need to ask qestion about my problem because Here is the rellay good place to share and solve my programming error(problem?)! now, I'm having a big problem at UIImagePickerViewController Fisrt, while My app is enconding Video Image on pckerViewcontroller, If I push the home button to go background, My app is terminated T_T(EXC_BAD_ACCESS) I want to keep my app alive(living) or close safely pickerview controller to be back I'm going crazy if there is anyone to help me, I would really appreciated Thank you! // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *// // in Init Method [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(enterBackgound:) name:UIApplicationDidEnterBackgroundNotification object:nil]; // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *// UIImagePickerController *pickerController = [UIImagePickerController new]; i_pc = pickerController; // "i_pc" is member instance .... [self presentModalViewController:pickerController animated:YES]; [pickerController release]; // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *// while encoding some video in pckerview Contrller, Push homeButton! and return back then my app is killed // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *// // this is my code to try to solve above problem.. But It's not working -(void)enterBackground:(NSNotification *)notification{ [self dismissModalViewControllerAnimated:YES]; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *//

    Read the article

  • NSTimer as a self-targeting ivar.

    - by Matt Wilding
    I have come across an awkward situation where I would like to have a class with an NSTimer instance variable that repeatedly calls a method of the class as long as the class is alive. For illustration purposes, it might look like this: // .h @interface MyClock : NSObject { NSTimer* _myTimer; } - (void)timerTick; @end - // .m @implementation MyClock - (id)init { self = [super init]; if (self) { _myTimer = [[NSTimer scheduledTimerWithTimeInterval:1.0f target:self selector:@selector(timerTick) userInfo:nil repeats:NO] retain]; } return self; } - (void)dealloc { [_myTimer invalidate]; [_myTImer release]; [super dealloc]; } - (void)timerTick { // Do something fantastic. } @end That's what I want. I don't want to to have to expose an interface on my class to start and stop the internal timer, I just want it to run while the class exists. Seems simple enough. But the problem is that NSTimer retains its target. That means that as long as that timer is active, it is keeping the class from being dealloc'd by normal memory management methods because the timer has retained it. Manually adjusting the retain count is out of the question. This behavior of NSTimer seems like it would make it difficult to ever have a repeating timer as an ivar, because I can't think of a time when an ivar should retain its owning class. This leaves me with the unpleasant duty of coming up with some method of providing an interface on MyClock that allows users of the class to control when the timer is started and stopped. Besides adding unneeded complexity, this is annoying because having one owner of an instance of the class invalidate the timer could step on the toes of another owner who is counting on it to keep running. I could implement my own pseudo-retain-count-system for keeping the timer running but, ...seriously? This is way to much work for such a simple concept. Any solution I can think of feels hacky. I ended up writing a wrapper for NSTimer that behaves exactly like a normal NSTimer, but doesn't retain its target. I don't like it, and I would appreciate any insight.

    Read the article

  • How do I digitally sign an HTTPS request in .net?

    - by Endy Tjahjono
    Is there a built in procedure to digitally sign an HTTPS request with client's SSL private key in .net? Also, is there a built in procedure to verify the digital signature against an SSL certificate? Or do I have to roll my own? Or is there a third party library? I need the request to be digitally signed because the client manipulates money, so I want to be sure that the request really comes from the client and that nobody tampers with the content of the request. I'm also considering using SSL client certificate, but it can only provide confidentiality and authentication, but not data integrity.

    Read the article

  • create menus in command line

    - by Miles Rout
    How can one create menus in the command line program? I've tried stuff like: cin input; switch (input) { case (1): // do stuff case (2): // ... } but then I've had the problem of sub-menus, and going back to the same menu, etc. The first program I wrote (apart from exercises) that tried to use the switch idea for the menus had goto statements because the alternative was heaps of (at the time) complicated loops.

    Read the article

  • Delphi7 - How can i copy a file that is being written to

    - by Simon
    I have an application that logs information to a daily text file every second on a master PC. A Slave PC on the network using the same application would like to copy this text file to its local drive. I can see there is going to be file access issues. These files should be no larger than 30-40MB each. the network will be 100MB ethernet. I can see there is potential for the copying process to take longer than 1 second meaning the logging PC will need to open the file for writing while it is being read. What is the best method for the file writing(logging) and file copying procedures? I know there is the standard Windows CopyFile() procedure, however this has given me file access problems. There is also TFileStream using the fmShareDenyNone flag, but this also very occasionally gives me an access problem too (like 1 per week). What is this the best way of accomplishing this task? My current File Logging: procedure FSWriteline(Filename,Header,s : String); var LogFile : TFileStream; line : String; begin if not FileExists(filename) then begin LogFile := TFileStream.Create(FileName, fmCreate or fmShareDenyNone); try LogFile.Seek(0,soFromEnd); line := Header + #13#10; LogFile.Write(line[1],Length(line)); line := s + #13#10; LogFile.Write(line[1],Length(line)); finally logfile.Free; end; end else begin line := s + #13#10; Logfile:=tfilestream.Create(Filename,fmOpenWrite or fmShareDenyNone); try logfile.Seek(0,soFromEnd); Logfile.Write(line[1], length(line)); finally Logfile.free; end; end; end; My file copy procedure: procedure DoCopy(infile, Outfile : String); begin ForceDirectories(ExtractFilePath(outfile)); //ensure folder exists if FileAge(inFile) = FileAge(OutFile) then Exit; //they are the same modified time try { Open existing destination } fo := TFileStream.Create(Outfile, fmOpenReadWrite or fmShareDenyNone); fo.Position := 0; except { otherwise Create destination } fo := TFileStream.Create(OutFile, fmCreate or fmShareDenyNone); end; try { open source } fi := TFileStream.Create(InFile, fmOpenRead or fmShareDenyNone); try cnt:= 0; fi.Position := cnt; max := fi.Size; {start copying } Repeat dod := BLOCKSIZE; // Block size if cnt+dod>max then dod := max-cnt; if dod>0 then did := fo.CopyFrom(fi, dod); cnt:=cnt+did; Percent := Round(Cnt/Max*100); until (dod=0) finally fi.free; end; finally fo.free; end; end;

    Read the article

  • Creating and maintaining Orchard translations

    - by Bertrand Le Roy
    Many volunteers have already stepped up to provide translations for Orchard. There are many challenges to overcome with translating such a project. Orchard is a very modular CMS, so the translation mechanism needs to account for the core as well as first and third party modules and themes. Another issue is that every new version of Orchard or of a module changes some localizable strings and adds new ones as others enter obsolescence. In order to address those problems, I've built a small Orchard module that automates some of the most complex tasks that maintaining a translation implies. In this post, I'll walk you through the operations I had to do to update the French translation for Orchard 1.0. In order to make sure you translate all the first party modules, I would recommend that you start from a full source code enlistment. The reason is that I'll show how you can extract the default en-US translation from any source code enlistment. That enables you to create a translation that is even more up-to-date than what is currently on the site. Alternatively, you could start by downloading the current en-US translation. If you decide to do so, just skip the relevant paragraphs. First, let's install the Orchard Translation Manager. I'm starting from a vanilla clone of the latest in the code repository. After you've setup the site, go into the dashboard and click on Gallery. Locate the Orchard Translation Manager in the list of modules and click "Install". Once the module is installed, you need to enable its one feature by going into Configuration/Features and clicking "Enable" next to Vandelay.TranslationManager. We're done with the setup that we need in order to start our translation work. We'll now switch to the command-line and to our favorite text editor. Open a command-line on the Orchard web site folder. I found the easiest way to do this is to do a SHIFT+right-click on the Orchard.Web folder in Windows Explorer and to click "Open command window here". Type bin\orchard to enter the Orchard command-line environment. If you do a "help commands" you should see four commands in the list that came from the module we just installed: extract default translation, install translation, package translation and sync translation. First, we're going to generate the default translation. Note that it is possible to generate that default translation for a specific list of modules and themes by using the /Extensions: switch, which should facilitate the translation of third party extensions, but in this tutorial we're going to generate it for the whole of the Orchard source code. extract default translation /Output:\temp .csharpcode, .csharpcode pre { font-size: small; color: black; font-family: consolas, "Courier New", courier, monospace; background-color: #ffffff; /*white-space: pre;*/ } .csharpcode pre { margin: 0em; } .csharpcode .rem { color: #008000; } .csharpcode .kwrd { color: #0000ff; } .csharpcode .str { color: #006080; } .csharpcode .op { color: #0000c0; } .csharpcode .preproc { color: #cc6633; } .csharpcode .asp { background-color: #ffff00; } .csharpcode .html { color: #800000; } .csharpcode .attr { color: #ff0000; } .csharpcode .alt { background-color: #f4f4f4; width: 100%; margin: 0em; } .csharpcode .lnum { color: #606060; } This should have created an Orchard.en-us.po.zip file in the temp directory. Extract that archive into an orchard.po folder under \temp. The next step depends on whether you have an existing translation that you want to update or not. If you do have an existing translation, just extract it into the same \temp\orchard.po directory. That should result in a file structure where you have the default en-US translation alongside your own. If you don't have an existing translation, just continue, the commands will be the same. We are now going to synchronize those translations (or generate the stub for a new one if you didn't start from an existing translation). sync translation /Input:\temp\orchard.po /Culture:fr-FR After this command (where you should of course substitute fr-FR with the culture you're working on), we now have updated files that contain a few useful flags. Open each of the .po files under the culture you are working on (there should be around 36) with your favorite text editor. For all the strings that are still valid in the latest version, nothing changes and you don't need to do anything. For all the strings that disappeared from the default culture, the old translation will still be there but they will be prefixed with the following comment: # Obsolete translation Conveniently, all the obsolete strings will be grouped at the end of the file. You can select all those and delete them. For all the new strings, you will see the following comment: # Untranslated string This is where the hard work begins. You'll need to translate each of those new strings by entering the translation between the quotes in: msgstr "" Don't introduce hard carriage returns in the strings, just stay on one line (your text editor should do some reasonable wrapping so this shouldn't be a big deal). Once you're done with a file, save it. Make sure, and this is very important, that your text editor is saving using the UTF-8 encoding. In Notepad, that setting can be found in the file saving dialog by doing a "Save As" rather than a plain "Save": When all the po files have been edited, you are ready to package the translation for submission (a.k.a. sending e-mail to the localization mailing list). package translation /Culture:fr-FR /Input:\temp\orchard.po /Output:\temp You should now see a Orchard.fr-FR.po.zip file in temp that is ready to be submitted. That is, once you've tested it, which can be done by deploying it into the site: install translation \temp\orchard.fr-fr.po.zip Once this is done you can go into the dashboard under Configuration/Settings and click on "Add or remove supported cultures for the site". Choose your culture and click "Add". You can go back to settings and set the default culture. Save. You may now take a tour of the application and verify that everything works as expected: And that's it really. Creating a translation for Orchard is a matter of a few hours. If you don't see a translation for your culture, please consider creating it.

    Read the article

  • ASP.NET MVC 3 RTM Released

    - by shiju
     The ASP.NET team has released RTM version of ASP.NET MVC 3. You can download the ASP.NET MVC 3 RTM from here and source code of ASP.NET MVC 3 can download from here. Microsoft has released the following products along with ASP.NET MVC 3.NuGetIIS Express 7.5SQL Server Compact Edition 4Web Deploy and Web Farm Framework 2.0Orchard 1.0WebMatrix 1.0 You can read more details from ScottGu's blog post Announcing release of ASP.NET MVC 3, IIS Express, SQL CE 4, Web Farm Framework, Orchard, WebMatrix .You can upgrade your ASP.NET MVC 2 projects to ASP.NET MVC 3 using MVC 3 Project Upgrade Tool. You can read more details about the MVC 3 Upgrade Tool from here. Demo Web App using ASP.NET MVC 3 RTM  You can download a demo web app using ASP.NET MVC 3 RTM from here. The demo app is explained in the below blog postsDeveloping web apps using ASP.NET MVC 3, Razor and EF Code First - Part 1Developing web apps using ASP.NET MVC 3, Razor and EF Code First - Part 2

    Read the article

  • Errors installing the Curl library with PHP/Apache/Windows

    - by MarathonStudios
    I'm having a hell of a time getting Curl to work with PHP/Apache on my Windows XP 64-bit development box. I have PHP and Apache successfully installed, but when I tried to enable Curl I get the following error (twice) from PHP on Apache startup: "PHP Startup: Unable to load dynamic library 'C:\php\ext\php_curl.dll' - The operating system cannot run %1." I did uncomment the correct line in PHP.ini. I did move the two DLLs (php_curl.dll and ssleay32.dll) into my PHO root, into my System32, even my apache root - but no matter where I put them, PHP can't find them. I keep getting the error above. Anyone have any idea how to remedy this?

    Read the article

  • Changing Apple Mac environment www record

    - by chairish
    Apple server gurus? I have a Mac OSX Snow Leopard server question. How to be able to view a company's externally hosted website from inside the company? I inherited a company using Mac OSX Snow Leopard server. We moved the website away from MobileMe and into an environment that offers PHP etc. Although the site shows up correctly outside of the company, internally it looks to the MobileMe page and shows an error. I need to change the www record to reflect the change. Where do I do this on OSX Server?

    Read the article

  • How do i setup a Window server 2008 R2 + SQL server 2008 VPS ?

    - by Spencer Lim
    I wish to deploy a trusted apps at the secured way... i got one empty VPS (no operating system) but i don't know how could i install Window server 2008 R2 and SQL server 2008 the version i got is genuine enterprise/ datacenter and sql enterprise the main purpose is used to deploy ASP.Net v4 MVC 2 and XBAP Apps + LINQ also use SQL server for my window application with someway to make it able to remote access May i know anyone here could teach me or introduce some source for me on how to setup the domain, IP, OS and feature all thing, please... i felt confuse here @.@

    Read the article

  • unable to properly execute binaries from PHP

    - by Lowgain
    I was building an app on a SUSE box, and had a binary called create_group for instance, which had a suid bit and allowed my PHP app to call exec('create group grpname'); and create a new group (there are others for users, etc). The binary was a small c script that calls setuid(0) and then runs the user creation stuff. This worked perfectly on the SUSE box I recently moved my project to Ubuntu and everything works fine except these binaries. I can run them from the shell and they work okay, but when I get the PHP app to run them it just does nothing. Is there anything Ubuntu would be doing differently that I'm missing?

    Read the article

  • Cisco 800 series won't forward port

    - by sam
    Hello ServerFault, I am trying to forward port 444 from my cisco router to my Web Server (192.168.0.2). As far as I can tell, my port forwarding is configured correctly, yet no traffic will pass through on port 444. Here is my config: ! version 12.3 service config no service pad service tcp-keepalives-in service tcp-keepalives-out service timestamps debug uptime service timestamps log uptime service password-encryption no service dhcp ! hostname QUESTMOUNT ! logging buffered 16386 informational logging rate-limit 100 except warnings no logging console no logging monitor enable secret 5 -removed- ! username administrator secret 5 -removed- username manager secret 5 -removed- clock timezone NZST 12 clock summer-time NZDT recurring 1 Sun Oct 2:00 3 Sun Mar 3:00 aaa new-model ! ! aaa authentication login default local aaa authentication login userlist local aaa authentication ppp default local aaa authorization network grouplist local aaa session-id common ip subnet-zero no ip source-route no ip domain lookup ip domain name quest.local ! ! no ip bootp server ip inspect name firewall tcp ip inspect name firewall udp ip inspect name firewall cuseeme ip inspect name firewall h323 ip inspect name firewall rcmd ip inspect name firewall realaudio ip inspect name firewall streamworks ip inspect name firewall vdolive ip inspect name firewall sqlnet ip inspect name firewall tftp ip inspect name firewall ftp ip inspect name firewall icmp ip inspect name firewall sip ip inspect name firewall fragment maximum 256 timeout 1 ip inspect name firewall netshow ip inspect name firewall rtsp ip inspect name firewall skinny ip inspect name firewall http ip audit notify log ip audit po max-events 100 ip audit name intrusion info list 3 action alarm ip audit name intrusion attack list 3 action alarm drop reset no ftp-server write-enable ! ! ! ! crypto isakmp policy 1 authentication pre-share ! crypto isakmp policy 2 encr 3des authentication pre-share group 2 ! crypto isakmp client configuration group staff key 0 qS;,sc:q<skro1^, domain quest.local pool vpnclients acl 106 ! ! crypto ipsec transform-set tr-null-sha esp-null esp-sha-hmac crypto ipsec transform-set tr-des-md5 esp-des esp-md5-hmac crypto ipsec transform-set tr-des-sha esp-des esp-sha-hmac crypto ipsec transform-set tr-3des-sha esp-3des esp-sha-hmac ! crypto dynamic-map vpnusers 1 description Client to Site VPN Users set transform-set tr-des-md5 ! ! crypto map cm-cryptomap client authentication list userlist crypto map cm-cryptomap isakmp authorization list grouplist crypto map cm-cryptomap client configuration address respond crypto map cm-cryptomap 65000 ipsec-isakmp dynamic vpnusers ! ! ! ! interface Ethernet0 ip address 192.168.0.254 255.255.255.0 ip access-group 102 in ip nat inside hold-queue 100 out ! interface ATM0 no ip address no atm ilmi-keepalive dsl operating-mode auto ! interface ATM0.1 point-to-point pvc 0/100 encapsulation aal5mux ppp dialer dialer pool-member 1 ! ! interface Dialer0 bandwidth 640 ip address negotiated ip access-group 101 in no ip redirects no ip unreachables ip nat outside ip inspect firewall out ip audit intrusion in encapsulation ppp no ip route-cache no ip mroute-cache dialer pool 1 dialer-group 1 no cdp enable ppp pap sent-username -removed- password 7 -removed- ppp ipcp dns request crypto map cm-cryptomap ! ip local pool vpnclients 192.168.99.1 192.168.99.254 ip nat inside source list 105 interface Dialer0 overload ip nat inside source static tcp 192.168.0.2 444 interface Dialer0 444 ip nat inside source static tcp 192.168.0.51 9000 interface Dialer0 9000 ip nat inside source static udp 192.168.0.2 1433 interface Dialer0 1433 ip nat inside source static tcp 192.168.0.2 1433 interface Dialer0 1433 ip nat inside source static tcp 192.168.0.2 25 interface Dialer0 25 ip classless ip route 0.0.0.0 0.0.0.0 Dialer0 ip http server no ip http secure-server ! ip access-list logging interval 10 logging 192.168.0.2 access-list 1 remark The local LAN. access-list 1 permit 192.168.0.0 0.0.0.255 access-list 2 permit 192.168.0.0 access-list 2 remark Where management can be done from. access-list 2 permit 192.168.0.0 0.0.0.255 access-list 3 remark Traffic not to check for intrustion detection. access-list 3 deny 192.168.99.0 0.0.0.255 access-list 3 permit any access-list 101 remark Traffic allowed to enter the router from the Internet access-list 101 permit ip 192.168.99.0 0.0.0.255 192.168.0.0 0.0.0.255 access-list 101 deny ip 0.0.0.0 0.255.255.255 any access-list 101 deny ip 10.0.0.0 0.255.255.255 any access-list 101 deny ip 127.0.0.0 0.255.255.255 any access-list 101 deny ip 169.254.0.0 0.0.255.255 any access-list 101 deny ip 172.16.0.0 0.15.255.255 any access-list 101 deny ip 192.0.2.0 0.0.0.255 any access-list 101 deny ip 192.168.0.0 0.0.255.255 any access-list 101 deny ip 198.18.0.0 0.1.255.255 any access-list 101 deny ip 224.0.0.0 0.15.255.255 any access-list 101 deny ip any host 255.255.255.255 access-list 101 permit tcp 67.228.209.128 0.0.0.15 any eq 1433 access-list 101 permit tcp host 120.136.2.22 any eq 1433 access-list 101 permit tcp host 123.100.90.58 any eq 1433 access-list 101 permit udp 67.228.209.128 0.0.0.15 any eq 1433 access-list 101 permit udp host 120.136.2.22 any eq 1433 access-list 101 permit udp host 123.100.90.58 any eq 1433 access-list 101 permit tcp any any eq 444 access-list 101 permit tcp any any eq 9000 access-list 101 permit tcp any any eq smtp access-list 101 permit udp any any eq non500-isakmp access-list 101 permit udp any any eq isakmp access-list 101 permit esp any any access-list 101 permit tcp any any eq 1723 access-list 101 permit gre any any access-list 101 permit tcp any any eq 22 access-list 101 permit tcp any any eq telnet access-list 102 remark Traffic allowed to enter the router from the Ethernet access-list 102 permit ip any host 192.168.0.254 access-list 102 deny ip any host 192.168.0.255 access-list 102 deny udp any any eq tftp log access-list 102 permit ip 192.168.0.0 0.0.0.255 192.168.99.0 0.0.0.255 access-list 102 deny ip any 0.0.0.0 0.255.255.255 log access-list 102 deny ip any 10.0.0.0 0.255.255.255 log access-list 102 deny ip any 127.0.0.0 0.255.255.255 log access-list 102 deny ip any 169.254.0.0 0.0.255.255 log access-list 102 deny ip any 172.16.0.0 0.15.255.255 log access-list 102 deny ip any 192.0.2.0 0.0.0.255 log access-list 102 deny ip any 192.168.0.0 0.0.255.255 log access-list 102 deny ip any 198.18.0.0 0.1.255.255 log access-list 102 deny udp any any eq 135 log access-list 102 deny tcp any any eq 135 log access-list 102 deny udp any any eq netbios-ns log access-list 102 deny udp any any eq netbios-dgm log access-list 102 deny tcp any any eq 445 log access-list 102 permit ip 192.168.0.0 0.0.0.255 any access-list 102 permit ip any host 255.255.255.255 access-list 102 deny ip any any log access-list 105 remark Traffic to NAT access-list 105 deny ip 192.168.0.0 0.0.0.255 192.168.99.0 0.0.0.255 access-list 105 permit ip 192.168.0.0 0.0.0.255 any access-list 106 remark User to Site VPN Clients access-list 106 permit ip 192.168.0.0 0.0.0.255 any dialer-list 1 protocol ip permit ! line con 0 no modem enable line aux 0 line vty 0 4 access-class 2 in transport input telnet ssh transport output none ! scheduler max-task-time 5000 ! end any ideas? :)

    Read the article

  • Computer no display from connection problem.

    - by whamsicore
    My computer is booting but has no display. The optical drive has power, but the USB doesn't, so I figured that I had a broken motherboard. However I tried to boot my computer again laying flat, and it worked fine for two seconds, and then froze like it did the first time. It had no display after that. I have come to the conclusion that it is a connection problem (someone had a similar problem on one of the online forums).

    Read the article

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