inicio mail me! sindicaci;ón

Archive for Uncategorized

“undefined function mysql_connect()” While Migrating Virtualmin

While migrating virtualmin to our shiney new CentOS 5  box, I ran into this error on all our PHP sites:

If I look at php info, it shows –with-mysql, but there is no mysql section farther down. It looked like PHP’s Apache module was having trouble finding the mysql.so file. I immediately thought to check for the php-mysql module (there is no php5-mysql for CentOS 5, I noted) and found it installed:

[root@server apf]# yum install php-mysql
...
Parsing package install arguments
Package php-mysql - 5.1.6-20.el5_2.1.i386 is already installed.
Nothing to do

After a short dive into the php.ini settings, I noted that all the restored sites had this in their php.ini file:

extension_dir=/usr/lib/php5/modules

But that dir doesn’t exist. Connecting the dots, I realized that CentOS 5 has moved all the PHP 5 data to the default. So the dir is now at /usr/lib/php/modules. And this solved the rest:

[root@server lib]# ln -s /usr/lib/php /usr/lib/php5
[root@server lib]# ls -ld /usr/lib/php*
drwxr-xr-x 4 root root 4096 Jul 16  2008 php
lrwxrwxrwx 1 root root    3 Mar 30 21:01 php5 -> php
[root@server lib]# /etc/init.d/httpd restart
Stopping httpd:                                            [  OK  ]
Starting httpd:                                            [  OK  ]

Yay!

Syntax Highlighting in MediaWiki

I wanted to put syntax highlighting in the new ztdev wiki. So off to google I went.

I checked out Extension:Syntax_Highlighting, but it required a pear extension to run and doesn’t produce great output, so I checked it back in again.

I also looked at Extension:Geshi, but I didn’t care for the absurd tags needed to make this run. Plus, the installation required pear extensions and other mediawiki extensions to be installed. Yarr. So I reported back to Google.

Then I found Extension:GeSHiHighlight . GeSHi based, so you know the highlighting is awesome, and it uses simple tags like <php>, etc to enforce the highlighting. Yay!

Installation was a sinch–4 steps listed in plain english. Do note the WARNING at the bottom about <div> and <css> tags! You may need to rename those as suggested in the wiki.

Adding Nav Links and Sidebars in MediaWiki

I tried to edit my nav links on a new MediaWiki page today. Yikes.   It’s not exactly click-to-edit, but it’s not impossible either, once you’ve waded through the mis-information available about how this is done.

  1. 1. Type MediaWiki:Sidebar into the search box
  2. 2. Click Go
  3. 3. Click on the edit tab. If this page has never been visited, there may not be an edittab; Click on create instead.
  4. 4. Make changes as desired.

Editing Other Bars

To edit other components on the sidebars, try the following pages:

Search Sidebar: MediaWiki:Search
Toolbox Sidebar: MediaWiki:Toolbox

WebKit Enhancements

For the web devs, Safari‘s WebKit has been updated, providing some great new tools for writing the web and debugging Safari issues. They also wrote up a great overview of the features.

Together with Firebug the Venkman Toolbar for Firefox, that’s a great set of tools.

Now if IE would just join the bandwagon and offer us more than “null is null or not an object”!

PHP Class for Accessing Twitter API

I wrote up a quick class for interacting with the twitter API. Right now it returns everything as json, but that would be a five minute project to change out for anyone with m4d sk1||z0rz.

Read the rest of this entry »

If Man Were In Charge of Creation (or… the user-agent string)

I think that the history of user-agent string about sums up the state web in a single article. And you don’t need to be a programmer to appreciate the hilarity of that.

Nor do you need to be a theologian to draw parallels between what we’ve done with browsers and what we’d munge as a people if we were in charge of the entire universe : (

Browser Compatible Fonts and Mac Equivalents

Here is a great page outlining Windows Fonts and Mac Equivalents, complete with a nice mockup for quick comparison.  Well done!

« Previous entries