symfony1 - Symfony's autoload vendor files doesn't seem to be working -


i'm building symfony 1.4 project, , i'm attempting use pear's crypt_rsa package. unfortunately, package hasn't been updated in awhile, instead of doing simple pear install command line, want include lib/vendor project path can modify various pieces of code use in php5. (it causes warnings , strict errors, , don't want disable strict error checking).

i created autoload.yml file in config path contains following:

autoload:     crypt_rsa:         path:      %sf_lib_dir%/vendor/crypt         recursive: true 

i attempt utilize crypt_rsa_keypair class (source) in following manner:

$keypair = new crypt_rsa_keypair(128); 

this results in following error:

warning: require_once(crypt/rsa/errorhandler.php) [function.require-once]: failed open stream: no such file or directory in /app_path/lib/vendor/crypt/rsa/keypair.php on line 28

fatal error: require_once() [function.require]: failed opening required 'crypt/rsa/errorhandler.php' (include_path='.:/opt/local/lib/php') in /app_path/lib/vendor/crypt/rsa/keypair.php on line 28

looking crypt/rsa.php file (source), has require_once calls crypt/rsa/errorhandler.php, crypt/rsa/mathloader.php, crypt/rsa/key.php, , crypt/rsa/keypair.php, i'm thinking don't want symfony autoload (i.e.: not autoload recursively) -- rsa.php file. however, require_once calls specific folder containing crypt folder, meaning autoload needs make sure when rsa.php loaded, loads proper path such each of files can loaded correctly.

with in mind, tried few different settings no luck:

autoload:     crypt_rsa:         path:      %sf_lib_dir%/vendor         files:     [crypt/rsa.php]         recursive: false 

and:

# moved "crypt" folder subfolder named "pear" autoload:     crypt_rsa:         path:      %sf_lib_dir%/vendor/pear         recursive: false 

each of these new attempts resulted in different error whereby crypt_rsa_keypair class not found altogether.

fatal error: class 'crypt_rsa_keypair' not found in /app_path/lib/model/doctrine/sfdoctrineguardplugin/sfguarduser.class.php on line 70

i've tried digging through docs, of google searches point symfony docs 1.0 rather 1.4, , of docs vague on autoloading vendor files.

i suppose option manually require_once rsa.php file need, i'm guessing breaking symfony convention, , doing harder should (even though autoloading thing seems harder should too).

you might try create custom autoloader crypt_rsa vendor package , register in projectconfiguration, presented in jobeet documentation (when using zend lucene).


Comments

Popular posts from this blog

java - SNMP4J General Variable Binding Error -

windows - Python Service Installation - "Could not find PythonClass entry" -

Determine if a XmlNode is empty or null in C#? -