Home Linux Community Community Blogs

Community Blogs

ATI Catalyst (fglrx) and Kernels 2.6.30 / 2.6.29

Updates / Changes

  • 29 July 2009 - Gentoo now has Catalyst 9.7 drivers in the official tree. Should work with kernels 2.6.29 and 2.6.30 as well. A leaked beta ATI driver has given us hope that the next version of fglrx will finally support these kernels without patching.
  • 26 July 2009 - Well, I just realized that Catalyst 9.7 drivers have been released. I've seen conflicting reports as to whether Gentoo's patches for 9.6 can be used with 9.7. If they don't work, then try this.
  • 27 June 2009 - As of yesterday, the patches discussed below are in the official portage tree! Hooray Gentoo!!!


Until the developers over at Mesa, Xorg, and the Linux Kernel commit the latest developments to finally bring open source 3D drivers to those of us with newer ATI graphics cards, our only option is the proprietary Catalyst driver.

Not that this is a problem for most people. But for those of us who wish to have the latest stable kernel running on our systems (2.6.30), it may seem we are out of luck.

Well not anymore!

Catalyst For Kernels 2.6.30 / 2.6.29

The folks over at Gentoo have recognized the demand for Catalyst on newer kernels. And though the discussed patches have not been applied to the Catalyst drivers in Portage, you can still apply them yourself with a little overlay magic. Non-Gentoo users will have to adapt this distribution specific process to their system, sorry.

First, download the patches here. Here's what you'll need:

For kernel 2.6.29 -

  • 2.6.29_support.patch

For kernel 2.6.30 -

  • fglrx-2.6.30-irqreturn_t.patch
  • fglrx-rt-compat.patch
  • fglrx-missing-pci_enable_msi.patch

