[ Поиск ] - [ Пользователи ] - [ Календарь ]
Полная Версия: Настройки Apach или PHP незнаю где копать
andre13161
Привет всем.
Сразу предупреждаю что я плохо знаю русский, живу на Украине
Попрошу сразу не пенать, я только учусь
Итак к делу:

Имеется сервер на FreeBSD и
Apache/2.2.17 (FreeBSD) mod_ssl/2.2.17 OpenSSL/0.9.8e DAV/2 PHP/5.3.3 with Suhosin-Patch

есть PHP скрип но не могу разобраться что к чему

index.php
<?php
include_once ('./form.html');
include_once ('./config.php');
include_once ('./db.class.php');
include_once ('./forms.class.php');
include_once ('./func.class.php');
$MySQL = new MySQL();
$Form = new Form();
$Func = new Func();

if ($_POST['type'] == 'activate'){
echo $Func->ActivateCard();
}else{
echo $Form->ClientActivateCard();
}

?>


func.class.php
<?php

class
Func{

// Генерация номера карты
function GenerateNum(){
$random= "";
srand((double)microtime()*1000000);
# $char_list = "abcdefghijklmnopqrstuvwxyz";
$char_list = "1234567890";

for($i = 0; $i < 10; $i++) {
$random .= substr($char_list,(rand()%(strlen($char_list))), 1);
}
return $random;
}

// Генеация PIN-кода
function GeneratePin(){
$random= "";
srand((double)microtime()*1000000);
$char_list = "ABCDEFGH";
$char_list .= "1234567890";

for($i = 0; $i < 12; $i++) {
$random .= substr($char_list,(rand()%(strlen($char_list))), 1);
}
return $random;
}

//Активация карты
function ActivateCard(){
global $config;
$str = array(" ", "%", "_", "$", "-", ".", ";");

$number = intval(substr($_POST['num'],0,10));
$pin = str_replace($str, "", $_POST['pin']);
$pin = mysql_real_escape_string($pin);
$pin = strtoupper($pin);
$login = mysql_real_escape_string($_POST['login']);
$password = mysql_real_escape_string($_POST['password']);

$MySQL = new MySQL();

// Получаем сумму карты
$result = $MySQL->Query("SELECT id, sum FROM silver_cards WHERE number='".$number."' AND pin='".$pin."' AND activate='0000-00-00 00:00:00'");
$row = mysql_fetch_assoc($result);
$sum = $row['sum'];
$cid = $row['id'];
unset($result);

// Получаем uid, сумму депозита, id в биллинге и проверяем совпадение всех параметров
$result = $MySQL->Query("SELECT u.uid, b.deposit, b.id FROM bills as b INNER JOIN users as u WHERE u.id='".$login."' AND u.bill_id=b.id AND u.password=ENCODE('".$password."', 'test12345678901234567890')");
$row = mysql_fetch_assoc($result);
$uid = $row['uid'];
$deposit = $row['deposit'];
$bid = $row['id'];
unset($result);

// Если сумма и uid присутствуют, то заносим платеж
if ($sum && $uid){
$result = $MySQL->Query("INSERT INTO payments SET date='".date('Y-m-d H:i:s')."', sum='${sum}', dsc='".iconv('UTF-8','CP1251',"Пополнение карточкой #${cid}")."', ip='".ip2long($_SERVER['REMOTE_ADDR'])."', last_deposit='${deposit}', uid='${uid}', aid='19', method='2', bill_id='${bid}', inner_describe='Silver Ghost\'s card system'");
$result = $MySQL->Query("UPDATE bills SET deposit=deposit+${sum} WHERE uid=${uid} LIMIT 1");
$result = $MySQL->Query("UPDATE silver_cards SET activate='".date('Y-m-d H:i:s')."', uid='${uid}' WHERE number=${number} LIMIT 1");
$result = $MySQL->Query("UPDATE users SET disable='0' WHERE uid='${uid}' LIMIT 1");
header("Location: ".$config['page_success']);
} else {
$result = $MySQL->Query("SELECT uid FROM users WHERE id ='".$login."' LIMIT 1");
$row = mysql_fetch_assoc($result);
$uid = $row['uid'];
$result = $MySQL->Query("INSERT INTO silver_cards_logs SET cid='${number}', pin='${pin}', uid='${uid}'");
header("Location: ".$config['page_failed']);
}
}



// Создаем карточку
function CreateCard($id, $pin, $sum){
global $config;

if (!$config['listOfCards']) {
$file = "images/card-${sum}.png";

if (!file_exists($file)){
die("Error: Image file not exists!!!");
}
}


// Вносим базу номер, пин и сумму
$MySQL = new MySQL();
$MySQL->Query("INSERT INTO silver_cards SET number='${id}', pin='${pin}', sum='${sum}'");
$result = $MySQL->Query("SELECT id FROM silver_cards WHERE number='${id}' AND pin='${pin}' LIMIT 1");

while ($row = mysql_fetch_assoc($result)) {
$number = $row['id'];
}

if (!$config['listOfCards']) {
// Создаем картинку
$img = imagecreatefrompng($file);

$ColorID = imagecolorallocate($img, 0,0,0);
$ColorPIN = imagecolorallocate($img, 255,0,0);

imagestring($img, 10, 200, 600, "ID: ${id}", $ColorID);
imagestring($img, 10, 200, 620, "PIN: ${pin}", $ColorPIN);
imagestring($img, 10, 550, 40, "# ${number}", $ColorID);

// Выводим картинку
header("Content-Type: image/png");
imagepng($img);
} else {
return $number . " - ". $id . " - ". $pin . "<br />";
}
}



// Получаем статистику
function GetStat($id, $val){

$MySQL = new MySQL();

if ($id == 'limit'){

list($from, $to) = split(",", $val);
$from = (int) $from;
$to = (int) $to;

// Получаем статистику из базы
$result = $MySQL->Query("SELECT c.number, c.sum, c.activate, u.id, c.uid, u.uid from silver_cards as c INNER JOIN users as u WHERE u.uid=c.uid ORDER BY c.activate DESC, c.number LIMIT ${from},${to}");

$table = "<table border=0 style='font-size: 0.8em; font-family: verdana;'>
<tr>
<td width='200px'>Дата активации</td>
<td width='150px'>Логин</td>
<td width='150px'>Номер карты</td>
<td width='100px'>Сумма</td>
</tr>
"
;

// Выводим статистику
while ($row = mysql_fetch_assoc($result)) {
$table = $table . "<tr>
<td>${row['activate']}</td>
<td><a href='http://178.210.129.171:9443/admin/index.cgi?index=15&UID=${row['uid']}'>${row['id']}</a></td>
<td><a href='/cards/admin/?type=GetCardInfo&id=${row['number']}'>${row['number']}</a></td> ;
<td>${row['sum']}</td>
</tr>"
;
$flag = 1;
}

// Выводим строку навигации
$nextfrom=$to+1;
$nextto=$nextfrom+29;
$beforefrom=$from-30;
$beforeto=$from-1;

if( $from != 0 ) {
$beforelink = "<a href='/cards/admin/?type=GetStat&limit=${beforefrom},${beforeto}'><-Назад</a>";
}

# if( $to < count($row) ) {
$nextlink = "<a href='/cards/admin/?type=GetStat&limit=${nextfrom},${nextto}'>Далее-></a>";
# }

if ( !$flag ){
return "Активированных карт не обнаружено<br />${beforelink}";
}

$table = $table . "</table><br />$beforelink $nextlink<br /><br />";



}elseif ($id == 'cardnum') {
}


return $table;
}

// Количество не активированных карт
function NotActivated(){
$table = "<div style='font-size: 0.8em; font-family: verdana;'><strong>Количество не активированных карт:</strong><br /><table><tr><td width='100px' align='center' style='font-size: 0.8em'>Номинал</td><td align='center' style='font-size: 0.8em'>Количество</td></tr>";

$MySQL = new MySQL();

$result = $MySQL->Query("SELECT sum, count(sum) as csum FROM `silver_cards` WHERE `activate` LIKE '0000-00-00 00:00:00' GROUP BY sum");
while ($row = mysql_fetch_assoc($result)) {
$table = $table . "<tr><td align='center' style='font-size: 0.8em'>".$row['sum'] ."</td><td align='center' style='font-size: 0.8em'><a href=?type=GetNotActivatedBySum&sum=".$row['sum']." title='Показать' alt='Показать'>".$row['csum']."</a></td></tr>";
}

$table = $table . "</table></div>";

return $table;
}

// Информация по карте
function GetCardInfo($id){
$MySQL = new MySQL();

$result = $MySQL->Query("SELECT c.id, c.number, c.pin, c.sum, c.activate, u.id as user, c.uid, u.uid from silver_cards as c INNER JOIN users as u WHERE c.number = '${id}' AND c.uid=u.uid LIMIT 1");

while( $row = mysql_fetch_assoc($result) ) {

$return = $return . "ID карты - ".$row[number]."<br />";
$return = $return . "PIN карты - ".$row[pin]."<br />";
$return = $return . "Номинал карты - ".$row[sum]."<br />";
if ( $row['activate'] == "0000-00-00 00:00:00" ){
$return = $return . "<font color='darkgreen'>Карта не активирована</font><br />";
} else {
$return = $return . "<font color='red'>Дата активации - ".$row[activate]."</font><br />";
$return = $return . "<font color='red'>Кто активировал - <a href='http://178.210.129.171:9443/admin/index.cgi?index=15&UID=${row['uid']}'>".$row[user]."</a></font><br />";
}

}


$return = $return . "<strong>Ошибки активации карт:</strong><br />";

$result = $MySQL->Query("SELECT * FROM silver_cards_logs WHERE cid='${id}'");


while( $row = mysql_fetch_assoc($result) ){
$res = $MySQL->Query("SELECT id FROM users WHERE uid='".$row['uid']."'");
$r = mysql_fetch_assoc($res);
$return = $return . "Pin: ${row['pin']} - User ID: <a href='http://178.210.129.171:9443/admin/index.cgi?index=15&UID=${row['uid']}'>${r['id']}</a><br />";
}

return $return;
}


// Количество отключенных пользователей по тарифным планам
function GetDisabledByTP(){
$MySQL = new MySQL();

$result = $MySQL->Query("SELECT d.tp_id, tp.tp_id as tpid, count( d.tp_id ) as tp_count , tp.name
FROM dv_main AS d
INNER JOIN users AS u
INNER JOIN tarif_plans AS tp
WHERE u.disable =1
AND u.uid = d.uid
AND tp.id = d.tp_id
GROUP BY d.tp_id"
);

unset($return);

$return = "<div style='font-family:verdana;font-size:0.8em;'><strong>Количество отключенных пользователей:</strong><table>";

while( $row = mysql_fetch_assoc($result) ) {
$return = $return . "<tr><td style='font-family:verdana;font-size:0.8em;'><a href='http://178.210.129.171:9443/admin/index.cgi?index=111&TP_ID=${row['tpid']}'>".iconv('CP1251', 'UTF-8', $row[name])."</a> </td><td style='font-family:verdana;font-size:0.8em;'> <a href='http://178.210.129.171:9443/admin/index.cgi?index=115&TP_ID=${row['tpid']}'>".$row[tp_count]."</a></td></tr>";
}

$result = $MySQL->Query("SELECT COUNT( disable ) as disabled
FROM users
WHERE disable =1"
);

while( $row = mysql_fetch_assoc($result) ) {
$return = $return."<tr><td style='font-family:verdana;font-size:0.8em;'><strong>Итого</strong> </td><td style='font-family:verdana;font-size:0.8em;'> ".$row['disabled']."</td></tr>";
}

return $return."</table></div>";
}

function GetNotActivatedBySum(){
$MySQL = new MySQL();

$sum = (int)$_GET['sum'];

$return = "<h2>Список не активированных карт по $sum у.е.</h2><a href=?type=GetNotActivatedBySum&sum=$sum&withpins=true>Показать пин-коды</a><br /><br />";

$result = $MySQL->Query("SELECT id, number, pin FROM silver_cards WHERE activate='0000-00-00 00:00:00' AND sum='".$sum."'");

while ( $row = mysql_fetch_assoc($result) ) {
$return .= $row['id']." - ".$row['number'];
if ( $_GET['withpins'] ) $return .= " - ".$row['pin'];
$return .= "<br />";
}

return $return;
}

}


