Install error

Report bugs and errors in this forum.

Install error

Postby darklord » Mon Dec 12, 2011 4:39 pm

I just installed 2.5.4 and finished the CHMods, no problem.

But on calling the script (index.php) I just get an error:

Code: Select all
Parse error: syntax error, unexpected T_NAMESPACE, expecting T_STRING or '(' in /home/conforma/public_html/cnr/inc/functions.inc.php on line 863


???

Call it yourself... http://www.conformance.info/cnr

HJ
darklord
 
Posts: 1
Joined: Mon Dec 12, 2011 4:31 pm

Re: Install error

Postby Hawk » Wed Dec 14, 2011 7:07 pm

Hello!
Which version of PHP do you have active on your server?
User avatar
Hawk
 
Posts: 437
Joined: Tue Aug 29, 2006 9:00 pm

Re: Install error

Postby Matsuga » Thu Jan 19, 2012 10:44 am

If you have the newest version of php then you'll need to change "namespace" on line 863 to "string".

This worked for me.

But now I get an error in step 2.

It has to do with the chmod or the directory.

This is the error I get

Installing CuteNews.RU
Make sure to CHMOD all the files belowcache/
data/config.php/

Warning: opendir(D:/Programs/xampp/htdocs/testing/news/data/config.php,D:/Programs/xampp/htdocs/testing/news/data/config.php) [function.opendir]: The directory name is invalid. (code: 267) in D:\Programs\xampp\htdocs\testing\news\install\install.php on line 30

Warning: opendir(D:/Programs/xampp/htdocs/testing/news/data/config.php) [function.opendir]: failed to open dir: No such file or directory in D:\Programs\xampp\htdocs\testing\news\install\install.php on line 30

Warning: readdir() expects parameter 1 to be resource, boolean given in D:\Programs\xampp\htdocs\testing\news\install\install.php on line 31
data/config.php//



This is the code that goes with it.

Code: Select all
<?php
error_reporting(E_ALL & ~E_NOTICE);
$cutepath = str_replace('\\', '/', substr(dirname(__FILE__), 0, -8));

include_once $cutepath.'/inc/functions.inc.php';
include_once $cutepath.'/inc/plugins.inc.php';
include_once $cutepath.'/skins/default.skin.php';

@chmoddir($cutepath.'/data', 0777);
@chmoddir($cutepath.'/cache', 0777);
@chmoddir($cutepath.'/data', 0777);

$handle = opendir($cutepath.'/inc/lang');
while ($file = readdir($handle)){
   if ($file != '.' and $file != '..' and is_dir($cutepath.'/inc/lang/'.$file)){
      $sys_con_lang_arr[$file] = file_read($cutepath.'/inc/lang/'.$file.'/langname');
   }
}

$handle = opendir($cutepath.'/inc/db');
while ($file = readdir($handle)){
   if (substr($file, -3) != 'php' and is_file($cutepath.'/inc/db/'.$file)){
      $sys_con_database_arr[$file] = file_read($cutepath.'/inc/db/'.$file);
   }
}

function check_writable($dir){
global $cutepath;

   $handle = opendir($cutepath.'/'.$dir);
   while (false !== ($file = readdir($handle))){
      if ($file != '.' and $file != '..' and $file != '.htaccess' and substr($file, -3) != 'gif'){
         $path = $dir.'/'.$file;

         if (is_file($path)){
            echo '<font color="'.(is_writable($path) ? 'green' : 'red').'">'.$path.'</font><br />';
         } else {
            echo '<font color="'.(is_writable($path) ? 'green' : 'red').'">'.$path.'/</font><br />';
            check_writable($path);
         }
      }
   }
}

$config_database   = strtolower($_POST['database']);
$config_lang      = $_POST['lang'];
$config_dbname      = $_POST['dbname'];
$config_dbuser      = $_POST['dbuser'];
$config_dbpassword = $_POST['dbpassword'];
$config_dbprefix   = $_POST['dbprefix'];
$config_dbserver   = $_POST['dbserver'];
$echo            = cute_lang('install');
$step            = $_GET['step'];
$step            = ($step ? $step : 1);
$url            = preg_replace('/\/index.php$/i', '', reset($url = explode('?', $_SERVER['HTTP_REFERER'])));

