Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Chris Jones' Blog:
Reducing diskspace of your Oracle Instant Client install
Apr 09, 2009 @ 15:29:16

Chris Jones has a recommendation for those compiling Oracle support into PHP - there's a simple way to reduce the amount of disk space that your Instant Client install uses - a "only what's needed" setup.

Most PHP OCI8 users link PHP with the Oracle Instant Client (IC) libraries that handle the underlying "client" (i.e PHP OCI8 extension) communication with the database. IC is relatively small for the features it gives, and is very easy to install. A ZIP or RPM download unpacks a few libraries. [...] Although IC isn't particularly big - and it's getting relatively smaller all the time - there are two ways to reduce its size.

His two recommendations are to use the lite client version instead of the full-blown one (only has common character sets) or you can just remove the JDBC/ODBC/OCCI libraries from the full install. He lists out the files that are actually needed by the OCI8 extension to compile correctly.

tagged: reduce disk space oracle install instant client oci8 compile

Link:

Tim Bromhead's Blog:
Super friendly URLs - handling spaces with URL Rewrites and PHP
Feb 20, 2007 @ 19:35:00

In a new entry today, Tim Bromhead shares his method for creating "super friendly urls" for a site's users using mod_rewrite:

Today we are going to show how to make the URLs with spaces super easy to type for users. bla.st uses dashes in the URLs to represent spaces eg. http//bla.st/web-design/. We chose dashes over underscores because underscores can get lost with underlined links, and we think they look nicer.

He includes the Apache config information for working with the VirtualHost entry and the simple PHP script to handle the requests. It looks in the SERVER superglobal, at the QUERY_STRING to see what the user is requesting and does an append and redirect accordingly. This example is made to take any form of a space in the URL (including underscores and %20), parse it out, and pass the user along correctly to the page they want.

tagged: friendly url space virtualhost apache modrewrite friendly url space virtualhost apache modrewrite

Link:

Tim Bromhead's Blog:
Super friendly URLs - handling spaces with URL Rewrites and PHP
Feb 20, 2007 @ 19:35:00

In a new entry today, Tim Bromhead shares his method for creating "super friendly urls" for a site's users using mod_rewrite:

Today we are going to show how to make the URLs with spaces super easy to type for users. bla.st uses dashes in the URLs to represent spaces eg. http//bla.st/web-design/. We chose dashes over underscores because underscores can get lost with underlined links, and we think they look nicer.

He includes the Apache config information for working with the VirtualHost entry and the simple PHP script to handle the requests. It looks in the SERVER superglobal, at the QUERY_STRING to see what the user is requesting and does an append and redirect accordingly. This example is made to take any form of a space in the URL (including underscores and %20), parse it out, and pass the user along correctly to the page they want.

tagged: friendly url space virtualhost apache modrewrite friendly url space virtualhost apache modrewrite

Link:

Dallas PHP Users Group:
PHP4 to PHP5 Minor gotcha
Jan 12, 2006 @ 12:58:21

On the Dallas PHP Users Group website today, there's quick little "gotcha" by MonkeyT when it comes to using the strtotime() function.

strtotime translates a date presented in various formats into a unix timestamp. It allows the syntax "+2 weeks" and various other time units to push that chosen date translation into the future. In 4.3.10, php would allow a space between the + and the beginning of the parameter. that doesn't seem to be the case any more. ("+3 days", not "+ 3 days"). Other than that, pretty smooth changeover so far.

It's pretty subtle, but I could potentially cause some headaches in the future - so keep an eye out!

tagged: php4 php5 upgrade strtotime space after plus php4 php5 upgrade strtotime space after plus

Link:

Dallas PHP Users Group:
PHP4 to PHP5 Minor gotcha
Jan 12, 2006 @ 12:58:21

On the Dallas PHP Users Group website today, there's quick little "gotcha" by MonkeyT when it comes to using the strtotime() function.

strtotime translates a date presented in various formats into a unix timestamp. It allows the syntax "+2 weeks" and various other time units to push that chosen date translation into the future. In 4.3.10, php would allow a space between the + and the beginning of the parameter. that doesn't seem to be the case any more. ("+3 days", not "+ 3 days"). Other than that, pretty smooth changeover so far.

It's pretty subtle, but I could potentially cause some headaches in the future - so keep an eye out!

tagged: php4 php5 upgrade strtotime space after plus php4 php5 upgrade strtotime space after plus

Link:


Trending Topics: