Zend Quickstart guestbook app and Apache

For programming and general questions on Zend Framework

Zend Quickstart guestbook app and Apache

Postby zendles on Thu Dec 03, 2009 11:50 am

First of all guys/gals, I'm a newbie to web development.
Managed to get php, mysql, apache (on win xp) up and running and created my dynamic web site. Then I got a ray of light telling me to explore zend and here I am.
managed to install zendF from the read me and then created my database using pdo sqlite, after fiddling around for sometime.
the problem I have now is with the virtual host thing and I am not able to specify the DocumentRoot as another folder other than my htdocs - which it has always been. Tried changing it to where ZF+guest app resides and still doesnt work (including phpmyadmin, which was working before the change).
I then copied the whole zendFQuickstart folder with guestbook app into htdocs and was able to see the first page of the app(index page). When I click on the guestbook link i get the message as below
An Error has Occurred
Application Error.

The readme.txt tells me to do the following which I have not done because of the DocumentRoot problem I described aboveHelp me please.
<VirtualHost *:80>
ServerAdmin x@zend.com
DocumentRoot <PATH_TO_QUICKSTART>/public
ServerName quickstart

<Directory <PATH_TO_QUICKSTART>/public>
DirectoryIndex index.php
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
zendles
 
Posts: 2
Joined: Thu Dec 03, 2009 11:31 am
Location: Perth

Re: Zend Quickstart guestbook app and Apache

Postby brunitto on Thu Dec 03, 2009 12:52 pm

Probably you're having problems with the Apache itself, not Zend Framework. Working with PHP and Zend also requires some knowledge about web servers, I suggest you to read:

http://httpd.apache.org/docs/2.2/

Start reading the Starting and Stopping or Restarting sections. After, try the VirtualHosts.

If you are completely newbie to Apache, search for some books about it.
Ookie dookie!
brunitto
 
Posts: 111
Joined: Fri May 29, 2009 10:10 pm
Location: São Paulo - Brazil

Re: Zend Quickstart guestbook app and Apache

Postby zendles on Fri Dec 04, 2009 2:44 am

Brunitto, I use apache monitor to start and stop apache. I do a restart after changing the virtual host setting.
zendles
 
Posts: 2
Joined: Thu Dec 03, 2009 11:31 am
Location: Perth

Re: Zend Quickstart guestbook app and Apache

Postby taddis on Tue Dec 08, 2009 8:57 am

Think something like this should work.

Code: Select all
# Don't forget to activate NameVirtualHost.
NameVirtualHost *:80

<VirtualHost *:80>
  ServerAdmin x@zend.com
  DocumentRoot "C:\xampp\htdocs\quickstart\public"

  ServerName quickstart

  <Directory "C:\xampp\htdocs\quickstart\public\">
    DirectoryIndex index.php
    # this line is important, If set to "None" the .htaccess file directives will be ignored.
    AllowOverride All
    Order allow,deny
    Allow from all
  </Directory>

  ErrorLog "C:\xampp\apache\logs\error-quickstart.log"
  LogLevel warn
  CustomLog "C:\xampp\apache\logs\access-quickstart.log" combined

</VirtualHost>

# add more...
# <VirtualHost *:80>
# ...
# ...
# </VirtualHost>


And then just add quickstart to your hosts file (C:\WINDOWS\System32\Drivers\etc\hosts):
127.0.0.1 quickstart

and be sure you have the included .htaccess file in quickstart/public (which have the rewrite rules). You could put them inside the apache virtual conf file as well.

Code: Select all
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]
taddis
 
Posts: 3
Joined: Fri Dec 04, 2009 11:45 am

Re: Zend Quickstart guestbook app and Apache

Postby file4086 on Wed Jul 26, 2017 10:55 am

I don't think there are any bugs with Zend but might be with the Apache framework. If you're completely new to this go read some books/online articles on it.
file4086
 
Posts: 1
Joined: Wed Feb 15, 2017 4:51 pm


Return to Zend Framework

Who is online

Users browsing this forum: No registered users and 2 guests

cron