problems with OSX

10 views
Skip to first unread message

will.ma...@gmail.com

unread,
Nov 27, 2005, 3:49:25 PM11/27/05
to Php Object Generator
Hi,

I have just discovered this and tried to use it on my local machine, OS
X tiger.

I am having all sorts of problems !!!

When I create an object and download the ZIP it doesn't download
properly, not does the ZIP file open with the built in unzipper.

I created a really simple page to list the entries in a database,
pretty much the tutorial.

I get some bizarre gibberish on the screen like this:

à .®W(

I am using PHP 4.3.11 with Apache 1.3.11:
Apache/1.3.33 (Darwin) mod_fastcgi/mod_fastcgi-SNAP-0404142202
PHP/4.3.11

I have seen something similar to this before and it was something to do
with BOM encoding, Byte Order Mark I think.

Anyone else seen this happen and know how to fix it ?

Will

Joel

unread,
Nov 27, 2005, 10:29:04 PM11/27/05
to Php Object Generator
Hi Will,

I haven't figured out why you're having the unarchive problem using
Stuffit exander. But here's a workaround to unzip the file through the
command line instead:

try this:
CTRL-click on the download and choose "Download Linked File" (Safari)
or "Save Link As" (firefox).

save the zip file to your desktop.
next:
open up terminal in the utility directory.
from terminal type:
cd desktop [ENTER]
unzip filename.zip -d directory name

for example:
unzip 1133146193.php.zip -d pog

should unzip all the files in the zip file like this:

Archive: 1133146193.php.zip
inflating: pog/class.database.php
inflating: pog/configuration.php


As for your 2nd issue (the gibberish characters), this is happening
because you're outputing stuff from the database that wasn't inserted
through POG. POG automatically encodes the data using base64 encode
upon Save() and decodes it upon Get(). Since the data in the database
wasn't inserted using POG, POG is trying to decode stuff which isn't
encoded, which causes the gibberish characters.
A workaround is to insert the data using POG in the first place, or to
comment out the Escape() and Unescape functions in class.database.php
like this:

function Escape($text)
{
/*if (!is_numeric($text))
{
return base64_encode($text);
}*/
return $text;
}

function Unescape($text)
{
/* if (!is_numeric($text))
{
return base64_decode($text);
}*/
return $text;
}


Hope this helps. Let us know if it works.

Joel

Joel

unread,
Nov 27, 2005, 11:33:46 PM11/27/05
to Php Object Generator
Hi Will, I checked on my ibook and had the same problem with stuffit
expander 7

I upgraded to version 10
http://www.stuffit.com/mac/expander/download3.html

and it solved the expansion issue.

Hope that helps
Joel

Reply all
Reply to author
Forward
0 new messages