Reputation: 83
I am trying to deploy on server web site (http://webdeveloper.md) developed using zend framework. When I enter the file manager on my account on server there is displayed following structure:
anon_ftp
cgi-bin
conf
error_docs
etc
httpdocs
and other directories.
I deployed my project in httpdocs, so when accessing it, there is displayed the standard zend structure (settings, application, data, etc.). As I understand the path to my website home directory is http://webdeveloper.md/httpdocs/public/index.php . I've tried to insert this path into Document root within hosting settings. Now when I access webdeveloper.md in browser I get error 404 (NOT FOUND).
I believe that the problem is in my .htaccess file. I have nothing changed in it and it contain standard code:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ index.php [NC,L]
I've tryed to modify it - added one more row:
RewriteBase /httpdocs/public
then this:
RewriteBase http://webdeveloper.md/httpdocs/public
then this, instead of the last row:
RewriteRule http://webdeveloper.md/httpdocs/public
Nothing works!
My configuraion.ini loks like this:
[production]
resources.cachemanager.database.frontend.name = Core
resources.cachemanager.database.frontend.options.lifetime = 7200
resources.cachemanager.database.frontend.options.automatic_serialization = true
resources.cachemanager.database.backend.name = File
resources.cachemanager.database.backend.options.cache_dir = APPLICATION_PATH "/../data/cache"
resources.cachemanager.database.frontendBackendAutoload = false
phpSettings.display_startup_errors = 0
phpSettings.display_errors = 0
includePaths.library = APPLICATION_PATH "/../library"
bootstrap.path = APPLICATION_PATH "/Bootstrap.php"
bootstrap.class = "Bootstrap"
appnamespace = "Application"
resources.frontController.controllerDirectory = APPLICATION_PATH "/controllers"
resources.frontController.params.displayExceptions = 0
resources.layout.layoutPath = APPLICATION_PATH "/layouts/scripts/"
resources.view[] =
resources.db.adapter = "PDO_MYSQL"
resources.db.isDefaultTableAdapter = true
resources.db.params.dbname = "database"
resources.db.params.charset = "utf8"
resources.db.params.host = "localhost"
resources.db.params.username = "root"
resources.db.params.password = "***********"
resources.session.save_path = APPLICATION_PATH "/../data/sessions"
resources.session.use_only_cookies = true
date.timezone = "Europe/Chisinau"
[staging : production]
[testing : production]
phpSettings.display_startup_errors = 1
phpSettings.display_errors = 1
resources.db.adapter = "PDO_MYSQL"
resources.db.params.dbname = "database"
resources.db.params.charset = "utf8"
resources.db.params.host = "localhost"
resources.db.params.username = "root"
resources.db.params.password = "*********"
[development : production]
phpSettings.display_startup_errors = 1
phpSettings.display_errors = 1
resources.frontController.params.displayExceptions = 1
resources.db.adapter = "PDO_MYSQL"
resources.db.params.dbname = "database"
resources.db.params.charset = "utf8"
resources.db.params.host = "localhost"
resources.db.params.username = "root"
resources.db.params.password = "*********"
Upvotes: 0
Views: 246
Reputation: 83
I have solved all the issues. Actually, I let .htaccess and index.php files as they are. As I understood from experience of other users, the necessity to edit .htaccess appears in cases when the server doesn't allow to modify Document Root (most common case - shared hosting). This was not my situation, so all I had to do is to edit PHP settings on server. I've done following modifications in PHP settings on server: 1. I changed Document Root to point on my public folder (in my case /httpdocs/public/); 2. in PHP settings on server initially open_basedir was ROOT:/tmp (or something), I've changed this value to DEFAULT; 3. I modified in PHP settings session.save_path and inserted there the path to sessions directory from my zend project. And finally I had to remove all the files and to deploy my project again. To solve all the issues, I have reviewed error logs from server. Good luck!
Upvotes: 1