PDA

Zobacz pełną wersję : dziwny błłąd



Bunio
27-12-2009, 01:49
Joomla 1.0.15 zamiast tresci na stronie glownej zaczela wyrzucac nastepujacy blad:


Warning: Parameter 2 to frontpage() expected to be a reference, value given in /home/zagubien/public_html/includes/Cache/Lite/Function.php on line 100Natomiast na podstonach:


Warning: Parameter 1 to HTML_content::show() expected to be a reference, value given in /home/zagubien/public_html/includes/Cache/Lite/Function.php on line 92Czym to moze byc spowodowane?
Z gory dzieki.

zwiastun
27-12-2009, 02:12
Wołaj @Jolaass na ratunek, na mój nos wynika to ze zmiany na serwerze, zapewne masz PHP 5.3

Bunio
27-12-2009, 02:20
i jak moge temu zaradzic? da sie to jakos zmienic?

nikszal
27-12-2009, 13:31
Dopisz linijkę kodu w pliku .htaccess:

AddHandler application/x-httpd-php5 .php

Bunio
27-12-2009, 14:00
po dodaniu tej linijki wyskakuje blad Internal Server Error i w ogole nie mozna wejsc na strone. Moze dodalem w zle miejsce w tym pliku?

P.S.
Przywrocenie starego pliku nic nie dalo - nadal jest Internal Server Error.

nikszal
27-12-2009, 14:18
To pytaj administratora serwera jakie zmiany ostatnio wprowadził.

Bunio
27-12-2009, 15:45
dlaczego po usunieciu tej linijki kodu strona nadal wywala blad Internal Server Error? Czy nie powinno byc tak jak wczesniej?

nikszal
27-12-2009, 15:51
A przypadkiem nie nastawiałeś w .htaccess zbędnych 'enterków'? Wgraj oryginalny htaccess.txt i zmień nazwę na .htaccess.

Bunio
27-12-2009, 18:04
Wgranie oryginalnego pliku .htaccess z paczki instalacyjnej pomogło.

Bunio
27-12-2009, 18:14
Oto raport z Pomocnika:
Wiadomość diagnostyczna
Joomla! Wersja: Joomla! + Admin Language 1.0.15 stable [ Daytime ] 22 lutego 2008 23:00 UTC
configuration.php: RG_EMULATION: Włączone
Architektura/Platforma: Linux 2.6.18-92.1.13.el5PAE ( i686) | Strona Serwer: Apache ( zagubieni.pl ) | PHP Wersja: 5.3.1
PHP Wymagania: register_globals: Wyłączone | magic_quotes_gpc: Włączone | safe_mode: Włączone | MySQL Obsługa: Tak | XML Obsługa: Tak | zlib Obsługa: Tak
mbstring Obsługa (1.5): Tak | iconv Obsługa (1.5): Tak | save.session_path: [color=red]Niezapisywalny[color] | Max.Execution Time: 30 sekund | File Uploads: Włączone
MySQL Wersja: 5.1.40-log ( Localhost via UNIX socket )

Informacje rozszerzone:
SEF: Włączone | FTP Layer: Niedostępne | htaccess: Zaimplementowano
PHP/suExec: Użytkownicy ftp i php nie są identyczni (prawdopodobnie nie zainstalowano PHP/suExec)
PHP Środowisko: API: cgi-fcgi | MySQLi: Tak | Max. Memory: 128M | Max. Upload Size: 4M | Max. Post Size: 8M | Max. Input Time: 60 | Zend Wersja: 2.3.0
Wyłączone Funkcje: popen,ini_alter,leak,listen,chgrp,dl,system,shell_ exec,proc_terminate,proc_open,proc_close,proc_nice ,proc_getstatus,passthru,exec,escapeshellcmd,ini_r estore,show_source
MySQL Klient: 5.1.40 ( latin1 )

Bunio
28-12-2009, 16:45
admin odpisal, ze zmiana wersji na mniejsza niz 5.3 nie jest mozliwa. czy da sie to jakos obejsc?

nikszal
28-12-2009, 16:47
Tak! Zmień Joomla na nowsze!

Bunio
28-12-2009, 17:41
takie rozwiazanie kosztuje 400zł, nie ma nic tanszego?:)

zwiastun
28-12-2009, 17:57
400 zł to niedużo za migrację witryny. Ale jeśli zrobisz ją sam, to zaoszczędzisz i tych parę groszy :)

Bunio
28-12-2009, 18:00
niestety, dla mnie 400zł to mimo wszystko duzo, dlatego ponawiam prosbe o jakies inne rozwiazanie.

Jola
29-12-2009, 01:56
W tym przypadku problemem było odmienne traktowanie funkcji func_get_args() przez PHP 5.3.
Pomogło przerobienie funkcji call() w pliku includes/Cache/Lite/Function.php
Podkreślam, że zmiana dotyczy wersji Joomla 1.0.15.
Orginalny kod funkcji:

function call()
{
$arguments = func_get_args();
$id = serialize($arguments); // Generate a cache id
if (!$this->_fileNameProtection) {
$id = md5($id);
// if fileNameProtection is set to false, then the id has to be hashed
// because it's a very bad file name in most cases
}

$data = $this->get($id, $this->_defaultGroup);
if ($data !== false) {
$array = unserialize($data);
$output = $array['output'];
$result = $array['result'];
} else {
ob_start();
ob_implicit_flush(false);
$target = array_shift($arguments);
if (strstr($target, '::')) { // classname::staticMethod
list($class, $method) = explode('::', $target);
$result = call_user_func_array(array($class, $method), $arguments);
} else if (strstr($target, '->')) { // object->method
// use a stupid name ($objet_123456789 because) of problems when the object
// name is the same as this var name
list($object_123456789, $method) = explode('->', $target);
global $$object_123456789;
$result = call_user_func_array(array($$object_123456789, $method), $arguments);
} else { // function
$result = call_user_func_array($target, $arguments);
}
$output = ob_get_contents();
ob_end_clean();
$array['output'] = $output;
$array['result'] = $result;
$this->save(serialize($array), $id, $this->_defaultGroup);
}
echo($output);
return $result;
}po zmianie:

function call()
{
$arguments = func_get_args();
/////dodane
$temp = func_get_args();
array_shift( $temp );
$arguments1 = array();
foreach ($temp as $k => $v) {
$arguments1[] = &$temp[$k];
}
///////koniec dodane

$id = serialize($arguments); // Generate a cache id
if (!$this->_fileNameProtection) {
$id = md5($id);
// if fileNameProtection is set to false, then the id has to be hashed
// because it's a very bad file name in most cases
}
$data = $this->get($id, $this->_defaultGroup);
if ($data !== false) {
$array = unserialize($data);
$output = $array['output'];
$result = $array['result'];
} else {
ob_start();
ob_implicit_flush(false);
$target = array_shift($arguments);
if (strstr($target, '::')) { // classname::staticMethod
list($class, $method) = explode('::', $target);
$result = call_user_func_array(array($class, $method), $arguments1);//zmienione
} else if (strstr($target, '->')) { // object->method
// use a stupid name ($objet_123456789 because) of problems when the object
// name is the same as this var name
list($object_123456789, $method) = explode('->', $target);
global $$object_123456789;
$result = call_user_func_array(array($$object_123456789, $method), $arguments1);//zmienione
} else { // function
$result = call_user_func_array($target, $arguments1);//zmienione
}
$output = ob_get_contents();
ob_end_clean();
$array['output'] = $output;
$array['result'] = $result;
$this->save(serialize($array), $id, $this->_defaultGroup);
}
echo($output);
return $result;
}