PHP Syntax Checking in CSE HTML Validator

For technical support for all editions of CSE HTML Validator. Includes bug reports.

PHP Syntax Checking in CSE HTML Validator

Postby Albert Wiersch » Mon Mar 21, 2011 9:01 am

If you write PHP and have CSE HTML Validator, then be sure to try the PHP syntax checking in CSE HTML Validator.

Here's a little tutorial on getting it working.

1. First you'll need php.exe and supporting files. CSE HTML Validator uses this to run the syntax check, the integrates the messages with its own results.

I recommend downloading the Windows binaries ZIP file from here (either thread safe or non thread safe should work):
http://windows.php.net/download/

2. Next, extract all the files and folders in the PHP binaries ZIP file to a folder on your hard drive. On my 64-bit system, I extracted the files to "C:\Program Files (x86)\PHP". On a 32-bit system this would be "C:\Program Files\PHP".

3. Next, load CSE HTML Validator and press Ctrl+F4 to go to the Validator Engine Options->PHP Checker Page. Make sure the box to enable PHP syntax messages is checked, and make sure that the path to php.exe is correct.

4. Press the OK button (hit "Save Now" first if you'd like).

5. Try checking a PHP document in CSE HTML Validator and see if it displays the results. If there are no PHP syntax problems, then it should include the follow comment message (unless this message has been disabled).
Code: Select all
[PHP] No syntax errors detected


Below is a screenshot of what the PHP installation folder should contain (notice all the files and folders):

Image

Finally, here is the online documentation for the Validator Engine Options->PHP Checker Page:
http://www.htmlvalidator.com/htmlval/v1 ... r_node.htm
Image
Albert Wiersch
User avatar
Albert Wiersch
Site Admin
Site Admin
 
Posts: 2435
Joined: Sat Dec 11, 2004 10:23 am
Location: Near Dallas, TX

Re: PHP Syntax Checking in CSE HTML Validator

Postby CodeChargeMVP » Tue Sep 13, 2011 6:15 am

Hi Albert,

Since I´m working with an apache server on a Windows 7 Home Premium,

I´ve download the Windows binaries PHP 5.2 (5.2.17) VC6 X86,

but I see I can choose within Non Thread Safe and Thread Safe,

I don´t really know what makes the difference so far,so I did choose,

Non Thread Safe, than I see four download options:

- source code
- zip
- installer
- debug pack

The questions are simply as it gets:

I´m running EasyPHP 2.0.0.0 which has an earlier PHP version which fix with my CMS and the

pages I´m developing for the web application projects.

If I Install the Windows Binaries PHP 5.2 (5.2.17) VC6 X86

¿it will affect to the earlier EasyPHP?

In other words, I don´t know if installing the Windows binaries will stop my web application projects working

since it may install a new PHP Version which my projects does not support.

¿Which one of the four files provides the php.exe file?

Thank you very much in advance.
CodeChargeMVP
Rank 0 - Newcomer
Rank 0 - Newcomer
 
Posts: 3
Joined: Thu Sep 08, 2011 3:08 am

Re: PHP Syntax Checking in CSE HTML Validator

Postby Albert Wiersch » Tue Sep 13, 2011 8:44 am

CodeChargeMVP wrote:If I Install the Windows Binaries PHP 5.2 (5.2.17) VC6 X86

¿it will affect to the earlier EasyPHP?


I don't think so, as long as you install them in another folder. If you get the ZIP package, then you can just unzip the files to the folder that you want. That would probably be the safest thing to do. Or, if you find that you already have the php.exe executable somewhere on your system from EasyPHP, then you could just try pointing CSE HTML Validator to that, so you may want to search your system for "php.exe" to see if it's already there.

CodeChargeMVP wrote:In other words, I don´t know if installing the Windows binaries will stop my web application projects working

since it may install a new PHP Version which my projects does not support.


I don't think It should as long as you keep it separate and not overwrite any files.

CodeChargeMVP wrote:¿Which one of the four files provides the php.exe file?

Thank you very much in advance.


I would recommend the ZIP package or the installer. You definitely don't need the source.

This may also help:
http://www.htmlvalidator.com/php-script-checker.php

If anything is not clear enough on the above page, please let me know so I can try to improve it.

Thank you.
Image
Albert Wiersch
User avatar
Albert Wiersch
Site Admin
Site Admin
 
Posts: 2435
Joined: Sat Dec 11, 2004 10:23 am
Location: Near Dallas, TX

Re: PHP Syntax Checking in CSE HTML Validator

Postby CodeChargeMVP » Wed Sep 14, 2011 3:04 am

Hi,

PHP-Script-Checker is working great now,

I found the PHP.Exe on C:\Program Files(x86)\EasyPHP3.0\PHP\PHP.Exe

so I´m able to check out now for errors on the PHP Scripts.

Thanks for your time.
CodeChargeMVP
Rank 0 - Newcomer
Rank 0 - Newcomer
 
Posts: 3
Joined: Thu Sep 08, 2011 3:08 am


Return to CSE Tech Support

Who is online

Users browsing this forum: No registered users and 3 guests