Location: PHPKode > projects > Moc10 PHP Library > docs/faqs.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- Header //-->
<html>

<head>

    <title>
        Moc10 Library v1.9.7 | A Lightweight PHP Library
    </title>

    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="author" content="Moc 10 Media" />
    <meta name="keywords" content="php, php library, php framework, php code library, moc10 library, moc10media, moc 10 media, moc 10, object oriented programming, oop" />
    <meta name="description" content="Moc10 Library is a lightweight, easily deployable PHP library that integrates a handful of some of the 'basics' that go into many websites, projects and applications." />
    <meta name="robots" content="all" />

    <link rel="stylesheet" type="text/css" href="styles.css" />
    <link rel="shortcut icon" href="moc10media.ico" type="image/ico" />

</head>

<body>
<!-- Content //-->
<div id="content">
    <a name="top"></a>
    <h1>Moc10 Library v1.9.7 | A Lightweight PHP Library</h1>
    <ul id="mainNav">
        <li><a href="./index.html">Overview</a></li>
        <li><a href="./features.html">Features</a></li>
        <li><a href="./manual.html">Manual</a></li>
        <li><a href="./api-glossary.html">API Glossary</a></li>
        <li><a href="./api-docs/index.html">API Docs</a></li>
        <li>FAQs</li>
        <li><a href="./development.html">Development</a></li>
        <li><a href="./download.html">Download</a></li>
    </ul>
    <h3>FAQs</h3>
    <p>
        Here are some frequently asked questions regarding the Moc10 Library.
    </p>
    <ol>
        <li><a href="./faqs.html#faq1">Is the Moc10 Library compatible with PHP 5.3?</a></li>
        <li><a href="./faqs.html#faq2">Do I have to place the library and autoloader above the document root?</a></li>
        <li><a href="./faqs.html#faq3">What's causing the memory-based fatal errors when I use the File, Image or PDF components?</a></li>
        <li><a href="./faqs.html#faq4">What's causing the "undefined function" fatal errors when I try and use the Image component?</a></li>
        <li><a href="./faqs.html#faq5">Is compression available in the PDF component?</a></li>
        <li><a href="./faqs.html#faq6">Can I embed fonts in the PDFs I create using the PDF component?</a></li>
        <li><a href="./faqs.html#faq7">Where do the X and Y coordinates start within a PDF I create with the PDF component?</a></li>
        <li><a href="./faqs.html#faq8">Why a String component?</a></li>
    </ol>
    <div class="divide"></div>
    <span class="right"><a href="./faqs.html#top">back to top ^</a></span>
    <a name="faq1"></a>
    <h4>1. Is the Moc10 Library compatible with PHP 5.3?</h4>
    <p>
        Yes, as of January 4, 2011, the Moc10 Library v1.9.7 has been developed and tested for PHP v5.3.3, with backwards compatibility tests performed for PHP v5.2.6+.
    </p>
    <div class="divide"></div>
    <span class="right"><a href="./faqs.html#top">back to top ^</a></span>
    <a name="faq2"></a>
    <h4>2. Do I have to use the library and autoloader above the document root?</h4>
    <p>
        No, you do not have to place the library code or your application code above the document root. This is just a standard practice for code security purposes. If, for some reason, you do not have access to the level above the document root, you can simply place the library code and your application code within the document root and set the 'bootstrap.php' file accordingly.
    </p>
    <div class="divide"></div>
    <span class="right"><a href="./faqs.html#top">back to top ^</a></span>
    <a name="faq3"></a>
    <h4>3. What's causing the memory-based fatal errors when I use the File, Image or PDF components?</h4>
    <p>
        If you are getting an error along the lines of "Allowed memory size of X bytes exhausted," chances are pretty good that your memory limit is not set high enough in your <strong>php.ini</strong> file. Usually, the standard, by default, is 128M, but a hosting provider might have lowered it for performance reasons. Regardless, it is important to know that any extensive manipulation of files, images or PDFs with the respective components of the Moc10 Library can potentially take up a large amount of resources. So, it is very possible that an increase in the memory limit will resolve this issue.
    </p>
    <div class="divide"></div>
    <span class="right"><a href="./faqs.html#top">back to top ^</a></span>
    <a name="faq4"></a>
    <h4>4. What's causing the "undefined function" fatal errors when I try and use the Image component?</h4>
    <p>
        If you are getting an "undefined function" error, chances are pretty good that the GD library is not properly configured or compiled within PHP. Please check with your hosting provider to insure that the GD library and all of the pertinent functions regarding the GIF, JPG and PNG formats, as well as the FreeType functions.
    </p>
    <p>
        Here's an example configuration setting:<br /><strong>(important flags: --with-gd --with-freetype-dir=/usr/local --with-png-dir=/usr/lib --with-jpeg-dir=/usr/lib)</strong>:
    </p>
    <pre>