?>


forms.class.php
<?php

class
Form{

function AdminGenerateCards(){
global $config;
// Получаем список картинок
$Images = $this->DirList(dirname(__FILE__)."/images");


if(!$config['listOfCards']) {
// Создаем список номиналов
foreach($Images as $Image){
list($tmp, $sum) = explode("-", $Image);
list($sum)=split("\.",$sum);
if ($sum) {
$options .= "<option value='${sum}'>${sum} у.е.</option>";
}
}
}
else {
$par = explode(",", $config['parOfCards']);
foreach($par as $sum){
$options .= "<option value='${sum}'>${sum} у.е.</option>";
}
}


// Форма генерации карт
echo "
<div style='font-family:verdana; text-align: center; font-size: 0.8em;'>
Генерация карт предоплаты:<br /><br />
<table align='center'>
<form method='post' align='center' style='border: 1px solid;'>
<tr><td style='font-size: 0.8em;'>Количество карт</td><td><input name=num></td></tr>
<tr><td style='font-size: 0.8em;'>Номинал</td><td><select name='sum'>${options}</select></td></tr>
</table>
<input type=hidden name=type value=generate><br />
<input type=submit value='111'>
</form>
</div>"
;
}

// Редирект на страницу активации
function ClientActivateCard(){
global $config;
header('Location: '.$config['page_form']);
}

// Получение списка файлов в каталоге
function DirList ($directory)
{

$results = array();

$handler = opendir($directory);

while ($file = readdir($handler)) {
if ($file != '.' && $file != '..')
$results[] = $file;
}

closedir($handler);
return $results;
}

// Вывод меню
function GetMenu(){
return '
<div style="text-align:center;font-family:Arial;font-size:0.8em;">
<a href="?">Генерация карт</a> .:. <a href="?type=GetStat&limit=0,29">Статистика</a> .:. <a href="?type=GetNotActivated">Остатки карточек</a> .:. <a href="?type=GetInfoByTP">Отключенные пользователи</a>
<hr size="2">
</div>
'
;
}

// Вывод формы информации по карте
function GetCardInfo(){
return '
<div style="font-family: verdana; font-size:0.8em; text-align: center;">
Получить информацию по карте:<br />
<form method="post">
<input type="hidden" name="type" value="GetCardInfo">
<input type="text" name="id"><br />
<input type="submit" value="Получить инфо">
</form>
</div>
'
;
}

// Вывод концовки страницы
function GetFooter(){
return '<hr size=1>
<div style="text-align: center; font-size: 0.6em; font-family: Verdana;">"ABills cards" ver.0.2.1 © <a href="http://silverghost.org.ua">Silver Ghost</a></div>
'
;
}

}


