How to create zend framework project in a joomla subdirectory? - zend-framework

I have my joomla in http://project/ and now I want to have http://project/zf-project/
What httaccess should I use? And what changes in the code?

I have done this by
Not changing the ZF .htaccess
Putting my ZF public files inside /public/zf-project instead of /public this includes putting the ZF .htaccess file in /public/zf-project
Doing this worked fine for me without having to change anything else. Have you tried this?
EDIT
You could try adding to your Joomla .htaccess
RewriteRule ^(zf-project) - [L]
After the line which reads
RewriteEngine On

You can use the following .htaccess. It will work in subdirectories:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ index.php [NC,L]
Remember that you must apply baseUrl to your links, css files etc. This is necessary to include the sub-directory as a prefix to your urls.
Some of the classes in ZF already does that like the Url view helper.

Related

how to disable http methods in jboss 7

anyone knows how to disable http methods such as put, delete on the jboss web server 7.0?
RewriteCond %{REQUEST_METHOD} ^(PUT|DELETE|TRACE|OPTIONS)$ [NC] is used for jboss6, but how can do on jboss7
Just add <security-constraint> to web.xml
see for example Whitelist security constraint in web.xml

How to find the Entry Point in the Magento project version 1.9.3.1

I am unable to find the entry point in the project where my index.php is located in the project, please help me on this.
Index.php file always exists in root of your Magento.
In magento 1.9.3.1 or any version of magento index.php is found in your root folder without index.php magento not run you can find publichtml or var/www/projectname/ if your in localhost xampp htdocs/project name or wamp www/your project name.

How to treat index.cgi as a directory index in Eclipse EPIC Perl CGI?

I am using the Eclipse EPIC (Perl Editor and IDE for Eclipse) Plugin's "Perl CGI" debug and run configuration on a site that uses index.cgi as it's directory index file. The site was written expecting the Apache DirectoryIndex to be index.html index.cgi, so most links just point to the directory and not to index.cgi. This results in getting 404 responses if index.html does not exist instead of displaying the results of index.cgi.
Is there a setting to make EPIC Perl CGI emulate the behavior of Apache's DirectoryIndex index.html index.cgi so that it serves index.cgi instead of 404 when it is available?
So far I have found no setting to configure this. The content seems to be served by a java process started by Eclipse. For now I'm scattering index.html files around with meta refresh tags.
<meta http-equiv="refresh" content="0;URL='index.cgi'" />

Zend Project not working in a real server after upload

I just completed the job site using zend framework. This is my first project using Zend framework. The site is almost finished in localhost and i tried to upload it in real server for testing. I put my files under public_html folder of real server. I noticed there is no any file "index.php" inside root folder of project(ie public_html). It actually lies inside public folder inside public_html. I am bewildered. I tried to make index.php inside root folder and put "require_once('public/index.php'), but didn't work. What should i do now?
Thanks.
Assuming a typical project directory structure, your public folder should go inside your server's public_html folder, and all other Zend project folders should go one level up, like this:
/application
// application files
/library
// library and vendor files
/public (aka public_html, htdocs etc)
index.php
.htaccess
/css
/images
/js
If you can, configure a vhost on your server, and make it point to the "public" folder of your application.
You should also enable the rewrite module of apache and ensure that your vhost accepts .htaccess files (directive AllowOverride All in your vhost).
The way I do it, is to have the index.php and .htacess 1 level up from the public directory and alter the paths defined in index.php accordingly.
e.g
set_include_path(implode(PATH_SEPARATOR, array(
realpath(APPLICATION_PATH . '/../library'),
get_include_path(),
)));

Zend framework deployment

Hello
I wanted to upload my web project done with zend framework on my ftp server.
I have uploaded it to the public_html/projects/myproject directory (I uploaded whole folder structure, directories: application, docs, library, Obsolete, public, scripts, tests, Zend).
Now if I type www.mydomain.com/projects/myproject I see all these folders.
If I want to run project I have to type www.mydomain.com/projects/myproject/public
I am not really surprised with that because it's exactly what I could expect, but I don't know how to make all folders other than public inaccessible and I would like to run my project after www.mydomain.com/projects/myproject...
What should I do to achieve this goal?
Greetings!
You will have to put htaccess files in the root, projects and myproject directories to disallow access. I don't know it by hand but it should be
deny all
Then in your apache config, might be a file named sites-enabled, there you should only need to add the directory config to the default host, e.g.:
<virtualhost foobar:80>
some crap here
some more crap
<Directory /projects/myproject/public>
Options -Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</virtualhost>
That should make your site work.
Remember to add the following to your project's htaccess file:
RewriteBase /projects/myproject
Hope that helps.