I am using a hosting solution for my Zend Framework app, but cannot get it to load the application/bootstrap.php file.
When I ftp on to the server, my doc root is /webspace/httpdocs/euro.millionsresults.com
I placed the application, public, library etc. dirs in this directory.
I then created a .htaccess, as per http://akrabat.com/zend-framework/zend-framework-on-a-shared-host/
/webspace/httpdocs/euro.millionsresults.com/.htaccess
RewriteEngine On
RewriteRule .* index.php
This rewrites everything to my index.php file, which then includes the public/index.php file of the ZF, which is correct and works fine. The index.php file is:
/webspace/httpdocs/euro.millionsresults.com/index.php
<?php
include 'public/index.php';
If I put in an echo in the public/index.php file, it works fine, proving public/index.php is now called when you try to access the site.
The problem is, the public/index.php file needs to include the ../application/bootstrap.php file:
/webspace/httpdocs/euro.millionsresults.com/public/index.php
<?php
echo "this is working";
require('../application/bootstrap.php');
However, application/bootstrap.php does not get included.
If I put a die at the very top of application/bootstrap.php, nothing gets rendered.
I have tried the following for public/index.php:
require('../../../application/bootstrap.php'); require('/webspace/httpdocs/euro.millionsresults.com/application/bootstrap.php');
But nothing works in including application/bootstrap.php.
Does anyone know what to do here? It is a cheap host I am on, with no access to php.ini.
Additional Info:
The issue seems to be with the include_path. When I do get_include_path(), I have:
:/php/includes:/usr/share/pear:/usr/libexec/php4-cgi/share/pear:/opt/alt/php55/usr/share/pear:/opt/alt/php54/usr/share/pear:/opt/alt/php53/usr/share/pear
I can set_include_path(), but what do I set it to?
I have tried:
set_include_path('/webspace/httpdocs/euro.millionsresults.com/application' . PATH_SEPARATOR. get_include_path());
set_include_path('/../../../application' . PATH_SEPARATOR . get_include_path());
set_include_path('../application' . PATH_SEPARATOR . get_include_path());
None of which work, i.e. when I have the following in my public/index.php file, I always get "does not exist":
<?php
echo "In file public/index.php <br>";
set_include_path('/../../../application' . PATH_SEPARATOR . get_include_path());
echo get_include_path();
if (file_exists('/../application/bootstrap.php')){
echo "<br>exists";
}
else {
echo "<br>does not exist";
}
It doesn't matter what file I check existence of - any file in the application folder, or any folder not in public, is not found.