Zend Framework routes not working - zend-framework

I'm having a problem with my Zend Framework application. It was working just fine on my old server, but I've moved it to a new server and for some reason it's no longer working.
If I go to the site's address, I get the main page. But when I try any of the links, I get a 404 error from Apache itself--not from the Zend Framework error controller.
I just set this new server up, and it's likely I've forgotten something, but I have no idea what it is. I don't do a lot of server administrative work, so I don't even know where to begin.

check your apache httpd.conf need allow override:
<Directory />
Options FollowSymLinks
AllowOverride All
Order deny,allow
Deny from all
</Directory>

I think you need to check document root ways on new server, your index.php is in public folder ?

Related

Error: "Err Too Many Redirect" Prestashop 1.7

I get the ERR_TOO_MANY_REDIRECTS error just modules and products page on the prestashop admin panel. When i try to connect pages url is contain ...security/compromised.... I was changed the all modules names for the making disable. But its not help to me.
How can i fix? Which methods can I try?
Thanks
I have installed this version on my live server and noticed the same issue.
I had my shop enabled for SSL but not for all pages, soon as I enabled it for all pages my error went away.
Hope this helps
Check your PHP setting for session.save_path. It should be /tmp. Particularly if you've switched PHP versions around, it has a nasty habit of setting it to something like /var/cpanel/php/sessions/ea-php72/.
Try to regenerate the .htaccess with SEO/URL in admin.
try to disable and then to enable friendly url.
if that won'tt help please try to switch on the error in config/defines.inc.php ps_mod_dev in true
and please check out if you htaccess is generated
please send your htaccess

zend framework: Creating the Default Module

I did everything as it is written in the book of Vaswani V. - the Zend Framework. A Beginner's Guide (page 33), but the page "http://square.localhost/default/index/index" returns the response "not found". What is wrong?
I had the exact same problem with that part of the book. Fortunately, the book's companion site (zf-beginners-guide.com) has an errata/troubleshooting section that solves the problem nicely. Quoting from the site:
If you see a "File not found" error after implementing the modular
directory layout and accessing the URL
http://square.localhost/default/index/index, check that the new
virtual host supports .htaccess overrides. You can enable this by
adding the following lines to your virtual host configuration,
remembering to change the directory path to your virtual host's
document root.
<Directory "/usr/local/apache/htdocs/square/public">
AllowOverride All
Options All
</Directory>
Incidentally, if you're using Ubuntu, it may not have mod_rewrite enabled by default. (I just ran into the exact same problem myself BTW). If you're still having trouble, try this:
sudo a2enmod rewrite
sudo service apache2 restart
(Big thanks to Mahok for the help on that, BTW!)

How do I set a canonical uri on jetty and redirect www users to non www address?

This has been bugging me for some time now, I will greatly appreciate the solution.
I am currently using jetty (jetty-7.3.0.v20110202) to host a static site. I intend to host applications written using JRuby there in the future. I picked Jetty in the first place because someone somewhere told me it had a low memory footprint. I am open to suggestions.
I want to redirect users to a canonical address a-la Redirect non www version of domain to www in Jetty
The method outlined above just doesn't work for me and I have no idea why.
I want my canonical address to be http://example.com/ and any visitors to http://www.example.com/ to be SEO friendly redirected.
I just want to use jetty xml files for the configuration.
I say the jetty documentation is lacking, but I'm not a java programmer, so I'm probably wrong.
I managed to fix this, following the guide included in the link included in the question.
The thing that was not indicated was that it is imperative that you include a virtualhosts section in your site.xml file.
It is commented out by default in the test.xml file example and most definitely needs to be uncommented to work in your site!

What should I configure when I put Zend project on windows to Ubuntu Lamp?

What should I configure when I put Zend project on windows to Ubuntu Lamp?
(I asking that beacause my Zend progect not working on Ubuntu, its gives first pages, but after i enter to next page its gives me 404 error(page Not Found), I check if rewrite mod enable with : sudo a2enmod rewrite and get: Module rewrite already enabled ::: I dont have such probelm on Zend Ce and Wamp servers on Windows).
Thanks,
Yosef
It almost sounds like the .htaccess file is not being taken into account. As a test you could try route this through index.php manually such as:
http://localhost/controller/action -> http://localhost/index.php/controller/action
This might help to narrow it down.
Double-check your class file names. Windows is a little more forgiving on case-sensitivity issues. It's quite easy to break an application written on a PC and transferred to a LAMP box with the wrong camel-casing on class files. I learned that the hard way.

Debugging Zend Framework in Eclipse, mod_rewrite problems

I have a simple ZF that already works well.
I've set it up to work in a subfolder, so I access it with localhost/zftutorial URL.
Now the time came for debugging, but when I execute debugger in Eclipse, it appends debug URL params (like XDEBUG_SESSION_START=ECLIPSE_DBGP) which break everything and I start getting this message:
> Zend_Controller_Dispatcher_Exception: Invalid controller specified (index.php) in C:\Program Files\VertrigoServ\www\library\Zend\library\Zend\Controller\Dispatcher\Standard.php on line 241
I've tried to set both localhost/zftutorial and localhost/zftutorial/public/index.php as start URLs for debugger, but still getting the same message.
Looks like ZF likes clean URL names, but Eclipse wants scripts with php extensions, but controller names. Whichever debug options I use, Ecplise tries to start debugging from
not Zend-style URL - http://localhost/zftutorial/index.php
I guess this can be solved 2 ways:
configuring Eclipse somehow to use a proper URL with debug params, like localhost/zftutorial
setting rewrite rule for localhost/zftutorial/public/index.php to be rewritten as localhost/zftutorial (right?)
I've come to a conclusion that such problems are best avoidable by setting up ZF application
public folder as root folder in web server. Such root placement is a recommended practice and causes are no debug-related problems like above, unlike when ZF app resides in a subfolder and mod_rewrite rules break things now and then.