echoheader('options', $echo['header']);
?>

<table width="200" border="0" cellspacing="0" cellpadding="0">
<form action="<?php $_SERVER['PHP_SELF']; ?>?step=<?php ($step + 1); ?>" method="post">
<input name="lang" type="hidden" value="<?php $config_lang; ?>">
<input name="database" type="hidden" value="<?php $config_database; ?>">

<?php
if ($step == 1){
?>

 <tr>
  <td><?php $echo['lang']; ?>
  <td><?php makeDropDown($sys_con_lang_arr, 'lang', ''); ?>

 <tr>
  <td><?php $echo['database']; ?>
  <td><?php makeDropDown($sys_con_database_arr, 'database', 'txtsql'); ?>

<?php
} elseif ($step == 2){
   echo $echo['chmod'];
   echo '<font color="'.(is_writable('cache') ? 'green' : 'red').'">cache/</font><br />';
   echo check_writable('data');
} elseif ($step == 3){
   if ($config_database == 'txtsql'){
      $disabled = ' disabled';
   }
?>

 <tr>
  <td><?php $echo['login']; ?>
  <td><input name="login" type="text" value="">
 <tr>
  <td><?php $echo['password']; ?>
  <td><input name="password" type="text" value="">
 <tr>
  <td colspan="2"><br /><br /><b><?php $echo['database']; ?></b>:
 <tr>
  <td><?php $echo['dbUser']; ?>
  <td><input name="dbuser" type="text" value=""<?php $disabled; ?>>
 <tr>
  <td><?php $echo['dbPassword']; ?>
  <td><input name="dbpassword" type="text" value=""<?php $disabled; ?>>
 <tr>
  <td><?php $echo['dbServer']; ?>
  <td><input name="dbserver" type="text" value="localhost"<?php $disabled; ?>>
 <tr>
  <td><?php $echo['dbName']; ?>
  <td><input name="dbname" type="text" value=""<?php $disabled; ?>>
 <tr>
  <td><?php $echo['dbPrefix']; ?>
  <td><input name="dbprefix" type="text" value="cute_"<?php $disabled; ?>>

<?php
} elseif ($step == 4){
   include $cutepath.'/inc/db/'.$config_database.'.inc.php';
   include $cutepath.'/install/db.php';
   include $cutepath.'/install/config.php';
   file_write($cutepath.'/data/config.php', $config);
   $sql->insert(array(
   'table'    => 'users',
   'values' => array(
            'date'      => time(),
            'level'      => 1,
            'username' => $_POST['login'],
            'password' => md5x($_POST['password'])
            )
   ));
}
?>

 <tr>
  <td colspan="2"><br /><br /><input type="submit" value="<?php sprintf($echo['next'], (($step + 1) == 5 ? $echo['end'] : ($step + 1))); ?>">
</form>
</table>

<?php
echofooter();
exit;
?>


What am I doing wrong. It seems that the script is calling the directory 2 times.
Matsuga
 
Posts: 3
Joined: Thu Jan 19, 2012 10:38 am

Re: Install error

Postby Matsuga » Thu Jan 19, 2012 5:15 pm

Got it installed now.

Now I get an HTTP 500 error when I try to click the add or edit news link. Everything else works though.
Matsuga
 
Posts: 3
Joined: Thu Jan 19, 2012 10:38 am

Re: Install error

Postby lahtis » Sun May 06, 2012 8:14 pm

i have a same install error.

go to functions.inc.php
go to 876 line and replace to function mwnamespace($str){
this works.
lahtis
 
Posts: 1
Joined: Sun May 06, 2012 8:10 pm

Re: Install error

Postby Pragatipol » Fri Jul 05, 2019 8:34 am

I have the same issuse!
Pragatipol
 
Posts: 1
Joined: Fri Jul 05, 2019 7:26 am


Return to Bugs and errors



Who is online

Users browsing this forum: No registered users and 1 guest

cron

x