1

i write a script and it works perfectly, on my local server.

I have uploaded it on my server and now I getting this Problem

Parse error: syntax error, unexpected '{' in /homepages/46/d319011794/htdocs/suche/public/index.php on line 18

an here is my index.php

<?php
error_reporting(E_ALL || E_STRICT);

define('APPLICATION_PATH', realpath(dirname(__FILE__)) . '/../application');

set_include_path(
 APPLICATION_PATH . '/../library'
 . PATH_SEPARATOR . '../application/models'
 . PATH_SEPARATOR . get_include_path()
);

require_once 'Zend/Loader.php';
Zend_Loader::registerAutoload();

new App_Connect();

try
{ //Line 18
 require '../application/bootstrap.php';
}
catch(Exception $exception)
{
 echo "<html><body>Fehler beim bootstraping";

 if(defined('APPLICATION_ENVIROMENT') && APPLICATION_EVIROMENT != 'production')
 {
  echo "<br><br>" . $exception->getMessage() . "<br>"
  . "<div align='left'>Stack Trace: "
  . "<pre> " . $exception->getTraceAsString() . "</pre></div>";
 }

 echo "</body></html>";
 exit(1);
}

Zend_Controller_Front::getInstance()->dispatch();

This is a Zend Project... so may be some one know what to do...

1 Answer 1

1

What version of PHP are you using on the server side? Perhaps it's a PHP 4.x installation, which does not support exceptions. This would seem like the most likely cause of the parse error.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.