I have an old Zend Framework 1 app that runs on my current Debian system so far.Now I wanted to set up this app also on my NixOS system, of course with the same packages of Apache/2.4.48, PHP version 7.3.29 and PostgreSQL 11. Unfortunately I get the following error message on the NixOS:
**Fatal error** : Uncaught Zend_View_Exception: script '/.phtml' not found in path
(/application/modules/default/views/scripts/) in /library/Zend/View/Abstract.php:987 Stack trace: #0
/library/Zend/View/Abstract.php(883): Zend_View_Abstract->_script('/.phtml')
#1/Zend/Controller/Action/Helper/ViewRenderer.php(910): Zend_View_Abstract->render('/.phtml') #2
/library/Zend/Controller/Action/Helper/ViewRenderer.php(931):
Zend_Controller_Action_Helper_ViewRenderer->renderScript('/.phtml', NULL) #3
/library/Zend/Controller/Action/Helper/ViewRenderer.php(970):
Zend_Controller_Action_Helper_ViewRenderer->render() #4 /ehochdrei-skillware/libr in
**/library/Zend/Controller/Plugin/Broker.php** on line **335**
I’m pretty sure this is related to the .htaccess. In the .htaccess my app says the following:
order deny,allow
allow from all
#require valid-user
SetEnv APPLICATION_ENV development
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ index.php [NC,L]
In my configuration.nix I made the following settings for the vhost:
services.httpd.virtualHosts."testware.de" = {
serverAliases = ["testware.de"];
documentRoot = "/home/bavramor/data/Webdesign/Webseiten/testware/public";
extraConfig =
''
#SetEnv APPLICATION_ENV development
#RewriteEngine On
#RewriteCond %{REQUEST_FILENAME} -s [OR]
#RewriteCond %{REQUEST_FILENAME} -l [OR]
#RewriteCond %{REQUEST_FILENAME} -d
#RewriteRule ^.*$ - [NC,L]
#RewriteRule ^.*$ index.php [NC,L]
<Directory "/home/bavramor/data/Webdesign/Webseiten/testware/public">
DirectoryIndex index.php index.htm index.html
Allow from All
Options FollowSymLinks
Order allow,deny
AllowOverride All
</Directory>
'';
};
As you can see, I have also tried to enter the settings directly into the vhost, but that didn’t help either. The rewrite engine is running, but somehow it doesn’t seem to do the rewrites correctly. In the /var/log I can’t find any error message that might help me. So as mentioned before, the app is running on my Debian system. Would appreciate any help or ideas.
Thanks and greetings
Bavra.