Zend Core Administration Web GUI Location

0

Posted by nick | Posted in Development, PHP | Posted on Dec 23 2009

Tags:

If you can’t find how to open the Zend Core Administration web GUI, then hopefully this will help you out. Go to http://localhost/ZendCore/index.php in your browser or on Windows go to Start | All Programs | Zend Core | Zend Core Administration . More documentation here from Zend http://files.zend.com/help/Zend-Core/zend-core.htm .

  • Share/Bookmark

PHP Developer Jobs in Minneapolis St. Paul

0

Posted by nick | Posted in Development, PHP | Posted on Nov 07 2009

Tags: , ,

A challenge I’ve found being a PHP developer in the .NET and Java ruled Minneapolis and Saint Paul area is finding good PHP jobs.  I am building a list of companies in the Twin Cities that use PHP or have a need for PHP developers so when the time comes to find work, this list should be very helpful. If you’re willing to work for ten bucks an hour, you can find PHP work in craigslist any day. However, if you need to make a living, this list should help you out.  Please leave a comment with additional companies in the Twin Cities area you’re aware of that use PHP and need Developers.

Employ Full Time PHP Developers

  1. VISI
    visi.com
  2. Sierra Bravo
    www.sierrabravo.com
  3. Ecreativeworks
    ecreativeworks .com
  4. Colle + Mcvoy
    collemcvoy.com
  5. National Bankcard Services, Inc
    nbs-inc.com
  6. Internet Exposure
    iexposure.com/
  7. Cazarin
    cazarin.com/
  8. Star Tribune
    startribune.com/
  9. Digital River
    digitalriver.com/
  10. Artropolis
    artropolis.com/
  11. The MLS Online
    themlsonline.com/

Contract or Temporary PHP Developers

  1. Best Buy
    bestbuy.com
    They only hire contractors. Accenture is their main recruiting firm.
  2. Dolan Media dolanmedia.com
    Various recruiting agencies
  3. Regis regissalons.com
    Various recruiting agencies
  • Share/Bookmark

Easy caching for PHP

0

Posted by nick | Posted in PHP | Posted on May 17 2009

Tags: ,

I just implemented this cache class
http://www.phpguru.org/static/Caching on one of my sites.

The product detail page
ALR Hyperdrive 3.0 has eight or ten queries that run every time to pull the product info, nutrition info, reviews, manufacturer info, category info, etc…  This cache class provides the ability to store either output cache (html) or data cache (query results) in a file.  Each time the page is loaded, we’ll first check if there is a cached file of the output before running all the queries.  If there is a cache file, we’ll grab it and display.  If not, we’ll run the queries as usual and then save the output to a file.  We’re able to set an expiration on the cache file so it automatically refreshes itself in case the content has changed.

Example for caching output

    if (!OutputCache::Start("myGroup", "myID", 600)) {
 
        // Generate some output (as you do)...
 
        OutputCache::End();
    }

Example for caching data structures and query results

    if (!$data = DataCache::Get("myGroup", "myOtherID")) {
 
        $result = $db->query("SELECT BIG_ASS_QUERY()");
 
        DataCache::Put("myGroup", "myOtherID", 600, $result);
    }
 
    // Do something useful with $result

The page on my site ALR Hyperdrive 3.0 took on average 9 seconds from the time I clicked the refresh button until it was completely loaded.  I added the few lines of code for output caching on the page so it would skip all product related queries and it then averaged 7.5 seconds per page load and database processing and bandwidth in the meantime.  I was hoping the pages would load in two or three seconds, but this is a great improvement for the little effort it took.

  • Share/Bookmark

Converting an Excel file into a delimited text file with PHP

0

Posted by nick | Posted in PHP | Posted on Mar 03 2009

Tags:

