Thread: [gbd-dev] regexptest.php not up to date?
Status: Beta
Brought to you by:
mccabe
From: Iassen H. <ih...@da...> - 2005-07-06 19:44:23
Attachments:
test_mssql.php
output.html
|
It looks like the content of Gubed/ServerScripts/develop/ is not up to date, because I do not get an explanation (and a link) on which line is the error. All I get is: C:/apache2triad/htdocs/owl/phplib/test_mssql.php 55 lines Original file did not parse I am attaching the source of the full output HTML and the test_mssql.php file that has the problem. I am sure it does have some syntax error in it, so I am sure it is not an issue of parsing, but simply it does not display what the error is. I guess one peculiar thing is, I am running under MS Windows. PHP is 5.0.4, not that it should matter. --On Wednesday, July 06, 2005 06:09 +0200 Linus McCabe <Li...@mc...> wrote: > > Hi! > > It was a while ago since a parsing error was reported... > Replace your GubedParserTokenizer.php file with the attached one and it > should work better. > > About regexptest: > I took the file you sent me and put it on my computer, in the dir > "Gubed/ServerScripts/develop" to be precise, but it can be anywhere. > > Then I enter ./ in 'specify path' on the regexptest page. (ie, the path > where i put the file) > > Then when i click "search" i get: > > ... > 1: ./testcode.php 3837 lines T_ARRAY: 'array' > *** Did not parse ok! *** > 2: ./regexptestcode.php 375 lines Parsed ok! > 3: ./diffdisplay.php 123 lines Parsed ok! > 4: ./index.php 26 lines Parsed ok! > 5: ./postprocessdiff.php 68 lines Parsed ok! > 6: ./regexptest.php 239 lines Parsed ok! > 7: ./postprocess.php 21 lines Parsed ok! > 8: ./regexptestcode_handmade.php 381 lines Original file did not parse > ... > > Ie, it tells me it could parse all files except the one you gave me > (which i saved as testcode.php when i saved it from the browser) > > I can then click on 'Did not parse ok' which is a link. > > Gubed will now show the code in modified (parsed) and unmodified versions > side by side as well as tell you what line it fails on. Sometimes the > line is not exact, since a parse error from gubed can result in a syntax > error further down (just like php give you the wrong line number > sometimes). > > I find the line it tells me and compare the parsed code to the original > and figure out what went wrong, this time it was very easy... > > Anyway, you can always send unparsable files if you dont want to do this > work yourself. > You're also encouraged to do the "Start scanning entire system > (*nix/Linux only)" on regexptest.php if you can and see if you have > other unparsable files... > > Thanks for reporting the bug and let me know if it works better now! > > cheers > /Linus |
From: Linus M. <Li...@mc...> - 2005-07-06 20:12:19
|
On Wednesday 06 July 2005 21.44, Iassen Hristov wrote: > It looks like the content of Gubed/ServerScripts/develop/ is not up to > date, because I do not get an explanation (and a link) on which line is the > error. Well, regexptest only gives you a link if the original file is error free (ie, its made to find errors in Gubeds parser, not to find errors in you php files) However, you can still make it test the file by doing something like: http://server/Gubed/ServerScripts/develop/diffdisplay.php?file=C:/apache2triad/htdocs/owl/phplib/test_mssql.php it will then show the original and parsed file as usual, but also the original file will have an error. In you specific case, its the missing parenthesis at the bottom (if you didnt already know). Once thats taken care of, it parses fine both before and after gubed's alternations. /linus > All I get is: > > C:/apache2triad/htdocs/owl/phplib/test_mssql.php 55 lines Original file did > not parse > > I am attaching the source of the full output HTML and the test_mssql.php > file that has the problem. I am sure it does have some syntax error in it, > so I am sure it is not an issue of parsing, but simply it does not display > what the error is. > > I guess one peculiar thing is, I am running under MS Windows. PHP is 5.0.4, > not that it should matter. > > --On Wednesday, July 06, 2005 06:09 +0200 Linus McCabe <Li...@mc...> > > wrote: > > Hi! > > > > It was a while ago since a parsing error was reported... > > Replace your GubedParserTokenizer.php file with the attached one and it > > should work better. > > > > About regexptest: > > I took the file you sent me and put it on my computer, in the dir > > "Gubed/ServerScripts/develop" to be precise, but it can be anywhere. > > > > Then I enter ./ in 'specify path' on the regexptest page. (ie, the path > > where i put the file) > > > > Then when i click "search" i get: > > > > ... > > 1: ./testcode.php 3837 lines T_ARRAY: 'array' > > *** Did not parse ok! *** > > 2: ./regexptestcode.php 375 lines Parsed ok! > > 3: ./diffdisplay.php 123 lines Parsed ok! > > 4: ./index.php 26 lines Parsed ok! > > 5: ./postprocessdiff.php 68 lines Parsed ok! > > 6: ./regexptest.php 239 lines Parsed ok! > > 7: ./postprocess.php 21 lines Parsed ok! > > 8: ./regexptestcode_handmade.php 381 lines Original file did not parse > > ... > > > > Ie, it tells me it could parse all files except the one you gave me > > (which i saved as testcode.php when i saved it from the browser) > > > > I can then click on 'Did not parse ok' which is a link. > > > > Gubed will now show the code in modified (parsed) and unmodified versions > > side by side as well as tell you what line it fails on. Sometimes the > > line is not exact, since a parse error from gubed can result in a syntax > > error further down (just like php give you the wrong line number > > sometimes). > > > > I find the line it tells me and compare the parsed code to the original > > and figure out what went wrong, this time it was very easy... > > > > Anyway, you can always send unparsable files if you dont want to do this > > work yourself. > > You're also encouraged to do the "Start scanning entire system > > (*nix/Linux only)" on regexptest.php if you can and see if you have > > other unparsable files... > > > > Thanks for reporting the bug and let me know if it works better now! > > > > cheers > > /Linus |
From: Iassen H. <ihr...@da...> - 2005-07-07 00:30:24
|
I guess my problem is that the version of PHP I have for some reason is not giving out any error information. It just quits with no error message whatsoever. This happened to me several times while debugging. It must be a problem with the compilation of PHP (I am using the apache2triad package which has it pre-compiled). This is why I don't see the errors as you see them. For example: > C:\apache2triad\htdocs\owl\phplib>php -l test_mssql.php > Errors parsing test_mssql.php Gives me only this "Errors parsing test_mssql.php". Nothing more. Executing the same thing on a Linux box (again PHP 5.0.4) returns a normal error as expected > Parse error: parse error, unexpected ';' in test_mssql.php on line 21 > Errors parsing test_mssql.php --On Wednesday, July 06, 2005 22:11 +0200 Linus McCabe <Li...@mc...> wrote: > On Wednesday 06 July 2005 21.44, Iassen Hristov wrote: >> It looks like the content of Gubed/ServerScripts/develop/ is not up to >> date, because I do not get an explanation (and a link) on which line is >> the error. > > Well, regexptest only gives you a link if the original file is error free > (ie, its made to find errors in Gubeds parser, not to find errors in you > php files) > > However, you can still make it test the file by doing something like: > http://server/Gubed/ServerScripts/develop/diffdisplay.php?file=C:/apache2 > triad/htdocs/owl/phplib/test_mssql.php > > it will then show the original and parsed file as usual, but also the > original file will have an error. In you specific case, its the missing > parenthesis at the bottom (if you didnt already know). > Once thats taken care of, it parses fine both before and after gubed's > alternations. > > /linus > |
From: Brett S. <tec...@se...> - 2005-07-07 01:17:58
|
I run php from the command line against my php files to see errors, either the DOS box on Windows or an xterm on Linux. Php has an option -f used to suppress the HTML headers in this case. Brett On Wed, 06 Jul 2005 20:30:18 -0400, "Iassen Hristov" <ihr...@da...> said: > I guess my problem is that the version of PHP I have for some reason is > not > giving out any error information. It just quits with no error message > whatsoever. This happened to me several times while debugging. > > It must be a problem with the compilation of PHP (I am using the > apache2triad package which has it pre-compiled). > > This is why I don't see the errors as you see them. > For example: > > > C:\apache2triad\htdocs\owl\phplib>php -l test_mssql.php > > Errors parsing test_mssql.php > > Gives me only this "Errors parsing test_mssql.php". Nothing more. > > Executing the same thing on a Linux box (again PHP 5.0.4) returns a > normal > error as expected > > > Parse error: parse error, unexpected ';' in test_mssql.php on line 21 > > Errors parsing test_mssql.php > > > --On Wednesday, July 06, 2005 22:11 +0200 Linus McCabe <Li...@mc...> > wrote: > > > On Wednesday 06 July 2005 21.44, Iassen Hristov wrote: > >> It looks like the content of Gubed/ServerScripts/develop/ is not up to > >> date, because I do not get an explanation (and a link) on which line is > >> the error. > > > > Well, regexptest only gives you a link if the original file is error free > > (ie, its made to find errors in Gubeds parser, not to find errors in you > > php files) > > > > However, you can still make it test the file by doing something like: > > http://server/Gubed/ServerScripts/develop/diffdisplay.php?file=C:/apache2 > > triad/htdocs/owl/phplib/test_mssql.php > > > > it will then show the original and parsed file as usual, but also the > > original file will have an error. In you specific case, its the missing > > parenthesis at the bottom (if you didnt already know). > > Once thats taken care of, it parses fine both before and after gubed's > > alternations. > > > > /linus > > > > > > > ------------------------------------------------------- > SF.Net email is sponsored by: Discover Easy Linux Migration Strategies > from IBM. Find simple to follow Roadmaps, straightforward articles, > informative Webcasts and more! Get everything you need to get up to > speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click > _______________________________________________ > Gubed-devel mailing list > Gub...@li... > https://lists.sourceforge.net/lists/listinfo/gubed-devel ------------------------------------- Brett C. Serkez, Technical Trainer |
From: Linus M. <Li...@mc...> - 2005-07-07 04:46:49
|
On Thursday 07 July 2005 02.30, Iassen Hristov wrote: > I guess my problem is that the version of PHP I have for some reason is not > giving out any error information. It just quits with no error message > whatsoever. This happened to me several times while debugging. Check your php.ini for the display_errors setting, is it on? /linus |
From: Linus M. <Li...@mc...> - 2005-07-07 04:48:21
|
Hi Do you mean that if you run through the webserver it does not show the error, but it does if you run cli version? Thats the behaviour i see when turning off display_errors anyway (it seems that setting has no meaning for cli version of php?) /Linus On Thursday 07 July 2005 03.17, Brett Serkez wrote: > I run php from the command line against my php files to see errors, > either the DOS box on Windows or an xterm on Linux. Php has an option > -f used to suppress the HTML headers in this case. > > Brett > > On Wed, 06 Jul 2005 20:30:18 -0400, "Iassen Hristov" > > <ihr...@da...> said: > > I guess my problem is that the version of PHP I have for some reason is > > not > > giving out any error information. It just quits with no error message > > whatsoever. This happened to me several times while debugging. > > > > It must be a problem with the compilation of PHP (I am using the > > apache2triad package which has it pre-compiled). > > > > This is why I don't see the errors as you see them. > > > > For example: > > > C:\apache2triad\htdocs\owl\phplib>php -l test_mssql.php > > > Errors parsing test_mssql.php > > > > Gives me only this "Errors parsing test_mssql.php". Nothing more. > > > > Executing the same thing on a Linux box (again PHP 5.0.4) returns a > > normal > > error as expected > > > > > Parse error: parse error, unexpected ';' in test_mssql.php on line 21 > > > Errors parsing test_mssql.php > > > > --On Wednesday, July 06, 2005 22:11 +0200 Linus McCabe <Li...@mc...> > > > > wrote: > > > On Wednesday 06 July 2005 21.44, Iassen Hristov wrote: > > >> It looks like the content of Gubed/ServerScripts/develop/ is not up to > > >> date, because I do not get an explanation (and a link) on which line > > >> is the error. > > > > > > Well, regexptest only gives you a link if the original file is error > > > free (ie, its made to find errors in Gubeds parser, not to find errors > > > in you php files) > > > > > > However, you can still make it test the file by doing something like: > > > http://server/Gubed/ServerScripts/develop/diffdisplay.php?file=C:/apach > > >e2 triad/htdocs/owl/phplib/test_mssql.php > > > > > > it will then show the original and parsed file as usual, but also the > > > original file will have an error. In you specific case, its the > > > missing parenthesis at the bottom (if you didnt already know). > > > Once thats taken care of, it parses fine both before and after gubed's > > > alternations. > > > > > > /linus > > > > ------------------------------------------------------- > > SF.Net email is sponsored by: Discover Easy Linux Migration Strategies > > from IBM. Find simple to follow Roadmaps, straightforward articles, > > informative Webcasts and more! Get everything you need to get up to > > speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click > > _______________________________________________ > > Gubed-devel mailing list > > Gub...@li... > > https://lists.sourceforge.net/lists/listinfo/gubed-devel > > ------------------------------------- > Brett C. Serkez, Technical Trainer > > > > ------------------------------------------------------- > SF.Net email is sponsored by: Discover Easy Linux Migration Strategies > from IBM. Find simple to follow Roadmaps, straightforward articles, > informative Webcasts and more! Get everything you need to get up to > speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click > _______________________________________________ > Gubed-devel mailing list > Gub...@li... > https://lists.sourceforge.net/lists/listinfo/gubed-devel |
From: Brett S. <tec...@se...> - 2005-07-07 09:37:38
|
Varies. I do see php errors thru the webserver, but not all or always. Sometimes I just get a blank page and then if I run manually I get the errors, other times I see the errors thru the webserver. This behavior seems to vary depending on which webserver I use on which platform. When I'm not sure, I run manually. I've started playing with php5 and see that the cli and cgi binaries are now separate. Brett On Thu, 7 Jul 2005 06:47:50 +0200, "Linus McCabe" <Li...@mc...> said: > > Hi > > Do you mean that if you run through the webserver it does not show the > error, > but it does if you run cli version? > > Thats the behaviour i see when turning off display_errors anyway (it > seems > that setting has no meaning for cli version of php?) > > /Linus > > On Thursday 07 July 2005 03.17, Brett Serkez wrote: > > I run php from the command line against my php files to see errors, > > either the DOS box on Windows or an xterm on Linux. Php has an option > > -f used to suppress the HTML headers in this case. > > > > Brett > > > > On Wed, 06 Jul 2005 20:30:18 -0400, "Iassen Hristov" > > > > <ihr...@da...> said: > > > I guess my problem is that the version of PHP I have for some reason is > > > not > > > giving out any error information. It just quits with no error message > > > whatsoever. This happened to me several times while debugging. > > > > > > It must be a problem with the compilation of PHP (I am using the > > > apache2triad package which has it pre-compiled). > > > > > > This is why I don't see the errors as you see them. > > > > > > For example: > > > > C:\apache2triad\htdocs\owl\phplib>php -l test_mssql.php > > > > Errors parsing test_mssql.php > > > > > > Gives me only this "Errors parsing test_mssql.php". Nothing more. > > > > > > Executing the same thing on a Linux box (again PHP 5.0.4) returns a > > > normal > > > error as expected > > > > > > > Parse error: parse error, unexpected ';' in test_mssql.php on line 21 > > > > Errors parsing test_mssql.php > > > > > > --On Wednesday, July 06, 2005 22:11 +0200 Linus McCabe <Li...@mc...> > > > > > > wrote: > > > > On Wednesday 06 July 2005 21.44, Iassen Hristov wrote: > > > >> It looks like the content of Gubed/ServerScripts/develop/ is not up to > > > >> date, because I do not get an explanation (and a link) on which line > > > >> is the error. > > > > > > > > Well, regexptest only gives you a link if the original file is error > > > > free (ie, its made to find errors in Gubeds parser, not to find errors > > > > in you php files) > > > > > > > > However, you can still make it test the file by doing something like: > > > > http://server/Gubed/ServerScripts/develop/diffdisplay.php?file=C:/apach > > > >e2 triad/htdocs/owl/phplib/test_mssql.php > > > > > > > > it will then show the original and parsed file as usual, but also the > > > > original file will have an error. In you specific case, its the > > > > missing parenthesis at the bottom (if you didnt already know). > > > > Once thats taken care of, it parses fine both before and after gubed's > > > > alternations. > > > > > > > > /linus > > > > > > ------------------------------------------------------- > > > SF.Net email is sponsored by: Discover Easy Linux Migration Strategies > > > from IBM. Find simple to follow Roadmaps, straightforward articles, > > > informative Webcasts and more! Get everything you need to get up to > > > speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click > > > _______________________________________________ > > > Gubed-devel mailing list > > > Gub...@li... > > > https://lists.sourceforge.net/lists/listinfo/gubed-devel > > > > ------------------------------------- > > Brett C. Serkez, Technical Trainer > > > > > > > > ------------------------------------------------------- > > SF.Net email is sponsored by: Discover Easy Linux Migration Strategies > > from IBM. Find simple to follow Roadmaps, straightforward articles, > > informative Webcasts and more! Get everything you need to get up to > > speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click > > _______________________________________________ > > Gubed-devel mailing list > > Gub...@li... > > https://lists.sourceforge.net/lists/listinfo/gubed-devel > > > ------------------------------------------------------- > SF.Net email is sponsored by: Discover Easy Linux Migration Strategies > from IBM. Find simple to follow Roadmaps, straightforward articles, > informative Webcasts and more! Get everything you need to get up to > speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click > _______________________________________________ > Gubed-devel mailing list > Gub...@li... > https://lists.sourceforge.net/lists/listinfo/gubed-devel ------------------------------------- Brett C. Serkez, Technical Trainer |
From: Iassen H. <ihr...@da...> - 2005-07-07 15:07:40
|
> Do you mean that if you run through the webserver it does not show the > error, but it does if you run cli version? Yes. > > That's the behaviour i see when turning off display_errors anyway (it > seems that setting has no meaning for cli version of php?) > You are correct. The errors were not displayed, but logged to a file as specified in display_errors in php.ini Sorry, I am new to PHP. |
From: Linus M. <Li...@mc...> - 2005-07-07 16:17:17
|
On Thursday 07 July 2005 17.07, Iassen Hristov wrote: > You are correct. The errors were not displayed, but logged to a file as > specified in display_errors in php.ini > > Sorry, I am new to PHP. No problem, just happy to help :) /L |