natanfelles/codeigniter-migrate

Migration does not work.

Closed this issue · 6 comments

Downloaded, unpacked as you wrote. If i'm try to install a new version (or check in a original version ), it issues a following error: CSRF Token could not be get.
Use : codeigniter 3.1.5 + HMVC + postgres

You need a route to site_url('migrate/token').

This error is here. Also see the line 114.

Try access your site_url/migrate/token directly and see whats happen. If it works you will see a JSON response.

response header

Cache-Control no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Connection Keep-Alive
Content-Length 69
Content-Type application/json
Date Tue, 01 Aug 2017 08:14:28 GMT
Expires Thu, 19 Nov 1981 08:52:00 GMT
Keep-Alive timeout=5, max=100
Pragma no-cache
Server Apache/2.4.18 (Ubuntu)
Set-Cookie csrf_cookie_name=cccdddecac8ca92dc2e7c9511a4118b7; expires=Tue, 01-Aug-2017 10:14:28 GMT; Max-Age=7200; path=/

request headers

Accept text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8
Accept-Encoding gzip, deflate
Accept-Language en-US,en;q=0.5
Cache-Control no-cache
Connection keep-alive
Cookie csrf_cookie_name=cccdddecac8ca92dc2e7c9511a4118b7; ci_session=eq9s0t04ob4pvfb9v7692pslj8darjdr
Host www.vdrezka.ru
Pragma no-cache
Upgrade-Insecure-Requests 1
User-Agent Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:54.0) Gecko/20100101 Firefox/54.0

JSON
{"name":"csrf_token_name","value":"cccdddecac8ca92dc2e7c9511a4118b7"}

no processing data {"name":"csrf_token_name","value":"cccdddecac8ca92dc2e7c9511a4118b7"}

  • i use php 5.6

And in the browser console, do you can see the log?

Something say me that you have an error in your base_url. Check your application/config/config.php file, you need to set the variable $config['base_url'] value like it: http://domain.tld/. Do not forget the last slash.

in functions of the post have a variable $response , from where it comes?

you may want to add:

the browser receive 200 token and 500 post