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

URL Query problem with phalcon serve #1305

Closed
AdnanBabakan opened this issue Jun 19, 2019 · 5 comments
Closed

URL Query problem with phalcon serve #1305

AdnanBabakan opened this issue Jun 19, 2019 · 5 comments
Assignees
Milestone

Comments

@AdnanBabakan
Copy link

Expected and Actual Behavior

When using phalcon serve as a development serve when trying to have url query for GET parameters development server cannot recognize it correctly.

http://icriticize.local/x/login?_m=SUCC_LOGOUT will cause the error below:

iCriticize\Controllers\IndexController handler class cannot be loaded

#0 [internal function]: Phalcon\Mvc\Dispatcher->_throwDispatchException('iCriticize\\Cont...', 2)
#1 [internal function]: Phalcon\Dispatcher->dispatch()
#2 C:\xampp\htdocs\icriticize\public\index.php(42): Phalcon\Mvc\Application->handle()
#3 C:\xampp\htdocs\icriticize\.htrouter.php(30): require_once('C:\\xampp\\htdocs...')
#4 {main}

and using the url http://icriticize.local/x/login/?_m=SUCC_LOGOUT with a / at the end of the route before the query will cause the error below:

iCriticize\Controllers\XController handler class cannot be loaded

#0 [internal function]: Phalcon\Mvc\Dispatcher->_throwDispatchException('iCriticize\\Cont...', 2)
#1 [internal function]: Phalcon\Dispatcher->dispatch()
#2 C:\xampp\htdocs\icriticize\public\index.php(42): Phalcon\Mvc\Application->handle()
#3 C:\xampp\htdocs\icriticize\.htrouter.php(30): require_once('C:\\xampp\\htdocs...')
#4 {main}

Totally means that without / at the end of the url causes phalcon to look for the default controller and with / at the end of the url causes phalcon to look for the correct controller but still cause error.

Details

Phalcon info:

Phalcon DevTools (3.4.0)

Environment:
  OS: Windows NT ADNAN-PC 10.0 build 18362 (Windows 10) AMD64
  PHP Version: 7.3.5
  PHP SAPI: cli
  PHP Bin: C:\xampp\php\php.exe
  PHP Extension Dir: C:\php\ext
  PHP Bin Dir: C:\php
  Loaded PHP config: C:\xampp\php\php.ini
Versions:
  Phalcon DevTools Version: 3.4.0
  Phalcon Version: 3.4.3
  AdminLTE Version: 2.3.6
@Jeckerson Jeckerson added this to the 3.4.x milestone Jun 27, 2019
@Jeckerson Jeckerson self-assigned this Jun 27, 2019
@Jeckerson
Copy link
Member

Can you post here the routes that handles /x/login?_m=SUCC_LOGOUT?

@AdnanBabakan
Copy link
Author

Here you are:

$x_user->add('/login', ['action' => 'login'])->setName('login');

@CameronHall
Copy link
Contributor

@Ultimater would this have anything to do with the changes you've made?

@Ultimater
Copy link
Member

@CameronHall Negative. The changes you speak of I had Jackerson revert so I wouldn't be holding back the 3.4.2 release, the version being used here is 3.4.0 and thus wouldn't have been affected anyways.

@AdnanBabakan Are you able to edit your index.php file and compare the output of the following between Apache and phalcon serve to see if you notice any differences?

<?php
echo $_GET['_url'];
exit;
?>

Jeckerson added a commit that referenced this issue Nov 3, 2019
Jeckerson added a commit that referenced this issue Nov 3, 2019
Jeckerson added a commit that referenced this issue Nov 3, 2019
@Jeckerson Jeckerson mentioned this issue Nov 3, 2019
@Jeckerson
Copy link
Member

Fixed in 3.4.7. Feel free to re-open in case new occurrences.

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

No branches or pull requests

5 participants