Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Phalcon-micro test: error in setup #5936

Closed
diplopito opened this issue Aug 18, 2020 · 3 comments
Closed

Phalcon-micro test: error in setup #5936

diplopito opened this issue Aug 18, 2020 · 3 comments

Comments

@diplopito
Copy link
Contributor

diplopito commented Aug 18, 2020

OS (Please include kernel version)

Ubuntu 18.04 | Kernel: 4.4.0-19041-Microsoft

Expected Behavior

(Replacing map for get): http://localhost/benchmark/fortunes:

id message
11 <script>alert("This should not be displayed in a browser alert box.");</script>
4 A bad random number generator: 1, 1, 1, 1, 1, 4.33e+67, 1, 1, 1
5 A computer program does what you tell it to do, not what you want it to do.
2 A computer scientist is someone who fixes things that aren't broken.
8 A list is only as strong as its weakest link. — Donald Knuth
0 Additional fortune added at request time.
3 After enough decimal places, nobody gives a damn.
7 Any program that runs right is obsolete.
10 Computers make very fast, very accurate mistakes.
6 Emacs is a nice operating system, but I prefer UNIX. — Tom Christaensen
9 Feature: A bug with seniority.
1 fortune: No such file or directory
12 フレームワークのベンチマーク

Actual Behavior

PhalconException: Not-Found handler is not callable or is not defined

Steps to reproduce behavior

Access http://localhost/benchmark/fortunes

Other details and logs

There is a known issue when running Phalcon from a subdirectory: phalcon/cphalcon#14559

So the handler should be:

$app->handle($_GET['_url']);

and not:

$request = new Phalcon\Http\Request();
$app->handle($request->getURI());

as the current test.

After changing these lines, Phalcon Micro works flawlessly (no errors in any of the four entrypoints); the benchmark is reporting 50K+ errors.

@NateBrady23
Copy link
Member

@diplopito Can you make a pull request for this change?

@diplopito
Copy link
Contributor Author

@nbrady-techempower sure, just did! One question: if the benchmark only uses POST or GET, MAP could be replaced by the selected case (there is a small performance penalty using MAP). Please let me know and I'll update it as well.

@NateBrady23
Copy link
Member

Gonna close this and move the discussion, if one is warranted, to the PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants