Question about PC Desktops

1 Answer

Parse error: syntax error, unexpected T_STRING in /home/a4491082/public_html/savefile_php/config.php on line 4

Posted by on

1 Answer

  • Level 1:

    An expert who has achieved level 1.

  • Contributor
  • 1 Answer

T_STRING is a string error. It usually means one of two things.

1. The string is formatted incorrectly. In your case check on line 4. Make sure if you have a ' that you close it with a '. Same with ". Close all " with another " somewhere. Make sure line 4 ends wth semi-colon ;

2. Usually this is the case. The line above the string it states doesn't have a semi-colon to complete the statement. In your case, check that line 3 ends with a ;
That is why it says unexpected T_STRING which means "unexpected string". The string on line 4 is unexpected because line 3 wasn't closed properly.

Posted on Aug 26, 2008

  • shideon Aug 26, 2008

    If a php error says something about it being unexpected than usually there's an error in the code directly above the unexpected line. Could be missing semi-colon ; or missing ) or missing } but it really depends on your code.

×

Add Your Answer

Uploading: 0%

my-video-file.mp4

Complete. Click "Add" to insert your video. Add

×

Loading...
Loading...

Related Questions:

1 Answer

Cannot view my own website. it reads: "Parse error: syntax error, unexpected $end..." in my index.php file. HELP


Syntax errors are the most common problem for developers. A single syntax error can cripple even the best applications and websites. You can correct syntax errors easily once you find them. Typical errors include missing commas, semicolons and parenthesis. Debuggers are available in many software development kits to aid you in the location of syntax errors. However, you can find and correct syntax errors manually as well. Learning how to correct syntax errors is an essential part of being a software developer.

Locate the syntax error manually. Step through each section of your code. Most code will be sectioned off into groups or functions. Carefully proof your code. Be sure to pay close attention to how lines are grouped. A common syntax mistake is incorrect grouping.

For instance, if you have an If Else statement embedded in another If Else statement, be sure the embedded statement is surrounded by a separate set of parenthesis or brackets, depending on your language. Double-check notes sections. Notes are only for the developer to see. However, if the syntax isn't correct, the notes may become part of your application, which may not agree with existing code. Ensure the syntax around your notes is correct. Run a debugger if possible. This will make locating errors much easier. A debugger will be found under a menu such as Debug, Run or Tools or as part of your SDK's toolbar. Allow the debugger to run. Errors will be listed at the bottom or right side of your screen. Many debuggers will highlight possible errors in your code as well. A line number, along with the possible error, will be listed in the error message. Locate your syntax error if the debugger isn't correct. Sometimes a debugger will show you where your application stopped working correctly. The syntax error itself may be above or below the line listed in the debugger message. Check all syntax within the surrounding area, especially within the line's function. Run your application after correcting the syntax error. Check every possible function of your application to ensure it works correctly. If you find a problem, double-check the syntax in your code that surrounds the problem area. For instance, if your application has a log-in screen that isn't accepting passwords correctly, check the code for the log-in screen. Remove Syntax Error syntax error typically occurs when the Web page you are loading causes a script error in the browser. This is caused by incorrect code that displays an error message or results in a Web page that does not load correctly. You can remove a syntax error by making a change to the settings of your Web browser. Common Web browsers that can experience this type of error include Internet Explorer, Mozilla Firefox and Safari.
Double-click the "Internet Explorer" icon to open the program. Click the "Tools" drop-down menu and select "Internet Options." This will display the Internet Options window. Go to the "Advanced" tab and scroll down to the "Browsing" section. Remove the check from the box for "Disable script debugging (Internet Explorer)," "Disable script debugging (Other)" and "Display a notification about every script error." Click the "Apply" button to save the changes. Click the "OK" button to close the Internet Options window. Close and restart the Internet Explorer browser for the changes you made to take effect. b> Mozilla Firefox b> Double-click the "Mozilla Firefox" icon to open the program. Type "about:config" into the address bar and press the "Enter" key. Type "dom.max_script_run_time" into the Filter text box and press the "Enter" key. Double-click "dom.max_script_run_time" to display the Enter Integer Value dialog box. Enter a value of "10" or "15" into the text box and click the "OK" button to save the change. Close and then restart the Firefox browser for the change to take effect. b> Safari b> Click the "Safari" icon to open the Web browser. Select the option for "Preferences" from the menu bar. Go to the Advanced tab and click the option for "Show Develop menu in menu bar." Click the option for "Develop" from the menu bar. Click the option for "Disable Runaway JavaScript Timer." Close and re-open the browser for the change to take effect.

b>

b>

Apr 06, 2013 | PC Desktops

Tip

System Restore Via Recovery Console


