Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3802734
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T14:15:16+00:00 2026-05-19T14:15:16+00:00

I’m building a Symfony 1.4 project, and I’m attempting to use PEAR’s Crypt_RSA package.

  • 0

I’m building a Symfony 1.4 project, and I’m attempting to use PEAR’s Crypt_RSA package. Unfortunately, the package hasn’t been updated in awhile, so instead of doing a simple pear install from the command line, I want to include it into my lib/vendor project path so that I can modify various pieces of code for use in PHP5. (It currently causes some warnings and strict errors, and I don’t want to disable strict error checking).

I created an autoload.yml file in my config path that now contains the following:

autoload:
    Crypt_RSA:
        path:      %SF_LIB_DIR%/vendor/Crypt
        recursive: true

I then attempt to utilize the Crypt_RSA_KeyPair class (source) in the following manner:

$keyPair = new Crypt_RSA_KeyPair(128);

This results in the following error:

Warning: require_once(Crypt/RSA/ErrorHandler.php) [function.require-once]: failed to 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 into the Crypt/RSA.php file (source), it has require_once calls for Crypt/RSA/ErrorHandler.php, Crypt/RSA/MathLoader.php, Crypt/RSA/Key.php, and Crypt/RSA/KeyPair.php, so I’m thinking I don’t want symfony to autoload everything (i.e.: not autoload recursively) — just the RSA.php file. However, the require_once calls are all specific to the folder containing the Crypt folder, meaning that the autoload needs to make sure that when RSA.php is loaded, it loads it from the proper path such that each of those files can be loaded correctly.

With this in mind, I tried a few different settings with no luck:

autoload:
    Crypt_RSA:
        path:      %SF_LIB_DIR%/vendor
        files:     [Crypt/RSA.php]
        recursive: false

and:

# moved "Crypt" folder into a subfolder named "pear"
autoload:
    Crypt_RSA:
        path:      %SF_LIB_DIR%/vendor/pear
        recursive: false

Each of these new attempts resulted in a different error whereby the Crypt_RSA_KeyPair class was simply 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 the docs, but most of my Google searches point to Symfony docs for 1.0 rather than 1.4, and all of the docs are generally vague on autoloading vendor files.

I suppose another option would be to manually require_once the RSA.php file I need, but I’m guessing that would be breaking Symfony convention, and probably doing something harder than I should be (even though this autoloading thing seems to be harder than it should be too).

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T14:15:17+00:00Added an answer on May 19, 2026 at 2:15 pm

    You might try to create your custom autoloader for the Crypt_RSA vendor package and register it in the ProjectConfiguration, as they presented in the Jobeet documentation (when using Zend Lucene).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I am trying to understand how to use SyndicationItem to display feed which is
I have a jquery bug and I've been looking for hours now, I can't
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I want use html5's new tag to play a wav file (currently only supported
We're building an app, our first using Rails 3, and we're having to build
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I'm trying to use string.replace('’','') to replace the dreaded weird single-quote character: ’ (aka
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.