How do I resolve a Parse error: syntax error in PHP?

Asked by:
Mento / 11 Points
Time:
2011-12-26 11:31 pm EST
Category:
Dreamweaver
Hits:
2,663
hi, i have the same problem, i installed a new version of xampp. when i open again phpMyAdmin my tables in the database are gone and when i try to open the interfaces, there is an error:

Parse error: syntax error, unexpected $end in C:\xampplite\ht docs\ldk\intern alPaymentsMaste r.php on line 184

line 184 is .

can someone help me?

To ask this user for more information, please first login.

To submit an answer, please login.

Best answer chosen by Web Hosting Hub staff

0

ChristiNi
Staff
13,688 Points
2011-12-27 5:50 pm EST
Hi Mento,

I'm sorry you're having trouble with your PHP file. This type of error can be caused by one or more of several errors in the PHP code. Without seeing the code, it's difficult to say for sure but we'll help as much as we can with possible causes for this error.

The most common cause of this error is using PHP short tags without setting that in your php.ini file. You can use short open tags for PHP, but you will need to allow that through your php.ini file. Find the SHORT_OPEN_TAG directive in your php.ini and make sure it's set to "1"

Next, check your code for common coding errors such as missing curly brackets, quotes, parenthesis, and commas:

Quotes should be closed
Brackets should be closed
Parenthesis should be closed
Make sure there are no instructions in your code missing a comma

You may find it helpful to use a syntax highlighting editor to help you identify any possible issues with the code.

You may also need to check the placement of your PHP opening and closing tags as well as the placement of PHP and any HTML code in the file.

I hope this helps. Please let us know if you have any additional questions or need further assistance.

Regards,

Christi N.

To submit a comment on this answer, please first login.

Want to share this Question?

Related Articles

It looks like there are no related articles.
Would you like to ask a question about this page? If so, click the button below!
Need More Help?

Help Center Search

Current Customers

Email: support@WebHostingHub.com Ticket: Submit a Support Ticket
Call: 877-595-4HUB (4482)
757-416-6627 (Intl.)
Chat: Click To Chat Now

Ask the Community

Get help with your questions from our community of like-minded hosting users and Web Hosting Hub Staff.

Not a Customer?

Get web hosting from a company that is here to help.
}