<br /> Ever encountered a problem with your computer wherein it gives you an error page saying that a certain file in the registry is missing or corrupt? Unfortunately, with this kind of error, there are times that you are not able to boot into the OS, and therefor you are not able to do a system restore. <br /> If you are using Windows 7 or Vista, you may initiate System Restore via booting into "Repair My Computer" which you can choose via the Advanced Boot Options of Windows. However, what do you do if this does not work, or you are using Windows XP. <br /> Fortunately, there is still a way to be able to restore your system. This involves manually doing the system restore via the recovery console (for XP), and recovery environment (Vista and 7). The only thing that you will need is the OS CD. <br /> Once you have successfully booted into the Recovery Console, type in the commands below and make sure that you press "ENTER" after each line. <br /> <br /> C:\WINDOWS] cd \ C:\] attrib -h-s "system volume information" C:\] Cd "system volume information" C:\system volume information] cd _resto~1 ..._resto~1] dir --- this should list several rp folders [short for restore points] just select second to the last or any of your choice other the the last rp folder ..._resto~1] cd rp# ...rp#] cd snapshot ...snapshot] dir --- the 5 hive files are shown in this format: _registry_machine_software _registry_machine_security _registry_machine_system _registry_machine_sam _registry_user_.default Syntax [Command filename location] ...snapshot] copy _registry_machine_software c:\windows\system32\config\software ...snapshot] copy _registry_machine_system c:\windows\system32\config\system ...snapshot] copy _registry_machine_security c:\windows\system32\config\security ...snapshot] copy _registry_machine_sam c:\windows\system32\config\sam ...snapshot] copy _registry_user_.default c:\windows\system32\config\default ...snapshot] exit <br /> After this, you just need to restart your computer and it should be working fine.

on Jul 25, 2011 | PC Desktops

1 Answer

Return code 4


nder X0, if dial tone detection is enforced or selected, this result code is used to indicate that dial tone has not been detected. 3.12.5. ERROR (4)Modem returns this result code if the command line contains a syntax error or it is unable to execute a command contained in the command line

Jan 02, 2012 | PC Desktops

1 Answer

I am getting an error message stating that i am missing \windows\system32\config\system file. i do not have a windows disk for this computer and it is using winows xp home


Use this below link it will be help full for you...

http://www.computing.net/answers/windows-xp/windowssystem32configsystem-file/47285.html

http://support.microsoft.com/kb/307545


There some procedures are there follow it.

Nov 05, 2010 | Dell PC Desktops

1 Answer

Create program for A-D:


A.) If else statement using Javascript
<script type="text/javascript">
//If the time is less than 10, you will get a "Good morning" greeting.
//Otherwise you will get a "Good day" greeting.

var d = new Date();
var time = d.getHours();

if (time < 10)
{
document.write("Good morning!");
}
else
{
document.write("Good day!");
}
</script>

B.) Switch Case Statement Using C#
using System;

class SwitchSelect
{
public static void Main()
{
string myInput;
int myInt;

begin:

Console.Write("Please enter a number between 1 and 10: ");
myInput = Console.ReadLine();
myInt = Int32.Parse(myInput);

// switch with integer type
switch (myInt)
{
case 1:
Console.WriteLine("Your number is {0}.", myInt);
break;
case 2:
Console.WriteLine("Your number is {0}.", myInt);
break;
case 3:
Console.WriteLine("Your number is {0}.", myInt);
break;
default:
Console.WriteLine("Your number {0} is not between 1 and 3.", myInt);
break;
}

decide:

Console.Write("Type \"continue\" to go on or \"quit\" to stop: ");
myInput = Console.ReadLine();

// switch with string type
switch (myInput)
{
case "continue":
goto begin;
case "quit":
Console.WriteLine("Bye.");
break;
default:
Console.WriteLine("Your input {0} is incorrect.", myInput);
goto decide;
}
}
}


C. For Loop Statement using C++
for(i=10; i > -1; i--)
{
if(i == 0)
cout << "Blast Off!" << endl;
else
cout << i << endl;
}
}

D. While Loop Using Java
void main() {

int counter = 1;

while(counter < 5 )
{
printLine("counter is equal to " + counter);

counter = counter + 1 ;
}

printLine("Goodbye");
}


Mar 22, 2010 | Dell Vostro 220 Desktop Computer

1 Answer

When I go to web site www.destle.com and click on a contection box(to chat oneline) I get: Line: 59 Char: 1 Error: syntax code: 0 what can I do?


This sounds like a PHP or Server Side Error, and so there is nothing you can do. Try again on another day, and if the problem persists contact the Site Admin.

Mar 02, 2009 | Syntax PC Desktops

1 Answer

ST585v6 router -how to set it up to allow forwarding of ports 5198 5199 & 5200 ? Trying to use it for a ham radio system called EchoLink. Thanks


ra config
Configure remote access parameters.
SYNTAX:
ra config [port = <number]>
[mode = <Permanent]>

I found the above command relating to port numbers in the reference manual for your access point. You can try this. If it does not work, below is a link to the Thomson website where you can view the pdf file for your access point's reference manual where you will find many other commands.

http://www.thomsontelecompartner.com/dsl-modems-gateways/products/product-detail.php?id=104

May 02, 2008 | PC Desktops

Not finding what you are looking for?
PC Desktops Logo

Related Topics:

122 people viewed this question

Ask a Question

Usually answered in minutes!

Top PC Desktops Experts

joecoolvette
joecoolvette

Level 3 Expert

5660 Answers

Brian Sullivan
Brian Sullivan

Level 3 Expert

27725 Answers

Les Dickinson
Les Dickinson

Level 3 Expert

18298 Answers

Are you a PC Desktop Expert? Answer questions, earn points and help others

Answer questions

Manuals & User Guides

Loading...