Problem dotyczy skryptu katalogu, który prawidłowo działa pod php4, a pod php5, przy wysyłaniu danych z
ormularzy (rejestracja, logowanie) pojawia się jako wynik pusta strona, chociaż
ane zapisują się do bazy. Działa natomiast prawidłowo wysyłanie z formularza wys
ukiwarki.
Skrypt zainstalowałem na ekofirmy.pl na serwerze iq.pl. W BOK twierdzą, że mają standardowe ustawienia serwera i prawdopodobnie skrypt jest niezgodny z php5, a na forum użytkowników skryptu jest inf. że powinien pracować pod php5.
to jest kod z pliku login (nie działa)
CODE
<?php
define('PMD_SECTION','members');
include ('../defaults.php');
$incomingline = $lang['my_account'];
if($_GET['message'] == 'EMAILNOTVALID') {
$response['message'] = $lang['email_confirmation_error'];
$response['type'] = 'error';
} elseif($_GET['message'] != '') {
$message = urldecode($_GET['message']);
$response['message'] = $message;
$response['type'] = 'error';
}
$template_content = & new PMDTemplate(PMDROOT.TEMPLATE_PATH.'/user_login.tpl');
if(sizeof($response) > 0) {
$template_response = & new PMDTemplate(PMDROOT.TEMPLATE_PATH.'/blocks/response.tpl');
$template_response->set('response',$response);
}
$template_content->set('template_response',$template_response);
$template_content->set('lang',$lang);
$template_content->set('message',$message);
$template_content->set('error',$error);
include(PMDROOT.'/includes/template_setup.php');
?>
define('PMD_SECTION','members');
include ('../defaults.php');
$incomingline = $lang['my_account'];
if($_GET['message'] == 'EMAILNOTVALID') {
$response['message'] = $lang['email_confirmation_error'];
$response['type'] = 'error';
} elseif($_GET['message'] != '') {
$message = urldecode($_GET['message']);
$response['message'] = $message;
$response['type'] = 'error';
}
$template_content = & new PMDTemplate(PMDROOT.TEMPLATE_PATH.'/user_login.tpl');
if(sizeof($response) > 0) {
$template_response = & new PMDTemplate(PMDROOT.TEMPLATE_PATH.'/blocks/response.tpl');
$template_response->set('response',$response);
}
$template_content->set('template_response',$template_response);
$template_content->set('lang',$lang);
$template_content->set('message',$message);
$template_content->set('error',$error);
include(PMDROOT.'/includes/template_setup.php');
?>
a to plik search (działa)
CODE
<?php
include ( "./defaults.php" );
$incomingline = $lang['advanced_search'];
$config['search_display_all'] = 'NO';
$categories = $db->GetAll("SELECT id, title, level FROM ".T_CATEGORY." WHERE level>=1 ORDER BY left_");
if(count($categories) > 0) {
foreach($categories as $key=>$category) {
for ($i=1;$i<$category['level'];$i++) {
$categories[$key]['title'] = ' '.$categories[$key]['title'];
}
}
}
$locations = $db->GetAll("SELECT id, title, level FROM ".T_LOCATIONS." WHERE level>=1 ORDER BY left_");
if(count($locations) > 0) {
foreach($locations as $key=>$location) {
for ($i=1;$i<$location['level'];$i++) {
$locations[$key]['title'] = ' '.$locations[$key]['title'];
}
}
}
$template_content = & new PMDTemplate(PMDROOT .'/template/' . $config['template'] . '/search.tpl');
$template_content->set('lang',$lang);
$template_content->set('categories',$categories);
$template_content->set('locations',$locations);
include(PMDROOT.'/includes/template_setup.php');
?>
include ( "./defaults.php" );
$incomingline = $lang['advanced_search'];
$config['search_display_all'] = 'NO';
$categories = $db->GetAll("SELECT id, title, level FROM ".T_CATEGORY." WHERE level>=1 ORDER BY left_");
if(count($categories) > 0) {
foreach($categories as $key=>$category) {
for ($i=1;$i<$category['level'];$i++) {
$categories[$key]['title'] = ' '.$categories[$key]['title'];
}
}
}
$locations = $db->GetAll("SELECT id, title, level FROM ".T_LOCATIONS." WHERE level>=1 ORDER BY left_");
if(count($locations) > 0) {
foreach($locations as $key=>$location) {
for ($i=1;$i<$location['level'];$i++) {
$locations[$key]['title'] = ' '.$locations[$key]['title'];
}
}
}
$template_content = & new PMDTemplate(PMDROOT .'/template/' . $config['template'] . '/search.tpl');
$template_content->set('lang',$lang);
$template_content->set('categories',$categories);
$template_content->set('locations',$locations);
include(PMDROOT.'/includes/template_setup.php');
?>