The lamp was installed on my local computer, os - debian8.
That is, the client and server were installed on my local computer.
The following code was saved as setcookie.php on my local computer.
<?php setcookie("user", "Alex Porter", time()+36000); ?> <html> <body> </body> </html>
Now php setcookie.php
been executed on my local computer. The following codes were executed on my local computer.
find / -name "cookies.sqlite" /home/debian8/.mozilla/firefox/joww2h34.default/cookies.sqlite sqlite3 /home/debian8/.mozilla/firefox/joww2h34.default/cookies.sqlite sqlite> .tables moz_cookies sqlite> PRAGMA table_info([moz_cookies]); 0|id|INTEGER|0||1 1|baseDomain|TEXT|0||0 2|appId|INTEGER|0|0|0 3|inBrowserElement|INTEGER|0|0|0 4|name|TEXT|0||0 5|value|TEXT|0||0 6|host|TEXT|0||0 7|path|TEXT|0||0 8|expiry|INTEGER|0||0 9|lastAccessed|INTEGER|0||0 10|creationTime|INTEGER|0||0 11|isSecure|INTEGER|0||0 12|isHttpOnly|INTEGER|0||0 sqlite> select * from moz_cookies where name="Alex Porter"; sqlite> select * from moz_cookies where name="user";
Why is there no information chosen for both of them?
How to set my cookie or not in my firefox? If it is installed on my firefrox, why can't sqlite be selected in the statement?
In my opinion, the sql select * from moz_cookies where name="Alex Porter";
will get something like
name user value Alex Porter expires 1515832198
Nothing is displayed. Do as Aadil P. said, the file was saved as setcookie.php in /var/www/html/tmp/setcookie.php. Performed 127.0.0.1/tmp/setcookie.php in firefox.
Open Cookies with firebug.
The correct result is displayed here.
Two problems remain:
1. How many fields for cookie?
PRAGMA table_info([moz_cookies]); 0|id|INTEGER|0||1 1|baseDomain|TEXT|0||0 2|appId|INTEGER|0|0|0 3|inBrowserElement|INTEGER|0|0|0 4|name|TEXT|0||0 5|value|TEXT|0||0 6|host|TEXT|0||0 7|path|TEXT|0||0 8|expiry|INTEGER|0||0 9|lastAccessed|INTEGER|0||0 10|creationTime|INTEGER|0||0 11|isSecure|INTEGER|0||0 12|isHttpOnly|INTEGER|0||0
There is only name, value, domain, raw size, path, expire, httponly, firebug cookie inspiration security.
Why don't they match? How many cookie elements comply with the relevant international standard?
2.How to write the correct sql command?
select * from moz_cookies where name="user"; select * from moz_cookies where Name="user";
Both of them get nothing.