?>


db.class.php
<?php
class
MySQL{
function Query($query){
global $config;
// Соединяемся с базой
$link = mysql_connect($config['db_host'], $config['db_user'], $config['db_passwd'])
or die("Could not connect: " . mysql_error());
mysql_select_db($config['db_name']);
// Отправляем запрос
$result = mysql_query($query) or die("Invalid query: " . mysql_error());
return $result;
}
}

?>


config.php
<?php
print '<meta http-equiv="content-type" content="text/html; charset=utf8>' ;
$config = array(
'db_host' => 'localhost',
'db_name' => 'qwerty',
'db_user' => 'qwerty',
'db_passwd' => '1q2w3e4r',

'page_success' => 'http://192.168.0.1/cards/activated.html',
'page_failed' => 'http://192.168.0.1/cards/failed.html',
'page' => 'http://192.168.0.1/cards',
'page_form' => 'http://192.168.0.1/cards/index.php',
'logo' => './logo.jpg',
'listOfCards' => 'FALSE',
'parOfCards' => '25,50,80,120,140',
);


?>


form.html
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<table
align="center">
<form
action="http://192.168.0.1/cards/" method="post" align="center">
<tbody>
<tr>
<td>
Имя пользователя (логин)</td>
<td><input
name="login" /></td>
</tr>
<tr>
<td>
Пароль</td>
<td><input
type="password" name="password" /></td>
</tr>
<tr>

