Strip phpmyadmin export to databases 

Exporting all tables with phpMyAdmin is not a good idea since there are some system tables which cannot be written during the importing.
(information_schema, mysql, performance_schema, test). If you did it as I you can strip the dump to databases using it the following php script:


<?php

$databaseComment = "-- Adat";

$handle = @fopen("localhost.sql", "r";);
$outhandle = 0;
if ($handle) {
while (($buffer = fgets($handle)) !== false) {
if (substr($buffer, 0, 7) == $databaseComment) {
$first = strrpos($buffer, ':';) + 3;
$length = strlen($buffer) - 2 - $first;
$dbName = substr($buffer, $first, $length);
echo $dbName."<br>";
if ($outHandle !== 0) {
fclose($outHandle);
}
$outHandle = @fopen($dbName.".sql", "w";);
}
if ($outHandle !== 0) {
fputs($outHandle, $buffer);
}
}
if (!feof($handle)) {
echo "Error: unexpected fgets() fail\n";
}
fclose($handle);
}

?>


Modify the $databaseComment variable to your database separating comments of your language settings.
[ hozzászólás ] ( 4 megtekintés ) [ 0 trackbackek ] permalink ( 3 / 1910 )
Some Hisilicon HI3515 embedded Linux investigation 

In my last post I have been blogged about a Hisilicon HI3515 based DVR recorder.

The device itself functioning well, except the web interface which requires ActiveX control installation which is unavailable for my system.
After a quick look at the u-boot I have figured out that we can boot the kernel through tftp without hurting the Flash device.

The first interesting project is the ezbox:
https://code.google.com/p/ezbox/

The project itself is very strange.
It provides a buiold system for different embedded devices (AR7240 based routers, HI3515 based Multimedia Processing Platform, x86 based CNC controller)

It includes the liloutdistro for a Hisilicon HI3515 MPPP Multimedia Procesing Platform.

This also includes some binary kernel blobs for handling the HI3515 peripherials:
https://code.google.com/p/ezbox/source/browse/#svn%2Ftrunk%2Fpool%2Fpackages%2F3rd-party%2Fhisilicon

There are serveral sample programs including binary only libraries in the distro also, but without source.
https://code.google.com/p/ezbox/source/browse/#svn%2Ftrunk%2Fpool%2Fpackages%2F3rd-party%2Fhisilicon%2Fhisilicon-hi35xx-mpp%2Ffiles%2Fhi3515%2Fsample

So we are blessed with some binary only stuffs around for the 2.6.24 kernel only without any examples. Don't panic, use the google-fu.

First interestingstuff is this SDK from our chinese friends:
http://www.pudn.com/downloads111/source ... 62702.html

The second one is the smartmind project:
http://smartmind.googlecode.com/svn-his ... 1x_device/

And the last one:
http://code.google.com/p/fvp/source/bro ... k%2F%20fvp

[ hozzászólás ] ( 47 megtekintés ) [ 0 trackbackek ] permalink ( 2.9 / 2126 )
Genesis Pro GP6308S console output 

I have receieved a GenesisPro GP6308S DVR recorder. I have read in the user manual that it runs Linux, so I could not missed taking into pieces and check the console output on it.

At first a short HW overview:

HiSilicon HI3515SoC
256MB DDR2 RAM (2 pcs. Hynix H5PS5162GFR)
8 MB flash (Spansion S29GL064N90)
Realtek RTL8201CP NIC
2 pcs. NVP1114 4 ch video decoder
DS13072 RTC

Pics:




The CN5 and CN7 are USB ports.

Read more...
[ hozzászólás ] ( 715 megtekintés ) [ 0 trackbackek ] permalink ( 3 / 2297 )
Tyco Terrain Twister reverse engineering 

I have a Tyco Terrain Twister without transmitter.
The demodulated signal encoder in it is on a small board on board PCB.
Unfortunatelly there are not any useful information about it on the web (how the encoding is works etc.).

I am planning that I will replace it with small AVR/PIC based custom circuit whihc capable to encode PPM signals

The RF receiever is also in a separate circuit it was manufactured by the Jetta Company Limited.

I have desoldered the encoder circuit and reverse engineered its pin's function:



My pin counting starts at the top left corner and continues tor right.

See the pins function below:

Read more...
[ hozzászólás ] ( 146 megtekintés ) [ 0 trackbackek ] permalink ( 3 / 1611 )
CakePHP: Undefined property: View::$Session after adding helper to the AppController 

I have got the error above after I have added a helper to the AppController. If I added the similar helper to all of my Controllers, everything had worked fine. Of course it is a workaround, so I have did some investigation, and I have figured out that the Session also acts as a helper not just as a component. After adding the Session to the helpers of the AppController the problem gone away.
[ hozzászólás ] ( 8 megtekintés ) [ 0 trackbackek ] permalink ( 3 / 1966 )

<< <Előző | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | Következő> >>

 
számláló