How to solve this Parse error - opencart

After I logged in our website,
Parse error: syntax error, unexpected T_ECHO, expecting T_PAAMAYIM_NEKUDOTAYIM in /home/hyuny276/public_html/ubpserver.com/view/template/common/home.tpl on line 291
line 291:
%</td -->

There must be any syntax error in your home.tpl
Check if any PHP tag is not closed at line 291.
Check if any semicolon in PHP code is left at line 291.
You can check syntax error in Netbeans IDE for PHP. Just open the file in IDE.
Hope it helps.

Related

Redirect c++ program syntax error to a file in windows

I'm using Dev C++ 5.11 on windows 10 home 64 bit. While compiling the program given below, I got the error message as semi colon is missing:
[Error] expected ';' before '}' token
I want the redirect or capture the syntax error in text file. I read about stdout and stderr, but couldn't get the output of compiler error in notepad/text file.
Unfortunately, there's no such option in the Dev-C++ IDE to redirect the output of stdout or stderr to a file.
But, you can do this from command line. This might help you in this regard:
How to redirect the output of gcc compiler to a file?
In addition, you can experiment with Tools -> Compiler Options to do this. I tried by adding general commands but it didn't work.
Alternatively, you can copy the warnings / errors by using Copy All option from context menu and paste it in a file manually.

the troubles of rebuild apk

I always use apktool to decompiler the apk file ,and ,you known,some resources's name looks very strange, just like this: <attr name="do" format="string" />. when it's been decompilered.
the question is: when rebuild the folder which contains this resource file ,and then ,error occurs,the error message likes this:"error: invalid symbol: 'do'" or error: invalid symbol: 'if'.
of cause,I have read the source code of apktool ,and I found that these error messages are not throw by apktool,but throws by aapt when executes code: OS.exec(cmd.toArray(new String[0])); in package brut.androlib.res in it's AndroidLibResources.java file. So, I think the google has forgotten to handle these exceptions,because the words "if" and "do" are also the keywords of most popular programming language, and is there anybody has meet the same trouble with me? hope your(s) help.
This is a bug in aapt, which is why you see the error on that line in apktool. Basically symbols like do and if have special meaning. aapt should ignore that and treat them literally, but the validation is a bit too strong.
You may follow the AOSP Bug Report here.

SSHClient() IndentationError: unexpected indent

ssh=paramiko.SSHClient()
ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
ssh.connect('devicenames',22,username=username,password=password)
I am getting "IndentationError: unexpected indent" in my python code.
I have written this code for SSH into Cisco devices but when I run this python code, it gives this error.
./device-config-backup.py
ssh=paramiko.SSHClient()
ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
ssh.connect('devicenames',22,username=username,password=password)`
File "./device-config-backup.py", line 23
ssh=paramiko.SSHClient()
^
IndentationError: unexpected indent
Can someone let me know what could be the error ?

Why this sublimetext build file dont work?

I am trying to capture the output of the build, for open the file with the syntax error.
This is the build file:
{
"cmd": ["D:\\xampp\\apache\\conf\\buildApache.bat"],
"file_regex": "of (.*?)(?=:)",
"line_regex": "line ([0-9]*) ",
"selector":"source.apacheconf"
}
This is the response from the build File
AH00526: Syntax error on line 19 of D:/xampp/apache/conf/extra/httpd-vhosts.conf:
Invalid command 'Liste', perhaps misspelled or defined by a module not included in the server configuration
[Finished in 0.3s]
What I am trying to do, is when the user, dbl-click on the error, it's will open the file, on line 19.
How Do I write the build file?
In SublimeText 2, The source code file name must appear BEFORE the line number in the build output.
That way, It's impossible to capture the output.

How do I debug the Eclipse CDT's Regex Error Parser?

I've wrote up my regex for error parsing of an unsupported compiler. However, it seems to ignore me and I don't know how to debug it.
The error message looks like this:
"file.c", line 224: Error: #20: identifier "myvar" is undefined
I wrote up this regex for Error:
"(.*?)", line (\d+): Error: #(\d+): (.*)
File: $1, Line: $2, Desc: $4
Eclipse's Console and Problems tabs seems to ignore it. What am I missing here?
Eclipse for Windows 3.7.1, CDT 8.0.0
Edited: while I use an online Javascript-based regex tester,
to debug CDT regular expressions I prefer to click into the console and use the regular search dialog box.
This might help someone. I was trying to get a custom parser working but I could never get it to match. It was a setup problem. You have to setup the match in Window > Preferences > c/c++ > Build > Settings > Error Parsers. To get it to USE it you have to check it in > Properties > c/c++ build > settings > error parsers.
Looks like my regex wasn't matching the error message.
The following regex solved the issue:
"(.*?)", line (\d+): Error:(\s*)#(.*): (.*)
File: $1, Line: $2, Desc: $5
Hope this helps someone with the same issue.
It did help me, actually. In response to your question about how to debug the error parser, I did my regex pattern testing with Python against strings captured from a compiler run. Once I got that working I just pasted the regexes into the error parser form in CDT.
Obviously, there are many different ways to play with regex, notably Perl.