Reputation: 1
I have a small problem with my site, I use wordpress and I first made my site locally but when I use the plugin Duplicator and I try to pass on the installer.php to install on OVH there is a syntax problem that appears on line 10 except that looking closer I see nothing.
<?php
/* ------------------------------ NOTICE ----------------------------------
If you're seeing this text when browsing to the installer, it means your
web server is not set up properly.
Please contact your host and ask them to enable "PHP" processing on your
account.
----------------------------- NOTICE --------------------------------- */
namespace {
use Duplicator\Libs\DupArchive\DupArchiveExpandBasicEngine;
$disabled_dirs = array(
'backups-dup-lite',
'wp-snapshots'
);
if (in_array(basename(dirname(__FILE__)), $disabled_dirs)) {
die;
}
define('KB_IN_BYTES', 1024);
define('MB_IN_BYTES', 1024 * KB_IN_BYTES);
define('GB_IN_BYTES', 1024 * MB_IN_BYTES);
define('DUPLICATOR_PHP_MAX_MEMORY', 4096 * MB_IN_BYTES);
date_default_timezone_set('UTC'); // Some machines don’t have this set so just do it here.
@ignore_user_abort(true);
function isIniValChangeable($setting)
{
static $ini_all;
if (!isset($ini_all)) {
$ini_all = false;
if (function_exists('ini_get_all')) {
$ini_all = ini_get_all();
}
}
if (isset($ini_all[$setting]['access']) && ( INI_ALL === ( $ini_all[$setting]['access'] & 7 ) || INI_USER === ( $ini_all[$setting]['access'] & 7 ) )) {
return true;
}
if (!is_array($ini_all)) {
return true;
}
return false;
}
@set_time_limit(3600);
if (isIniValChangeable('memory_limit')) {
@ini_set('memory_limit', DUPLICATOR_PHP_MAX_MEMORY);
}
if (isIniValChangeable('max_input_time')) {
@ini_set('max_input_time', '-1');
}
if (isIniValChangeable('pcre.backtrack_limit')) {
@ini_set('pcre.backtrack_limit', PHP_INT_MAX);
}
if (isIniValChangeable('default_socket_timeout')) {
@ini_set('default_socket_timeout', 3600);
}
I try several times to download installer.php and .zip duplicator in case one of them is corrupted. I look lot of tutos on web but i don't find solution of my problem.
Upvotes: 0
Views: 211
Reputation: 1258
You can always run php -l yourscript.php
or use an online PHP linter (just make sure to not paste anything secret, like a password).
I assume your error is Parse error: Unclosed '{' on line 10 in your code on line 54
?
If so, you have a {
at namespace but this {
is never closed with }
.
Upvotes: 1