Seite 1 von 2
Redirect
Verfasst: Fr 30. Apr 2010, 06:03
von ilias
I have a problem,
i send my dns records of my server to a domain that hosting to another server.
But when it click the domain contenido types a problem:
Parse error: syntax error, unexpected T_OBJECT_OPERATOR in /var/www/web46/html/contenido-neu/cms/front_content.php on line 204
The client name is psb and i change the name also in administration->client.
What i did wrong???
Best Regards
Ilias
Re: Redirect
Verfasst: Fr 30. Apr 2010, 06:48
von thepoet
Could it be that the new server is running an old PHP version (i.e. PHP 4.x) which doesn't support chaining method calls?
The offending line is (unless something was changed from the standard)
Code: Alles auswählen
Contenido_Url::getInstance()->getUrlBuilder()->setHttpBasePath($cfgClient[$client]['htmlpath']['frontend']);
and won't run in PHP4.
Re: Redirect
Verfasst: Fr 30. Apr 2010, 09:45
von ilias
Thanks for your quick reply, but i have php 5.2.
Propably something else is the problem.
Re: Redirect
Verfasst: Fr 30. Apr 2010, 12:10
von Oldperl
Hi ilias
you may check the following points
- Are there folders contenido/classes/Url and contenido/classes/UrlBuilder with some php classfiles in your web?
- Are there the following entries at the end of contenido/includes/startup.php?
Code: Alles auswählen
// Initialize UrlBuilder, configuration is set in /contenido/includes/config.misc.php
cInclude('classes', 'Url/Contenido_Url.class.php');
cInclude('classes', 'UrlBuilder/Contenido_UrlBuilderConfig.class.php');
Contenido_UrlBuilderConfig::setConfig($cfg['url_builder']);
- Are there any other errors in contenido logs?
regards Ortwin
Re: Redirect
Verfasst: Sa 1. Mai 2010, 14:24
von ilias
dear oldperl
i check everything that you said:
1-step : i have the folders
2-step: The entries at the end of contenido/includes/startup.php existe
3-step: no error logs
Anything else for help???
Thanks everybody for answering in my problem
Best Regards
ilias
Re: Redirect
Verfasst: Sa 1. Mai 2010, 15:04
von Oldperl
Hello ilias,
ok, let's try if the class exists. Try the following, change the code in front_content.php near line 200 like this
Code: Alles auswählen
print "Class ".(class_exists(Contenido_Url))?"exists":"does not exist";
// update urlbuilder set http base path
Contenido_Url::getInstance()->getUrlBuilder()->setHttpBasePath($cfgClient[$client]['htmlpath']['frontend']);
Now call the front_content.php in your browser and check what is printed out.
regards Ortwin
Re: Redirect
Verfasst: Di 4. Mai 2010, 06:42
von ilias
Dear Oldperl
i put the code as you told me (show it below)
Code: Alles auswählen
// Initialize client
if (!isset($client)) {
//load_client defined in frontend/config.php
$client = $load_client;
}
print "Class ".(class_exists(Contenido_Url))?"exists":"does not exist";
// update urlbuilder set http base path
Contenido_Url::getInstance()->getUrlBuilder()->setHttpBasePath($cfgClient[$client]['htmlpath']['frontend']);
// Initialize language
if (!isset($lang)) {
But it show the below error:
Parse error: syntax error, unexpected T_OBJECT_OPERATOR in /var/www/web46/html/contenido-neu/psb/front_content.php on line 203
For your information the directory that exists the client is /psb
Re: Redirect
Verfasst: Di 4. Mai 2010, 08:40
von thepoet
Please modify the code like the following:
Code: Alles auswählen
// Initialize client
if (!isset($client)) {
//load_client defined in frontend/config.php
$client = $load_client;
}
// update urlbuilder set http base path
$inst = Contenido_Url::getInstance();
$builder = $inst->getUrlBuilder();
$builder->setHttpBasePath($cfgClient[$client]['htmlpath']['frontend']);
// Initialize language
if (!isset($lang)) {
and if the error persists, this should show which of the method calls exactly triggers the error. Though I'm still rather convinced that, from the error message you get, your php version is 4.x. Could it be that you're running different versions as php-cli (command line) interpreter and in your webserver?
Re: Redirect
Verfasst: Di 4. Mai 2010, 09:02
von ilias
dear thepoet
i made the changes and now it shows:
Parse error: syntax error, unexpected '/' in /var/www/web46/html/contenido-neu/psb/front_content.php on line 195
that means //initialize client
can it solve??
Re: Redirect
Verfasst: Di 4. Mai 2010, 09:28
von thepoet
Looks like an error (maybe a new one introduced when changing the file) in a line before 195. Check if the code line above it is missing the closing semicolon.
Re: Redirect
Verfasst: Di 4. Mai 2010, 10:31
von ilias
Ok my friends,
in attach file you'll see all the code of the front_content.
May be you;ll see somtehing that i cannot find.
Re: Redirect
Verfasst: Di 4. Mai 2010, 10:41
von Dodger77
is the problematic line. The following would be better:
Re: Redirect
Verfasst: Di 4. Mai 2010, 11:02
von ilias
Yes, you are right
but now it has new mistake in:
Parse error: syntax error, unexpected T_OBJECT_OPERATOR in /var/www/web46/html/contenido-neu/psb/front_content.php on line 297
that means
Code: Alles auswählen
// error page
$aParams = array (
'client' => $client, 'idcat' => $errsite_idcat[$client], 'idart' => $errsite_idart[$client],
'lang' => $lang, 'error'=> '1'
);
$errsite = 'Location: ' . Contenido_Url::getInstance()->buildRedirect($aParams);
and special
Code: Alles auswählen
$errsite = 'Location: ' . Contenido_Url::getInstance()->buildRedirect($aParams);
Thanks in advance and for your quick reply to solve my problem
Best Regards
Ilias
Re: Redirect
Verfasst: Mi 5. Mai 2010, 09:23
von ImmoF
Ich beschaeftige mich zur Zeit mit dieser Installation, insofern will ich mich mal mit meiner Muttersprache zu Wort melden, vielleicht schaffen wir dann irgendwie eine Loesung. Ich stehe vor einem voelligen Raetsel.
Das Contenido wurde urspruenglich auf domain.de installiert. Dann wurden Mandanten eingerichtet und weitere Domains auf das Verzeichnis gelegt. Ein Mandant liegt im Ordner /psb/
Der Aufruf bringt keinen Fehler:
domain.de/psb/
Nehme ich jedoch die 2. Domain
domain2.de
kommt der Fehler
Code: Alles auswählen
Parse error: syntax error, unexpected T_OBJECT_OPERATOR in /var/www/web46/html/contenido-neu/psb/front_content.php on line 203
Die Domain domain2.de liegt auf dem Mandantenverzeichnis und es wird sauber auf die front_content.php weitergeleitet.
Der Server nutzt PHP5.
Ich wuerde einen Fehler im Code ausschliessen, da ja der 1. Abruf fehlerlos arbeitet. Offenbar kann die neue Domain nicht verarbeitet werden. con_code und con_inuse wurden bereits geleert. Die Mandanteneinstellungen sind angepasst.
Je oefter ich drueber nachdenke, um so mehr denke ich, dass es die griechische Sprache des Mandanten sein koennte (anderer Zeichensatz). Aber dann muesste bei beiden Domains der Fehler auftreten, oder?
Re: Redirect
Verfasst: Mi 5. Mai 2010, 09:39
von Dodger77
Da es sich um zwei verschiedene Domains handelt, können auch unterschiedliche PHP-Versionen im Einsatz sein. Vielleicht kann das mal überprüft werden, indem im Mandantenverzeichnis eine Datei "config.local.php" abgelegt wird mit folgendem Inhalt: