Kernel Bench

Kernel News and How To

I have an upload script and it” saving the filename with the original filaname+temp name. I need it to be changed as just temp name because special characters are causing problems and if there is a spacial character in the filename browsers can not read the image.

Here is the code:

<?php
// $Id: uploader.php 888 2007-07-28 09:03:03Z phppp $
// ———————————————————————— //
// XOOPS – PHP Content Management System //
// Copyright (c) 2000 XOOPS.org //
// <http://www.xoops.org/> //
// ———————————————————————— //
// This program is free software; you can redistribute it and/or modify //
// it under the terms of the GNU General Public License as published by //
// the Free Software Foundation; either version 2 of the License, or //
// (at your option) any later version. //
// //
// You may not change or alter any portion of this comment or credits //
// of supporting developers from this source code or any supporting //
// source code which is considered copyrighted (c) material of the //
// original comment or credit authors. //
// //
// This program is distributed in the hope that it will be useful, //
// but WITHOUT ANY WARRANTY; without even the implied warranty of //
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
// GNU General Public License for more details. //
// //
// You should have received a copy of the GNU General Public License //
// along with this program; if not, write to the Free Software //
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
// ———————————————————————— //
// Author: Kazumi Ono (AKA onokazu) //
// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
// Project: The XOOPS Project //
// ————————————————————————- //
/*!
Example

include_once ‘uploader.php’;
$allowed_mimetypes = array(’image/gif’, ‘image/jpeg’, ‘image/pjpeg’, ‘image/x-png’);
$maxfilesize = 50000;
$maxfilewidth = 120;
$maxfileheight = 120;
$uploader = new XoopsMediaUploader(’/home/xoops/uploads’, $allowed_mimetypes, $maxfilesize, $maxfilewidth, $maxfileheight);
if ($uploader->fetchMedia($_POST['uploade_file_name'])) {
if (!$uploader->upload()) {
echo $uploader->getErrors();
} else {
echo ‘<h4>File uploaded successfully!</h4>’
echo ‘Saved as: ‘ . $uploader->getSavedFileName() . ‘<br />’;
echo ‘Full path: ‘ . $uploader->getSavedDestination();
}
} else {
echo $uploader->getErrors();
}

*/