<td>
Номер карты</td>
<td><input
name="num" /></td>
</tr>
<tr>
<td>
Пин-код карты</td>
<td><input
name="pin" /></td>
</tr>
<tr>
<td
align="center" colspan="2"><input type="hidden" name="type" value="activate"><input type="submit" value="111" /></td>
</tr>
</tbody>
</form>
</table>


.htaccess
DirectoryIndex index.php
AddDefaultCharset UTF-8

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^admin(.*) admin.php$1 [L]

<Files "admin.php">
Require valid-user
</Files>
Authname "Cards admin"
Authtype Basic
AuthUserFile "/usr/.htpasswd"



Проблема собственно даже незнаю в чом.
Просто даже Apache никаких ошибок непишет
GoogleChrom пишет "На этой странице обнаружена циклическая переадресация"
В логах

[Mon Jun 25 16:21:03 2012] [error] [client 192.168.0.2] PHP Notice: Undefined index: type in /usr/local/www/negativ/cards/index.php on line 11
[Mon Jun 25 16:21:03 2012] [error] [client 192.168.0.2] PHP Notice: Undefined index: type in /usr/local/www/negativ/cards/index.php on line 11
[Mon Jun 25 16:21:03 2012] [error] [client 192.168.0.2] PHP Notice: Undefined index: type in /usr/local/www/negativ/cards/index.php on line 11
[Mon Jun 25 16:21:03 2012] [error] [client 192.168.0.2] PHP Notice: Undefined index: type in /usr/local/www/negativ/cards/index.php on line 11
[Mon Jun 25 16:21:03 2012] [error] [client 192.168.0.2] PHP Notice: Undefined index: type in /usr/local/www/negativ/cards/index.php on line 11
[Mon Jun 25 16:21:03 2012] [error] [client 192.168.0.2] PHP Notice: Undefined index: type in /usr/local/www/negativ/cards/index.php on line 11
[Mon Jun 25 16:21:04 2012] [error] [client 192.168.0.2] PHP Notice: Undefined index: type in /usr/local/www/negativ/cards/index.php on line 11
[Mon Jun 25 16:21:04 2012] [error] [client 192.168.0.2] PHP Notice: Undefined index: type in /usr/local/www/negativ/cards/index.php on line 11
[Mon Jun 25 16:21:04 2012] [error] [client 192.168.0.2] PHP Notice: Undefined index: type in /usr/local/www/negativ/cards/index.php on line 11
[Mon Jun 25 16:21:04 2012] [error] [client 192.168.0.2] PHP Notice: Undefined index: type in /usr/local/www/negativ/cards/index.php on line 11
[Mon Jun 25 16:21:04 2012] [error] [client 192.168.0.2] PHP Notice: Undefined index: type in /usr/local/www/negativ/cards/index.php on line 11
[Mon Jun 25 16:21:04 2012] [error] [client 192.168.0.2] PHP Notice: Undefined index: type in /usr/local/www/negativ/cards/index.php on line 11
[Mon Jun 25 16:21:04 2012] [error] [client 192.168.0.2] PHP Notice: Undefined index: type in /usr/local/www/negativ/cards/index.php on line 11
[Mon Jun 25 16:21:04 2012] [error] [client 192.168.0.2] PHP Notice: Undefined index: type in /usr/local/www/negativ/cards/index.php on line 11
[Mon Jun 25 16:21:04 2012] [error] [client 192.168.0.2] PHP Notice: Undefined index: type in /usr/local/www/negativ/cards/index.php on line 11
[Mon Jun 25 16:21:04 2012] [error] [client 192.168.0.2] PHP Notice: Undefined index: type in /usr/local/www/negativ/cards/index.php on line 11
[Mon Jun 25 16:21:04 2012] [error] [client 192.168.0.2] PHP Notice: Undefined index: type in /usr/local/www/negativ/cards/index.php on line 11
[Mon Jun 25 16:21:04 2012] [error] [client 192.168.0.2] PHP Notice: Undefined index: type in /usr/local/www/negativ/cards/index.php on line 11
[Mon Jun 25 16:21:04 2012] [error] [client 192.168.0.2] PHP Notice: Undefined index: type in /usr/local/www/negativ/cards/index.php on line 11
[Mon Jun 25 16:21:04 2012] [error] [client 192.168.0.2] PHP Notice: Undefined index: type in /usr/local/www/negativ/cards/index.php on line 11
[Mon Jun 25 16:21:04 2012] [error] [client 192.168.0.2] PHP Notice: Undefined index: type in /usr/local/www/negativ/cards/index.php on line 11

