martes, septiembre 12, 2006

PHP in command line

This post is a bit off-topic of my two last posts to my blog, but just in case someone (maybe me), in the future could have any problem.

Today, I was trying to run a php script in command line. I came across the following link:

Which was helpful to know that I could do what I want. I needed to check whether my php installation could run as CLI (command line):

linuxserver:/var/www-ssl# php -v

PHP 5.0.5-Debian-0.8~sarge1 (cli) (built: Oct 27 2005 10:43:05) (Debian
Copyright (c) 1997-2004 The PHP Group
Zend Engine v2.0.5, Copyright (c) 1998-2004 Zend Technologies
Anyway, when I tried to run the command (which essentially was exporting a Ms Access database into MySQL), I got:
Fatal error: Call to undefined function mysql_connect() in
/var/www-ssl-version0.2/ on line 19

After searching around a little bit, I discovered that I needed to change the php.ini file of the CLI, to be able to load the mysql dynamic library. I went to:
 vi /etc/php5.0/cli/php.ini

and added in the extension part:

But I came across with other problem:

Fatal error: Call to undefined function gzcompress() in /var/www-ssl-version0.2/ on line 257

Which is solved adding also zlib support:

and off We go! :)

viernes, septiembre 08, 2006

Installing Debian testing problems with e2fsprogs and signatures couldn´t be verified

As I said yesterday, I am going to share my experiences rebuilding my home infrastructure of linux servers. I used to have RedHat based servers, but since I always have thought tha t bilingualism is a good thing to have ;-) so I am going now for Debian servers.

As some people know, Debian separates different branches of its distribution: stable, testing and unstable. As the names indicate, the level of stability are less in the unstable version. People normally recommends for servers using stable or testing. I go for testing, since sometimes is difficult to get some applications working in the stable branch since they are sometimes quite old.

Anyway, installing Linux could be a bit scaring, but I promise, Debian is not that difficult as It used to be with the new installer. But the last installations that I made, I always went through the same problem:

This installation run will require temporarily removing the essential package e2fsprogs due to a Conflicts/Pre-Depends loop. This is often bad, but if you really want to do it, activate the APT::Force-LoopBreak option.

Internal Error, Could not early remove e2fsprogs

Unlike some sites say, the way of solving this is typing this in other console (using Alt+F2 for instance):

apt-get - o APT::Force-LoopBreak=yes remove e2fsprogs

Then, You can give another try to install the packages that you want to from the menu.

Also if you get a message similar to this one:

The following signatures couldn't be verified because the public key is not available

You need to install the package of the debian keyring to have the signatures of all packages to avoid installing non-verified packages. This could be accomplished typing in:

apt-get install debian-archive-keyring

and issue:

apt-get update

otherwise will not be activated

Of course this is for a minimum installation (for installing any only-console server or router this is enough).

and off We go! enjoy your Debian installation ;)

jueves, septiembre 07, 2006

The show must go on

The title is just a reference of Freddy Mercury and his song which I like very much. I just wanted to highlight that after a long time thinking about to write again this blog, finally I made the effort to recover the passwords and so on to give it again a try. Why starting in English? For me it is a kind of challenge to write in other language than my mother tongue, and secondly, as any writer, everyone wants to reach a wider audience. This does not mean some posts will be written in Spanish. So, please bare my faults in English :)

I hope everybody enjoys my blog, I will mix technology and personal stuff and I just want to share my experiences in my daily life with Linux :)

Right now, I am in the process of rebuilding my computer infrastructure at home which takes a little bit of time. As a preview, I will try to have a better management of my Internet connection to keep on providing a good service to the freelance bankhacker ( without suffering the problems of bandwidth. This management is called in “computer language” traffic shaping which will let me to manage my upload bandwidth of my Internet connection letting bankhacker make use of the whole upload bandwidth when I am not at home, and make use of my download bandwidth to use VoIP applications or others, without having any breakdown of bad quality because of the use of the upload. Why is that? Because even when you are downloading anything, you need a channel in the upload stream to have a “conversation” with the server (what in computer language is call handshake).

For achieving this, I have got a new PC. I used to have a Pentium MMX for routing purposes, but lately the PC was getting stuck too many times. This “router” recently was converted also in my Wireless AP. With a cheap 802.11 g PCI wireless card, I could convert my router in an Wi-fi Access Point. I purchased a card with an Atheros chipset from SMC which could be around $ 25. Also for improving the coverage at my flat, I bought an indoor antenna with more gain. With around $15 more, I bought a 5 dB gain antenna which let me to be connected in my living ( I have a quite big flat :-) )

I want to encourage people of going to their nearest recycling center or try to get any second hand computer. In my small town I usually drop by the recycling center, and being honest, it has been really, really fruitful . I got not only Pentium II computers but also I was so lucky that I found an AMD XP 1800 and AMD 1800, even with DDR memory! Sometimes I am amazed of what people could throw away as trash! For me, it has a good chance to getting different old PC hardware and compose my new desktop PCs and home Linux servers. I have also change my parent’s router old 486 with ISA cards with another Pentium II router which probably will work better and get less stuck that the old 486. Also this will allow me to get rid of the Pentium III they used substituted with the AMD 1800 and use the Pentium III as one my servers. Also the AMD XP will be acting as my desktop computer and my old AMD K6 III will also be acting as another server (probably for my backups). So, since this procedures will take me some time and probably will make to discover new things, I will try to share my experiences with the readers.

Finally, please send me your comments whatever they are about, about my bad English, any mistake that I have committed or whatever…