header(“Location:./comehere.php?”.session_name().”=”.session_id());
Use along with session_write_close();
header(“Location:./comehere.php?”.session_name().”=”.session_id());
Use along with session_write_close();
After updating php, I got: “Content Encoding Error” for some Joomla site.
configuration.php:
public $gzip = ‘0’;
rm -- ----myfile
The “–” after rm prevents processing of more options, so everything after it will not be taken as option.
You need to refresh the browser window automatically when it is resized.
You can find plenty of complex solutions for this issue, with javascript, and preferably using jquery, the bigger the library the better.
Or you can also put this in the body tag:
<body onResize=”window.location.href = window.location.href;”>
Another old one to remember for the road… simple question:
How to reconfigure / set the timezone in Debian, without rebooting?
dpkg-reconfigure tzdata
Soooo annoying to find plenty of solutions on the net that just tell about setting up the config and have to reboot. No, you dont have to reboot under a proper Linux to change the time. That would be just plain shame.
Old stuff, update PHP for squeeze
Before going into distribution upgrade for my hosting server:
DTC GPLHost running on Squeeze (yeah, I know.)
I will update php, using dotdeb repositories
https://www.dotdeb.org/instructions/
And Debian flavored distros.. tested on Mint.
This may be a good idea, for example for Android Studio.
Found from:
http://www.webupd8.org/2014/03/how-to-install-oracle-java-8-in-debian.html
First uninstall all Java related previous stuff you may have:
apt-get update
apt-get upgrade
apt-get autoremove
apt-get purge ca-certificates-java default-jre default-jre-headless icedtea-\* icedtea-netx icedtea-netx-common openjdk-\* tzdata-java gcj-\* gcj-jre gcj-jre-headless
apt-get autoremove
apt-get update
Then:
su –
echo “deb http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main” | tee /etc/apt/sources.list.d/webupd8team-java.list
echo “deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main” | tee -a /etc/apt/sources.list.d/webupd8team-java.list
apt-key adv –keyserver hkp://keyserver.ubuntu.com:80 –recv-keys EEA14886
apt-get update
apt-get install oracle-java8-installer
exit
Checking:
root@ary-l750:/home/alain# java -version
java version “1.8.0_60”
Java(TM) SE Runtime Environment (build 1.8.0_60-b27)
Java HotSpot(TM) 64-Bit Server VM (build 25.60-b23, mixed mode)
Yep that’s it, tested and approved.
The guys at webupd8 also have a nice package to set the environment vars and make it default:
apt-get install oracle-java8-set-default
Easy when you know it:
for file in *.JPG; do convert $file -auto-orient oriented-$file; done
If you want to apply this to only one image:
convert imageinfile -auto-orient imageoutfile
Very basic IPTables reference
How to block an IP address in Linux from ssh:
DROP anything coming from the IP address 1.2.3.4:
append will put this new rule at the end of your ruleset:
iptables -A INPUT -s 1.2.3.4 -j DROP
with insert you can tell which position you want your rule to be:
iptables -I INPUT 3 -s 1.2.3.4 -j DROP
When you insert the rule will not replace the existing one.
list rules:
iptables -L
list specific INPUT rules:
iptables -L INPUT
find where the rule is in the list, #1 at the top, and delete it:
iptables -D INPUT 3
(removes rule #3 from “INPUT”)
I’ve got my wireless setup at home working just fine with my Linux machines (Debian) and for some laptop running Windows 7 could not connect.
The SSID is not hidden (better not to), and still could not find it. I could actually at start see the name of my SSID flashing and disappearing in the list of available network.
Till I discover that this windows could not handle channel number 13… when I changed the channel number of the router, the SSID came in the list.
Great.