Overview

Packages

  • Actions
  • Codegen
  • Controls
    • Base
  • DatabaseAdapters
  • Events
  • None
  • Sessions
  • Tests

Classes

  • AbstractControl_CodeGenerator
  • AjaxTimingForm
  • BasicForm
  • BasicOrmTests
  • BBCodeParser
  • CacheTests
  • CalculatorForm
  • CalculatorWidget
  • ComplexColumn
  • DataRepeaterExample
  • Event
  • ExampleCheckColumn1
  • ExampleCheckColumn2
  • ExampleForm
  • Examples
  • ExampleService
  • ExamplesForm
  • ExampleSingleForm
  • ExpandAsArrayTests
  • HtmlJqDoc
  • InjectForm
  • JavaScriptHelper
  • JqAttributes
  • JqControlGen
  • JqDoc
  • JqIcon
  • Method
  • ModelConnectorTests
  • MyControl
  • MyQSlider_ChangeEvent
  • NavPanel
  • NestedTabForm
  • Option
  • Order
  • PaginatorForm
  • ParamsForm
  • PersistentExampleForm
  • PersonEditPanel
  • PluginEditForm
  • PluginManagerForm
  • Project
  • ProjectEditPanel
  • ProjectListForm
  • ProjectPickerListBox
  • ProjectViewPanel
  • QAbstractCacheProvider
  • QAbstractHtmlTableColumn
  • QAbstractHtmlTableDataColumn
  • QAccordion
  • QAccordion_ActivateEvent
  • QAccordion_BeforeActivateEvent
  • QAccordion_CreateEvent
  • QAccordionBase
  • QAccordionGen
  • QAction
  • QActionControl
  • QAjaxAction
  • QAjaxControlAction
  • QAjaxResponse
  • QAlertAction
  • QApplication
  • QApplicationBase
  • QArchive
  • QAutocomplete
  • QAutocomplete_ChangeEvent
  • QAutocomplete_CloseEvent
  • QAutocomplete_CodeGenerator
  • QAutocomplete_CreateEvent
  • QAutocomplete_FocusEvent
  • QAutocomplete_OpenEvent
  • QAutocomplete_ResponseEvent
  • QAutocomplete_SearchEvent
  • QAutocomplete_SelectEvent
  • QAutocomplete_SourceEvent
  • QAutocompleteBase
  • QAutocompleteBase_CodeGenerator
  • QAutocompleteGen
  • QAutocompleteListItem
  • QBackspaceKeyEvent
  • QBaseClass
  • QBlockControl
  • QBlurControlAction
  • QBlurEvent
  • QBorderCollapse
  • QBorderStyle
  • QBrowserType
  • QButton
  • QButtonBase
  • QCache
  • QCacheDeleteAction
  • QCacheDeleteAllAction
  • QCacheProviderAPC
  • QCacheProviderLocalMemory
  • QCacheProviderLocalMemoryTest
  • QCacheProviderMemcache
  • QCacheProviderNoCache
  • QCacheProviderProxy
  • QCacheSetAction
  • QCalendar
  • QCalendarType
  • QCallType
  • QCausesValidation
  • QCellClickEvent
  • QChangeEvent
  • QCheckBox
  • QCheckBox_CodeGenerator
  • QCheckBoxBase_CodeGenerator
  • QCheckBoxLegacyColumn
  • QCheckBoxList
  • QCheckBoxList_CodeGenerator
  • QCheckBoxListBase_CodeGenerator
  • QClickEvent
  • QCodeGen
  • QCodeGenBase
  • QConfirmAction
  • QContextMenuEvent
  • QControl
  • QControl_CodeGenerator
  • QControlBase
  • QControlBase_CodeGenerator
  • QControlBaseTests
  • QControlCategoryType
  • QControlGrouping
  • QControlLabel
  • QControlProxy
  • QConvertNotation
  • QConvertNotationBase
  • QCrossScripting
  • QCryptography
  • QCss
  • QCssAction
  • QCssClassAction
  • QCssTests
  • QCsvTextBox
  • QCursor
  • QDatabaseBase
  • QDatabaseCodeGen
  • QDatabaseFieldBase
  • QDatabaseFieldType
  • QDatabaseForeignKey
  • QDatabaseIndex
  • QDatabaseResultBase
  • QDatabaseRowBase
  • QDatabaseTests
  • QDataGrid
  • QDataGrid_CheckBoxColumn
  • QDataGrid_CodeGenerator
  • QDataGrid_SortEvent
  • QDataGridBase
  • QDataGridBase_CodeGenerator
  • QDataGridLegacy
  • QDataGridLegacyBase
  • QDataGridLegacyColumn
  • QDataGridLegacyRow
  • QDataGridLegacyRowStyle
  • QDataRepeater
  • QDatepicker
  • QDatepicker_BeforeShowDayEvent
  • QDatepicker_BeforeShowEvent
  • QDatepicker_CalculateWeekEvent
  • QDatepicker_ChangeMonthYearEvent
  • QDatepicker_CloseEvent
  • QDatepicker_SelectEvent
  • QDatepicker_SelectEvent2
  • QDatepickerBase
  • QDatepickerBox
  • QDatepickerBox_BeforeShowDayEvent
  • QDatepickerBox_BeforeShowEvent
  • QDatepickerBox_CalculateWeekEvent
  • QDatepickerBox_ChangeMonthYearEvent
  • QDatepickerBox_CloseEvent
  • QDatepickerBox_CodeGenerator
  • QDatepickerBox_SelectEvent
  • QDatepickerBoxBase
  • QDatepickerBoxBase_CodeGenerator
  • QDatepickerBoxGen
  • QDatepickerGen
  • QDateTime
  • QDateTimePicker
  • QDateTimePicker_CodeGenerator
  • QDateTimePickerBase_CodeGenerator
  • QDateTimePickerFormat
  • QDateTimePickerType
  • QDateTimeSpan
  • QDateTimeTests
  • QDateTimeTextBox
  • QDbBackedFormStateHandler
  • QDbBackedSessionHandler
  • QDialog
  • QDialog_BeforeCloseEvent
  • QDialog_ButtonEvent
  • QDialog_CloseEvent
  • QDialog_CreateEvent
  • QDialog_DragEvent
  • QDialog_DragStartEvent
  • QDialog_DragStopEvent
  • QDialog_FocusEvent
  • QDialog_OpenEvent
  • QDialog_ResizeEvent
  • QDialog_ResizeStartEvent
  • QDialog_ResizeStopEvent
  • QDialogBase
  • QDialogBox
  • QDialogGen
  • QDisplayStyle
  • QDoubleClickEvent
  • QDownArrowKeyEvent
  • QDragDropEvent
  • QDraggable
  • QDraggable_CreateEvent
  • QDraggable_DragEvent
  • QDraggable_StartEvent
  • QDraggable_StopEvent
  • QDraggableBase
  • QDraggableGen
  • QDroppable
  • QDroppable_ActivateEvent
  • QDroppable_CreateEvent
  • QDroppable_DeactivateEvent
  • QDroppable_DropEvent
  • QDroppable_OutEvent
  • QDroppable_OverEvent
  • QDroppableBase
  • QDroppableGen
  • QDropZoneGrouping
  • QEmailAttachment
  • QEmailMessage
  • QEmailServer
  • QEmailStringAttachment
  • QEmailTextBox
  • QEnterKeyEvent
  • QErrorAttribute
  • QEscapeKeyEvent
  • QEvent
  • QFieldset
  • QFile
  • QFileAsset
  • QFileAssetBase
  • QFileAssetDialog
  • QFileAssetType
  • QFileControl
  • QFileFormStateHandler
  • QFilterType
  • QFloatTextBox
  • QFloatTextBox_CodeGenerator
  • QFloatTextBoxBase_CodeGenerator
  • QFocusControlAction
  • QFocusEvent
  • QFocusInEvent
  • QFocusOutEvent
  • QFolder
  • QFontFamily
  • QForm
  • QFormBase
  • QFormGen
  • QFormStateHandler
  • QGridLines
  • QHideCalendarAction
  • QHideDialog
  • QHideDialogBox
  • QHListControl
  • QHListItem
  • QHorizontalAlign
  • QHtml
  • QHtmlAttributeManager
  • QHtmlAttributeManagerBase
  • QHtmlReporter
  • QHtmlTable
  • QHtmlTable_CodeGenerator
  • QHtmlTableBase
  • QHtmlTableCallableColumn
  • QHtmlTableCheckBoxColumn
  • QHtmlTableCheckBoxColumn_ClickEvent
  • QHtmlTableIndexedColumn
  • QHtmlTableLinkColumn
  • QHtmlTableNodeColumn
  • QHtmlTablePropertyColumn
  • QI18n
  • QI18nTests
  • QImageBase
  • QImageBrowser
  • QImageBrowserBase
  • QImageBrowserNav
  • QImageBrowserThumbnails
  • QImageButton
  • QImageControl
  • QImageControlBase
  • QImageFileAsset
  • QImageLabel
  • QImageLabelBase
  • QImageRollover
  • QImageType
  • QIndex
  • QInformixPdoDatabase
  • QInformixPdoDatabaseField
  • QInformixPdoDatabaseResult
  • QInformixPdoDatabaseRow
  • QInputEvent
  • QInstallationValidationResult
  • QInstallationValidator
  • QIntegerTextBox
  • QIntegerTextBox_CodeGenerator
  • QIntegerTextBoxBase_CodeGenerator
  • QJavaScriptAction
  • QJQAction
  • QJQBounceAction
  • QJqButton
  • QJqButton_CreateEvent
  • QJqButtonBase
  • QJqButtonGen
  • QJqCheckBox
  • QJqCheckBox_CreateEvent
  • QJqCheckBoxBase
  • QJqCheckBoxGen
  • QJQHideAction
  • QJQHideEffectAction
  • QJQHighlightAction
  • QJQPulsateAction
  • QJqRadioButton
  • QJqRadioButton_CreateEvent
  • QJqRadioButtonBase
  • QJqRadioButtonGen
  • QJQShakeAction
  • QJQShowAction
  • QJQShowEffectAction
  • QJQSizeAction
  • QJQToggleAction
  • QJQToggleEffectAction
  • QJQTransferAction
  • QJqUiEvent
  • QJqUiPropertyEvent
  • QJsClosure
  • QJsFunction
  • QJsNoQuoteKey
  • QJsParameterList
  • QJsPriority
  • QJsTimer
  • QJsTimerBase
  • QJsVarName
  • QKeyDownEvent
  • QKeyPressEvent
  • QKeyUpEvent
  • QLabel
  • QLabel_CodeGenerator
  • QLabelBase_CodeGenerator
  • QLexer
  • QLinkButton
  • QListBox
  • QListBox_CodeGenerator
  • QListBoxBase
  • QListBoxBase_CodeGenerator
  • QListControl
  • QListControl_CodeGenerator
  • QListControlBase_CodeGenerator
  • QListItem
  • QListItemBase
  • QListItemStyle
  • QManyToManyReference
  • QMenu
  • QMenu_BlurEvent
  • QMenu_CreateEvent
  • QMenu_FocusEvent
  • QMenu_SelectEvent
  • QMenuBase
  • QMenuGen
  • QMimeType
  • QModelConnectorArgumentType
  • QModelConnectorCreateType
  • QModelConnectorEditDlg
  • QModelConnectorOptions
  • QModelConnectorParam
  • QMouseDownEvent
  • QMouseEnterEvent
  • QMouseLeaveEvent
  • QMouseMoveEvent
  • QMouseOutEvent
  • QMouseOverEvent
  • QMouseUpEvent
  • QMultiLevelCacheProvider
  • QMySqlDatabase
  • QMySqlDatabaseField
  • QMySqlDatabaseResult
  • QMySqli5ClusterDatabase
  • QMySqli5Database
  • QMySqli5DatabaseField
  • QMySqli5DatabaseResult
  • QMySqliDatabase
  • QMySqliDatabaseField
  • QMySqliDatabaseResult
  • QMySqliDatabaseRow
  • QNoScriptAjaxAction
  • QNumericTextBox
  • QOnEvent
  • QOracleDatabase
  • QOracleDatabaseField
  • QOracleDatabaseResult
  • QOracleDatabaseRow
  • QOrderedListType
  • QOverflow
  • QPaginatedControl
  • QPaginator
  • QPaginatorBase
  • QPanel
  • QPartialQueryBuilder
  • QPdoDatabase
  • QPdoDatabaseResult
  • QPgConditionILike
  • QPgConditionJsonContains
  • QPgQ
  • QPosition
  • QPostgreSqlDatabase
  • QPostgreSqlDatabaseField
  • QPostgreSqlDatabaseResult
  • QPostgreSqlDatabaseRow
  • QPostgreSqlPdoDatabase
  • QPostgreSqlPdoDatabaseField
  • QPostgreSqlPdoDatabaseResult
  • QPostgreSqlPdoDatabaseRow
  • QProgressbar
  • QProgressbar_ChangeEvent
  • QProgressbar_CompleteEvent
  • QProgressbar_CreateEvent
  • QProgressbarBase
  • QProgressbarGen
  • QQ
  • QQAggregationClause
  • QQAliasTests
  • QQAssociationNode
  • QQAverage
  • QQClause
  • QQColumnNode
  • QQCondition
  • QQConditionAll
  • QQConditionAnd
  • QQConditionBetween
  • QQConditionComparison
  • QQConditionEqual
  • QQConditionExists
  • QQConditionGreaterOrEqual
  • QQConditionGreaterThan
  • QQConditionIn
  • QQConditionIsNotNull
  • QQConditionIsNull
  • QQConditionLessOrEqual
  • QQConditionLessThan
  • QQConditionLike
  • QQConditionLogical
  • QQConditionNone
  • QQConditionNot
  • QQConditionNotBetween
  • QQConditionNotEqual
  • QQConditionNotExists
  • QQConditionNotIn
  • QQConditionNotLike
  • QQConditionOr
  • QQCount
  • QQDistinct
  • QQExpand
  • QQExpandAsArray
  • QQExpandVirtualNode
  • QQFuncTests
  • QQFunctionNode
  • QQGroupBy
  • QQHavingClause
  • QQLimitInfo
  • QQMathNode
  • QQMathOpTests
  • QQMaximum
  • QQMinimum
  • QQNamedValue
  • QQNode
  • QQNoParentNode
  • QQOrderBy
  • QQReverseReferenceNode
  • QQSelect
  • QQSubQueryCountNode
  • QQSubQueryNode
  • QQSubQuerySqlNode
  • QQSum
  • QQTableNode
  • QQuery
  • QQueryBuilder
  • QQueryExpansion
  • QQVirtualNode
  • QRadioButton
  • QRadioButtonList
  • QRadioButtonList_CodeGenerator
  • QRadioButtonListBase_CodeGenerator
  • QRedirectAction
  • QReference
  • QRegex
  • QRegisterClickPositionAction
  • QRepeatDirection
  • QRequestMode
  • QResetTimerAction
  • QResizable
  • QResizable_CreateEvent
  • QResizable_ResizeEvent
  • QResizable_StartEvent
  • QResizable_StopEvent
  • QResizableBase
  • QResizableGen
  • QResizeHandleDirection
  • QRestServiceCodeGen
  • QReverseReference
  • QRssCategory
  • QRssFeed
  • QRssImage
  • QRssItem
  • QSampleControl
  • QSampleTranslation
  • QSelectable
  • QSelectable_CreateEvent
  • QSelectable_SelectedEvent
  • QSelectable_SelectingEvent
  • QSelectable_StartEvent
  • QSelectable_StopEvent
  • QSelectable_UnselectedEvent
  • QSelectable_UnselectingEvent
  • QSelectableBase
  • QSelectableGen
  • QSelectControlAction
  • QSelectEvent
  • QSelectionMode
  • QSelectMenu
  • QSelectMenu_ChangeEvent
  • QSelectMenu_CloseEvent
  • QSelectMenu_CreateEvent
  • QSelectMenu_FocusEvent
  • QSelectMenu_OpenEvent
  • QSelectMenu_SelectEvent
  • QSelectMenuBase
  • QSelectMenuGen
  • QServerAction
  • QServerControlAction
  • QSessionFormStateHandler
  • QSetValueAction
  • QShowCalendarAction
  • QShowDialog
  • QShowDialogBox
  • QSlider
  • QSlider_ChangeEvent
  • QSlider_CodeGenerator
  • QSlider_CreateEvent
  • QSlider_SlideEvent
  • QSlider_StartEvent
  • QSlider_StopEvent
  • QSliderBase
  • QSliderBase_CodeGenerator
  • QSliderGen
  • QSoapMethod
  • QSoapParameter
  • QSoapService
  • QSortable
  • QSortable_ActivateEvent
  • QSortable_BeforeStopEvent
  • QSortable_ChangeEvent
  • QSortable_CreateEvent
  • QSortable_DeactivateEvent
  • QSortable_OutEvent
  • QSortable_OverEvent
  • QSortable_ReceiveEvent
  • QSortable_RemoveEvent
  • QSortable_SortEvent
  • QSortable_StartEvent
  • QSortable_StopEvent
  • QSortable_UpdateEvent
  • QSortableBase
  • QSortableGen
  • QSpinner
  • QSpinner_ChangeEvent
  • QSpinner_CreateEvent
  • QSpinner_SpinEvent
  • QSpinner_StartEvent
  • QSpinner_StopEvent
  • QSpinnerBase
  • QSpinnerGen
  • QSqlColumn
  • QSqLite3PdoDatabase
  • QSqLite3PdoDatabaseField
  • QSqLite3PdoDatabaseResult
  • QSqLite3PdoDatabaseRow
  • QSqlServer2005Database
  • QSqlServer2005DatabaseField
  • QSqlServer2005DatabaseResult
  • QSqlServer2005DatabaseRow
  • QSqlServerDatabase
  • QSqlServerDatabaseField
  • QSqlServerDatabaseResult
  • QSqlServerDatabaseRow
  • QSqlTable
  • QStack
  • QStopPropagationAction
  • QString
  • QStringTest
  • QTabKeyEvent
  • QTabs
  • QTabs_ActivateEvent
  • QTabs_BeforeActivateEvent
  • QTabs_BeforeLoadEvent
  • QTabs_CreateEvent
  • QTabs_LoadEvent
  • QTabsBase
  • QTabsGen
  • QTag
  • QTagStyler
  • QTerminateAction
  • QTestControl
  • QTestForm
  • QTextAlign
  • QTextBox
  • QTextBox_CodeGenerator
  • QTextBoxBase
  • QTextBoxBase_CodeGenerator
  • QTextMode
  • QTimer
  • QTimerExpiredEvent
  • QTimerTests
  • QToggleCssClassAction
  • QToggleDisplayAction
  • QToggleEnableAction
  • QTranslationPoParser
  • QTreeNav
  • QTreeNavItem
  • QType
  • QTypeTable
  • QTypeTests
  • QUnitTestCaseBase
  • QUnorderedListStyle
  • QUpArrowKeyEvent
  • QUrlTextBox
  • QVerticalAlign
  • QVirtualAttributeColumn
  • QWaitIcon
  • QWatcher
  • QWatcherBase
  • QWatcherCache
  • QWatcherDB
  • QWatcherNone
  • QWriteBox
  • RecordsSummary
  • RefreshForm
  • SampleComposite
  • SampleForm
  • SelectableLabel
  • SelectForm
  • SpeedForm
  • TestImageBrowser
  • UrlForm