Sorry to say, I don’t have the magic hidden PHP function to do this as the process is a bit more involved.  I built functionality today to download an Excel inventory file for my side business and then have my website automatically read it and update the inventory.  This has been the missing automated link for a while and I’m finally getting around to it.  I won’t go over how to download a file via FTP with PHP in detail, but basically you use the ftp_connect, ftp_login, and ftp_get functions built into PHP.  Below I describe the magic involved with converting an Excel file into a delimited file that your existing code (like mine) can handle.

1. Download Spreadsheet Excel Reader from sourceforge

2. I received an error when testing because the file OLERead.php could not be found.  The path is incorrect in reader.php on line 31. Update it to “require ‘oleread.inc’;” so it includes the oleread.inc file from the same directory.

3. Give my code below a whirl and you’re done.  You can save it to a file as I did or print it to the screen by just echoing the $output variable.

//path and name for inventory file after download
$localFilePath = 'inventory/'.date('Ymd').'_inventory.xls';
 
//init excel reader
$reader = new Spreadsheet_Excel_Reader();
 
//set output encoding
$reader->setOutputEncoding("UTF-8");
 
//read file
$reader->read($localFilePath);
 
//set field delimiter
$fieldDelimiter = "\t";
 
//set row return/delimiter
$rowDelimiter = "\r";
 
//set new file name
$newFilename = 'inventory/'.date('Ymd').'_inventory.txt';
 
//loop through all rows
for ($i = 1; $i <= $reader->sheets[0]["numRows"]; $i++) {
 
	//loop through all columns for this row
	for ($j = 1; $j <= $reader->sheets[0]["numCols"]; $j++)	{
 
		//set field
		$output .= "\"".$reader->sheets[0]["cells"][$i][$j]."\"" . $fieldDelimiter;
	}
	//end row
	$output .= $rowDelimiter;
}
 
//save new delimited file
file_put_contents($newFilename, $output);
  • Share/Bookmark

Magento or Zen-cart for downloadable products?

0

Posted by nick | Posted in Ecommerce, PHP | Posted on Jan 11 2009

Tags: , ,

A friend of mine wants a shopping cart for his downloadable products (images and music).  I’ve worked on oscommerce for a few years now (1 year full time) and know that the code is crap.  Oscommerce is dead, period.  The code is unmaintainable.

Zen-Cart

I know Zencart is based on oscommerce as the database is pretty much the same and it has most of the same interfaces.  Zencart is a cleaned up oscommerce, but let’s face it, to really clean up oscommerce you need to start over from scatch.  Setting up a downloadable product with zencart is a hack in itself.  Here are two tutorials I found showing you how to do it -   http://www.imakewebsites.ca/zen-cart-downloadable-products/ and  http://tutorials.zen-cart.com/index.php?article=71 .  After the customer has made their purchase, here is the download screen they’ll use to access the file. You’ll find the list of available downloads scrunched in the middle of the page below.

Magento

Today was my first experience with Magento.  The installation was more difficult than Zen-cart and the database is 212 tables as compared to 95 for Zen-cart.  I’ll admit my eyes glazed over looking at the database and the code library today.  Everything with Magento is mod rewrite so when you see mysite.com/customer there really isn’t a customer directory in the code.  Magento is like wordpress where you don’t modify the code if you want updates and support.  Magento offers paid support programs and customizations… maybe that’s why they made is so damn confusing.  Magento is cutting edge PHP; it’s built on the Zend Framework.  The interfaces of Magento are modern and don’t look like something that came from back when the internet was born.

How to specify that a product is downloadable and upload the downloadable file.

Customer’s view of downloadable products after making a purchase.

In my opinion, Magento is the clear choice going forward.  Here’s my analagy of comparing Magento to Zencart… it’s like comparing a new car to a twenty year old car.  The new car looks better, has better features, and outperforms the older car in every way.  From a developer’s perspective, when you look under the hood of Magento (at the code and database), you’ll feel overwhelmed and will realize there is a lot to learn.

  • Share/Bookmark