Daily Archives

Articles indexed Friday June 18 2010

Page 15/76 | < Previous Page | 11 12 13 14 15 16 17 18 19 20 21 22  | Next Page >

  • Rewrite Url with apache2

    - by dhalsim
    Hi, I'm experimenting with CodeIgniter PHP framework, this framework works like: http://localhost:7777/~dhalsim/ci/index.php/blog So, I tried to remove index.php part from there. So far I do these: make $config['index_page'] = "index.php"; to $config['index_page'] = ""; make $config['uri_protocol'] = "REQUEST_URI"; from $config['uri_protocol'] = "AUTO"; enable apache mod_rewrite by "a2enmod rewrite" put a .htaccess file to /ci directory: RewriteEngine on RewriteBase / RewriteCond %{REQUEST_URI} ^system.* RewriteRule ^(.*)$ /index.php/$1 [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php?/$1 [L] And of course restart apache server Here is my apache logs with these configurations: 127.0.0.1 - - [17/Jul/2009:02:21:41 +0300] [localhost/sid#7f48e8ad2968][rid#7f48e8e634c8/initial] (3) [perdir /home/dhalsim/public_html/ci/] strip per-dir prefix: /home/dhalsim/public_html/ci/blog -> blog 127.0.0.1 - - [17/Jul/2009:02:21:41 +0300] [localhost/sid#7f48e8ad2968][rid#7f48e8e634c8/initial] (3) [perdir /home/dhalsim/public_html/ci/] applying pattern '^(.*)$' to uri 'blog' 127.0.0.1 - - [17/Jul/2009:02:21:41 +0300] [localhost/sid#7f48e8ad2968][rid#7f48e8e634c8/initial] (4) [perdir /home/dhalsim/public_html/ci/] RewriteCond: input='/~dhalsim/ci/blog' pattern='^system.*' => not-matched 127.0.0.1 - - [17/Jul/2009:02:21:41 +0300] [localhost/sid#7f48e8ad2968][rid#7f48e8e634c8/initial] (3) [perdir /home/dhalsim/public_html/ci/] strip per-dir prefix: /home/dhalsim/public_html/ci/blog -> blog 127.0.0.1 - - [17/Jul/2009:02:21:41 +0300] [localhost/sid#7f48e8ad2968][rid#7f48e8e634c8/initial] (3) [perdir /home/dhalsim/public_html/ci/] applying pattern '^(.*)$' to uri 'blog' 127.0.0.1 - - [17/Jul/2009:02:21:41 +0300] [localhost/sid#7f48e8ad2968][rid#7f48e8e634c8/initial] (4) [perdir /home/dhalsim/public_html/ci/] RewriteCond: input='/home/dhalsim/public_html/ci/blog' pattern='!-f' => matched 127.0.0.1 - - [17/Jul/2009:02:21:41 +0300] [localhost/sid#7f48e8ad2968][rid#7f48e8e634c8/initial] (4) [perdir /home/dhalsim/public_html/ci/] RewriteCond: input='/home/dhalsim/public_html/ci/blog' pattern='!-d' => matched 127.0.0.1 - - [17/Jul/2009:02:21:41 +0300] [localhost/sid#7f48e8ad2968][rid#7f48e8e634c8/initial] (2) [perdir /home/dhalsim/public_html/ci/] rewrite 'blog' -> 'index.php?/blog' 127.0.0.1 - - [17/Jul/2009:02:21:41 +0300] [localhost/sid#7f48e8ad2968][rid#7f48e8e634c8/initial] (3) split uri=index.php?/blog -> uri=index.php, args=/blog 127.0.0.1 - - [17/Jul/2009:02:21:41 +0300] [localhost/sid#7f48e8ad2968][rid#7f48e8e634c8/initial] (3) [perdir /home/dhalsim/public_html/ci/] add per-dir prefix: index.php -> /home/dhalsim/public_html/ci/index.php 127.0.0.1 - - [17/Jul/2009:02:21:41 +0300] [localhost/sid#7f48e8ad2968][rid#7f48e8e634c8/initial] (2) [perdir /home/dhalsim/public_html/ci/] trying to replace prefix /home/dhalsim/public_html/ci/ with / 127.0.0.1 - - [17/Jul/2009:02:21:41 +0300] [localhost/sid#7f48e8ad2968][rid#7f48e8e634c8/initial] (5) strip matching prefix: /home/dhalsim/public_html/ci/index.php -> index.php 127.0.0.1 - - [17/Jul/2009:02:21:41 +0300] [localhost/sid#7f48e8ad2968][rid#7f48e8e634c8/initial] (4) add subst prefix: index.php -> /index.php 127.0.0.1 - - [17/Jul/2009:02:21:41 +0300] [localhost/sid#7f48e8ad2968][rid#7f48e8e634c8/initial] (1) [perdir /home/dhalsim/public_html/ci/] internal redirect with /index.php [INTERNAL REDIRECT] Here is the result in Firefox: 404 Not Found: The requested URL /index.php was not found on this server. So, what should I do (or where am I wrong) to get work these URLs? http://localhost:7777/~dhalsim/ci/blog/ instead of http://localhost:7777/~dhalsim/ci/index.php/blog/

    Read the article

  • Unity to dispose of object

    - by Johan Levin
    Is there a way to make Unit dispose property-injected objects as part of the Teardown? The background is that I am working on an application that uses ASP.NET MVC 2, Unity and WCF. We have written our own MVC controller factory that uses unity to instantiate the controller and WCF proxies are injected using the [Dependency] attribute on public properties of the controller. At the end of the page life cycle the ReleaseController method of the controller factory is called and we call IUnityContainer.Teardown(theMvcController). At that point the controller is disposed as expected but I also need to dispose the injected wcf-proxies. (Actually I need to call Close and/or Abort on them and not Dispose but that is a later problem.) I could of course override the controllers' Dispose methods and clean up the proxies there, but I don't want the controllers to have to know about the lifecycles of the injected interfaces or even that they refer to WCF proxies. If I need to write code myself for this - what would be the best extension point? I'd appreciate any pointer.

    Read the article

  • Is a point inside or outside a polygon which is on the surface of a globe

    - by richard
    How do I determine if a point is inside or outside a polygon that lies on the the surface of the earth? The inside of the polygon can be determined via the right hand rule, ie. the inside of the polygon is on your right hand side when you walk around the polygon. The polygon may Circle either pole Cross the 180 longitude Cover more than 50% of the globe As the globe is a sphere the normal ray crossing algorithms do not work correctly.

    Read the article

  • Facebook graph api photo upload to a fan page album

    - by kielie
    Hi guys, I have gotten the photo upload function to work with this code, <?php include_once 'facebook-php-sdk/src/facebook.php'; include_once 'config.php';//this file contains the secret key and app id etc... $facebook = new Facebook(array( 'appId' => FACEBOOK_APP_ID, 'secret' => FACEBOOK_SECRET_KEY, 'cookie' => true, 'domain' => 'your callback url goes here' )); $session = $facebook->getSession(); if (!$session) { $url = $facebook->getLoginUrl(array( 'canvas' => 1, 'fbconnect' => 0, 'req_perms'=>'user_photos,publish_stream,offline_access'//here I am requesting the required permissions, it should work with publish_stream alone, but I added the others just to be safe )); echo 'You are not logged in, please <a href="' . $facebook->getLoginUrl() . '">Login</a> to access this application'; } else{ try { $uid = $facebook->getUser(); $me = $facebook->api('/me'); $token = $session['access_token'];//here I get the token from the $session array $album_id = 'the id of the album you wish to upload to eg: 1122'; //upload your photo $file= 'test.jpg'; $args = array( 'message' => 'Photo from application', ); $args[basename($file)] = '@' . realpath($file); $ch = curl_init(); $url = 'https://graph.facebook.com/'.$album_id.'/photos?access_token='.$token; curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_HEADER, false); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, $args); $data = curl_exec($ch); //returns the id of the photo you just uploaded print_r(json_decode($data,true)); } catch(FacebookApiException $e){ echo "Error:" . print_r($e, true); } } ?> I hope this helps, a friend and I smashed our heads against a wall for quite some time to get this working! Anyways, here is my question, how can I upload a image to a fan page? I am struggling to get this working, when I upload the image all I get is the photo id but no photo in the album. So basically, when the user clicks the upload button on our application, I need it to upload the image they created to our fan page's album with them tagged on it. Anyone know how I can accomplish this?

    Read the article

  • Rails auto_complete "undefined method `auto_complete_for'" problem

    - by Andrew Wize
    rails - 2.3.8 ruby - 1.8.7 After auto_complete plugin installstion i still have "undefined method `auto_complete_for'" problem! Andrey-Bezruks-MacBook-Pro:eyeonasia.stage wizeflux$ ruby script/plugin install http://github.com/rails/auto_complete.git --force svn: '/Users/wizeflux/Projects/ionasia/eyeonasia.stage/vendor/plugins' is not a working copy Initialized empty Git repository in /Users/wizeflux/Projects/ionasia/eyeonasia.stage/vendor/plugins/auto_complete/.git/ warning: Option "depth" is ignored for github.com/rails/auto_complete.git From github.com/rails/auto_complete * branch HEAD - FETCH_HEAD Andrey-Bezruks-MacBook-Pro:eyeonasia.stage wizeflux$ after restarting server i get an error on line " auto_complete_for :listings, :name " - undefined method `auto_complete_for' for #

    Read the article

  • Bridging wlan0 to eth0

    - by user46127
    On arch Linux, I would like to mainly have eth0 (connected to bridged router) share the connection recieved from wlan0, Ive read tutorials but I'm not command sabby as other users are and don't completely understand. I would appreciate some help! Ty!

    Read the article

  • WordPress MU: Login from main page but not individual blogs

    - by bradrhine
    I recently upgraded to WPMU 2.8.6 and ever since, my users can't log in on their individual blogs, but they can log in from the main page. My site is at blogs.mtwp.net (we're a school district). So if a user goes to blogs.mtwp.net/BLOGNAME/wp-login.php, their password is rejected. If they go toblogs.mtwp.net/wp-login.php, they can log in and get to the dashboard from there. But it's not all users. Site admins can get in just fine. We're using wpDirAuth 1.4 if that makes a difference. Honestly, I'm stumped. Any help would be very much appreciated. Thanks!

    Read the article

  • silverlight 3.0 communication with winforms

    - by abusemind
    I would like to create a winform on the client side for interaction with Silverlight 3.0. The basic idea is using the winform browser. I definitely need both the directions of communication. Would it be impossible by using JavaScript as a midware for the interaction or some better ways? Or is there any new features of Silverlight 3.0 supported for this kind of winform application communication? The original one is one the client's browser to run but now I would like to migrate it to the winform application. For the sake of time-saving, please don't mention about the WPF because of the gap between WPF and the Silverlight.

    Read the article

  • MySql "comments" parameter as descriptor?

    - by Nick
    So, I'm trying to learn a lot at once, and this place is really helpful! I'm making a little running log website for myself and maybe a few other people, and I have it so that the user can add workouts for each day. With each workout, I have a variety of information the user can fill out for the workout, such as running distance, time, quality of run, course, etc... I store this in a MySql database as a table with fields titled "distance", "time", "runquality", etc... Now, these field titles don't match up with what I want displayed on the running log, so I was thinking of using the "Comments" attribute for a field to store its human-readable title--thus the field "runquality" would have "Quality of run" as its comment, and then I would pull the comment with a SQL query and display it instead of the field name. Is this a good theoretical/practical way of going about it? And what sort of SQL would I use to pull the comment for the field anyway? Secondly, suppose I want to add the ability for the user to create their own workout descriptors. So say a user wants to add a "temperature" descriptor for their workout. Should I create a script that adds fields to my workout table, or should I create a separate table listing only workout descriptors and somehow link the descriptor table with the "contents" table? I haven't learned any theory about database design or anything so any help is appreciated!

    Read the article

  • What is the most simple implementation of IDynamicMetaObjectProvider?

    - by Néstor Sánchez A.
    Hi, I have this scenario... 1.- I'm providing a "Dynamic Table" for wich users can define Fields. Each Dynamic Table will have as many rows/records as needed, but the Field definitions are centralized. 2.- My Dynamic Row/Record class was inherited from the .NET DLR DynamicObject class, and the underlying storage was a List appropriately associated to the defining fields. Everything works fine! BUT... 3.- Because I need to Serialize the content, and DynamicObject is not Serializable, I was forced to generate and carry a Dynamic Object when dynamic member access is required. But this is ugly and redundant. So, I need to implement IDynamicMetaObjectProvider myself to achieve dynamic access and serialization together. After googling/binging unsuccessfully I ask for your help... Can anybody please give a good example (or related link) for doing that?

    Read the article

  • XSLT string replace

    - by aximili
    I don't really know XSL but I need to fix this code, I have reduced it to make it simpler. I am getting this error Invalid XSLT/XPath function on this line <xsl:variable name="text" select="replace($text,'a','b')"/> This is the XSL <?xml version="1.0" encoding="ISO-8859-1"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:inm="http://www.inmagic.com/webpublisher/query" version='1.0'> <xsl:output method="text" encoding="UTF-8"/> <xsl:preserve-space elements="*"/> <xsl:template match="text()"></xsl:template> <xsl:template match="mos"> <xsl:apply-templates/> <xsl:for-each select="mosObj"> 'Notes or subject' <xsl:call-template name="rem-html"><xsl:with-param name="text" select="SBS_ABSTRACT"/></xsl:call-template> </xsl:for-each> </xsl:template> <xsl:template name="rem-html"> <xsl:param name="text"/> <xsl:variable name="text" select="replace($text,'a','b')"/> </xsl:template> </xsl:stylesheet> Can anyone tell me what's wrong with it? Thanks in advance.

    Read the article

  • How do I apply multiple rotation transforms on a Raphael text object?

    - by Pridkett
    I have a Raphael text object that I would like to rotate around an axis some distance away and also rotate the text accordingly so it stays horizontal. I know this is possible using SVG transformation matrices, but the author of Raphael has stated that they won't be a part of the toolkit anytime soon. Here's some code of what I'd like to do: txt_obj = paper.text(100, 0, "Hello!"); txt_obj.rotate(90, 100, 100); // rotate text so it is sideways at (200,100) txt_obj.rotate(-90); // rotate text back to horizontal Unfortunately, the second rotate command obliterates the translation and rotation accomplished by the first. Ideally I'd like to animate the operation, but I'll take it one step at a time for right now.

    Read the article

  • Real winforms/wpf projects which use MVC, MVP, MVVM

    - by Belousov Pavel
    Hello everybody, I have looked some videos and read some articles about MVC, MVP, MVVM. I think, that I understood basic principles and differences. But it seems to me that samples in articles and videos are very easy. I think that it's easy to learn how to apply these patterns when you can look on some projects. So I'd like to look on real projects(Winforms/WPF), which use MVC, MVP or MVVM. Could you provide me links to sources of such projects? (If it is open source) It will be great if projects will have unit tests for Controller/Presenter/ViewModel, because it's one of my problem when I develop applications. Thanks in advance.

    Read the article

  • What SATA drive should I install FreeBSD onto? i.e. ar0 vs da0 vs ad4/5

    - by Matt
    I'm installing FreeBSD 8.0 on a server that has hardware SATA Raid. I'm just wondering. What is the difference between these devices. i.e. ar0, da0, ad4, ad5 I take it that ad4 & 5 are my two disks. Somehow the OS can see them individually even though it's one logical mirrored drive. Should I be installing it onto ar0 or one of the adX disks. What is da0? it's smaller than the others. ar0 is not some kind of software raid device is it? Just want to make sure I don't mess this up right from the get go.

    Read the article

  • intercepting feed:// in safari5

    - by edwink
    Hello. I am writing an extension for Safari5 and I am trying to intercept the fact that the user is clicking on an RSS icon and loading a feed://.... URL to offer him/her subscription options. I have tried to register a start content script for the feed:/// whitelist pattern but that does not work. Does anyone know how to make this work?

    Read the article

  • Combine Hibernate class with @Bindable for SwingBuilder without Griffon?

    - by Misha Koshelev
    Dear All: I have implemented a back-end for my application in Groovy/Gradle, and am now trying to implement a GUI. I am using Hibernate for my data storage (with HSQLDB) per http://groovy.codehaus.org/Using+Hibernate+with+Groovy (with Jasypt for encryption) and it is working quite well. I was wondering if there are any good tips for using @Bindable with, e.g., an @Entity class such as @Entity class Book { @Id @GeneratedValue(strategy = GenerationType.AUTO) public Long id @OneToMany(cascade=CascadeType.ALL) public Set<Author> authors public String title String toString() { "$title by ${authors.name.join(', ')}" } } or if I am: (i) asking for Griffon (ii) completely on the wrong track? Thank you! Misha

    Read the article

  • ASP.Net HttpHandler ProcessRequest() firing twice

    - by Doug
    Hi there, I have a strange issue where i have a a HttpHandler having its ProcessRequest() event firing twice. i have nothing else in the class except a pointer to a static method so i'm lost. I have done some googling to no avail even thought it appears a few people are having similar issues: Code: public bool IsReusable { get { return true; } } public void ProcessRequest(HttpContext context) { Common.Tracker.TrackPageView(context); }

    Read the article

< Previous Page | 11 12 13 14 15 16 17 18 19 20 21 22  | Next Page >