Interfaces

  • ICacheAction
  • QDataList_CodeGenerator_Interface
  • QTranslationBase

Traits

  • QDataBinder
  • QListItemManager
  • QModelTrait

Exceptions

  • QCallerException
  • QCrossScriptingException
  • QCryptographyException
  • QDatabaseExceptionBase
  • QDataBindException
  • QDateTimeNullException
  • QEmailException
  • QIndexOutOfRangeException
  • QInformixPdoDatabaseException
  • QInvalidCastException
  • QInvalidFormStateException
  • QMySqliDatabaseException
  • QOptimisticLockingException
  • QOracleDatabaseException
  • QPdoDatabaseException
  • QPoParserException
  • QPostgreSqlDatabaseException
  • QPostgreSqlPdoDatabaseException
  • QRemoteAdminDeniedException
  • QSqLite3PdoDatabaseException
  • QSqlServer2005DatabaseException
  • QSqlServerDatabaseException
  • QUndefinedMethodException
  • QUndefinedPrimaryKeyException
  • QUndefinedPropertyException

Functions

  • __database_check_error
  • __QForm_EvaluateTemplate_ObHandler
  • _b
  • _indent
  • _nl
  • _p
  • _r
  • _t
  • _tp
  • _tr
  • array_trim
  • beginsWith
  • CamelCaseFromDash
  • CastToInt
  • DataGridEvalHandleError
  • DisplayMonospacedText
  • endsWith
  • GO_BACK
  • jq_anytime_gen
  • jq_control_gen
  • jq_inc_gen
  • jq_indent
  • PrintExplainStatement
  • PrintInstructions
  • QcubedHandleCodeGenParseError
  • QcubedHandleError
  • QcubedHandleException
  • QCubedShutdown
  • QDateTimeErrorHandler
  • trimOffEnd
  • trimOffFront
  • Overview
  • Package
  • Class
  1: <?php
  2: require('QString.class.php');
  3: 
  4: abstract class QInstallationValidator {
  5:     /**
  6:      * @return array an array of QInstallationValidationResult objects
  7:      * If no errors were found, the array is empty.
  8:      */
  9:     public static function Validate() {
 10:         $result = array();
 11:         
 12:         if(ini_get('safe_mode') ){
 13:             $obj = new QInstallationValidationResult();
 14:             $obj->strMessage = "Safe Mode is deprecated in PHP 5.3+ and is removed in PHP 6.0+." . 
 15:                 "Please disable this setting in php.ini";
 16:             $result[] = $obj;
 17:         }
 18:         
 19:         if (get_magic_quotes_gpc() || get_magic_quotes_runtime()) {
 20:             $obj = new QInstallationValidationResult();
 21:             $obj->strMessage = "magic_quotes_gpc and magic_quotes_runtime " .
 22:                 "need to be disabled\r\n";
 23:             $result[] = $obj;
 24:         }
 25:         
 26:         $docrootOnlyPath = __DOCROOT__;
 27:         $docrootWithSubdirPath = __DOCROOT__ . __DEVTOOLS_ASSETS__ . substr($_SERVER['PHP_SELF'], strrpos($_SERVER['PHP_SELF'], "/"));
 28: 
 29:         $commonSubsequence = QString::LongestCommonSubsequence($_SERVER['PHP_SELF'], $_SERVER['SCRIPT_FILENAME']);
 30:         $root = substr($_SERVER['SCRIPT_FILENAME'], 0, strlen($_SERVER['SCRIPT_FILENAME']) - strlen($commonSubsequence));
 31:         $part1 = substr($_SERVER['PHP_SELF'], 1, strpos($_SERVER['PHP_SELF'], "/", 1) - 1);
 32:         $part2 = substr($root, strrpos($root, "/") + 1);
 33:         $virtualDir = substr($_SERVER['PHP_SELF'], 0, 0 - strlen($commonSubsequence));
 34: 
 35: 
 36:         // Debugging stuff - there until this code stabilizes across multiple platforms.
 37:     /*
 38:         print("DOCROOT = " . __DOCROOT__ . "<br>");
 39:         print("SUBDIR = " . __SUBDIRECTORY__ . "<br>");
 40:         print("DEVTOOLS = " . __DEVTOOLS_ASSETS__ . "<br>");
 41: 
 42:         print("PHP_SELF = " . $_SERVER['PHP_SELF'] . "<br>");
 43:         print("SCRIPT_FILENAME = " . $_SERVER['SCRIPT_FILENAME'] . "<br>");
 44: 
 45:         print("commonSubsequence = " . $commonSubsequence . "<br>");
 46:         print("root = " . $root . "<br>");
 47:         print("rootWithSubdirPath = " . $docrootWithSubdirPath . "<br>");
 48:         print("part1 = " . $part1 . "<br>");
 49:         print("part2 = " . $part2 . "<br>");
 50:         print("virtualDir = " . $virtualDir . "<br>");
 51:     //*/
 52: 
 53:         if (!is_dir($docrootOnlyPath)) {
 54:             $obj = new QInstallationValidationResult();
 55:             $obj->strMessage = 'Set the __DOCROOT__ constant in ' .
 56:                 '/includes/configuration/configuration.inc.php. ' .
 57:                 'Most likely value: "' . $root . '"';
 58:             $result[] = $obj;
 59:         } else if (strlen(__VIRTUAL_DIRECTORY__) == 0 &&
 60:                 !file_exists(__DOCROOT__ . $_SERVER['PHP_SELF'])) {
 61:             $obj = new QInstallationValidationResult();
 62:             $obj->strMessage = 'Set the __DOCROOT__ constant in ' .
 63:                 '/includes/configuration/configuration.inc.php. ' .
 64:                 'Most likely value: "' . $root . '"';
 65:             $result[] = $obj;
 66:         }
 67: 
 68:         if (!file_exists($docrootWithSubdirPath)) {
 69:             $obj = new QInstallationValidationResult();
 70:             $obj->strMessage = 'Set the __SUBDIRECTORY__ constant in ' .
 71:                 '/includes/configuration/configuration.inc.php. ' .
 72:                 'Most likely value: "/' . $part1 . '"';
 73:             $result[] = $obj;
 74: 
 75:             // At this point, we cannot proceed with any more checks - basic config
 76:             // is not set up. Just exit.
 77:             return $result;
 78:         }
 79: 
 80:         if (!file_exists(__INCLUDES__)) {
 81:             // Did the user move the __INCLUDES__ directory out of the docroot?
 82:             $obj = new QInstallationValidationResult();
 83:             $obj->strMessage = 'Set the __INCLUDES__ constant in ' .
 84:                 'includes/configuration/configuration.inc.php. ';
 85:             $result[] = $obj;
 86: 
 87:             // At this point, we cannot proceed with any more checks - basic config
 88:             // is not set up. Just exit.
 89:             return $result;
 90:         }
 91: 
 92:         // Check for trailing slashes
 93:         self::checkTrailingSlash("__DOCROOT__", $result);
 94:         self::checkTrailingSlash("__SUBDIRECTORY__", $result);
 95:         self::checkTrailingSlash("__VIRTUAL_DIRECTORY__", $result);
 96: 
 97:         if (strcmp($commonSubsequence, $_SERVER['PHP_SELF']) != 0 && strlen(__VIRTUAL_DIRECTORY__) == 0) {
 98:             $obj = new QInstallationValidationResult();
 99:             $obj->strMessage = 'Set the __VIRTUAL_DIRECTORY__ constant in ' .
100:                 'includes/configuration/configuration.inc.php. Most likely value: "' . $virtualDir . '"';
101:             $result[] = $obj;
102:         }
103: 
104:         // Now that we know that the basic config is correct, we can actually
105:         // initialize the full QCubed framework.
106:         require(__CONFIGURATION__. '/prepend.inc.php');
107: /*
108:         if (!QFolder::isWritable(QPluginInstaller::PLUGIN_EXTRACTION_DIR)) {
109:             $obj = new QInstallationValidationResult();
110:             $obj->strMessage = "Plugin temporary extraction directory (" .
111:                 QPluginInstaller::PLUGIN_EXTRACTION_DIR . ") needs to be writable";
112:             $obj->strCommandToFix = "chmod 777 " . QPluginInstaller::PLUGIN_EXTRACTION_DIR;
113:             $result[] = $obj;
114:         }
115:         
116:         // Checks to make sure that everything about plugins is allright
117:         if (!QFile::isWritable(QPluginInstaller::getMasterConfigFilePath())) {
118:             $obj = new QInstallationValidationResult();
119:             $obj->strMessage = "Plugin master configuration file (" .
120:                 QPluginInstaller::getMasterConfigFilePath() . ") needs to be writable";
121:             $obj->strCommandToFix = "chmod 777 " . QPluginInstaller::getMasterConfigFilePath();
122:             $result[] = $obj;
123:         }
124: 
125:         if (!QFile::isWritable(QPluginInstaller::getMasterExamplesFilePath())) {
126:             $obj = new QInstallationValidationResult();
127:             $obj->strMessage = "Plugin example configuration file (" .
128:                 QPluginInstaller::getMasterExamplesFilePath() . ") needs to be writable";
129:             $obj->strCommandToFix = "chmod 777 " . QPluginInstaller::getMasterExamplesFilePath();
130:             $result[] = $obj;
131:         }
132: 
133:         if (!QFile::isWritable(QPluginInstaller::getMasterIncludeFilePath())) {
134:             $obj = new QInstallationValidationResult();
135:             $obj->strMessage = "Plugin includes configuration file (" .
136:                 QPluginInstaller::getMasterIncludeFilePath() . ") needs to be writable";
137:             $obj->strCommandToFix = "chmod 777 " . QPluginInstaller::getMasterIncludeFilePath();
138:             $result[] = $obj;
139:         }
140:                     
141:         if (!QFolder::isWritable(__PLUGINS__)) {
142:             $obj = new QInstallationValidationResult();
143:             $obj->strMessage = "Plugin includes installation directory (" .
144:                 __PLUGINS__ . ") needs to be writable";
145:             $obj->strCommandToFix = "chmod 777 " . __PLUGINS__;
146:             $result[] = $obj;
147:         }
148: 
149:         if (!QFolder::isWritable(__DOCROOT__ . __PLUGIN_ASSETS__)) {
150:             $obj = new QInstallationValidationResult();
151:             $obj->strMessage = "Plugin assets installation directory (" .
152:                 __DOCROOT__ . __PLUGIN_ASSETS__ . ") needs to be writable";
153:             $obj->strCommandToFix = "chmod 777 " . __DOCROOT__ . __PLUGIN_ASSETS__;
154:             $result[] = $obj;
155:         }
156:         */
157:         if (!QFolder::isWritable(__CACHE__)) {
158:             $obj = new QInstallationValidationResult();
159:             $obj->strMessage = "Cache directory (" . __CACHE__ . ") needs to be writable";
160:             $obj->strCommandToFix = "chmod 777 " . __CACHE__;
161:             $result[] = $obj;
162:         }
163: 
164:         if (!file_exists(__IMAGE_CACHE__)) {
165:             // Did the user move the __INCLUDES__ directory out of the docroot?
166:             $obj = new QInstallationValidationResult();
167:             $obj->strMessage = 'Create the "' . __IMAGE_CACHE__ . '" directory.';
168:             $obj->strCommandToFix = "mkdir " . __IMAGE_CACHE__;
169:             $result[] = $obj;
170:         }
171:         else if (!QFolder::isWritable(__IMAGE_CACHE__)) {
172:             $obj = new QInstallationValidationResult();
173:             $obj->strMessage = "Images cache directory (" . __IMAGE_CACHE__ . ") needs to be writable";
174:             $obj->strCommandToFix = "chmod 777 " . __IMAGE_CACHE__;
175:             $result[] = $obj;
176:         }
177: 
178:         if (!QFolder::isWritable(__FILE_CACHE__)) {
179:             $obj = new QInstallationValidationResult();
180:             $obj->strMessage = "Cache directory (" . __FILE_CACHE__ . ") needs to be writable";
181:             $obj->strCommandToFix = "chmod 777 " . __FILE_CACHE__;
182:             $result[] = $obj;
183:         }
184: 
185:         if (!QFolder::isWritable(__PURIFIER_CACHE__)) {
186:             $obj = new QInstallationValidationResult();
187:             $obj->strMessage = "Cache directory (" . __PURIFIER_CACHE__ . ") needs to be writable";
188:             $obj->strCommandToFix = "chmod 777 " . __PURIFIER_CACHE__;
189:             $result[] = $obj;
190:         }
191: 
192:         if (!file_exists(__CONFIGURATION__ . '/codegen_options.json')) {
193:             // Did the user move the __INCLUDES__ directory out of the docroot?
194:             $obj = new QInstallationValidationResult();
195:             $obj->strMessage = 'Create the "' . __CONFIGURATION__ . '/codegen_options.json"' . ' file.';
196:             $obj->strCommandToFix = "touch " . __CONFIGURATION__. '/codegen_options.json';
197:             $result[] = $obj;
198:         }
199:         else if (!QFile::isWritable(__CONFIGURATION__ . '/codegen_options.json')) {
200:             $obj = new QInstallationValidationResult();
201:             $obj->strMessage = "The file (" . __CONFIGURATION__ . '/codegen_options.json' . ") needs to be writable";
202:             $obj->strCommandToFix = "chmod 666 " . __CONFIGURATION__ . '/codegen_options.json';
203:             $result[] = $obj;
204:         }
205:         
206:         if (!file_exists(__PROJECT__ . '/forms')) {
207:             // Did the user move the __INCLUDES__ directory out of the docroot?
208:             $obj = new QInstallationValidationResult();
209:             $obj->strMessage = 'Create the "' . __PROJECT__ . '/forms"' . ' directory.';
210:             $obj->strCommandToFix = "mkdir " . __PROJECT__. '/forms';
211:             $result[] = $obj;
212:         }
213:         else if (!QFolder::isWritable(__PROJECT__ . '/forms')) {
214:             $obj = new QInstallationValidationResult();
215:             $obj->strMessage = "Forms directory (" . __PROJECT__ . '/forms' . ") needs to be writable";
216:             $obj->strCommandToFix = "chmod 777 " . __PROJECT__ . '/forms';
217:             $result[] = $obj;
218:         }
219:         
220:         if (!file_exists(__PANEL__)) {
221:             // Did the user move the __INCLUDES__ directory out of the docroot?
222:             $obj = new QInstallationValidationResult();
223:             $obj->strMessage = 'Create the "' . __PANEL__ . '" directory.';
224:             $obj->strCommandToFix = "mkdir " . __PANEL__;
225:             $result[] = $obj;
226:         }
227:         else if (!QFolder::isWritable(__PANEL__)) {
228:             $obj = new QInstallationValidationResult();
229:             $obj->strMessage = "Panels directory (" . __PANEL__ . ") needs to be writable";
230:             $obj->strCommandToFix = "chmod 777 " . __PANEL__;
231:             $result[] = $obj;
232:         }
233:         
234:         if (!file_exists(__DIALOG__)) {
235:             // Did the user move the __INCLUDES__ directory out of the docroot?
236:             $obj = new QInstallationValidationResult();
237:             $obj->strMessage = 'Create the "' . __DIALOG__ . '" directory.';
238:             $obj->strCommandToFix = "mkdir " . __DIALOG__;
239:             $result[] = $obj;
240:         }
241:         else if (!QFolder::isWritable(__DIALOG__)) {
242:             $obj = new QInstallationValidationResult();
243:             $obj->strMessage = "Panels directory (" . __DIALOG__ . ") needs to be writable";
244:             $obj->strCommandToFix = "chmod 777 " . __DIALOG__;
245:             $result[] = $obj;
246:         }
247:         
248:         if (!QFolder::isWritable(__APP_CACHE__)) {
249:             $obj = new QInstallationValidationResult();
250:             $obj->strMessage = "Cache directory (" . __APP_CACHE__ . ") needs to be writable";
251:             $obj->strCommandToFix = "chmod 777 " . __APP_CACHE__;
252:             $result[] = $obj;
253:         }
254: 
255:         if (!file_exists(__APP_IMAGE_CACHE__)) {
256:             // Did the user move the __INCLUDES__ directory out of the docroot?
257:             $obj = new QInstallationValidationResult();
258:             $obj->strMessage = 'Create the "' . __APP_IMAGE_CACHE__ . '" directory.';
259:             $obj->strCommandToFix = "mkdir " . __APP_IMAGE_CACHE__;
260:             $result[] = $obj;
261:         }
262:         else if (!QFolder::isWritable(__APP_IMAGE_CACHE__)) {
263:             $obj = new QInstallationValidationResult();
264:             $obj->strMessage = "Images cache directory (" . __APP_IMAGE_CACHE__ . ") needs to be writable";
265:             $obj->strCommandToFix = "chmod 777 " . __APP_IMAGE_CACHE__;
266:             $result[] = $obj;
267:         }
268:         
269:         if (defined("__APP_UPLOAD__")) {
270:             if (!file_exists(__APP_UPLOAD__)) {
271:                 // Did the user move the __INCLUDES__ directory out of the docroot?
272:                 $obj = new QInstallationValidationResult();
273:                 $obj->strMessage = 'Create the "' . __APP_UPLOAD__ . '" directory.';
274:                 $obj->strCommandToFix = "mkdir " . __APP_UPLOAD__;
275:                 $result[] = $obj;
276:             }
277:             else if (!QFolder::isWritable(__APP_UPLOAD__)) {
278:                 $obj = new QInstallationValidationResult();
279:                 $obj->strMessage = "Uploads directory (" . __APP_UPLOAD__ . ") needs to be writable";
280:                 $obj->strCommandToFix = "chmod 777 " . __APP_UPLOAD__;
281:                 $result[] = $obj;
282:             }
283:         }
284: 
285:         if (defined("__QCUBED_UPLOAD__")) {
286:             if (!file_exists(__QCUBED_UPLOAD__)) {
287:                 // Did the user move the __INCLUDES__ directory out of the docroot?
288:                 $obj = new QInstallationValidationResult();
289:                 $obj->strMessage = 'Create the "' . __QCUBED_UPLOAD__ . '" directory.';
290:                 $obj->strCommandToFix = "mkdir " . __QCUBED_UPLOAD__;
291:                 $result[] = $obj;
292:             }
293:             else if (!QFolder::isWritable(__QCUBED_UPLOAD__)) {
294:                 $obj = new QInstallationValidationResult();
295:                 $obj->strMessage = "Uploads directory (" . __QCUBED_UPLOAD__ . ") needs to be writable";
296:                 $obj->strCommandToFix = "chmod 777 " . __QCUBED_UPLOAD__;
297:                 $result[] = $obj;
298:             }
299:         }
300:         
301:         // Database connection string checks
302:         for ($i = 1; $i < 1 + sizeof(QApplication::$Database); $i++) {
303:             if (!isset(QApplication::$Database[$i]))
304:                 continue;
305:             $db = QApplication::$Database[$i];
306:             // database connection problems are PHP Errors, not exceptions
307:             // using an intermediate error handler to make them into
308:             // exceptions so that we can catch them locally
309:             set_error_handler("__database_check_error");
310:             try {
311:                 $db->Connect();
312:             } catch (Exception $e) {
313:                 $obj = new QInstallationValidationResult();
314:                 $obj->strMessage = "Fix database configuration settings in " .
315:                     __CONFIGURATION__ . "/configuration.inc.php for adapter #"
316:                     . $i . ": " . $e->getMessage();
317:                 $result[] = $obj;
318:             }
319:             restore_error_handler();
320:         }
321:         
322:         return $result;
323:     }
324: 
325:     public static function checkTrailingSlash($strConstantName, & $result) {
326:         if (QString::LastCharacter(constant($strConstantName)) == '/') {
327:             $obj = new QInstallationValidationResult();
328:             $obj->strMessage = 'Remove the trailing slash from the ' . $strConstantName . ' constant in ' .
329:                 '/includes/configuration/configuration.inc.php. ';
330:             $result[] = $obj;
331:         }
332:     }
333: 
334: }
335: 
336: function __database_check_error($errno, $errstr, $errfile, $errline, $errcontext) {
337:     throw new Exception(strip_tags($errstr));
338: }
339: 
340: class QInstallationValidationResult {
341:     /**
342:      * A string that represents an error that has been
343:      * found for this installation. If no errors were found, the array
344:      * is empty.
345:      */
346:     public $strMessage = "";
347: 
348:     /**
349:      * A hint of the bash script that can be used to fix the issues.
350:      * May or may not be set, depending on whether there's an
351:      * automated way to fix these.
352:      */
353:     public $strCommandToFix = "";
354: 
355:     public function __toString() {
356:         return $this->strMessage;
357:     }
358: }
API documentation generated by ApiGen