I have installed zend server on my local system.I created one project folder using this command line argument
zf create project quickstart
The project folder is created on C:\Program Files\Zend.
How i can run the project in browser.
http://localhost/zend/
I suggest not to use a subfolder or you'll have problems with URLs. Create a virtual host on you local apache ! it's by far the best solution !
look here
http://akrabat.com/zend-framework-tutorial/
download the PDF, at the end of page 3 there is the guide to configure the virtualhost
Briefly,
add this to apache conf file
<VirtualHost *:80>
ServerName zf-tutorial.localhost
DocumentRoot /var/www/html/zf-tutorial/public
<Directory "/var/www/html/zf-tutorial/public">
AllowOverride All
</Directory>
</VirtualHost>
where
/var/www/html/zf-tutorial/public
is the path to the index.php (inside public folder of the zend project)
If you are using windows, use c:/www/etc...
then edit hosts file (linux: /etc/hosts)
and add the line
127.1.0.1 zf-tutorial
restart apache and point the browser to
http://zf-tutorial
if you create a simple zend framework with zend studio (it creates all necessary files).
put it in your server folder (htdocs) und run it with localhost/project/public/index.php
You don't need the zend server to build/run zend Projects.
Just Download mix or max Zend Framework package and you can start.
Related
So i have downloaded Softaculous (ampps), and from their dashboard I installed the symfony framework, and it created a symfony3 folder with all of the files in the www directory (with an index.php file in the root directory of symfony that only prints a welcome message).
When I access it through http://localhost/symfony3/ it shows the index.php (if i remove the index.php it just shows the tree of the symfony3 directory)
Is it possible to set my localhost to launch the app? If I run php bin/console server:start it launches my app on localhost with port 8000. Is it possible to set up Ampps to launch my app when it is accessed through localhost/symfony3/ ? Thanks in advance!
EDIT: So turns out I could do this just by editing the httpd70.conf file (ampps>conf>httpd70.conf)
find the <VirtualHost 127.0.0.1:80> block and change the <Directory "{$path}/www"> to the web folder in your app (in my case it was <Directory "{$path}/www/symfony3/web"> and do the same thing for DocumentRoot "{$path}/www" in the same block. Restart your Apache. You should now see your app when you just go to http://localhost/ (http://localhost/app_dev.php/)
If I understood your question, you need to set up you web server with correct configuration file and to change permissions for Symfony project.
It might be helpful (documentation for Symfony 2.8.*):
Web server configuration.
Symfony project file permissions.
Recently I have installed laravel 5.2 but my home page is not showing at 'localhost' address. It is showing at 'localhost/public' address. I have installed the all files in htdocs folder.Why this 'Public' thing showing up?
Assuming you installed xampp in the default location, a httpd.conf file should be available here:
C:\xampp\apache\conf\httpd.conf
Look for 2 adjacent lines:
DocumentRoot "C:/xampp/htdocs"
<Directory "C:/xampp/htdocs">
And change them to point to laravel's public folder:
DocumentRoot "C:/xampp/htdocs/public"
<Directory "C:/xampp/htdocs/public">
I find this tutorial helpful.
https://www.youtube.com/watch?v=ybJYyU5FPv4
Just set up a vhost for your page with the right Document Root like mentioned above. But you dont need to handle Laravel Projects like a default web project. Use php artisan serve via console inside your project folder and the page will run at localhost:8000 default.
I deployed an application on Heroku and I used a folder to place all my files inside thus now my application is only accesible from:
http://myapp.heroku.com/app/
Is it possible to create a virtual root to point
http://myapp.heroku.com -> http://myapp.heroku.com/app/ ?
Something similar to Apache VirtualHost?:
<VirtualHost 10.1.2.3>
ServerAdmin webmaster#host.foo.com
DocumentRoot /www/docs/host.foo.com
ServerName host.foo.com
ErrorLog logs/host.foo.com-error_log
TransferLog logs/host.foo.com-access_log
</VirtualHost>
Thanks in advance.
Yes you can configure the apache as well, however, this needs some changes on your system.
I've compiled a blog post recently that shows this (as the last part), it also shows how you can compile your own PHP extensions for heroku:
PHP on Heroku, again (by hakre; 20 May 2012)
It basically works by extending the standard configuration with your additional settings in another file. Look for the Configure the Webroot section, that's where it starts:
Now comes the next tricky part that is specifying the webroot. Specifying the webroot needs a little bit more work and background information. The CVBacklogs applications webroot in the git-tree is src/app/public. For Heroku, by default, the webroot is the root of the git-tree. That directory is internally mapped to /app/www btw. So what this needs is to create a so called Procfile that starts a sh-script each time the Heroku app web-node starts. That script then modifies the Apache configuration and includes your own config which is setting the webroot to /app/www/src/app/public. So we create the procfile, a config directory, the script and the Apache configuration. Ready?
You can't do anything with Apache / Nginx configuration on Heroku - these are all beyond your control. You could do some kind of php based redirect in the root folder to the /app folder or alternatively rejig the repo so app is the top level.
I have just started using the Zend-Framework. On advice of a friend I use NetBeans for PHP development with Zend. I have installed NetBeans and referenced the Zend-Framework under Tools>Options>PHP>Zend, registered it since I am using a version newer then 1.10.
Under PHP>General I have inluded the Zend-library path as a Global-Include-Path.
Since I've read that the beginners tutorial provided on the website (http://framework.zend.com/manual/en/learning.quickstart.create-project.html) has some errors and since it does not use NetBeans I started with this video tutorial: http://netbeans.org/kb/docs/php/zend-framework-screencast.html
Creating the project as a Zend-Framework Project worked just fine, all default folders and files are created. However, when I run the project with this defauilt setup the browser should diplay the index.php provided by the Framework under localhost/quickstart, instead of that it just displays a listing of the files of directories:
Index of /quickstart
Parent Directory
.zfproject.xml
application/
docs/
library/
nbproject/
public/
tests/
I suppose there is something wrong with the configuration of the apache server but the video screencast did not mention any needed configuration when using netbeans.
I am using xampp and one of the things that might be the problem is the httpd.conf file as described in the tutorial (http://framework.zend.com/manual/en/learning.quickstart.create-project.html) since no NameVirtualHost-propperty is defined there and no VirtualHost configured. However I didn't want to change the httpd.conf without knowing if that is the problem.
Also adding a line "127.0.0.1 quickstart.local" to the hosts file turned out to be impossible under Windows 7, so in case this is actually neccesary, I would apreciate any help.
Thanks,
Lukas
Have you set the DocumentRoot in the apache httpd-vhost.conf to the public folder?
All you should need to do is add public to the end of your current document root...
Also to change the vhosts file in windows 7 you need to find notepad in the start menu -> all programs -> accessories
Right click and run as Administrator
File -> open -> C:\Windows\System32\drivers\etc\hosts
Now add your records and save.
Opening as Administrator allows the save to attually save the changes.
Ironically, I just went through all of this yesterday. First, what happens when you type: localhost/quickstart/public, into your browser instead of: localhost/quickstart ? The controller is accessed via the index action and .htaccess file inside that directory.
Second, in regards to editing the hosts file... I have windows 7 as well, and all i did to find it was type "system32" in the Search Programs and files, then follow the path to the hosts file. I was able to edit it using notepad and it worked great!
there are two steps to configuring the vhost after that. You will need to uncomment a line in the httpd.conf file under the apache folder, remove the # from httpd.conf:
#Include conf/extra/httpd-vhosts.conf
Then go to the extras folder and add the following to the bottom of your httpd-vhosts.conf file like so:
<VirtualHost *:80>
ServerAdmin webmaster#dummy-host.localhost
DocumentRoot "C:/path_to_local_webroot/quickstart.com/public"
ServerName quickstart.com
ServerAlias quickstart.com
ErrorLog "logs/quickstart.com-error.log"
CustomLog "logs/quickstart.com-access.log" common
</VirtualHost>
For your hosts file, just add one line to the bottom:
127.0.0.1 quickstart.com
Then restart your server and you should be good to go.
(mind you: I'm a complete noob regarding zend framework. I've been using CodeIgniter and Zend Studio for quite some time now but felt the need to "expand", so to say.)
Using the Studios built in ZF generator I made myself a fresh ZF 1.11 install on my localhost. However, when I tried to access my newly made index page, I cannot see a thing. I fear that Studio has not installed the proper files for my Framework appilcation, seeing that the require_once 'Zend/Application.php'; line requires it to load a non-existing file.
Could anyone give a hand perhaps?
Thanks!
Zend library path is not correctly configured in php.ini file.
Configure the above stated file and also put the zf.bat or zf.sh according to your working platform in the path directory of the system.
Then, configure your httpd.conf file and configure the virtual host as follows (On linux Platform).
<Directory "/var/www/html">
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
<VirtualHost *:80>
ServerAdmin root#server.om.com
DocumentRoot /var/www/html
ServerName www.om.com
<Directory "/var/www/html">
AllowOverride All
</Directory>
</VirtualHost>
Along with that
mod_rewrite should be enabled in your httpd.conf file of Apache.
Can you give some more details about your installation. I use Zend all day but I dont use Zend Studio zf generator, so I dont know how it has set you up.
What OS are you running and whats your apache server setup? (Zend Community Server, wamp, mamp)
Have you setup added your domain name to the host file? 127.0.0.1 dev.mydomain
Is your VHOST pointing to the public directory?
Do you have an .htaccess file inside your public folder.
I am thinking at the very least if it is set up correctly you should see the blue and green Zend Framework output in your Index Controller view Script.
Make sure that the paths are correct in /public/index.php.
Its quite possible your zend library is not in /library and thus you must ajust your paths accordingly.
Download ZF from its website and copy the folder "Zend" inside your application library folder and then check again . Also open index.php inside your public folder and paste this code on top
defined('APPLICATION_ENV')
|| define('APPLICATION_ENV', (getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') : 'development'));