php - Zend framework 2 LAMP returns 404 error while it was working on windows -
i have application running on windows centos server, have changed os windows ubuntu. public
folder called triggers onbootstrap
have custom logic check if not logged in redirect loginaction
of default controller. redirects fine none of controller working returns 404 error
.
even public controllers not accessible.
am missing dependent extension?
could directory separators \
, not /
? if these hard coded in, try replacing them php constant directory_separator anywhere have them, so:
require_once 'path'.directory_separator.'to'.directory_separator.'file';
instead of:
require_once 'path/to/file';
there several issues when developing in windows, , that's 1 of them. case insensitivity , character encoding other problems face.
an easier solution re-configuring in site (or wamp/xampp etc) portable development server setup can share team, recommend try vm!
download vagrant , virtualbox first. if go puphpet.com, can fill in form configure development server. make match closely production server possible.
once finish filling in form, download configuration zip, unzip it, cd folder, , type vagrant up
. takes while first time araound, when it's ready, have full linux server, , if share zip, on team have identical setups, whether on windows, linux, or mac.
anyway, if intend keep devving natively in windows, check php error_log
Comments
Post a Comment