jump to navigation

Learning PHP, MySQL, JavaScript, and CSS by Robin Nixon, O’Reilly Media October 2, 2012

Posted by claudio in Uncategorized.
Tags: , , , ,
add a comment

Although I was curious about this book, I had mixed expectations. I have no background in web development (beyond playing a little with Catalyst and Drupal) so getting my toes wet with popular web-related technologies can’t hurt. At the same time, I must confess I had serious doubts when I read the title out loud: “PHP”, “MySQL”, “JavaScript”, “CSS”. Learning four technologies as different as two programming languages (one server- and one client-side at that), a relational database and a style sheet language seemed like a little too much, even for a book of 556 pages.

Depending on your expectations, the book may be a hit or a miss. On one hand, if you unrealistically hoped to be a PHP, MySQL, JavaScript and CSS wizard after reading the book: no luck. You’ll need to buy several books about each subject and invest the necessary time to get to know the technologies. But, you probably know this already. If, on the other hand, you just want to scratch the surface but -this is the interesting part- you want to see how these disparate technologies interoperation, then it’s a pretty good read. In the limited space, the author manages to give attention to best practices (e.g. database normalization), something I didn’t expect. The including classical web application mini-project, that uses the 4 technologies, may be a good incentive to those that prefer a more hands-on approach.

Title: Learning PHP, MySQL, JavaScript, and CSS, 2nd Edition
By:obin Nixon
Publisher:O’Reilly Media
Print:August 2012
Pages: 584
Print ISBN: 978-1-4493-1926-7
          ISBN 10:1-4493-1926-2

Book at amazon.co.uk Book at amazon.co.uk
Book at amazon.fr Book at amazon.de

Install DBD::mysql for Mysql 5 on Solaris 10 October 25, 2010

Posted by claudio in Uncategorized.
Tags: , , ,
add a comment

Installing DBD::mysql can be a little complicated because the needed libraries and header files are often not installed on Solaris or found in weird places (Howto on installing DBD::mysql with Solaris supplied mysql 4.0.31 and perl 5.8.4). This post explains how to install the module linked with Mysql 5.

To install the module do this:

  1. Install Mysql5. The paths on this post are applicable to the Sun Webstack installation in /opt/webstack. When using an other package or when compiling mysql yourself, change the paths accordingly. Remember that both perl and mysql must coincide in the binary format (32- or 64-bit). Because I use a self compiled 64-bit perl installation, the mysql binaries must be 64-bit as well.
  2. Download the tar ball of the modules or, easier, go to your cpan build directory (set at cpan configure time), typically at ~/.cpan/build/DBD-mysql-<VERSION> (already there if you previously tried to install the module with cpan).
  3. Run the makefile with the following arguments (adapt to your own needs if necessary):
    $ cd ~/.cpan/build/DBD-mysql-<VERSION>
    $ perl Makefile.PL --libs '-R/opt/webstack/mysql/5.0/lib/sparcv9/mysql -L/opt/webstack/mysql/5.0/lib/sparcv9/mysql -lmysqlclient -lz' --cflags '-I/opt/webstack/mysql/5.0/include/mysql -m64' --with-mysql=/opt/webstack/mysql

    (After -lz you can add other options depending on your needs, like -lcrypt for ssl support.)
  4. Complete the normal installation (make, make test (if you have a test db running), make install).

That’s it.

Install DBD::mysql for Solaris 10 system perl August 13, 2009

Posted by claudio in Uncategorized.
Tags: , , , , ,
10 comments

perlInstalling DBD::mysql on Solaris 10 seems to be less trivial than “cpan DBD::mysql” when you want to use the system-supplied perl (5.8.4) and mysql (4.0.31) installation. Google shows a lot of people asking how to proceed, but surprisingly no answers. Typically, one gets this error at make time:

[...]
"dbdimp.c", line 4468: improper member use: com
"dbdimp.c", line 4468: improper member use: com
"dbdimp.c", line 4468: improper member use: com
"dbdimp.c", line 4630: undefined struct/union member: pmysql
"dbdimp.c", line 4653: undefined struct/union member: pmysql
cc: acomp failed for dbdimp.c
make: *** [dbdimp.o] Error 1

To install the module do this:

  1. Install the following Solaris mysql packages (if not already installed): SUNWmysqlr, SUNWmysqlu, SUNWmysqlS, SUNWmysqlt.
  2. Type the following as root:
    cd /usr/sfw/share/src/mysql
    ./configure
  3. Download the tar ball of the modules or, easier, go to your cpan build directory (set at cpan configure time), typically at ~/.cpan/build/DBD-mysql-<VERSION> (already there if you previously tried to install the module with cpan).
  4. Run the makefile with the following arguments (adapt to your own needs if necessary):
    cd ~/.cpan/build/DBD-mysql-<VERSION>
    perl Makefile.PL --libs '-R/usr/sfw/lib -R/usr/sfw/lib/mysql -L/usr/sfw/lib -L/usr/sfw/lib/mysql -lmysqlclient -lz -lposix4 -lcrypt -lgen -lsocket -lnsl -lm' --cflags '-I/usr/sfw/include -I/usr/include -I/usr/sfw/share/src/mysql/include'
  5. Complete the normal installation (make, make test (if you have a test db running), make install).

That’s it.

Follow

Get every new post delivered to your Inbox.

Join 142 other followers