Syntax Error and PHP formatting errors

Post your questions and problem reports here

Moderator: kfury77

Forum rules
Please try to follow these guidelines. This will help to receive faster and more accurate response.
  • Check the Support section of the corresponding product first. Chances are you will find your answer there;
  • Do not create new topics for already reported problems. Add your comments to the existing topics instead;
  • Create separate topic for each problem request. Do NOT post a number of non-related problem reports in a single topic;
  • Give your topic a meaningful title. Titles such as "A question," "Bug report" and "Help!" provide others no clue what your message is about;
  • Include the version number of the software you are using;
  • This is not an official customer support helpdesk. If you need a prompt and official response, please contact our support team directly instead. It may take a while until you receive a reply in the forum;
Post Reply
grobot
Posts: 2
Joined: Sun Sep 09, 2007 6:16 am
Location: Canterbury New Zealand

Syntax Error and PHP formatting errors

Post by grobot »

RapidPHP2007 Version 8.1(8.1.0.78)

This may be covered earlier but I have browsed thru and cannot find any reference to it.

If a preview or page fails I have to open manually the php.log file, run to the end and see what it was I failed to do to allow my pages to work.

It normaly is something as daft as a semi colon or one " or } too many or too short.

The syntax check just beeps and says Ng filename.php in a little popup or says no problemo.

when it says Ng it resets to the top of the script and leaves me guessing where.

To me this is a major problem as it really slows me down.
Is the php and or other scripting types not pre-processed before we get to the preview stage, nothing seems to appear in the messages view or Inspector view so I am at a loss.

Obv something simple and I am too simple to see it.

Regards

Gary
grobot
Posts: 2
Joined: Sun Sep 09, 2007 6:16 am
Location: Canterbury New Zealand

Post by grobot »

Hmm ok I seem to have managed to find a solution by switching error reporting on in the php.ini file.

Personally this isn't what I was hoping for.

Is it not possible for the PHP Editor to capture the log and display results that way rather than leaving your site in a position where information that could be detrimental to your security has to be enabled.

ie the following from the ini file.
; Print out errors (as a part of the output). For production web sites,
; you're strongly encouraged to turn this feature off, and use error logging
; instead (see below). Keeping display_errors enabled on a production web site
; may reveal security information to end users, such as file paths on your Web
; server, your database schema or other information.
display_errors = On
Cary
Posts: 82
Joined: Mon May 28, 2007 10:41 pm

Post by Cary »

You're right. That would be a problem for a production server, but it shouldn't be a problem for a local testing server which nobody else will access.
User avatar
Karlis
Site Admin
Posts: 3605
Joined: Mon Jul 15, 2002 5:24 pm
Location: Riga, Latvia, Europe
Contact:

Post by Karlis »

The syntax check will only detect syntax problems such as missing } or ;, it will not detect problems in logic. You should really keep error reporting turned on for testing purposes.

As I just tested it, it does not change cursor position if there are no errors found.
Karlis Blumentals
Blumentals Software
www.blumentals.net
Post Reply