You will also need ati-drivers-8.612.ebuild from the bugzilla. The latest version mentioned on the bug entry should be fine, as it works with both of the mentioned kernel versions. (Note: the aforementioned ebuild corresponds to Catalyst 9.5. If you want to use Catalyst 9.6, you'll need to update the ebuild accordingly)

These patches should apply to Catalyst 9.5 and 9.6. Other versions have not been tested.

Alright, now if you have a local overlay, great! If not, see this guide to learn how to create one. I won't go into the specific process of creating an overlay for the sake of brievity.

First, let's copy the ati-drivers ebuilds to our overlay . . .

$ mkdir -p  /usr/local/portage/abby/x11-drivers/ati-drivers
$ cp -R /usr/portage/x11-drivers/ati-drivers/*

 . . . now overwrite the ebuild in there with the one from the bugzilla . . .

$ cp ~/ati-drivers-8.612.ebuild /usr/local/portage/abby/x11-drivers/ati-drivers

. . . and copy over the patches you downloaded.

$ cp ~/my-ati-patches/*  /usr/local/portage/abby/x11-drivers/ati-drivers/files

Great! Now let's create the new manifest.

$ ebuild ati-drivers-8.612.ebuild digest

Now we're all ready to roll! Remerge ati-drivers and you will now have 3D acceleration on a brand spanking new kernel. Congrats!


 If you get a bunch of crap filling up your dmesg from the patched fglrx driver, don't worry too much about it as it seems to be harmless.


 I'm sure we all eagerly await the day we finally get open source 3D drivers for our ATI cards. AMD deserves a lot of credit releasing the documentation and funding the developers to make that happen. So sit tight folks, the day is soon coming that the open driver surpasses the proprietary one.


It's a new world. Are you ready for it?

We are in a new world today than we were just a few years ago.  I saw on the news today (yes, on the internet) that some third-world leader (no need to say who for the purpose of this discussion) is limiting the amount of media coverage on the election turmoil that is plaguing his country...the media would make him look instead of being quiet, the public is taking to the internet, flooding popular social networking sites like Facebook, Youtube and Twitter with the news. I'm not going to get in the middle of a political debate, I'm just pointing out that this world is changing, and gone are the days when people can do anything they want without the news spreading like wildfire around the globe, and it happens almost instantly.

In this new world, computers are more important and easier to get than they ever have been before.  With their increasing importance, more and more people are making a living commiting cyber-crimes.  Others create viruses that infiltrate your computer and steal your information or cripple your computer's security and software.  Still others are making a very good living from creating the anti-virus software to combat this problem.  The average home user probably shares too much information on the social networking sites, but since "everybody does it", it doesn't seem like too much harm could come of it...and that is probably true.

Imagine this: There is a computer system that is so vast that it forms one global network that is, by all practical purposes, alive. It knows everything about everything and allows any and all of the world's inhabitants to know anything they want to know, in an instant...a global consiousness, if you will.  Does this sound like a futuristic movie? It isn't.  It is Web 2.0 and it's happening right now.

Twenty years ago, nobody would have believed that the world would be like it is today, and twenty years from now, it will be unbelievable. Are you ready for it?


Best Gaming Platform Emulation Lineup

Whoever says Linux isn't a good platform for gaming is only half right (for now). While Linux may not have a very robust lineup of games that run natively, there are still options out there for creating a great gaming experience!


Intro to Gaming Platform Emulation

When I talk about gaming platform emulation here, I'm talking about running games on your Linux machine using software that simulates the environment the games would otherwise run in natively. The type of emulation software you use depends very much on the type of games you want to play.

Below, I'll describe the best (in my opinion) game platform emulation software available for Linux.


DOS Emulation

Ah, DOS. You gave birth to many a gamer, only to vanish with the emergence of pretty little windows and true color displays. Lucky for us, we can relive our faithful DOS gaming days with a little app called DOSBox.

DOSBox ( provides everything you would need for a complete DOS-based gaming experience (trust me on this). It's also being actively developed, so you can keep up with all the latest features if you'd like.

Being eaten by a grue may send you into a nostalgic seizure.


Sega Genesis / Mega Drive Emulation

There are many choices for emulation of this platform. Fortunately, the folks at GerbilSoft made the choice of emulators an easy one.

Gens/GS ( is GerbilSoft's fork of Gens, and man does it rock. With each milestone, Gens/GS becomes faster, more stable, and more feature-filled. Best of all, it's open source!

Go ahead and play your naughty 16-bit games. I won't tell.


Super Nintendo Emulation

This was actually a hard decision to make. But in the end I think I made the right one. For the best emulator here, I'm going with bsnes (

When bsnes' big brother ZSNES stopped working with my PulseAudio setup, then wouldn't compile on my system, I was completely lost. Luckily, bsnes was there to tell me everything was okay (and it was). It is decently fast, works with my audio setup, and has every feature one would need to enjoy your SNES games again without fishing your old console from the closet.

Unfortunately, I can't whip up a screenshot right now because of some problems bsnes is having with one of the Gnome dialogs. Hope I don't have to second guess my decision . . .

Nintendo Entertainment System (NES) Emulation

The winner here would have to be FCEUX ( It's a great emulator, though the lack of a GUI is kinda off-putting. There are GUI frontends available to make the emulator friendlier for the casual gamer however.

Make no mistake, this emulator is quite complex. A visit to its homepage will show you that. But with the right choice of GUI, you'll be playing Super Mario Bros. and eating mushrooms in no time.

The choice never gets easier . . .


Nintendo64 Emulation

Rounding things off in the Nintendo emulation department is the greatest N64 emulator for Linux to date. Mupen64Plus ( stole the best emulator spot with its great list of features and compatibility. It plays most of your backup games quite well, and has an active community.


 The above list of game platform emulation software is not exhaustive by any means. I plan on contiuing this list at a later date, with entries for NintendoDS, GameBoy, GameBoy Advanced, MAME, and of course, Windows emulators.

Stay Tuned.


Setting up wireless with ar9170 in Linux

 My wn111v2I have just got a new wn111v2 wireless adapter and I thought I would just quickly run through how to get it running with  Ubuntu/Linux/GNU/whatever whilst jumping on the new bandwagon. This tutorial will also add to many more devices:

  • Atheros 9170 0x0cf3 0x9170
  • Atheros TG121N 0x0cf3 0x1001
  • Cace Airpcap NX 0xcace 0x0300
  • D-Link DWA 160A 0x07d1 0x3c10
  • D-Link DWA 160A 0x0846 0x9010
  • Netgear WNDA3100 0x0846 0x9010
  • Netgear WN111 v2 0x0846 0x9001
  • Zydas ZD1221 0x0ace 0x1221
  • Z-Com UB81 BG 0x0cde 0x0023
  • Z-Com UB82 ABG 0x0cde 0x0026
  • Arcadyan WN7512 0x083a 0xf522
  • Planex GWUS300 0x2019 0x5304
  • IO-Data WNGDNUS2 0x04bb 0x093f
  • Zyxel NWD271N 0x0586 0x3417 

Right, on to the nitty gritty stuff.

Firstly the driver has only been included in kernels later that 2.6.30 and as far as I know those have not reached any desktop distros yet so you have two options A. go through some rather hairy step and compile the latest linux kernel: (Google dependant on distro) or B. use an unstable release of your distro (Ubuntu) which contains a newer kernel. I would personally do the latter as it is much less hassle and I like to use them anyway but it is really up to you. If you care compiling you will need to make sure that the ar9170 module is actually included :-) .

When you have finished installing/compiling you now only need to add the correct open firmware files. To do that just use  these commands in terminal (replace wget with curl -o if on fedora):

 sudo su # just su on fedora
cd /tmp
mv ar*.fw /lib/firmware

 Now next time you plug it in your card should have 100% more wireless. Enjoy and feel free to comment if it did not work.


Who designs this hardware, anyway?

I dunno if its just me, but there's something incredibly sad about the designers of PC hardware. 

OK, so I'm just a little annoyed; once more my USB key has taken a hit, and once more I'm lucky to get the data off it, but once more there goes another bunch of dollars thanks to the guy who  figured that a gadget that sticks out of a laptop by a good 3 cm minimum is safe as houses.  I'm not much of a conspiracy theorist, so I don't really subscribe to the view they're deisgned like that so you have to buy a new one every 6 months, but...

There's not a whole lot of point getting fussed about it; PC's have been designed by the people who play FPS after hours for years, and they still look like it.

I would have thought that someone by now would have wondered if a brick about 4x0.5x1 cm was a great way of carrying sensitive data.  It's got a fairly ugly/ useless mechanism for hooking it onto a keyring, can't fit in a wallet easily, and the people who design PC's seem to have gone out of their way to make sure you can't have it in a semi-protected location when reading data.  I mean, why doesn't it slot in more like a small- form CD or SD card?  Especially in laptops?  And this one is better than my last laptop; it had power and USB inputs on the back, where they were conveniently out of sight when the kids did something stupid... mobile computing is only for the rich, it would seem.

Smartphones are another good example.  I don't mind the look of them; square and black functions pretty well for me (mind you, I'm of an age where I think Kojak had a pretty good haircut).  My significant other, however... disagrees.   Carrying around a smartphone with the dimensions of mine is great when you've got a belt, or a desk.  For mobile workers, especially those who don't like the bulky pocket look, there's a few steps to go.  Joe 90 may not be alive, but his wardrobe supervisor does seem to be designing our hardware.

PC's are a third.  I find it hard to believe that anyone has ever got their significant other in a lab, told them to design a container for a PC and left them to it.  There's a ton of options that _should_ be available.  They're not.  Why, for example, can't you make it look like a vase?  or buy a desk with the PC built in?  Most of us buy the desktop, then the desk to put it on top of. 

Why does IT hardware have to look like a cardboard box with exterior paint?  Yeah, I know there's some exotic options, for those who have a few extra hundred dollars.  It's a coat of paint though...and I'd argue Nokia did so well in the phone market because all those teenage girls could reskin their phones at little cost (and, in all likelihood, their fashionista brothers had to keep up with the looks too).

In summary, can someone rethink:

  Colour.  For people who want to use hardware (as opposed to programming it), image is everything.  And they've got a point!  The colour of our world affects the way we interact with it.  If a couple of graphic designers did the phone casings, non-tech people would look at them.  Currently, they're just boxes with screens.

Shape.  While I'm happy to have a PC, it's not because of what it is, it's what it does.  So can we move on from the "my box is bigger than your box" look, and get on with making it fit into our living instead of vice versa?

Common sense.  USB keys are portable and universal.  So, like keys, pens and wallets, why aren't they durable, and where are the common-sense features that would make them safer and longer- lasting?  Why do they have to stick out the side of laptops when in use, looking like targets for youngsters to swing off?  

rant done.


Still a mixed bag, but it's coming on good

This week I had the pleasure of running a Webex session directly from my Ubuntu Desktop.

It was the first time I didn't have to hop into a VM via rdesktop in order to connect. The webex client uses Java and was working fine, untill I tried to resize the screen (that failed miserably and gave me a very nastily distorted view).

But in all cases, with the excpetion of a few bumps here and there I have to admit that I'm spending more and more time on Linux, even during work hours, and I am only getting on Windows VM's to do office work or support work (as our software isn't running on Linux yet - and I can only dream that'll happen one day)!


Blogparade Betriebssystem oder Distributionsumstieg

Nach mehreren Blogeinträgen über den Distributionsumstieg von Gentoo auf Ubuntu und einer damit verknüpften "Umfrage" möchte auch ich hier und jetzt erläutern, wie ich zu Linux, oder treffender Ubuntu gefunden habe.


  • Habt ihr euch stark über andere Möglichkeiten informiert?
  • Was war schlussendlich der Grund für den Umstieg?
  • Was war vorher schöner, besser, schneller, toller?
  • Was ist jetzt besser, schneller, schöner, toller?
  • Bereut ihr euren Umstieg?
  • Würdet ihr Anderen diesen Umstieg empfehlen?
Mein Umstieg liegt etwa zweieinhalb bis drei Jahre zurück, wie genau das ablief, weiß ich nicht mehr, allerdings weiß ich noch, dass ich ein frustrierter Windows XP Nutzer war.
Habt ihr euch stark über andere Möglichkeiten informiert?
Ich  war eigentlich oft am surfen und hatte von Linux gehört. Da ich gerne mal am Betriebssystem geschraubt hatte, habe ich mich gefragt, wie kann man wirklich etwas an seinem System ändern, ohne etwas zu machen, wozu es nicht gedacht war? Da wurde Linux interessant für mich, gefragt hatte ich dann einen Bekannten, der gab mir dann im Jahr 2007 irgendwann die Live-CD von 6.06 oder 6.10.
 Was war schlussendlich der Grund für den Umstieg?
 Von Windows war ich von Tag zu Tag immer mehr frustriert. Vor allem von der Tatsache, dass ich größtenteils nur das machen konnte, wozu M$ das System vorgesehen hatte. Kontrolle ist etwas anderes ;-). Durch die Regelmäßigkeit, wie sich das System aufgehangen hatte, wurde mir klar: die Architektur der Software ist ein Desaster. Ich war sogar in dem Glauben, Software müsse sich aufhängen.... Dazu kam immenser Bluthochdruck, weil ich einfach keinen Grund dafür sah, dass man mit den Fenstern mal wieder den Bildschirm ausmalen konnte.
Was war vorher schöner, besser, schneller, toller?
  • 3D-Desktop? - Nein!
  • Spiele? - Nein! Nicht mit Intel-Onboard-Grafik!
  • Programme? - Nein! Programme waren gezeichnet durch den Kommerz: ein aufgeplustertes ICQ, das langsam ist, oder Programme, die fast nichts können, da die Hersteller sich die "guten" Funktionen für die kostenpflichtigen Programme vorenthielten.
  •  Schönheit des Systems? Nein! Blau ist keine Farbe, es ist der Zustand einer Katastrophe!
  • Sicherheit? - Nein!
Was ist jetzt besser, schneller, schöner, toller?
Alles was ich gerade eben aufgezählt habe, leistet Linux, vor allem Ubuntu. Ich gehe eine Symbiose mit dem System ein, wenn etwas nicht funktioniert, weiß ich woher ich Hilfe bekomme und wie ich ein Problem löse. Dann ist da noch die Gemeinschaft, die mich dazu führt, diesen Blogeintrag zu verfassen ;-). Auch die bisherigen Stammtische, auf denen ich war, waren alle ein Erfolg.
Bereut ihr euren Umstieg?
Niemals. Endlich Freiheit und ein System, das genau das tut, was ich will.
Würdet ihr Anderen diesen Umstieg empfehlen?
Auf jeden Fall: Das System macht fast alles besser als Windows, und wer jetzt wieder von Treibern und Spielen anfängt, der lebt im letzten Jahrtausend, denn diese "Meinungen" über Linux sind überholt. Wer es nötig hat, Crysis zu zocken, darf das gerne weiter unter Windows tun....

Tapping into Android's sensors with Java

The Android platform is ideal, especially for Java developers, for creating innovative applications through the use of hardware sensors. Learn about some of the interfacing options available for Android applications, including using the sensor subsystem and recording audio snippets.

Password Recovery for Cisco's ASA 5505 Adaptive Security Appliance.

This blog will discuss how to reset the password on Cisco's ASA 5505 Adaptive Security Appliance.  First I will assume you are using Cisco's gudie for recovering your password located at .  Start at page 7 entited "Performing password Recovery for the ASA 5500 Series Adaptive Security Appliance.

I won't copy what's in Cisco's guide but I'll add the following:

1.  Below is what steps 4 - 8 actually look like on Cisco's ASA 5505:

rommon #1> confreg

Current Configuration Register: 0x00000000

Configuration Summary:


Do you wish to change this configuration? y/n [n]: y

enable boot to ROMMON prompt? y/n [n]:

enable TFTP netboot? y/n [n]:

enable Flash boot? y/n [n]:

select specific Flash image index? y/n [n]:

disable system configuration? y/n [n]: y

go to ROMMON prompt if netboot fails? y/n [n]:

enable passing NVRAM file specs in auto-boot mode? y/n [n]:

disable display of BREAK or ESC key prompt during auto-boot? y/n [n]:

Current Configuration Register: 0x00000040

Configuration Summary:


ignore system configuration

Update Config Register (0x40) in NVRAM...

rommon #2>

Next reload the ASA by typing boot.

rommon #2> boot

Launching BootLoader...

Default configuration file contains 1 entry.

Searching / for images to boot.

Loading /asa722-k8.bin... Booting...



Total SSMs found: 0

Total NICs found: 10

88E6095 rev 2 Gigabit Ethernet @ index 09 MAC:

88E6095 rev 2 Ethernet @ index 08 MAC:

88E6095 rev 2 Ethernet @ index 07 MAC:

88E6095 rev 2 Ethernet @ index 06 MAC:

88E6095 rev 2 Ethernet @ index 05 MAC: 

88E6095 rev 2 Ethernet @ index 04 MAC: 

88E6095 rev 2 Ethernet @ index 03 MAC: 

88E6095 rev 2 Ethernet @ index 02 MAC: 

88E6095 rev 2 Ethernet @ index 01 MAC: 

y88acs06 rev16 Gigabit Ethernet @ index 00 MAC:

Licensed features for this platform:

Maximum Physical Interfaces : 8

VLANs : 3, DMZ Restricted

Inside Hosts : 10

Failover : Disabled

VPN-DES : Enabled

VPN-3DES-AES : Enabled

VPN Peers : 10

WebVPN Peers : 2

Dual ISPs : Disabled

VLAN Trunk Ports : 0

This platform has a Base license.

Encryption hardware device : Cisco ASA-5505 on-board accelerator (revision 0x0)

Boot microcode : #CNlite-MC-Boot-Cisco-1.2

SSL/IKE microcode: #CNlite-MC-IPSEC-Admin-3.03

IPSec microcode : #CNlite-MC-IPSECm-MAIN-2.04


. .

| |

||| |||

.|| ||. .|| ||.

.:||| | |||:..:||| | |||:.

C i s c o S y s t e m s


Cisco Adaptive Security Appliance Software Version )


****************************** Warning *******************************

This product contains cryptographic features and is

subject to United States and local country laws

governing, import, export, transfer, and use.

Delivery of Cisco cryptographic products does not

imply third-party authority to import, export,

distribute, or use encryption. Importers, exporters,

distributors and users are responsible for compliance

with U.S. and local country laws. By using this

product you agree to comply with applicable laws and

regulations. If you are unable to comply with U.S.

and local laws, return the enclosed items immediately.

A summary of U.S. laws governing Cisco cryptographic

products may be found at:

If you require further assistance please contact us by

sending email to This e-mail address is being protected from spambots. You need JavaScript enabled to view it .

******************************* Warning *******************************

Copyright (c) 1996-2006 by Cisco Systems, Inc.

Restricted Rights Legend

Use, duplication, or disclosure by the Government is

subject to restrictions as set forth in subparagraph

(c) of the Commercial Computer Software - Restricted

Rights clause at FAR sec. 52.227-19 and subparagraph

(c) (1) (ii) of the Rights in Technical Data and Computer

Software clause at DFARS sec. 252.227-7013.

Cisco Systems, Inc.

170 West Tasman Drive

San Jose, California 95134-1706

Ignoring startup configuration as instructed by configuration register.

INFO: Converting to disk0:/

Type help or '?' for a list of available commands.


2.  You should follow steps 9 - 12 exactly as in Cisco's guide.

3.  I would like to add to Cisco's step 13.  Cisco uses the command "password password" which should actually be "passwd password".

4.  Cisco's step 14 is where the fun begins!  Cisco says to type the command "config-register value" where value is the number you recorded in step 5.  THIS IS WRONG WRONG WRONG!!!!!.   If you follow Cisco's step 14 and then step 15, yes you will have successfully reset your password, but if you reboot your ASA or loose power your ASA will stop at the ROMMON prompt (i.e. rommon #1>).  Instead, in step 14 you should type "config-register 0x10011" and then precede to step 15.  Then, if you ever reboot you ASA or loose power, it should fully reboot and not be stuck at the rommon #1> prompt.

Hope this helps and happy routing/firewalling! 



NEWB's adventures's in Linux From Scratch

Hello again,

   This would be funny if I were intending to humor the readers of this blog.  Seems I go from one fiasco to another.  Not to disappoint, :)   My latest attempt ends in yet another failure.   I got as far as "/sbin/udevstart" in chapter 8 . Before I got my latest failure,  I was following the stop resume txt  listed in the readme from the cd and it called for that command to resume the build but I didn't have a file called "sbin/udevstart". Now that file according to the README is in regards to older versions of LFS so I'm not really sure if I'm supposed to have udevstart in this version of LFS. I googled it and in older versions they found the install of Udev omitted the install of udevstart. I did both find and locate and couldn't see anything other than udevd in my file system. So just to see if that was it I ran udevd start at the command prompt "already running" so I continued to resume and then tried to run kernel config and got another error when trying to run "make menuconfig" Anyways I believe that somehow I've messed up yet again....  I 'm not sure if it's to do with "strip" command in the last chapter or if I resumed wrong?  so I figure well I backed up my system so I retreive the tarball and guess what?.... this newbie screwed up yet again!!!!!!. dammit man..... I backed up just the "tools" dir... I have the base backed up already this tarball is no good, was supposed to be the entire /mnt/lfs/ directory  NOT :(  I'm not sure which I'm starting to look more like at this point ? moe, larry, or curly??? :)

    As much care as I've taken this last attempt to install LFS by writing down each step of each package , I'm sure that I did all the packages right. However I'm conserned that I stopped and resumed correctly. With that in mind I took the past 4-5 hours trying to get "hibernate" to work on my machine.  It seems that won't help me as there must be a bug in my bios as I had to do " pnpbios=off and acpi=off just to get the screen to reappear. You see I was getting errors when I 'd try to hibernate so I added the pnpbios command as the computer screens "comment" recommended... no more hibernate halt errors. Now when it restarted,  I could use the mouse none of the windows would move. It did capture everything that was on the screen at the command of hibernate.  It would have been nice to inform us that the extra swap you make so you can run hibernate on an isolated partition would have to be manually turned on each boot.

  Maybe next time I 'll do something funnier. :)

If at first you don't succeed try, try again :)).... and again and again. :)


Ispravljanje krive Drine - LAMP i problem sa belinama

Prošle noƒái sam izgubio 4h na debagovanje i modifikaciju koda koji je bio ispravan, ali nije radio – a ja sam jedva provalio o ƒçemu se radi. Glavni krivac bio je Windows, a šta se desilo, kako sam otkrio o ƒçemu se radi i kako sam problem rešio, saznaƒáete vrlo brzo :) Naime, razrešenje ove misterije nije išlo gore pomenutim redosledom, pa upravo zato i reših da svoje iskustvo podelim sa ostatkom svet.

Pretprošle noƒái krenuh u realizaciju jednog mog mini WEB projekta. Kako su pitanju XHTML/CSS + PHP/MySQL tehnologije, krenuo sam sa radom u lokalu. Startovah LAMP pa se bacih na izradu baze i back panel-a. Zakljuƒçno sa sistemom za logovanje korisnika, privedoh rad kraju za taj dan (noƒá zapravo) pa sam sve do tada uraƒëeno okaƒçio na server. Probao sam skriptu i sve do tada implementirano je radilo bez ikakvih problema.

Onda prošle noƒái reših da malo sredim kod, formatiranje i komentare, pa sam sve ponovo svuk’o u lokal, sredio i vratio online. Jedina razlika bila je što sam ovog puta radio sa WAMP-om na mašini sa Windowsom. Ništa znaƒçajno nisam menjao što se koda tiƒçe, ali ipak reših da još jednom proverim da li je sve ok. Kad imam šta i da vidim: na svakom fajlu pucaju neke funkcije (2-3 uproseku). Od svega su se najviše bunile sesije (kreiranje i promena podataka). Tu je krenulo 4h pakla sa istra≈æivanjem šta taƒçno ne radi i zašto se od jednom buni, a prethodnog dana je radilo.

Probao sam sve i svašta. ƒåak sam i potpuno promenio sistem za logovanje. Menjao pamƒáenje nekih stvari u cookie umesto u sesiju i svašta drugo što mi je palo na pamet. No na kraju je ipak negde pucalo. Onda reših da sklonim komentare sa poƒçetka fajla, jer sam ƒçitao da neke PHP funkcije moraju biti apsolutno na poƒçetku koda (iako su u demo primerima, ƒçak i u dokumentaciji, radile i ako pre njih ima belina ili komentara). Iz web-editora sam otvorio, izmenio i saƒçuvao svaki fajl ponaosob, posle ƒçega je, na moje zaprepašƒáenje, sve ponovo proradilo bez ikakvih grešaka. U neverici sam ponovo vratio komentare, kako bih bio siguran da je do toga, no i dalje je sve radilo. Nekoliko minuta sam gledao u kod i ƒçeškao se po glavi dok se nisam setio sliƒçnih problema jednog prijatelja. Branku je pucao IE7 prilikom izvršavanja JavaScript-a pisanog na Windows platformi, pa sam pomislio da i ovde CR-LF pravi probleme.

Ovu teoriju sam eksperimentalno dokazao na sledeƒái naƒçin: Prvo sam sve fajlove upload-ovao preko FTP-a (text-modom) gde sistem autoamtski sreƒëuje EOL. Pokrenuo sam skriptu sa servera i nije bilo nikakvih grešaka. Zatim sam iste fajlove arhivirao i ponovo upload-ovao (ovaj put kao jednu arhivu, binarnim modom) pa otpakovao na serveru. Prilikom pokretanja skripte, ponovo su se javile misteriozne greške o nemoguƒánosti pokretanja sesija.

Suma sumarum: Ukoliko se bavite WEB development-om i radite pod Windows-om, imajte na umu da je veƒáina WEB servera pod nekim UNIX-olikim operativnim sistemom (Linux, BSD, Solaris, MacOS…) te da je preporuƒçljivo da svoje fajlove spakujete u odgovarajuƒái format kako ne bi dolazilo do ovakvih problema. Sa druge strane, ako radite u Linux okru≈æenju, a koristite komponente koje su razvijala treƒáa lica, obavezno proverite da li su sami fajlovi saƒçuvani na odgovarajuƒái naƒçin. Na taj naƒçin uštedeƒáete vreme i sebi i drugima ukoliko doƒëe do ovakvih problema.

* tekst orignalno objavljen na adresi:

Page 134 of 175

Upcoming Linux Foundation Courses

  1. LFS230 Advanced Linux System Administration and Networking
    14 Dec » 17 Dec - Virtual
  2. LFS220 Linux System Administration
    14 Dec » 17 Dec - N. Reading + Virtual
  3. LFD405 Embedded Linux Development with Yocto Project
    14 Dec » 17 Dec - San Jose

View All Upcoming Courses

Who we are ?

The Linux Foundation is a non-profit consortium dedicated to the growth of Linux.

More About the foundation...

Frequent Questions

Linux Training / Board