FORMfields, the premiere web framework
Login
Support Home | Knowledge Base | Documentation | Forums | Contact Us
Info
FORMfields & FORMgen :: Errors

Formatting of FORMfields/index.php Homepage is Corrupt

(3895 views. Last Updated: 2007-11-13 9:35 AM)

If when visiting FORMfields/index.php, the FORMfields elements and fonts looked messed up, there is most likely a problem with your web server's PHP document root configuration. To check this, visit FORMfields/index.php?FF_GLOBALS_VERBOSE=1 on your website and inspect the FF_DOC_ROOT value. This should be the absolute path to the directory on your web server where your website is located. If this is incorrect, then most likely the value of $_SERVER["DOCUMENT_ROOT"] is being set to the wrong value by your php.ini file. If you have administrative access to your website, you should edit your php.ini file and set the value of "doc_root" to the correct value. If you can't edit php.ini, you can side step this misconfiguration by editing FORMfields/src/FfPaths.php and replacing:
...
if (!defined("FF_DOC_ROOT")) {
    if (FfGlobals::existsAndIsNotBlank("SUBDOMAIN_DOCUMENT_ROOT", $_SERVER))
        $docRoot = $_SERVER["SUBDOMAIN_DOCUMENT_ROOT"];
...
with:
...
define ("FF_DOC_ROOT", "/home/mysite/public_html");
if (!defined("FF_DOC_ROOT")) {
    if (FfGlobals::existsAndIsNotBlank("SUBDOMAIN_DOCUMENT_ROOT", $_SERVER))
        $docRoot = $_SERVER["SUBDOMAIN_DOCUMENT_ROOT"];
...
where "/home/mysite/public_html" is what your DOCUMENT_ROOT should be. (Be sure not to include the trailing "/" in the DOCUMENT_ROOT. For example, "/home/mysite/public_html/" is invalid)
Info
Support | Earn Money
Copyright © 2005-2019 Brain Book Software LLC.
Built with FORMfields, the premiere web framework.