Author Topic: [SOLVED] Zend startup project  (Read 785 times)

0 Members and 1 Guest are viewing this topic.

Offline simpliTopic starter

  • Enthusiast
  • Posts: 164
    • View Profile
[SOLVED] Zend startup project
« on: May 25, 2009, 07:09:34 AM »
Hi,
I am trying to create a project with the ZF to get going. To begin with, what I do is very simple. I create a project through the zend command line then I try to connect to the resulting site. Sounds simple right?

My zend library is on /library/webserver/documents/zend (I'm on a mac)
I created a project called test at the same location. Consequently, the base folder for my application is /library/webserver/documents/test.

Now, I'm supposed to be able to point my webserver at that address and see a welcome page. When I go to http://localhost/test/public/ I get absolutely nothing. It's a blank and nothing comes up when I view source. I don't really know what I'm doing wrong at this point. Anyone has a clue what's happening and I can get unstuck?

Thanks,
JR


Offline thorpe

  • Administrator
  • 'Mind Boggling!'
  • *
  • Posts: 29,255
    • View Profile
Re: Zend startup project
« Reply #1 on: May 25, 2009, 07:13:39 AM »
Where is the apache servers document root?

Offline simpliTopic starter

  • Enthusiast
  • Posts: 164
    • View Profile
Re: Zend startup project
« Reply #2 on: May 25, 2009, 07:43:12 AM »
The apache document root is /library/webserver/documents/
JR

Offline simpliTopic starter

  • Enthusiast
  • Posts: 164
    • View Profile
Re: Zend startup project
« Reply #3 on: May 25, 2009, 07:53:29 AM »
Also if I replace the index.php file by an index.php with phpinfo(); in it it works fine so it seems to be the content of the current index file that's screwed up. What's funny is I didnt change anything in that file. It's the standard that is created when you create project with ZF.
The current content of the file is below
Code: [Select]
<?php

// Define path to application directory
defined('APPLICATION_PATH')
    || 
define('APPLICATION_PATH'realpath(dirname(__FILE__) . '/../application'));

// Define application environment
defined('APPLICATION_ENV')
    || 
define('APPLICATION_ENV', (getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') : 'production'));

// Ensure library/ is on include_path
set_include_path(implode(PATH_SEPARATOR, array(
    
realpath(APPLICATION_PATH '/../library'),
    
get_include_path(),
)));

/** Zend_Application */
require_once 'Zend/Application.php';  

// Create application, bootstrap, and run
$application = new Zend_Application(
    
APPLICATION_ENV
    
APPLICATION_PATH '/configs/application.ini'
);
$application->bootstrap()
            ->
run();
            
            
?>


Offline simpliTopic starter

  • Enthusiast
  • Posts: 164
    • View Profile
Re: Zend startup project
« Reply #4 on: May 25, 2009, 08:02:07 AM »
I solved this myself.
I wasn't referencing the zend library in my projects library.

All is good.
JR