Search Results

Search found 32 results on 2 pages for 'autoloading'.

Page 1/2 | 1 2  | Next Page >

  • Dynamic Class Inheritance For PHP

    - by VirtuosiMedia
    I have a situation where I think I might need dynamic class inheritance in PHP 5.3, but the idea doesn't sit well and I'm looking for a different design pattern to solve my problem if it's possible. Use Case I have a set of DB abstraction layer classes that dynamically compiles SQL queries, with one DAL class for each DB type (MySQL, MsSQL, Oracle, etc.). Each table in the database has its own class that extends the appropriate DAL class. The idea is that you interact with the table classes, but never directly use the DAL class. If you want to support a different DB type for your app, you don't need to rewrite any queries or even any code, you simply change a setting that swaps one DAL class out for another...and that's it. To give you a better idea of how this is used, you can take a look at the DAL class, the table classes, and how they are used on this StackExchange Code Review page. To really understand what I'm trying to do, please take a look at my implementation first before suggesting a solution. Issues The strategy that I had used previously was to have all of the DAL classes share the same class name. This eliminated autoloading, so I had to manually load the appropriate DAL class in a switch statement. However, this approach presents some problems for testing and documentation purposes, so I'd like to find a different way to solve the problem of loading the correct DAL class more elegantly. Update to clarify the issue The problem basically boils down to inconsistencies in the class name (pre-PHP 5.3) or class namespace (PHP 5.3) and its location in the directory structure. At this point, all of my DAL classes have the same name, DBObject, but reside in different folders, MySQL, Oracle, etc. My table classes all extend DBObject, but which DBObject they extend varies depending on which one has been loaded. Basically, I'm trying to have my cake and eat it too. The table classes act as a stable API and extend a dynamic backend, the DAL (DBObject) classes. It works great, but I outsmarted myself and because of the inconsistencies with the class names and their locations, I can't autoload the DBObject, which makes running unit tests and generating API docs impossible for the DBObject classes because the tests and docs rely on auto-loading. Just loading the appropriate DBObject into memory using a factory method won't work because there will be times when I need to load multiple DBObjects for testing. Because the classes currently share a name, this causes a class is already defined error. I can make exceptions for the DBObjects in my test code, obviously, but I'm looking for something a little less hacky as there may future instances where something similar would need to be done. Solutions? Worst case scenario, I can continue my current strategy, but I don't like it very much, especially as I'll soon be converting my code to PHP 5.3. I suspect that I can use some sort of dynamic inheritance via either namespaces (preferred) or a dynamic class extension, but I haven't been able to find good examples of this implemented in the wild. In your answers, please suggest either an alternate pattern that would work for this use case or an example of dynamic inheritance done right. Please assume PHP 5.3 with namespaced code. Any code examples are greatly encouraged. The preferred constraints for the solution are: DAL class can be autoloaded. DAL classes don't share the same exact same namespace, but share the same class name. As an example, I would prefer to use classes named DbObject that use namespaces like Vm\Db\MySql and Vm\Db\Oracle. Table classes don't have to be rewritten with a change in DB type. The appropriate DB type is determined via a single setting only. That setting is the only thing that should need to change to interchange DB types. Ideally, the setting check should occur only once per page load, but I'm flexible on that.

    Read the article

  • autoloading folder ZendX_JQuery and others

    - by explorex
    Hi, I am trying to use ZendX_Jquery and i don't how know to autoload this file in bootstrap. I am doing require_once("ZendX/JQuery.php"); on my file Bootstrap.php i also tried $autoLoader = Zend_Loader_Autoloader::getInstance(); $autoLoader->registerNamespace('ZendX_'); but it did not work is there any elegant way of autoloading files in diretories? EDIT: Changed ZendX_jQuery to ZendX_JQuery (case sensitivity) on my bootstrap.php file

    Read the article

  • Autoloading Development or Production configs (best practices)

    - by Xeoncross
    When programming sites you usually have one set of config files for the development environment and another set for the production server (or one file with both settings). I am assuming all projects should be handled by version control like git or svn. Manual file transfers (like FTP) is wrong on so many levels. How you enable/disable the correct settings (so that your system knows which ones to use) is a problem for me. Each system I work on just kind of jimmy-rigs a solution. Below are the 3 methods I know of and I am hoping that someone can submit a more elegant solutions. 1) File Based The system loads a folder structure based on the URL requested. /site.com /site.fakeTLD /lib index.php For example, if the url is http://site.com then the system loads the production config files located in the site.com folder. However, if I'm working on the site locally I visit http://site.fakeTLD to work on the local copy of the site. To setup this I edit my hosts file and add site.fakeTLD to point to my own computer (127.0.0.1/localhost) and then create a vhost in apache. So now I can work on the codebase locally and then push to the server without any trouble. The problem is that this is susceptible to a "host" injection attack. So someone loading site.com could set the host to site.fakeTLD and then the system would load my development config files instead of production. 2) Config Based The config files contain on section for development - and one for production. The problem is that each time you go to push your changes to the repo you have to edit the file to specify which set of config options should be used. $use = 'production'; //'development'; This leaves the repo open to human error should one of the developers forget to enable the right setting. 3) File System Check Based All the development machines have an extra empty file called "development.txt" or something. Each time the system loads it checks for this file - if found then it knows it is in development mode - if missing then it knows it is in production mode. Since the file is NEVER ADDED to the repo then it will never be pushed (and checked out) on the production machine. However, this just doesn't feel right and causes a slight slow down since all filesystem checks are slow.

    Read the article

  • Autoloading Development or Production configs (best practices)

    - by Xeoncross
    When programming sites you usually have one set of config files for the development environment and another set for the production server (or one file with both settings). I am assuming all projects should be handled by version control like git or svn. Manual file transfers (like FTP) is wrong on so many levels. How you enable/disable the correct settings (so that your system knows which ones to use) is a problem for me. Each system I work on just kind of jimmy-rigs a solution. Below are the 3 methods I know of and I am hoping that someone can submit a more elegant solutions. 1) File Based The system loads a folder structure based on the URL requested. /site.com /site.fakeTLD /lib index.php For example, if the url is http://site.com then the system loads the production config files located in the site.com folder. However, if I'm working on the site locally I visit http://site.fakeTLD to work on the local copy of the site. To setup this I edit my hosts file and add site.fakeTLD to point to my own computer (127.0.0.1/localhost) and then create a vhost in apache. So now I can work on the codebase locally and then push to the server without any trouble. The problem is that this is susceptible to a "host" injection attack. So someone loading site.com could set the host to site.fakeTLD and then the system would load my development config files instead of production. 2) Config Based The config files contain on section for development - and one for production. The problem is that each time you go to push your changes to the repo you have to edit the file to specify which set of config options should be used. $use = 'production'; //'development'; This leaves the repo open to human error should one of the developers forget to enable the right setting. 3) File System Check Based All the development machines have an extra empty file called "development.txt" or something. Each time the system loads it checks for this file - if found then it knows it is in development mode - if missing then it knows it is in production mode. Since the file is NEVER ADDED to the repo then it will never be pushed (and checked out) on the production machine. However, this just doesn't feel right and causes a slight slow down since all filesystem checks are slow. Is there anyway that the server can auto-detect wither to use the development or production configs?

    Read the article

  • Zend Framework: Autoloading module resources in config.ini?

    - by Olagato
    Is it possible, to configure the following behaviour in application.ini? <?php class Bootstrap extends Zend_Application_Bootstrap_Bootstrap { protected function _initAdminModuleAutoloader() { $this->_resourceLoader = new Zend_Application_Module_Autoloader(array( 'namespace' => 'Admin', 'basePath' => APPLICATION_PATH . '/modules/admin', )); $this->_resourceLoader->addResourceTypes(array( 'model' => array( 'namespace' => 'Model', 'path' => 'models' ) )); } } ?> If so, can you please show us an example? Thanks.

    Read the article

  • Zend not autoloading models

    - by Guy
    Ok, this is driving me nuts! I have a directory structure as follows: application - modules -- default --- controllers --- models ---- DbTable ---- Cachmapper.php --- views My config file looks like this [production] phpSettings.display_startup_errors = 0 phpSettings.display_errors = 0 includePaths.library = APPLICATION_PATH "/../library" bootstrap.path = APPLICATION_PATH "/Bootstrap.php" bootstrap.class = "Bootstrap" resources.frontController.moduleDirectory = APPLICATION_PATH "/modules" resources.modules[] = The application seems to work, if I navigate to localhost, it correctly goes to the index controller. But, for some reason it refuses to load any models. Fatal error: Class 'Model_Cachmapper' not found in .............................../application/modules/default/controllers/IndexController.php on line 26 Ideas? Thanks

    Read the article

  • Zend Framework Autoloading in 3 modules

    - by haohan
    I am new to ZF and I am writing in Zend Framework 1.10 . Here is my application directory structure. APPLICATION_PATH` +-configs +-layouts +-modules +-admin ¦ +-controllers ¦ +-forms ¦ +-models ¦ +-views ¦ +-filters ¦ +-helpers ¦ +-scripts ¦ +-authentication ¦ +-cars ¦ +-index +-default +-controllers +-forms ¦ +-admin +-models ¦ +-DbTable +-plugins +-views +-helpers +-scripts +-about +-contact +-error +-index +-insurance +-used-cars I have 3 bootstrap.php files in APPLICATION_PATH, /default/ and /admin, i used AutoLoader to load models and forms $modelLoader = new Zend_Application_Module_Autoloader(array( 'namespace' => '', 'basePath' => APPLICATION_PATH . '/modules/default')); The code above will load all models and forms automatically in modules/default, and now, I have a problem to load forms and models in /modules/admin, Any solutions to solve this problem? How should I name the class name in /modules/admin Thanks.

    Read the article

  • PHPUnit and autoloaders: Determining whether code is running in test-scope?

    - by pinkgothic
    Premise I know that writing code to act differently when a test is run is hilariously bad practise, but I may've actually come across a scenario in which it may be necessary. Specifically, I'm trying to test a very specific wrapper for HTML Purifier in the Zend framework - a View Helper, to be exact. The HTML Purifier autoloader is necessary because it uses a different logic to the autoloaders we otherwise have. Problem require()-ing the autoloader at the top of my View Helper class, gives me the following in test-scope: HTML Purifier autoloader registrar is not compatible with non-static object methods due to PHP Bug #44144; Please do not use HTMLPurifier.autoload.php (or any file that includes this file); instead, place the code: spl_autoload_register(array('HTMLPurifier_Bootstrap', 'autoload')) after your own autoloaders. Replacing the require() with spl_autoload_register(array('HTMLPurifier_Bootstrap', 'autoload')) as advertised means the test runs fine, but the View Helper dies a terrible death claiming: Zend_Log[3707]: ErrorController caught LogicException "Passed array does not specify an existing static method (class 'HTMLPurifier_Bootstrap' not found)" (Our test folder structure is slightly different to our Zend folder structure by necessity.) Question(s) After tinkering with it, I'm thinking I'll need to pick an autoloader-loading depending on whether things are in the test scope or not. Do I have another option to include HTMLPurifier's autoloading routine in both cases that I'm not seeing due to tunnel vision? If not, do I have to find a means to differentiate between test-environment and production-environment this with my own code (e.g. APPLICATION_ENV) - or does PHPUnit support this godawful hackery of mine natively by setting a constant that I could check whether its been defined(), or similar shenanigans? (My Google-fu here is weak! I'm probably just doing it wrong.)

    Read the article

  • Kohana 3 Auto loading Models

    - by pigfox
    I'm attempting to use a Model but I get a fatal error so I assume it doesn't autoload properly. ErrorException [ Fatal Error ]: Class 'Properties_Model' not found The offending controller line: $properties = new Properties_Model; The model: class Properties_Model extends Model { public function _construct() { parent::_construct(); } } I also put the class in three different locations hoping one would work, all there failed. They are: application/classes/model application/model application/models What am I missing?

    Read the article

  • Zend Framework modular app, can't load models for each module, autoloading models?

    - by EricP
    Is there a way to have models for each module? I have 3 modules, one is a "contacts" module. I created a model for it in modules/contacts/models/Codes.php Codes Controller class Contacts_CodesController extends Zend_Controller_Action { public function init() { /* Initialize action controller here */ $this->view->messages = $this->_helper->flashMessenger->getMessages(); } public function indexAction() { $codesTable = new Contacts_Model_Codes(); } Codes Model: class Contacts_Model_Codes extends Zend_Db_Table { protected $_name = 'codes'; } The error I get: Fatal error: Class 'Contacts_Model_Codes' not found in /Applications/MAMP/htdocs/zf_site/application/modules/contacts/controllers/CodesController.php on line 26 thanks

    Read the article

  • Drupal, Lightbox2: how can I disable the autoloading of css and javascript on triggering ?

    - by Patrick
    is there any way to disable the tag in the lightbox modal in drupal ? I've just realized it loads again all javascripts and css files of my page, and it is quite annoying, since it is not even an iFrame.. it is modal version.. and I would like to re-use what I've already loaded in my page for it. See pictures: http://dl.dropbox.com/u/72686/lightbox1.png http://dl.dropbox.com/u/72686/lightbox2.png I guess this code is wrong. I should load the node differently: " rel="lightmodal" class="LightLink" style="display:none;" title="" thanks

    Read the article

  • Oddities when mixing Zend Framework 1.11 & Doctrine 2 Autoloaders

    - by jiewmeng
    I have setup autoloading in my ZF/Doctrine2 app as follows $zendAutoloader = Zend_Loader_Autoloader::getInstance(); $autoloader = array(new ClassLoader('Symfony'), 'loadClass'); $zendAutoloader->pushAutoloader($autoloader, 'Symfony'); $autoloader = array(new ClassLoader('Doctrine'), 'loadClass'); $zendAutoloader->pushAutoloader($autoloader, 'Doctrine'); $autoloader = array(new ClassLoader('Application', realpath(__DIR__ . '/..')), 'loadClass'); $zendAutoloader->pushAutoloader($autoloader, 'Application'); $autoloader = array(new ClassLoader('DoctrineExtensions'), 'loadClass'); $zendAutoloader->pushAutoloader($autoloader, 'DoctrineExtensions'); I find that the DoctrineExtensions autoloading is not working while other classes are ... to verify that the path etc are right, I tried $autoloader = new ClassLoader('DoctrineExtensions'); $autoloader->register(); And it works. So it seems it has something to do with Zend Framework?

    Read the article

  • Codeigniter return config file as array with autoload enabled

    - by Fverswijver
    So I'm using CodeIgniter to build a website and I've made it so that all my specific settings are stored in a config file that's automatically loaded. I've also built a page that loads the settings file, makes a nice little table and allows me to edit everything from that page, afterwards it saves the entire page again (I know I could've done the same with a database but I want to try it this way). My problem is that I can't seem to use this bit when autoloading of my config file is enabled, but when I disable autoloading I can't seem to manually load it, it never finds my variables. So what I'm doing here is just taking all values from the config file and putting them in a single array so I can pass this array onto my settings administration page (edit/show all settings). $this->config->load('site_settings', TRUE); $data['settings'] = $this->config->item('site_settings'); ... $this->load->view('template', $data); config/site_settings.php <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); $config['header_img'] = './img/header/'; $config['copyright_text'] = 'Copyright Instituto Kabu'; $config['copyright_font'] = './system/fonts/motoroil.ttf'; $config['copyright_font_color'] = 'ffffff'; $config['copyright_font_size'] = '32';

    Read the article

  • PHP Doctrine: cannot find ClassName, but factory loading works..?

    - by ropstah
    I'm using PHP Doctrine and i've setup autoloading: spl_autoload_register(array('Doctrine', 'autoload')); spl_autoload_register(array('Doctrine', 'modelsAutoload')); I can create a table like so: $table = Doctrine_Core::getTable('TableName'); However if I try it like this, it doesn't work, what am I missing?: $table = new TableNameTable(); //Yes it should be TableNameTable

    Read the article

  • ZF Autoloader to load ancestor and requested class

    - by Pekka
    I am integrating Zend Framework into an existing application. I want to switch the application over to Zend's autoloading mechanism to replace dozens of include() statements. I have a specific requirement for the autoloading mechanism, though. Allow me to elaborate. The existing application uses a core library (independent from ZF), for example: /Core/Library/authentication.php /Core/Library/translation.php /Core/Library/messages.php this core library is to remain untouched at all times and serves a number of applications. The library contains classes like class ancestor_authentication { ... } class ancestor_translation { ... } class ancestor_messages { ... } in the application, there is also a Library directory: /App/Library/authentication.php /App/Library/translation.php /App/Library/messages.php these includes extend the ancestor classes and are the ones that actually get instantiated in the application. class authentication extends ancestor_authentication { } class translation extends ancestor_translation { } class messages extends ancestor_messages { } usually, these class definitions are empty. They simply extend their ancestors and provide the class name to instantiate. $authentication = new authentication(); The purpose of this solution is to be able to easily customize aspects of the application without having to patch the core libraries. Now, the autoloader I need would have to be aware of this structure. When an object of the class authentication is requested, the autoloader would have to: 1. load /Core/Library/authentication.php 2. load /App/Library/authentication.php My current approach would be creating a custom function, and binding that to Zend_Loader_Autoloader for a specific namespace prefix. Is there already a way to do this in Zend that I am overlooking? The accepted answer in this question kind of implies there is, but that may be just a bad choice of wording. Are there extensions to the Zend Autoloader that do this? Can you - I am new to ZF - think of an elegant way, conforming with the spirit of the framework, of extending the Autoloader with this functionality? I'm not necessary looking for a ready-made implementation, some pointers (This should be an extension to the xyz method that you would call like this...) would already be enough.

    Read the article

  • ZF-Autoloader not working in UnitTests on Ubuntu

    - by Sam
    i got a problem regarding Unit-testing a Zend-Framework application under Ubuntu 12.04. The project-structure is a default zend application whereas the models are defined as the following ./application ./models ./DbTable ./ProjectStatus.php (Application_Model_DbTable_ProjectStatus) ./Mappers ./ProjectStatus.php (Application_Model_Mapper_ProjectStatus) ./ProjectStatus.php (Application_Model_ProjectStatus) The Problem here is with the Zend-specific autoloading. The naming convention here appears that the folder Mappers loads all classes with _Mapper but not _Mappers. This is some internal Zend behavior which is fine so far. On my windows machine the phpunit runs without any Problems, trying to initiate all those classes. On my Ubuntu machine however with jenkins running on it, phpunit fails to find the appropriate classes giving me the following error Fatal error: Class 'Application_Model_Mapper_ProjectStatus' not found in /var/lib/jenkins/jobs/PAM/workspace/tests/application/models/Mapper/ProjectStatusTest.php on line 39 The error appears to really be that the Zend-Autoloader doesn't load from the ubuntu machine, but i can't figure out how or why this works. The question remains of why this is. I think i've double checked every point of contact with the zend autoloading stuff, but i just can't figure this out. I'll paste the - from my point of view relevant snippets - and hope someone of you has any insight to this. Jenkins Snippet for PHPUnit <target name="phpunit" description="Run unit tests with PHPUnit"> <exec executable="phpunit" failonerror="true"> <arg line="--configuration '${basedir}/tests/phpunit.xml' --coverage-clover '${basedir}/build/logs/clover.xml' --coverage-html '${basedir}/build/coverage/.' --log-junit '${basedir}/build/logs/junit.xml'" /> </exec> </target> ./tests/phpunit.xml <phpunit bootstrap="./bootstrap.php"> ... this shouldn't be of relevance ... </phpunit> ./tests/bootstrap.php <?php // Define path to application directory defined('APPLICATION_PATH') || define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/../application')); // Define application environment defined('APPLICATION_ENV') || define('APPLICATION_ENV', (getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') : 'testing')); // Ensure library/ is on include_path set_include_path(implode(PATH_SEPARATOR, array( realpath(APPLICATION_PATH . '/../library'), get_include_path(), ))); require_once 'Zend/Loader/Autoloader.php'; Zend_Loader_Autoloader::getInstance(); Any help will be appreciated.

    Read the article

  • Catch requests to non-existent classes (not autoload)

    - by Spot
    Is there a manner in which to catch requests to a class which does not exist. I'm looking for something exactly like __call() and __static(), but for classes as opposed to methods in a class. I am not talking about autoloading. I need to be able to interrupt the request and reroute it. Ideas?

    Read the article

  • Selective PHP autoload

    - by Extrakun
    I am writing a add-on module which is integrated with an existing PHP application; Because I am using a MVC pattern, and which may requires lot of inclusion of classes (which might not be used at all depending on the action of the user), I decide to use autoloading of classes. However, I have to ensure that the autoload function does not interferes with the normal operations of the existing applications. Does autoload only kicks in if a class name is not defined? Say I have to write another module which uses its own autoload functions (say, I have an autoload for a module, since they each reside in their own folder), how do I differentiate which module is it for? For #2, I thought of 2 options. Either prefix the class name with the module name (Such as 'MyNewModule_View_Default' and 'AnotherModule_View_Default'), or use file_exists to check the include file exists. Other suggestions are welcomed too!

    Read the article

  • Module autoloader in ZF

    - by ChrisRamakers
    The manual on Zend_Application_Module_Autoloader states the following: When using module bootstraps with Zend_Application, an instance of Zend_Application_Module_Autoloader will be created by default for each discrete module, allowing you to autoload module resources. Source: http://framework.zend.com/manual/zh/zend.loader.autoloader-resource.html#zend.loader.autoloader-resource.module This requires me to create an empty bootstrap class for each of my modules or else resource autoloading per module won't work with the build-in autoloader. Now I have two questions What is a discrete module? Is there a way to have this resource autoloader registered by default for each module without the need to create a bootstrap file for each module? I want it available in each module and creating so many empty bootstrap classes is something i'd rather prevent.

    Read the article

  • Namespace Autoload works under windows, but not on Linux

    - by EvilChookie
    I have the following php code: index.php <?php spl_autoload_extensions(".php"); spl_autoload_register(); use modules\standard as std; $handler = new std\handler(); $handler->delegate(); ?> modules\standard\handler.php <?php namespace modules\standard { class handler { function delegate(){ echo 'Hello from delegation!'; } } } ?> Under Windows 7, running WAMP, the code produces the message "Hello from Delegation!" however under Linux, I get the following: Fatal error: spl_autoload(): Class modules\standard\handler could not be loaded in /var/www/index.php on line 15 Windows is running PHP 5.3.0 under WAMP, and Linux is running the 5.3.2 dotdeb package under Ubuntu 9.10. Is this a configuration issue on my linux box, or just a difference in the way namespaces and autoloading is handled on the different operating systems

    Read the article

  • Is autoload thread-safe in Ruby 1.9?

    - by SFEley
    It seems to me that the Ruby community has been freaking out a little about autoload since this famous thread, discouraging its use for thread safety reasons. Does anyone know if this is no longer an issue in Ruby 1.9.1 or 1.9.2? I've seen a bit of talk about wrapping requires in mutexes and such, but the 1.9 changelogs (or at least as much as I've been able to find) don't seem to address this particular question. I'd like to know if I can reasonably start autoloading in 1.9-only libraries without any reasonable grief. Thanks in advance for any insights.

    Read the article

  • How to preload local javascript everytime a new tab or page is opened?

    - by Klerk
    I would like to autoload a local javascript file, everytime a new page/tab is opened in a browser. I tried the bookmarklet approach, but it gets tiresome as the button needs to be pressed everytime a new page/tab is opened. Chrome extensions also seem to work along the same lines (where you have to press an icon to run the js). Googling for javascript and preload seems to return everything except what I am looking for. Is there a browser indepent way of autoloading (no user action required) a local js file? If not, any browser specific info to do this would be appreciated (even if they mean reducing security by turning off required options). Thanks!

    Read the article

  • Proper error handling in a custom Zend_Autoloader?

    - by Pekka
    I'm building a custom autoloader based on Zend Framework's autoloading (related question here). The basic approach, taken from that question, is class My_Autoloader implements Zend_Loader_Autoloader_Interface { public function autoload($class) { // add your logic to find the required classes in here } } and then binding the new autoloader class to a class prefix. Now what I'm unsure about is how to handle errors inside the autoload method (for example, "class file not found") in a proper, ZF compliant way. I'm new to the framework, its conventions and style. Do I quietly return false and let the class creation process crash? Do I output an error or log message somehow (which would be nice to pinpoint the problem) and return false? If so, what is the Zend way of doing that? Do I trigger an error? Do I throw an exception? If so, what kind?

    Read the article

  • Can't get Wireless RT2x00usb driver to work, and can't blacklist it

    - by TheLQ
    After a two year hiatus to Linux, I try it again out again. And then I run into to driver issues... I have an old Linksys WUSB54G v4 Wireless USB Adapter. In previous versions I had to use a combination of Ndiswrapper and Wicd to hope of getting it working. In 10.10, apparently there are built in drivers for it. Unfortunately they don't work. Fails to connect to my WPA network, fails to connect to my open unencrypted network. Wicd fails at "Obtaining IP address" or when using static IPs fails at verifying connectivity to network. Getting fed up I tried the ndiswrapper approach. Installed and configured, but still not working, even when blacklisting the rt2570 module. So for some debugging I added some lines to my /etc/modprobe.d/blacklist.conf file blacklist rt2570 blacklist prism54usb blacklist rt2x00lib blacklist rt2x00usb Restart and find this: lordquackstar@quackbeast:/etc/modprobe.d$ lsmod | grep rt2 rt2500usb 18049 0 rt2x00usb 9779 1 rt2500usb rt2x00lib 27275 2 rt2500usb,rt2x00usb led_class 2633 1 rt2x00lib mac80211 231541 2 rt2x00usb,rt2x00lib cfg80211 144470 2 rt2x00lib,mac80211 Seems to be ignored... Tried this: lordquackstar@quackbeast:/etc/modprobe.d$ sudo rmmod -f rt2x00usb ERROR: Removing 'rt2x00usb': Resource temporarily unavailable lordquackstar@quackbeast:/etc/modprobe.d$ sudo rmmod -f rt2x00lib ERROR: Removing 'rt2x00lib': Resource temporarily unavailable and couldn't connect. Restarted and was back to the same modules loading. Maybe there's something in the log: lordquackstar@quackbeast:/etc/modprobe.d$ tail -n100000 /var/log/syslog | grep rt2 Dec 13 19:01:15 quackbeast kernel: [ 23.698056] Registered led device: rt2500usb-phy0::radio Dec 13 19:01:15 quackbeast kernel: [ 23.698140] Registered led device: rt2500usb-phy0::quality Dec 13 19:01:15 quackbeast kernel: [ 23.701680] usbcore: registered new interface driver rt2500usb Dec 13 19:01:15 quackbeast NetworkManager[855]: <info> (wlan0): new 802.11 WiFi device (driver: 'rt2500usb' ifindex: 4) Dec 13 19:17:47 quackbeast kernel: [ 23.521759] Registered led device: rt2500usb-phy0::radio Dec 13 19:17:47 quackbeast kernel: [ 23.521824] Registered led device: rt2500usb-phy0::quality Dec 13 19:17:47 quackbeast kernel: [ 23.524740] usbcore: registered new interface driver rt2500usb Dec 13 19:17:47 quackbeast NetworkManager[798]: <info> (wlan0): new 802.11 WiFi device (driver: 'rt2500usb' ifindex: 4) Seems to be autoloading. So this means that even if I pull it out, remove the module, and get it working, it still won't work when its plugged in all the time. More info: lordquackstar@quackbeast:/etc/modprobe.d$ sudo lshw -C Network *SNIP* *-network description: Wireless interface physical id: 1 bus info: usb@1:2 logical name: wlan0 serial: 00:12:17:9b:f3:1e capabilities: ethernet physical wireless configuration: broadcast=yes driver=rt2500usb driverversion=2.6.35-24-generic firmware=N/A link=no multicast=yes wireless=IEEE 802.11bg USB: lordquackstar@quackbeast:/etc/modprobe.d$ lsusb | grep -i rt Bus 001 Device 003: ID 13b1:000d Linksys WUSB54G v4 802.11g Adapter [Ralink RT2500USB] Any suggestions on how to either fix the rt2x00usb driver or permanently block it from loading? Note that I already have ndiswrapper installed

    Read the article

1 2  | Next Page >