View Single Post

  #7 (permalink)  
Old 05-08-2008
ELINTPimp
 
Posts: n/a
Default Re: Tool to parse and validate PHP script?

On May 8, 9:59 am, Rik Wasmus <luiheidsgoe...@hotmail.com> wrote:
> ELINTPimp wrote:
> > On May 8, 9:06 am, Rik Wasmus <luiheidsgoe...@hotmail.com> wrote:
> >> Gilles Ganault wrote:
> >>> Is there a tool on Linux/FreeBSD that can parse a PHP script to make
> >>> sure there's no compile-time issues?
> >>> I just noticed that I copy/pasted some code that had lines longer that
> >>> can fit in the SSH terminal window, and that caused a run-time error
> >>> as reported in the /var/log/httpd-error.log but not in the browser:
> >>> [error] PHP Notice: Undefined index: etablissemen\nt in
> >>> /usr/local/www/apache22/data/prospect.php on line 49, referer:
> >>>http://server/myscript.php
> >> You can run 'php -l thescript.php' to do a syntax check, however your
> >> error would not be catched by that: this is a run time error, and only
> >> catchable by actually running the script.

>
> >> Of course, on live websites error should not be shown, but logged, as is
> >> done her apparently.

>
> > Any chance to transfer your file by ftp or sftp?

>
> What do you mean? 'my file'?
>
> --
> Rik Wasmus


Sorry, Rik, I replied to the wrong comment. I was referring to the
posters copy/paste method being the problem and skip the need for
checking this post-transfer altogether by transferring the file they
created (and presumably tested) instead of copy/paste over ssh.
Reply With Quote