/**
* Upload Media files
*
* Example of usage:
* <code>
* include_once ‘uploader.php’;
* $allowed_mimetypes = array(’image/gif’, ‘image/jpeg’, ‘image/pjpeg’, ‘image/x-png’);
* $maxfilesize = 50000;
* $maxfilewidth = 120;
* $maxfileheight = 120;
* $uploader = new XoopsMediaUploader(’/home/xoops/uploads’, $allowed_mimetypes, $maxfilesize, $maxfilewidth, $maxfileheight);
* if ($uploader->fetchMedia($_POST['uploade_file_name'])) {
* if (!$uploader->upload()) {
* echo $uploader->getErrors();
* } else {
* echo ‘<h4>File uploaded successfully!</h4>’
* echo ‘Saved as: ‘ . $uploader->getSavedFileName() . ‘<br />’;
* echo ‘Full path: ‘ . $uploader->getSavedDestination();
* }
* } else {
* echo $uploader->getErrors();
* }
* </code>
*
* @package kernel
* @subpackage core
*
* @author Kazumi Ono <onokazu@xoops.org>
* @author phppp
* @copyright The Xoops Project
*/
class XoopsMediaUploader
{
/**
* Flag indicating if unrecognized mimetypes should be allowed (use with precaution ! may lead to security issues )
**/
var $allowUnknownTypes = false;

var $mediaName;
var $mediaType;
var $mediaSize;
var $mediaTmpName;
var $mediaError;
var $mediaRealType = ”;

var $uploadDir = ”;

var $allowedMimeTypes = array();
var $deniedMimeTypes = array("application/x-httpd-php");

var $maxFileSize = 0;
var $maxWidth;
var $maxHeight;

var $targetFileName;

var $prefix;

var $errors = array();

var $savedDestination;

var $savedFileName;

va

it’s funny but all that code you pasted in there is totally irrelevant to your problem..

Anyhow I went and looked up this class for you here, http://www.xoops.info/doc/nav.html?_classes/index.html and researched the problem..

After this – $uploader = new XoopsMediaUploader

slide in this:
$uploader->setTargetFileName($value);

Where $value is the random file name you wish to use.
A very simply way to create a random string would be:
$value = mt_rand(5, 15);

Keep in mind you will need to concat the extension onto that random number!!!

Hardcover, Windows Via C/C++

This book teaches Windows developers about various Windows features and how to access them via the C and C++ programming languages. Focus is on Windows basic building blocks and the fundamental concepts required for architecting and implementing software that targets the Windows operating systems. The first three chapters provide required background on error handling, working with characters and strings, and kernel objects. Later chapters are in sections on getting work done, memory management, dynamic-link libraries, and structured exception handling. This fifth edition covers 170 new functions and features that have been introduced in Windows XP, Windows Vista, and Windows Server 2008. There is more coverage of how the C/C++ run-time library interacts with the operating system. Two new chapters have been added to explain how I/O operations work and to dig into the new Windows Error Reporting system. Richter is a software consultant. Nassare is a software architect.

Read the rest of this entry »

Hardcover, Microsoft Windows Internals: Microsoft Windows Server 2003, Windows XP, and Windows 2000

- The premier guide to Windows system internals–now fully updated for Windows Server 2003 and Windows XP- Provides unique insights on the operating system s architecture and kernel for developers and IT professionals- Written by well-known Windows internals experts in full partnership with the Windows Server product development team- Also covers Windows 2000 ServerFrom the IT Subject Tracker Study (Feb. 2002; of 2502 respondents to a pop-up survey presented on the TechNet and Win2000 Technical Resources home pages), the highest scoring products and topics included: – Windows 2000 Server, including networking security, networking and communications, Web security, user and resource – Active Directory- Networking, including troubleshooting and security- Security, including best practices, e-mail, Web, and virus protectionWindows 2000 Server information has the highest proportion of IT professionals (79%) rating it very important. This will grow to include .NET Server as it is adopted.

Read the rest of this entry »

Paperback, Programming Windows Embedded CE 6.0 Developer Reference

Focusing on core operating system concepts and the Win32 API, this reference for developing small-footprint applications tells how to create applications designed for the requirements of embedded devices, with extensive code samples and sample projects. Chapters are in sections on Windows programming basics, Windows CE programming, and advanced Windows CE. The book is written for anyone who will be writing applications for Windows CE, especially embedded systems programmers using Windows CE for a specific application, Windows programmers interested in writing or porting an existing Windows application, and developers of managed code. This fourth edition is updated for the new Windows Embedded 6.0 kernel. There is also coverage of new APIs. Readers are assumed to be familiar with C and Windows. To Compile the example programs in the book, readers will need Visual Studio 2005 and a Windows CE device SDK. Boling is a Windows CE consultant.

Read the rest of this entry »

Paperback, The Linux Kernel Newbies Book

Designed after the wildly popular kernelnewbies.org web sitethis book by two senior kernel developers helps readers understand basic tasks in Linux kernel development and gets kernel newcomers up and running. As the first and only book on the market for newcomers to the Linux kernel, this task-oriented, hands-on guide covers such topics as debugging basics; kernel modules; threads, deferred work, and workqueues; memory management; file systems; kernel testing; and more.

Read the rest of this entry »

http://packages.debian.org/sid/developers-reference – - (due to lack of corresponding source code). The “magic” for a recompilation-only NMU is triggered by using a suffix appended to the package version number, following the form bnumber. For instance, if the latest version you are recompiling against was version 2.9-3, your binary-only NMU should carry a version of 2.9-3+b1. If the latest version was 3.4+b1 (i.e, a native package with a previous recompilation NMU), your binary-only NMU should have a version number of 3.4+b2. ^[4] Similar to initial porter uploads, the correct way of invoking dpkg-buildpackage is dpkg-buildpackage -B to only build the architecture-dependent parts of the package. 5.10.2.2. When to do a source NMU if you are a porter Porters doing a source NMU generally follow the guidelines found in Section 5.11, Non-Maintainer Uploads (NMUs) , just like non-porters. However, it is expected that the wait cycle for a porter’s source NMU is smaller than for a non-porter, since porters have to cope with a large quantity of packages. Again, the situation varies depending on the distribution they are uploading to. It also varies whether the architecture is a candidate for inclusion into the next stable release; the release managers decide and announce which architectures are candidates. If you are a porter doing an NMU for unstable, the above guidelines for porting should be followed, with two variations. Firstly, the acceptable waiting period — the time between when the bug is submitted to the BTS and when it is OK to do an NMU — is seven days for porters working on the unstable distribution. This period can be shortened if the problem is critical and imposes hardship on the porting effort, at the discretion of the porter group. (Remember, none of this is Policy, just mutually agreed upon guidelines.) For uploads to stable or testing , please coordinate with the appropriate release team first. Secondly, porters doing source NMUs should make sure that the bug they submit to the BTS should be of severity serious or greater. This ensures that a single source package can be used to compile every supported Debian architecture by release time. It is very important that we have one version of the binary and source package for all architectures in order to comply with many licenses. Porters should try to avoid patches which simply kludge around bugs in the current version of the Compile environment, kernel, or libc. Sometimes such kludges can’t be helped. If you have to kludge around compiler bugs and the like, make sure you #ifdef your work properly; also, document your kludge so that people know to remove it once the external problems have been fixed. Porters may also have an unofficial location where they can put the results of their work during the waiting period. This helps others running the port have the benefit of the porter’s work, even during the waiting period. Of course, such locations have no official blessing or status, so buyer beware. 5.10.3. Porting infrastructure and automation There is infrastructure and several tools to help automate package porting. This section contains a brief overview of this automation and porting to these tools; see the package documentation or references for full information. 5.10.3.1. Mailing lists and web pages Web pages containing the status of each port can be found at http://www.debian.org/ports/. Each port of Debian has a mailing list. The list of porting mailing lists can be found at http://lists.debian.org/ ports.html . These lists are used to coordinate porters, and to connect the users of a given port with the porters. 5.10.3.2. Porter tools Descriptions of several porting tools can be found in Section A.7, Porting tools .5.10.3.3. wanna-build The wanna-build system is used as a distributed, client-server build distribution system. It is usually used in conjunction with build daemons running the buildd program. Build daemons are “slave” hosts which contact the central wanna-build system to receive a list of packages that need to be built. wanna-build is not yet available as a package; however, all Debian porting efforts are using it for automated package building. The tool used to do the actual package builds, sbuild is available as a package, see its description in Section A.4.4, sbuild . Please note that the packaged version is not the same as the one used on build daemons, but it is close enough toreproduce problems. Most of the data produced by wanna-build which is generally useful to porters is available on the web at http:// buildd.debian.org/. This data includes nightly updated statistics, queueing information and logs for build attempts. We are quite proud of this system, since it has so many possible uses. Independent development groups can use the system for different sub-flavors of Debian, which may

Duration : 0:7:32

Read the rest of this entry »

Technorati Tags: , ,

Here is the file you need: http://www.megaupload.com/?d=RVLZY4VH

Fixing DFU mode on 10.5.6

As noted previously OS X 10.5.6 introduced a bug that affected the use of DFU mode. with some Macs. There have been previously published hacks and techniques to fix this, but here is another method that can be used to temporarily restore DFU functionality in order to use QuickPwn or PwnageTool.

You will need an account with ADC (Apple Developer Connection) this is free and takes a few minutes to sign up, you should read the terms and conditions carefully and you should only sign up if you are thinking of developing applications in the future – http://developer.apple.com/mac/
Download the disk image IOUSBFamily-315.4-log.dmg for Mac OS X 10.5.5 Build 9F33 (yes, that is a 5 in 10.5.5 – this is a developer debug package of the USB kernel extension).
Unplug non-vital USB equipment, such as external DVD writers, USB scanners, USB mass storage devices, at the most leave a Keyboard and Mouse connected.
Install IOUSBFamily-315.4.1.pkg from within the disk image
Reboot your system!
Perform necessary DFU activity with QuickPwn or PwnageTool.
Download the disk image IOUSBFamily-327.4.0-log.dmg for Mac OS X 10.5.6 Build 9G55
Intall IOUSBFamily-327.4.0.pkg from within the disk image
Reboot your system!
Reattach your USB peripherals.

Duration : 0:6:57

Read the rest of this entry »

Technorati Tags: , , , , , , , , , ,

Ok so i ran out of time at the end that why it got cut off so you will just have to believe me that it works.

Quickpwn Download Link: http://iphone-dev.fgv6.net/QuickPwn_2.2.5.dmg

Fixing DFU mode on 10.5.6

As noted previously OS X 10.5.6 introduced a bug that affected the use of DFU mode. with some Macs. There have been previously published hacks and techniques to fix this, but here is another method that can be used to temporarily restore DFU functionality in order to use QuickPwn or PwnageTool.

You will need an account with ADC (Apple Developer Connection) this is free and takes a few minutes to sign up, you should read the terms and conditions carefully and you should only sign up if you are thinking of developing applications in the future – http://developer.apple.com/mac/
Download the disk image IOUSBFamily-315.4-log.dmg for Mac OS X 10.5.5 Build 9F33 (yes, that is a 5 in 10.5.5 – this is a developer debug package of the USB kernel extension).
Unplug non-vital USB equipment, such as external DVD writers, USB scanners, USB mass storage devices, at the most leave a Keyboard and Mouse connected.
Install IOUSBFamily-315.4.1.pkg from within the disk image
Reboot your system!
Perform necessary DFU activity with QuickPwn or PwnageTool.
Download the disk image IOUSBFamily-327.4.0-log.dmg for Mac OS X 10.5.6 Build 9G55
Intall IOUSBFamily-327.4.0.pkg from within the disk image
Reboot your system!
Reattach your USB peripherals.

Duration : 0:9:59

Read the rest of this entry »

Technorati Tags: , , , , , , , , , , , ,

**PLEASE REMEMBER TO DOWNLOAD AND INSTALL THE FIX FOR MAC OS X 10.5.6 AND REBOOT YOUR COMPUTER BEFORE USING PWNAGE TOOL**

Mac DFU fix: https://connect.apple.com/cgi-bin/WebObjects/MemberSite.woa/wa/getSoftware?bundleID=20216 (YOU HAVE TO MAKE AN ACCOUNT ON WEBSITE)

Mobile installation file: http://www.mediafire.com/?qlymytng2go

Pwnage tool 2.2.5: http://blog.iphone-dev.org/ (SCROOL DOWN THE PAGE)

2.2.1 firmware: http://www.iclarified.com/entry/index.php?enid=1842 (UNDER STEP #2)

Regards

Got0Apple87
FAQ ON THE DFU FIX ***PLEASE READ**** AND DON’T ASK

Fixing DFU mode on 10.5.6

As noted previously OS X 10.5.6 introduced a bug that affected the use of DFU mode. with some Macs. There have been previously published hacks and techniques to fix this, but here is another method that can be used to temporarily restore DFU functionality in order to use QuickPwn or PwnageTool.

You will need an account with ADC (Apple Developer Connection) this is free and takes a few minutes to sign up, you should read the terms and conditions carefully and you should only sign up if you are thinking of developing applications in the future – http://developer.apple.com/mac/
Download the disk image IOUSBFamily-315.4-log.dmg for Mac OS X 10.5.5 Build 9F33 (yes, that is a 5 in 10.5.5 – this is a developer debug package of the USB kernel extension).
Unplug non-vital USB equipment, such as external DVD writers, USB scanners, USB mass storage devices, at the most leave a Keyboard and Mouse connected.
Install IOUSBFamily-315.4.1.pkg from within the disk image
Reboot your system!
Perform necessary DFU activity with QuickPwn or PwnageTool.
Download the disk image IOUSBFamily-327.4.0-log.dmg for Mac OS X 10.5.6 Build 9G55
Intall IOUSBFamily-327.4.0.pkg from within the disk image
Reboot your system!
Reattach your USB peripherals.

Duration : 0:9:13

Read the rest of this entry »

Technorati Tags: , , , , , ,

http://www.wikicfp.com/cfp/servlet/event.showcfp?eventid=3640 FISL had the presence of Richard Stallman, writer of the “GNU Manifesto” and Founder of the Free Software Foundation. As the event grew, more (knowledgeable) people started to hear about FISL. And as a result of the word-spreading, more people came to Porto Alegre to attend the Forum. Speakers Among others, founders and important members of great Free Software projects had spoken in 2002 FISL: * Ralf Nolden: Maintainer of KDE’s Kdevelop IDE * Jon “maddog” Hall: Executive Director of Linux International; * Larry Wall: Creator of the Perl programming language; * Peter Salus: Author of “A Quarter Century of Unix” and “The Daemon, The Gnu and The Penguin” * Rik van Riel: Linux Kernel Developer * Timothy Ney: GNOME Foundation Executive

Duration : 0:1:13

Read the rest of this entry »

Technorati Tags: , , , , , , ,