Showing posts from November, 2011

Using sed to remove empty lines

sed '/^$/d' myFile > tt  mv tt myFile ref: //alak

Fatal error: Cannot access empty property in /var/www/html//regForm_process.php on line 9

This is te code: $i = 1; foreach($_GET as $name->$value) {     echo 'GET '.$i.': '.$name.' and VALUE = '.$value.' ';     $i+=1; } Basically i wanted to get all the variables,a nd assign them as a var to be fed to a mysql insert query. But the code above is jusr P0C. When called/runned, get this error" Fatal error : Cannot access empty property in  /var/www/html/regForm_process.php  on line  9 The fix? easy. change the ' -> ' to become ' => ' As easy as that -______-" Hope this helps someone. /alak

BackTrack 4 sources.list - BT5

For anyone still stuck at BT4 and can't update their apps, use this sources: deb revolution main microverse non-free testing deb revolution main microverse non-free testing deb revolution main microverse non-free testing ref: /alak

Python: thread.error: can't start new thread

So the case is this: i have a python script that listens on certain port for a connection, and when a client connects, it acts as a tcp forwarder, forwarding connections accordingly. somehow, the script throws exception after few connection: Unhandled exception in thread started by Traceback (most recent call last):   File "", line 55, in server_thread     thread.start_new_thread(forward_client, (client_socket, server_socket)) thread.error: can't start new thread Damn it! so i do what all people been doing, i Google. From below two URL, i was able to understand the situation and came up with the solution: - - Tsunanet states that memory allocation might be the issue. Sort of like where my RAM is not enough for all the threading happening