php - Symfony, error with routing -


i have 1 symfony controller

class apidictionarycontroller extends controller {     /**      * @route("/api/dictionary_list/{userid}/{sessionkey}", name="api/dictionary_list")      */      public function dictionarylistaction($userid=null, $sessionkey=null)     {         // security check         $security = $this->get('app.security');         $security->userid = $userid;         $security->sessionkey = $sessionkey;         $response = new response();         if (!$security->sessionkeyisvalid())         {             $response->setstatuscode(400, 'session key has expiried ['.$sessionkey.'] user ['.$userid.']');             return $response;         }         // content         $statement = $this->get('database_connection')             ->prepare('select * main.service_dictionary_cursor()');         $statement->execute();         // set content         $response->setcharset('utf-8');         $response->setcontent(json_encode($statement->fetchall(), json_unescaped_unicode));         return $response;     }  } 

which returns 404 error in production enviroment. http://xxx.xxx.xxx.xxx/api/dictionary_list/3/a4767716-c68f-40f1-b3cc-fce272eb2e60

i've cleared cache (deleted files /var/cache/prod) did't help.

when tried

sudo php bin/console debug:router --env=prod 

i see

 --------------------- -------- -------- ------ --------------------------------------------------------------------   name                  method   scheme   host   path  --------------------- -------- -------- ------ --------------------------------------------------------------------   api/dictionary_list                /api/message_list/{userid}/{sessionkey}/{parcelid}   api/message_create                 /api/message_create/{userid}/{sessionkey}/{parcelid}/{messagetext}   api/parcel_list                    /api/parcel_list/{userid}/{sessionkey}/{showdate}/{statusid}   api/parcel_content                 /api/parcel_content/{userid}/{sessionkey}/{parcelid}   api/login                          /api/login/{login}/{password}   app_index_index                    /   profile                            /profile/{userid}/{sessionkey}   login                              /login  --------------------- -------- -------- ------ -------------------------------------------------------------------- 

why first string points path /api/message_list/{userid}/{sessionkey}/{parcelid} instead of /api/dictonary_list/{userid}/{sessionkey}/{parcelid} , how fix it?


Comments

Popular posts from this blog

Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12:test (default-test) on project.Error occurred in starting fork -

windows - Debug iNetMgr.exe unhandle exception System.Management.Automation.CmdletInvocationException -

configurationsection - activeMq-5.13.3 setup configurations for wildfly 10.0.0 -