Fórum Ubuntu CZ/SK
Ubuntu pro osobní počítače => Software => Příkazový řádek a programování pro GNU/Linux => Téma založeno: Coolhis 13 Září 2009, 21:21:14
-
Ahojte mam takovy problem s PHPckem. PHP jsem instaloval prez LAMP vse v pohode spousteni stranek jede az na jednu a asi podstatnou vec a to chybu:
Warning: include(../src/func/language.php) [function.include]: failed to open stream: Permission denied in /var/www/install/index.php on line 31
Warning: include() [function.include]: Failed opening '../src/func/language.php' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/install/index.php on line 31
Fatal error: Class 'Language' not found in /var/www/install/index.php on line 32
nevim jestli je chyba ve skriptu nebo na me strane v OS.
Jsem na linuxu totalni zacatecnik a odpoved na tuhle otazku jsem nikde nenasel tak prosim jestli mi tady nekdo nehelpne
-
Warning: include(../src/func/language.php) [function.include]: failed to open stream: Permission denied in /var/www/install/index.php on line 31
Todle mluví za vše... na té adrese by měl být language.php. On tam nejspíše je, ale www-data uživatel se k němu nedostane. Máte nastavená špatná práva na ten soubor.
Nevím co tam chcete přesně mít, zkuste třeba:
sudo chmod 774 adresa/language.php (za adresa vložte adresu k souboru language.php)
-
Jak se snazim tak se snazim ale nikde ten soubor language.php nemuzu najit ani vyhledavac ho nenajde
-
mozno by pomohol kod index.php
-
Tady je kod index.php:
<?php
session_name("ws_session");
session_start();
header('content-type: text/html; charset=utf-8');
include("../src/func/language.php");
$_language = new Language();
if(!isset($_SESSION['language'])){
$_SESSION['language'] = "uk";
}
if(isset($_GET['lang'])){
if($_language->set_language($_GET['lang'])) $_SESSION['language'] = $_GET['lang'];
header("Location: index.php");
exit();
}
$_language->set_language($_SESSION['language']);
$_language->read_module('index');
if(isset($_GET['step'])) $_language->read_module('step'.(int)$_GET['step'],true);
else $_language->read_module('step0',true);
if(!isset($_GET['step'])){
$_GET['step'] = "";
}
$languages = "";
if ($handle = opendir('./languages/')) {
while (false !== ($file = readdir($handle))) {
if(is_dir('./languages/'.$file) && $file != ".." && $file != "." && $file != ".svn"){
$languages .= "<img src='../images/flags/".$file.".gif' alt='".$file."' onclick='javascript:changeLanguage(\"".$file."\");' /> ";
}
}
closedir($handle);
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="description" content="Website using webSPELL 4 CMS - Society Edition" />
<meta name="author" content="webspell.org" />
<meta name="keywords" content="webspell, webspell4, cms, society, edition" />
<meta name="copyright" content="Copyright © 2005 - 2009 by webspell.org" />
<meta name="generator" content="webSPELL" />
<title>webSPELL Installation</title>
<link href="style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
<!--
function changeLanguage(lang){
var conf = confirm("<?php echo $_language->module['confirm_change']; ?>");
if(conf){
window.location = "index.php?lang="+lang;
}
}
-->
</script>
</head>
<body>
<table border="0" cellpadding="0" cellspacing="0" width="776" align="center">
<tr>
<td id="head" colspan="2">
<div id="links">
<ul>
<li><a href="http://www.webspell.org/index.php?site=support" target="_blank" class="link1"></a></li>
<li><a href="http://www.webspell.org/index.php?site=license" target="_blank" class="link2"></a></li>
<li><a href="http://www.webspell.org/index.php?site=about" target="_blank" class="link3"></a></li>
</ul>
</div>
</td>
</tr>
<?php
echo '<tr><td colspan="2"><form action="index.php?step='.($_GET['step']+1).'" method="post" name="ws_install" /></td></tr>';
include('step0'.$_GET['step'].'.php');
?>
<tr>
<td style="background-image:url(images/4.jpg);" height="25" colspan="2"></td>
</tr>
</table>
</body>
</html>
EDIT: Šikovnej to tag ten code
-
Možná by taky nebylo od věci se pochlubit, co to v tom adresáři /var/www/install vlastně má být zač...
-
Je to vlastne udelani php system webovek od webspellu ktery si muze kdo koliv stahnout: http://www.webspell.org/. A má to bát instalace jak rozjed tento systém
-
No ale to pak řeš s někým od WebSpellu; to není problém PHP (resp LAMP), ale konkrétní PHP aplikace - pokud jejich instalačka nefunguje, je problém u nich. Takže přinejmenším přejmenuj vlákno na "Pomoc s WebSpellem".
P.S.
To, že ti to hlásí chybu, když se snaží zpracovat soubor, který neexistuje (pokud tedy opravdu neexistuje) znamená, že ti PHP maká správně.
-
ok dobre diky za radu myslel jsem ze to je chyba PHPka
-
language.php je na adrese relativně od index.php a to konkrétně tu: ../src/func/language.php
vyplývá to z definice v index.php
hledal bych adresář src a v něm adresář func ... a v něm by to mělo být.... ;)