'./configure' '--prefix=/usr' '--with-config-file-path=/etc' '--with-config-file-scan-dir=/etc/php.d'
'--sysconfdir=/etc' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--with-apxs2=/usr/bin/apxs2'
'--enable-cli' '--with-bz2=/usr' '--enable-zip' '--with-zlib' '--enable-exif' '--enable-mbstring'
'--enable-mbregex' '--enable-sockets' '--with-curl' '--with-mysql=/usr/bin/mysql' '--with-openssl'
'--with-xmlrpc' '--with-xsl' '--with-mcrypt' '--enable-bcmath' '--with-gd' '--with-freetype-dir=/usr/local'
'--with-png-dir=/usr/lib' '--with-jpeg-dir=/usr/lib' '--with-mysqli=/usr/bin/mysql_config' '--with-pgsql'
'--with-unixODBC=/usr' '--enable-shmop' '--enable-pcntl' '--with-ldap' '--without-pear'
    </pre>
    <div class="divide"></div>
    <span class="right"><a href="./faqs.html#top">back to top ^</a></span>
    <a name="faq5"></a>
    <h4>5. Is compression available in the PDF component?</h4>
    <p>
        No, it is not available at this time, but will most likely be included in a future release.
    </p>
    <div class="divide"></div>
    <span class="right"><a href="./faqs.html#top">back to top ^</a></span>
    <a name="faq6"></a>
    <h4>6. Can I embed fonts in the PDFs I create using the PDF component?</h4>
    <p>
        No, currently fonts cannot be embedded into PDFs created with the PDF component. Only the <a href="./features.html#fonts">standard PDF fonts</a>, which are supported natively by Adobe&reg; Reader, can be used at this time. This feature will most likely be included in a future release.
    </p>
    <div class="divide"></div>
    <span class="right"><a href="./faqs.html#top">back to top ^</a></span>
    <a name="faq8"></a>
    <h4>7. Where do the X and Y coordinates start within a PDF I create with the PDF component?</h4>
    <img style="float: right;" src="pdf_coor.gif" width="100" height="180" alt="PDF coordinates" />
    <p style="padding-bottom: 120px;">
        The PDF component mirrors the PDF standard coordinate system. This means that the X,Y coordinates of (0,0) are located at the bottom left of the page. And, in the case of a 'Letter' sized page, for example, the X,Y coordinates of (612, 792) are located at the top right.
    </p>
    <div style="clear: both;" class="divide"></div>
    <span class="right"><a href="./faqs.html#top">back to top ^</a></span>
    <a name="faq9"></a>
    <h4>8. Why a String component?</h4>
    <p>
        The purpose of the String component is to house a set of commonly used string functions and allow easy access to them. Many of the methods can be easily chained together for things such database clean-up and form validation.
    </p>
</div>
<!-- Footer //-->
<div id="footer">
    Copyright &copy; 2009-2011, Moc 10 Media, LLC. All rights reserved.
</div>
</body>

</html>
Return current item: Moc10 PHP Library