Если в index.php на 11 строку пишу
 if (!isset($_POST['type']) == 'activate'){

меня сразу перенаправляет на страницу http://192.168.0.1/cards/failed.html
А должно бы открыть страничку с формой для ввода даных.
Спасибо за внимания...



Спустя 44 минуты, 51 секунда (25.06.2012 - 17:11) Игорь_Vasinsky написал(а):
разбирай .htaccess 500 ошибка в основном из-за кривости онного. либо у тя не включен mod_rewrite..т.е. не подключен сам модуль

Спустя 53 секунды (25.06.2012 - 17:12) walerus написал(а):
Так и будет, смотри что происходит, приходим на условие:

if ($_POST['type'] == 'activate'){
echo $Func->ActivateCard();
}else{
echo $Form->ClientActivateCard();
}
Тип не активный - вызывается функция ClientActivateCard();
// Редирект на страницу активации
function ClientActivateCard(){
global $config;
header('Location: '.$config['page_form']);
}
А конфиг $config['page_form'] у тебя равен
'page_form' => 'http://192.168.0.1/cards/index.php',
т.е. шлет опять на условие проверки и так по кругу. Может нужно выдавать на экран form.html, для того что бы что то поменялось ?

Спустя 40 минут, 57 секунд (25.06.2012 - 17:53) andre13161 написал(а):
Loaded Modules	core prefork http_core mod_so mod_authn_file mod_authn_dbm mod_authn_anon mod_authn_default mod_authn_alias mod_authz_host mod_authz_groupfile mod_authz_user mod_authz_dbm mod_authz_owner mod_authz_default mod_auth_basic mod_auth_digest mod_file_cache mod_cache mod_disk_cache mod_dumpio mod_reqtimeout mod_include mod_filter mod_charset_lite mod_deflate mod_log_config mod_logio mod_env mod_mime_magic mod_cern_meta mod_expires mod_headers mod_usertrack mod_unique_id mod_setenvif mod_version mod_ssl mod_mime mod_dav mod_status mod_autoindex mod_asis mod_info mod_cgi mod_dav_fs mod_vhost_alias mod_negotiation mod_dir mod_imagemap mod_actions mod_speling mod_userdir mod_alias mod_rewrite mod_php5


mod_rewrite - включен

Спустя 9 минут, 41 секунда (25.06.2012 - 18:03) andre13161 написал(а):
'page_form' => 'http://192.168.0.1/cards/index.php',
заменил на
'page_form' => 'http://192.168.0.1/cards/form.html',


В логе Apache

[Mon Jun 25 17:56:03 2012] [error] [client 192.168.0.2] PHP Notice:  Undefined index: num in /usr/local/www/negativ/cards/func.class.php on line 36

[Mon Jun 25 17:56:03 2012] [error] [client 192.168.0.2] PHP Notice: Undefined index: pin in /usr/local/www/negativ/cards/func.class.php on line 37

[Mon Jun 25 17:56:03 2012] [error] [client 192.168.0.2] PHP Warning: mysql_real_escape_string() [<a href='function.mysql-real-escape-string'>function.mysql-real-escape-string</a>]: Access denied for user 'admin'@'localhost' (using password: NO) in /usr/local/www/negativ/cards/func.class.php on line 38

[Mon Jun 25 17:56:03 2012] [error] [client 192.168.0.2] PHP Warning: mysql_real_escape_string() [<a href='function.mysql-real-escape-string'>function.mysql-real-escape-string</a>]: A link to the server could not be established in /usr/local/www/negativ/cards/func.class.php on line 38

[Mon Jun 25 17:56:03 2012] [error] [client 192.168.0.2] PHP Notice: Undefined index: login in /usr/local/www/negativ/cards/func.class.php on line 40

[Mon Jun 25 17:56:03 2012] [error] [client 192.168.0.2] PHP
Warning: mysql_real_escape_string() [<a href='function.mysql-real-escape-string'>function.mysql-real-escape-string</a>]: Access denied for user 'admin'@'localhost' (using password: NO) in /usr/local/www/negativ/cards/func.class.php on line 40

[Mon Jun 25 17:56:03 2012] [error] [client 192.168.0.2] PHP Warning: mysql_real_escape_string() [<a href='function.mysql-real-escape-string'>function.mysql-real-escape-string</a>]: A link to the server could not be established in /usr/local/www/negativ/cards/func.class.php on line 40

[Mon Jun 25 17:56:03 2012] [error] [client 192.168.0.2] PHP Notice: Undefined index: password in /usr/local/www/negativ/cards/func.class.php on line 41

[Mon Jun 25 17:56:03 2012] [error] [client 192.168.0.2] PHP Warning: mysql_real_escape_string() [<a href='function.mysql-real-escape-string'>function.mysql-real-escape-string</a>]: Access denied for user 'admin'@'localhost' (using password: NO) in /usr/local/www/negativ/cards/func.class.php on line 41

[Mon Jun 25 17:56:03 2012] [error] [client 192.168.0.2] PHP Warning: mysql_real_escape_string() [<a href='function.mysql-real-escape-string'>function.mysql-real-escape-string</a>]: A link to the server could not be established in /usr/local/www/negativ/cards/func.class.php on line 41

Спустя 13 часов, 56 минут, 42 секунды (26.06.2012 - 07:59) andre13161 написал(а):
Но если я вызываю сразу /form.html то у меня нету подключения к базе, поскольку там только код формы

Спустя 7 часов, 2 минуты, 4 секунды (26.06.2012 - 15:01) Игорь_Vasinsky написал(а):
да. понятно. код косячный. нужно устранять нотисы.

Спустя 17 минут, 47 секунд (26.06.2012 - 15:19) andre13161 написал(а):
можно немножко подробнее куда копать?

Вопрос:
А может быть такая ошибка из за кодировок файлов?

Попрошу по мере возможности ответить на дурацкий вопрос разумным ответом.
Просто иногда на дурацкие вопросы отвечают также и приписывают "какой вопрос такой ответ"
Спасибо

Спустя 4 дня, 23 часа, 39 минут, 28 секунд (1.07.2012 - 14:59) andre13161 написал(а):
Помогите. А то ничего немогу понять в чом проблема.
Быстрый ответ:

 Графические смайлики |  Показывать подпись
Здесь расположена полная версия этой страницы.
Invision Power Board © 2001-2024 Invision Power Services, Inc.