Results 1 to 5 of 5

Thread: E-mail Quote as PDF Fails on 4.2.0d as well

  1. #1
    eugenevdm is offline Sugar Community Member
    Join Date
    Dec 2005
    Posts
    48

    Default E-mail Quote as PDF Fails on 4.2.0d as well

    I tried e-mailing as PDF on 4.2.1. This gave me:
    Fatal error: Call to a member function on a non-object in /var/www/html/crm/data/SugarBean.php on line 784
    So I though I'd go back to versoin 4.2.0d. Now when I try to e-mail as PDF I get:
    Warning: fopen(include/fonts/php_Helvetica.afm): failed to open stream: Permission denied in /var/www/html/crm/include/pdf/class.pdf.php on line 1400
    Warning: fwrite(): supplied argument is not a valid stream resource in /var/www/html/crm/include/pdf/class.pdf.php on line 1401
    Warning: fclose(): supplied argument is not a valid stream resource in /var/www/html/crm/include/pdf/class.pdf.php on line 1402
    Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/crm/include/pdf/class.pdf.php:1400) in /var/www/html/crm/modules/Quotes/Layouts.php on line 104

    Where is the correct place to ask for support?
    ________
    UHWH
    Last edited by eugenevdm; 2011-03-16 at 09:47 PM.

  2. #2
    ruchida's Avatar
    ruchida is offline A Sugar Hero | Help Forum Moderator
    Join Date
    Feb 2005
    Location
    Japan
    Posts
    1,375

    Default Re: E-mail Quote as PDF Fails on 4.2.0d as well

    Do you (your web server) have enough permissions on include/fonts and files under it?

    SugarCRM fails to open font files when it tries to creat a PDF quote.
    Ryuhei Uchida
    Help Forum Moderator
    Calendar 2.0
    http://blogs.itmedia.co.jp/ruchida/

  3. #3
    eugenevdm is offline Sugar Community Member
    Join Date
    Dec 2005
    Posts
    48

    Default Re: E-mail Quote as PDF Fails on 4.2.0d as well

    Thank you for your reply.

    The interesting thing was that the file "php_Helvetica.afm" did not exist on the server.

    However I concluded that most of my printing problems were related to my platform. I was using PHP 4.3.9 as supplied by Trixbox and I notice in the SugarCRM installation PDF that this version is not supported. So I upgraded to PHP 5 on a shared Plesk 8 server and now at least I can print PDFs. But when I try to e-mail the PDFs I get:

    Notice: Undefined index: db in /var/www/vhosts/crm.snowball.co.za/httpdocs/data/SugarBean.php on line 784

    Fatal error: Call to a member function quote() on a non-object in /var/www/vhosts/crm.snowball.co.za/httpdocs/data/SugarBean.php on line 784

    Line 784 is:
    $query .= $field."='".$GLOBALS['db']->quote(from_html($this->$field))."'";

    It looks like $GLOBALS['db'] is defined in json_server line 51:
    $GLOBALS['db'] = DBManager::getInstance();

    but I'm not sure if this is the actual problem. I would still like some help.
    Last edited by eugenevdm; 2011-03-16 at 09:48 PM.

  4. #4
    ruchida's Avatar
    ruchida is offline A Sugar Hero | Help Forum Moderator
    Join Date
    Feb 2005
    Location
    Japan
    Posts
    1,375

    Default Re: E-mail Quote as PDF Fails on 4.2.0d as well

    Hi,

    The php_Helvetica.afm file does not come with the SugarCRM release, but is created dynamically (and only once) from Helvetica.afm when a PDF file is generated. The first error you encounter with 4.2.0d may mean your SugarCRM failed to write the php_Helvetica.afm file in the font directory. Please check the permission of the font (and above) directory.

    I think the notice(Undefined index) and the fatal error (Call to a member...) are related to the latest 4.2.1, which changed the db layer. If so, please go back to 4.2.0d and check the permission issue above.
    Ryuhei Uchida
    Help Forum Moderator
    Calendar 2.0
    http://blogs.itmedia.co.jp/ruchida/

  5. #5
    eugenevdm is offline Sugar Community Member
    Join Date
    Dec 2005
    Posts
    48

    Default Re: E-mail Quote as PDF Fails on 4.2.0d as well

    My problem is fixed in the post:

    http://www.sugarcrm.com/forums/showt...ed=1#post44236

    problem is new database code
    Last edited by eugenevdm; 2011-03-16 at 09:49 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •