Open-Source PHP Framework - Designed for rapid development of performance-oriented scalable applications

Frequently Asked Questions

API >> faq

How can I re-route incoming traffic? (aka. setting "routes")

We recommend re-routing with your web server, Apache mod_rewrite is made for this. If you must re-route from Vork you may do so by creating an APP_CONSTRUCT file that either changes the controller and view or issues a load::redirect()

How can I use Vork with file extensions like .php?

This is unsupported and we recommend against it but you can set in the config class of your .config file a new property with the extension including preceding dot:
public $fileExtension '.php';
Note: this is a global setting, so you will need to change all the files in Vork to include the extension.

How can I move the Vork MVC folders somewhere else?

This is unsupported and we recommend against it but you can set in the config class of your .config file new properties for:
$pathToMvc - this is the parent mvc folder containing:
$modelsFolder$viewsFolder$controllersFolder$layoutsFolder$elementsFolder$componentsFolder$helpersFolder

How can I move the Vork "packages" folders somewhere else?

Packages are completely external and can be moved freely, the only Vork reference to the packages folder is at the top of the /webroot/vork file, you will need to update the PACKAGES_PATH constant in order for the debug functions to work in Firefox equipped with the FireBug and FirePHP extensions (an incorrect path will not have any effect on other browsers or in Firefox if FirePHP is not installed or if the debug feature is not enabled.)

Troubleshooting

I get a 404 not found error when viewing a page that exists

If you are a superuser or have debugging mode enabled then you should also see additional info leading to the cause of the issue and relevant to one of the points below. If debug is disabled and you are not a superuser then you will have to try each of the following until one works.

controllerNotDefined

In most cases there is a controller file with the correct filename, but the controller class is either missing or inaccessible due to a typeo in the class name or improper naming convention - the class name must be the same name as the file, but with "Controller" appended to it (case-sensitive) eg. in a file named cheese you would have a class cheeseController {...}

missingAction

Every action needs a method in your controller by the same name as the action being requested (unless you have the optionalAction directive set in which case the only way that you could get this error is if the index() method was missing). In most cases there is a typeo in the method name for the action.

missingView

This is a normal 404 error, make sure that a view file exists for the view defined by the URL. If your controller or a component accessed within it explicitly selects to use a different view file, then that new file is the one that is missing.

PHP error messages in PHP versions prior to 5.2.3

Follow the instructions for legacy installations at the bottom of the installation docs