[PHP] Exception not being caught

2009-07-15 Thread Weston C
So, I've got a little piece of code designed to play with catching the
exception that's thrown when an object doesn't have a __toString
method.

?php

class A { }

$a = new A();   // Ayn would be proud, right?

try {
echo a is ,$a,\n;
} catch(Exception $e) {
echo \nException Caught: ;
echo $e, $n;
}

?

This does not run as expected. I'd think that when the implicit string
conversion in the try block hits, the exception would be thrown,
caught by the catch block, and relayed.

Instead you don't ever see the words exception caught and you get
Catchable fatal error: Object of class A could not be converted to
string.

If it's catchable, why isn't it caught in my example?

Thanks,

Weston

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: table-less layouts; Ideas welcome

2009-05-21 Thread Weston C
On Thu, 2009-05-21 at 09:54 -0400, tedd wrote:
 My thoughts are -- my understanding the reason why tables have
 received such bad-press is that designers have abused tables in
 holding designs together with nested tables AND in doing so made it
 difficult for the visually disabled to pull content from the site.
 Screen readers do not read the screen but rather read the source and
 pull out of it what they (the screen reader program) think is
 content. Translating nested tables becomes an impossible job for them.

I've heard a rumor this is exaggerated, and I buy it to some extent.
Lynx had an algorithm for distinguishing simple tabular data from more
complex (and probably layout) tables back in 1999. I'd assume a
serious screen reader with more development resources behind it could
do better, and I don't think heuristics for working with this would
even be particularly hard.

This isn't to say tangled table markup is never a problem. It is, both
for human and machine readers. But as much as I like CSS -- and as
much as it simplifies many designs -- there are some cases for which
table layouts are easier and/or more robust, so I almost just wish
we'd accepted the horse was out of the barn and tried to figure out an
easy way to signal distinctions between layout tables and semantic
tabular data, rather than trying to get the entire internet to
completely retool.

A few years ago, I started marking my layout tables with
class=layout. Not always a perfect solution, but makes the
distinction easy (and turns out to be a useful styling convention as
well), and if table-based layouts really are a significant obstacle to
machine readers, my guess is something like this would get us over
that hurdle a lot faster than waiting for everyone to give up those
layouts.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Problems working with HTML using PHP's XML tools (placing mixed text/html into xpath-specified nodes...)

2009-05-21 Thread Weston C
Is there a straightforward way (or, heck, any way) of placing mixed
html/text content into xpath-specified nodes using any of PHP's XML
tools?

So far, I've tried SimpleXML and the DOM and things aren't coming out well.

SimpleXML:

 /* $filename contains path to valid XML file, $xpathxpr contains
valid XPath expression matching at least  one document node, $fillval
contains a mixed well-formed text/xhtml string to be pre-pended within
each matching node */

$sx = simplexml_load_file($filename);
$nodes = $sx-xpath($xpathxpr);
foreach($nodes as $node) {
  $children = $node-children();
  $children[0] = $fillval . $children[0];
}

This only sortof works. I get $fillval appended before the original
contents of each matching docment node but if I've put any markup
in, it's all there as literal text (ie, a
href=http://php.net;php.net/a wouldn't show up as a link, you'd
see the actual markup when the document is rendered).

A variation on this that I tried is creating a new SimpleXMLElement
object, with the mixed text/markup string as an argument passed to the
constructor, since the docs seem to indicate this is blessed. Weirdly,
when I do this, it seems to actually be stripping out the markup and
just giving the text. For example:

$s = new SimpleXMLElement('a href=#Boo/a')
echo $s;

yields Boo (and echo $s-a yields nothing). This would be such a
huge bug I have a hard time believing it, so I have to suspect there's
a dance I'm not doing to make this work correctly.

DOM XML:

 /* again, $filename contains path to valid XML file, $xpathxpr
contains valid XPath expression matching at least  one document node,
$fillval contains a mixed well-formed text/xhtml string to be
pre-pended within each matching node */

$domDoc = new DOMDocument();
$domDoc-loadHTML(file_get_contents($filename));
$search = new DOMXPath($domDoc);
$nodes = $search-query($xpathxpr);
foreach($nodes as $emt) {
$f = $domDoc-createDocumentFragment();
$f-appendXML($fillval . $emt-nodeValue);
$emt-nodeValue = '';
$emt-appendChild($f);
}

This also gets mixed results. It gets cranky and issues warnings about
any HTML entities (despite that it seems it should be clear this is an
HTML document given the invocation of loadHTML), and while I'm seeing
some markup make it through, I'm not in other cases. I haven't quite
figured out the difference.

I can come up with some runnable tests if it will help, but I'm hoping
someone's already familiar with the general issues with using PHP's
XML tools to work with HTML that they can make some good commentary on
the matter.

Thanks,

Weston

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: table-less layouts; Ideas welcome

2009-05-21 Thread Weston C
On Thu, May 21, 2009 at 12:10 PM, tedd tedd.sperl...@gmail.com wrote:
 Could you be certain that your algorithm would figure out which way it needs
 to present the text to a blind person?

My own experience browsing the web with Lynx (which for the most part,
tends to ignore table layout, giving you the content of table cells in
source order) suggests that order doesn't end up being a significant
issue. The common layouts tend to read surprising well in source
order. Navigation is usually at the top or the left, so you encounter
it quickly. If there's any problem, most of the time it's that the
page author has done something hideous with a lot of images with no
alt text or abuse of HTML entitites, or part of the navigation
structure is only accessible via javascript or flash or something like
that... all separate issues from repurposing tabular markup.

And when there *is* some kind of a layout issue, most of the time it's
easy to adapt as a human reader by searching/scanning (sometimes
easier than if you're looking at a bad visual layout). The tools that
enhance accessibility on a page in these respects really don't have a
lot to do with whether there's tabular markup -- if you want to enable
easy access to page navigation, you can add semantic information about
that regardless. In fact, that information is quite likely more
important and less prevalent than what you end up with even most
CSS-positioned sites, given that the vast majority of them simply
provide stylesheets for the purposes of... visual layout, and what
you're left with when a screen reader ignores them is linear
source-ordered elements.

None of this is to say that CSS can't be very useful in addressing
this problem (and other problems), or that there aren't some problems
with tabular markup. The presentation example you mentioned is
actually going to be an issue with even real tabular data without some
care taken in the markup. And I don't want to go back to coding 1999
markup for 1999 browsers. Mostly my point is that the problem with
using tables is a bit more limited in size than it's often made out to
be, there are other ways of dealing with the accessibility and
semanticity issues involved, some of them potentially more effective.
And for some cases, table layouts just work better. I think we'd be
better off with a wide variety of professionals who can balance these
different issues than with a  tables considered harmful summary.

 Now compound that with cells holding images,
 place-holders, empty cells and cells with navigation elements,
 flash, videos, and such -- and you might have a better appreciation
 as to the problem screen readers face.

These are actually some of the heuristic markers I believe some
browsers actually use (and if they don't, they certainly could). If
you have a table whose cells largely contain highly mixed markup,
largely presentational elements, no alternative data, chances are
pretty good that it isn't tabular data. And...

Benjamin Hawkes-Lewis bhawkesle...@googlemail.com
 WCAG 1.0 ... explained how /authors/ could distinguish between layout
 tables and data tables:

 1) When writing a presentational table, stick to the elements table, tr,
 td. Do not use the headers, scope, axis, or summary attributes.
 Make sure layout tables make sense when linearized.

 2) When writing a data table, add the elements th, thead, tbody,
 tfoot, caption, and col and the attributes headers, scope, axis,
 and summary wherever appropriate.

Exactly. These are great markers for distinguishing between where
authors were using table markup semantically or presentationally. I
think in practice there are probably many others available.

 Fast forward a decade, and authors are getting another tool in our toolbox,
 not a million miles away from your 'class=layout'. I don't think it's very
 well specified yet, but:

 http://www.w3.org/TR/wai-aria/#presentation

I'm actually amazed... this is very nearly what I proposed in some
discussions back in 2004. I eventually shifted to class=layout
because it had some other practical benefits and everybody I talked to
seemed to feel cluttering up the attribute space with yet another item
was wrong (on top of this sortof general malaise about repurposed
table markup), especially when considering how much semantic mileage
you can get out of class attributes. I'd be totally happy to see
anything like it adopted, though, and as I said before, think it'd
push the semantic web forward faster than waiting for everyone to come
around to doing things one blessed way.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] make install doesn't seem to work on downgrade on OS X -- anyone else seen this?

2008-08-19 Thread Weston C
I recently downgraded from a build of 5.3 to 5.2.6 on OS X, and had a
bit of time figuring out what was going on when make install didn't
seem to actually copy the CLI binary and Apache SO to their target
spots.

Has anyone else seen this problem?

What category would a bug report for this be under? It's a
build/install issue, but there's no particular category for these
beyond compile issues...

Thanks,

Weston

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] make install doesn't seem to work on downgrade on OS X -- anyone else seen this?

2008-08-19 Thread Weston C
On Tue, Aug 19, 2008 at 9:43 AM, Jason Pruim [EMAIL PROTECTED] wrote:
 Is there a particular reason you are downgrading?

I'm pretty happy with some of the features in 5.3, but have been asked
to work with a codebase that turned out to have some issues under 5.3
that didn't show up under 5.2.x. I'd love to have the time to dig and
give feedback on the issues for the improvement and quicker release of
5.3, but unfortunately work has to be a higher priority. :(

-W

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] PHP 5 auto-htmlentitizing strings?

2008-08-02 Thread Weston C
I just switched over an app from PHP 4 to PHP 5, and one of the weird
things I'm noticing initially is that some of the html output seems to
be html entitized. For example, a link that was showing up in html
output as:

 a href=http://metaphilm.com/philm.php?id=29_0_2_0;Is Tyler Durden
Hobbes?/a

now gets transformed to:

lt;a href=http://metaphilm.com/philm.php?id=29_0_2_0gt;Is Tyler
Durden Hobbeslt;/agt;

No other changes in the PHP source -- just a change in the interpreter.

Any idea what could be causing this?

Thanks,

Weston

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] 5.3 Timeline and Features(true anon functions? shorter array syntax?)

2008-06-21 Thread Weston C
Just curious if anyone knows the rough timeline for PHP 5.3.

Also curious if anyone knows whether anon functions/closures or a
shorter JSON-ish array syntax are being considered for inclusion. I
know there were two patches announced in December/January:

http://marc.info/?l=php-internalsm=119833623532713w=2
http://marc.info/?l=php-internalsm=119995972028293w=2

But they don't seem to be part of the early June 5.3 releases, much as
I'd love to see them.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] PHP Extensions as Shared Objects?

2008-05-29 Thread Weston C
This might be a dumb question with an obvious answer somewhere,  but
I'm wondering if it's possible to build php extensions as shared
objects that plug into the PHP binary much like an apache shared
module plugs into apache.

Is PECL close to this?

Sorry if this is obvious. Searches on the topic are pretty noisy given
that php's installation as a shared module itself for Apache are a
fairly popular topic.

Thanks,

Weston

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP Extensions as Shared Objects?

2008-05-29 Thread Weston C
On Thu, May 29, 2008 at 7:11 PM, Chris [EMAIL PROTECTED] wrote:
 See http://www.php.net/dl (though a lot of hosts disable this
 functionality for security reasons).

Fortunately, I'll have full control of the hosting environment in the
context this matters. :)

dl is  definitely interesting, but I'm worried that runtime invocation
might mean performance hits. Is there a way to do load/startup time
inclusion?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Advantages of declared vs undeclared object properties

2008-05-25 Thread Weston C
In a setup like you've got with a SimpleXML object, where object
properties aren't necessarily declared in the class definition but are
added on an ad hoc basis, is there any performance hit?

If not, other than the ability to mark properties as private, is there
any other particular advantage to declaring them at the top of the
class definition?

Thanks,

Weston

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Ways to tell if existing setup is SAPI or Shared Object?

2007-04-19 Thread Weston C

What ways are there to tell if PHP is actually built into an Apache 2
installation or if it's installed as a shared object?

I've dropped a file containing phpinfo() on the server I'm looking at,
hoping the Server API value would give me a clue, but it just says
Apache 2.0 Filter, and I don't know if Apache filters are required
to be one or the other

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Ways to tell if existing setup is SAPI or Shared Object?

2007-04-19 Thread Weston C

On 4/19/07, Richard Lynch [EMAIL PROTECTED] wrote:

On Thu, April 19, 2007 4:08 pm, Weston C wrote:
 What ways are there to tell if PHP is actually built into an Apache 2
 installation or if it's installed as a shared object?

 phpinfo() / Server API value .. just says Apache 2.0 Filter

If you can read httpd.conf, and find a LoadModule there with php, then
it's shared, I think.


I do have access to httpd.conf. I can't find a LoadModule directive
for php in it, though. Is that a bad sign? Could they possibly have
been stuffed into any of the other lesser-used conf files?


The php_sapi_name function and PHP_SAPI constant may be of use if you
just want SAPI info in your program, rather than all of phpinfo()

They're probably all exactly the same output, though.


Seems to give the same result.


... if you compiled it directly into Apache (does anybody do
that anymore?)


I certainly wouldn't. But I think this is the default Apache2
distribution on RH9, and you just never know with those folks. ;)

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Ways to tell if existing setup is SAPI or Shared Object?

2007-04-19 Thread Weston C

On 4/19/07, Edward Vermillion [EMAIL PROTECTED] wrote:


Fedora, and I'm assuming RedHat and possibly others that use their
system layout, will put the loading line in /etc/httpd/conf.d/
php.conf so yes it can be in an external configuration file.


That's the exact location, and it's a shared object. Thank you!

The other method I thought of was to search for lib4php.so, and if
it's found, rename it, restart Apache, and see if/where it complains.
:)

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Trouble compiling in mysqli under PHP5 -- mysql_config not found

2007-01-02 Thread Weston C

I'm trying to build a CLI/CGI binary of PHP5 with MySQLi under Mac OS
X. When I invoke configure, I get the following error message:

checking whether to enable embedded MySQLi support... no
mysql_config not found
configure: error: Please reinstall the mysql distribution

Now, mysql (4.1.22) is in fact installed, and it looks to me like the
headers are in fact there (and mysql_config seems to be under ./bin),
and I did give it the path with the config option
(--with-mysqli=/usr/local/mysql -- yes, I know this isn't the
conventional Mac OS X path, but I like these things under /usr/local,
so).

Curiously, I note that a build using --with-mysql=/usr/local/mysql
works just fine.

Any ideas what I'm doing wrong here?

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] CLI - php shell script worked under php4, breaks under php5

2006-06-28 Thread weston
On Mon, Jun 26, 2006 at 01:53:31PM +1000, David Tulloh wrote:

 [EMAIL PROTECTED] wrote:
  A while back I wrote a little read-eval-print loop that essentially 
  constituted a very basic php shell:
  
  http://weston.canncentral.org/misc/phpsh.txt
  
  However, I just recently tried to use this with PHP 5.1.2, and found that 
  it doesn't work. 
 
 Works for me, PHP 5.1.4.  Perhaps you have some kind of output 
 buffering enabled.  Using the -n command line switch will disable 
 your php.ini which should stop anything like that.

Thank you! It is apparently exactly as you say. :) Adding a -n makes it run 
just fine.

 The syntax error you are getting is caused by not entering 
 any input.
 Your line 23 becomes:
 $returnval = eval(return(););
 Return expects some value to be provided, hence the syntax error.

Makes sense. Thanks again!

-WEston

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] CLI - php shell script worked under php4, breaks under php5

2006-06-25 Thread weston
A while back I wrote a little read-eval-print loop that essentially constituted 
a very basic php shell:

http://weston.canncentral.org/misc/phpsh.txt

This has almost always run fine for me with the cgi versions of php 4, and 
often proves to be a great help in quickly testing various snippets of code. 

However, I just recently tried to use this with PHP 5.1.2, and found that it 
doesn't work. Specifically, it seems to wait for input to be typed without 
issuing a prompt. Upon entering a line, there's no response, until one presses 
ctrl-d. At this point, it throws a parse error:

syntax error, unexpected ')' in phpsh5(23): eval()'d code on line 1

regardless of whether or not there are in fact any unmatched parenths (or any 
parenths at all) on the entered line. And it apparently doesn't execute any of 
the code at all until one enters exit as a command.

I've tried switching from /dev/stdin to php://stdin, tried adding -f or -a to 
the processing options nothing seems to make a difference. I also tried 
removing my _readln() function, and simple entering a default expression. 
This produces the expected (if repetetive and ultimately practically useless) 
results, so I assume it's something in my _readln() function that throws it 
off. 

Any ideas how to get this to work with PHP 5?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Extending a class with a static constructur (like PEAR::DB)

2006-03-09 Thread weston
So... I'm trying to extend PEAR::DB. It'd be great to keep everything it offers 
and just add a few more perhaps unconventional functions. 

Intuitively, it seemed like this approach might work:

?PHP

require_once(DB.php);

# Toy Extension of DB Class
class DBToyExt extends DB
{
var $foo = 1;
var $bar = 2;

function testext($x)
{
echo \nHEY: $x;
}
}

$dte = DBToyExt::connect(mysql://weston_tssa:[EMAIL 
PROTECTED]/weston_tssa);

$dte-testext('testing');
$dte-testext($dte-moo);
$dte-testext($dte-bar);

?  

However, it doesn't seem to understand that the method testext exists, and 
gives me a fatal error to that effect, as you can see:

http://weston.canncentral.org/web_lab/mlib/DBToyExt.php

I'm guessing this is a side effect of the static constructor -- apparently 
using the extends keyword is enough to help the engine know that the class 
DBToyExt is supposed to inherit the static function connct, but it's not 
enough to bless the return value of connect from the class DB to DBToyExt

How do I get around this and extend DB?

Thanks,

Weston

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Extending a class with a static constructur (like PEAR::DB)

2006-03-09 Thread weston
Weston wrote:

   $dte = DBToyExt::connect(mysql://weston_tssa:[EMAIL 
  PROTECTED]/weston_tssa);
 
   $dte-testext('testing');
   $dte-testext($dte-moo);
   $dte-testext($dte-bar);

On Fri, Mar 10, 2006 at 10:43:02AM +1100, Chris wrote:

 $dte will only have the return value of DBToyExt::connect() - it won't
 allow you to access other methods in the class.

 You'll need to:

 $dbtoy = new DBToyExt();
 $dbtoy-connect()
 $dbtoy-testext('testing');

Thanks! Works like a charm:

http://weston.canncentral.org/web_lab/mlib/DBToyExt2.php

That's interesting. I think I just sortof expected that since the canonical
invocation is through a statically called method, calling it by dereferencing
a specific object wouldn't work. 

Does anyone know if that would also work in PHP 5?

If not, is there another way to do what I'm trying to do?

Thanks,

Weston

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Extending a class with a static constructur (like PEAR::DB)

2006-03-09 Thread weston
  So... I'm trying to extend PEAR::DB. It'd be great to keep everything it 
  offers and just add a few more perhaps unconventional functions. 
  
  $dte = DBToyExt::connect(mysql://weston_tssa:[EMAIL 
  PROTECTED]/weston_tssa);
  
 
 DB::connect() is actually a factory call. So what is returned is an
 instance of (in your case) a DB_mysql object. 

Ahhh! I'd kept thinking what connect() returned was a db object, but it does 
look like
it returns varying objects depending on which database you're using.

Maybe I'd want to extend DB_common instead of DB_mysql, so that the methods 
would
be inhereted by any object?

Thanks,

Weston

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] arrow values in command line php

2004-09-04 Thread weston
A while back I decided I wanted a simple interactive interpreter for PHP.
So I wrote a little PHP script that essentially did a read from stdin,
and ran eval on that. Worked for most situations I was in.

I'm trying to add some more features now, namely recalling a list of commands
using the up and down arrow, and making each line left/right arrow editable.
But I'm not sure exactly how to read the input from the arrow characters.
Could someone tell me how or point me to a good resource on doing this
kind of thing?

Thanks,

Weston

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Using php_value in .htaccess files

2004-08-23 Thread weston
Is there anything special one has to do in order to enable the use of the php_value 
directive in the context of an apache .htaccess file?

I notice that on some hosts I can drop in something like:

php_value auto_prepend_file groove.php

with impunity. Other hosts, it causes Apache to generate an internal
server error. 

-Weston

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Using php_value in .htaccess files

2004-08-23 Thread weston
 I believe Apache's Allowoverride directive must have Options or
 +Options set for php_value changes to be permitted on a per-directory
 basis in .htaccess files.
 
 Allowoverride All is one way to make sure they're permitted. :D

So... if I throw an override all in the .htaccess file I'm set? ;)

But seriously... on the particular server I'm wondering about right 
now, I can use the directive:

AddHandler server-parsed .html .htm

So using .htaccess files themselves is apparently OK on this one. 
It's when I throw in the php_value statement that things blow up
any ideas why?

-Weston

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Getting PHP on Windows to talk to MS SQL?

2004-07-23 Thread weston
I'm trying to get PHP (for Windows) to talk to MS SQL Server. This
is proving to be non-trivial...

I downloaded and installed the Windows binary package on my machine 
(the machine is running Microsfot Windows XP Professional), and 
jumped through the hoops to get it running under Apache 2.0. So
far, so good.

Now, the first thing I noted was that the mssql functions actually
don't seem to exist in the binary... and apparently you have to
compile them in to PHP, after having built FreeTDS. This seems a bit
odd, as it's not at all clear to me that FreeTDS actually will
build under Windows at all (it being a UNIX solution). I did try
building it under cygwin, which ended with a flurry of error messages
in bsqldb.c, so this assumption seems correct. 

All right, approach #2... maybe I can use COM objects to try to 
connect to an ODBC data source, something like an example I found
on the php documentation for mssql:

$db = new COM(ADODB.Connection);
$dsn = DRIVER=SQL Server; SERVER=my.local.server;UID=user;PWD=passwd; 
DATABASE=dbname;
$db-Open($dsn);
$rs = $db-Execute(SELECT * FROM project LIMIT 1);

while (!$rs-EOF)
{
echo $rs-Fields['project_id']-Value.BR;
$rs-MoveNext();
}

This seems to at least kick up no errors up to a point... and 
that point is when I try to wind through that loop. 

Any ideas what the right best way to do this is? I'd prefer to
use the mssql functions if I can... 

Thanks,

Weston

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] session looses variable

2004-06-17 Thread Anthony Weston
Hi,

This is what is probably a newbie session problem.

I've been having some trouble with sessions on php 4.0.6, I'm developing 
a website in which I don't have direct control over the server.  Due to 
some other problems I created a test counter script to try to narrow 
down where the problem resides but no I'm sort of stuck.

Here is the small counter script.

session_start();
print_r($HTTP_SESSION_VARS);
if (!session_is_registered('count2345')) {
$GLOBALS['count2345'] = 0;
echo create countbr;
session_register('count2345');
} else {
$count2345++;
}
echo br;
echo session_id();
session_write_close();

When I refresh it will periodically loose the count2345 session variable 
and recreate the variable.  At times it will also jump in value.

Here are also the php configuration session settings.

session.auto_start  Off Off
session.cache_expire 180 180
session.cache_limiter   nocache nocache
session.cookie_domain   no valueno value
session.cookie_lifetime 00
session.cookie_path  //
session.cookie_secure   Off Off
session.entropy_fileno valueno value
session.entropy_length  00
session.gc_maxlifetime  1440 1440
session.gc_probability  11
session.name PHPSESSID   PHPSESSID
session.referer_check   no valueno value
session.save_handler files   files
session.save_path/tmp/tmp
session.serialize_handler php   php
session.use_cookies  On   On

Here is also the compile configuration which includes --enable-trans-sid
 './configure' '--disable-pear' '--enable-ftp' 
'--with-sybase-ct=/usr/local/freetds' '--enable-trans-sid' 
'--enable-force-cgi-redirect'

Thank you

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Oh, for a sureset() (orthogonal to isset())

2003-10-30 Thread weston
I'm sure I'm not the first person to find strict checking of whether
or not variable (or array index) is set painful. I've considered
just setting error_reporting() to some lax level on every script I
write for the rest of my life, but have been thinking there might
be a better way.

What I'd like is a sureset() function ...there's probably a better 
name, but what it would do is more important:

function sureset($var) {

if(!isset($var) || empty($var))
return '';
else
return $var;
}

Of course, when you've got strict checking on, the above doesn't 
work, because if the variable is unset you get caught on the fact 
before the function call happens.

Is there something like this already? Is there a way to make this 
work? Or should I just go back to the idea of nuking error_reporting
in all my scripts?

Thanks,
Weston


Thanks,

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Server Slow After PHP Error

2003-10-14 Thread Weston
Whenever I access a PHP script from the web that contains an error (such as
a parsing error, etc...) The server will not respond to any request (php or
not) for about 2-3 minutes. This only happens over the web though, if i try
to run a php file using command line, the error loads immedaitely. Any help?
My system information is listed below.

RedHat Linux 7.3
Apache 1.3.27
PHP 4.1.2

Thanx
Weston

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Server Slow After PHP Error

2003-10-14 Thread Weston
Any ideas on how to correct the problem with reinstalling server software?

Thanx
-Weston

Weston [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 Whenever I access a PHP script from the web that contains an error (such
as
 a parsing error, etc...) The server will not respond to any request (php
or
 not) for about 2-3 minutes. This only happens over the web though, if i
try
 to run a php file using command line, the error loads immedaitely. Any
help?
 My system information is listed below.

 RedHat Linux 7.3
 Apache 1.3.27
 PHP 4.1.2

 Thanx
 Weston

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] PHP Shell doesn't run on a system

2003-09-22 Thread Weston Cann
A while back I wrote a small script that was designed to work as an 
interactive interpreter for PHP code, a la Python. The script itself is 
written in PHP, and is pretty basic:

?PHP

function readln()
{
$fp=fopen(/dev/stdin, r);
$input=fgets($fp, 255);
fclose($fp);
return rtrim($input);
}
print \n;

foreach($argv as $arg) include_once($arg);

do
{
print phpsh ;
$cmdline = readln();
	$lastchar = substr($cmdline,-1);
	if(($lastchar == ';') || ($lastchar == '}'))		// No Return Value
		$returnval = eval($cmdline);
	else// 
eval and return the value
		$returnval = eval(return($cmdline););

if(isset($returnval)  !empty($returnval))
{ echo $returnval,\n; }

} while(TRUE);

?
Since it lets you evaluate setup test scripts specified via the command 
line, it's not a half-bad way to debug things, not to mention ints main 
purpose, which is to let you interact with the language or some other 
code and see if things behave as you expect.

It runs great on my home system, running OS X, and one other web server 
I host on However, I recently moved it over to a friend's shared hosting 
at Verio, and it doesn't run on this system. Rather, it gives me the 
following messsage:

bParse error/b:  parse error in 
b/usr/home/jakus1/www/htdocs/phpsh(28) : eval()'d code/b on line 
b1/bbr /
phpsh br /
bParse error/b:  parse error in 
b/usr/home/jakus1/www/htdocs/phpsh(28) : eval()'d code/b on line 
b1/bbr /

Which it actually repeats over and over again, until I hit ^C or ^Z.  
Looks to me like my function to get command line entries isn't working 
so well -- but why not on this server if it works so whel on the other 
systems? Is there a setup option I'm missing?

And while we're at it, has anyone written a tool that will tell you 
what's different between server setups?

Thanks,
  Weston
~ == ~
http://weston.canncentral.org/
Correct as usual, King Friday
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] PHP setup differences (was: PHP Shell doesn't run on a system)

2003-09-22 Thread weston
 
 
 And while we're at it, has anyone written a tool that will tell you 
 what's different between server setups?
  
  I use diff on unix.
  
 
 You may like tkdiff, with its additional GUI to diff

Hmmm. Diff on what? I suppose the INI files are prime candidates, as well as whatever 
phpinfo spits out. Except that while I expect the HTML output of PHP info remains 
pretty consistent, I have my doubts that a line-by-line diff of two HTML files will 
yield the desired information in a 
readable format... 

Is there a way (without parsing the HTML of phpinfo()) to get the information 
phpinfo() puts out in a line by line plain text format?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP Shell doesn't run on a system

2003-09-22 Thread weston
Curt Zirzow wrote:

 * Thus wrote Weston Cann ([EMAIL PROTECTED]):
  A while back I wrote a small script that was designed to work as an 
  interactive interpreter for PHP code, a la Python. The script itself is 
  written in PHP, and is pretty basic:
 
  ?PHP
 
  function readln()
  {
  $fp=fopen(/dev/stdin, r);

 use fopen('php://stdin', 'r') instead.

 http://php.net/manual/en/wrappers.php.php

Muchas Gracias! That solves the problem -- now I just wish I understood why. 
/dev/stdin is present on both the system the original script ran on and the problem 
system 

-W

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Using Image/GD functions to transform images stored in database

2003-09-13 Thread weston
I'm new to the GD/Image functions with PHP, and I'm trying to use them 
to manipulate jpeg images that I've stored in a MySQL database 
(specifically, creating thumbnails). The thing I can't tell from reading 
the documentation is how to use these image functions to operate on 
image data -- it looks like you get a GD image resource in each case 
by specifying a file name, not by passing image data directly. While I 
can see how that's convenient for the common case, I can't figure out 
how to make this work without writing the image out to a file (and since 
I'm already taking a bit of a performance hit by reading the image out 
a database, that seems like the wrong thing to do). Can anyone elaborate? 

Thanks,
Weston

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] More Image Transformation Difficulty

2003-09-13 Thread weston
I'm trying to write a script that pulls an image from a database and transforms
the size if passed a width via the url query string.

Thanks to the helpful hint about the function imagecreatefromstring, I 
think I'm now able to ready image data I've pulled for a database with 
GD. However, I'm still having trouble resizing... at least, when I'm 
sending the image to my browser, I'm being told that it cannot be 
displayed, because it contains errors. (And the script does work if
I don't try resizing... see below for example URL).


Here's what I'm doing:

$row = mysql_fetch_row($dbresult);
$imgdata = $row[0];

if(isset($width)  !empty($width)  is_numeric($width))
/* only do transformation if given a width */
{
$gdimg = imagecreatefromstring($imgdata);
$srcWidth = imagesx($gdimg);
$srcHeight = imagesy($gdimg);
$scaleFactor = $width/$srcWidth;
$targetHeight = $srcHeight * $scaleFactor;

$resizedimg = imagecreatetruecolor($width,$targetHeight);

imagecopyresized($resizedimg,$gdimg,0,0,0,0,$width,$targetHeight,$srcWidth,$srcHeight);
}

header(Content-Type: image/jpeg);
header(Content-Transfer-Encoding: binary\n);
//send file contents
if(!empty($resizedimg)) 
imagejpg($resizedimg);
else 
{
header(Content-length:  . strlen($imgdata) . \n);
print($imgdata);
}


Does anyone see what I'm doing wrong? Again, the script actually works if I
don't try to do the transform. See:

http://www.fsboutah.net/jpg.php?table=homeskey=4field=Picture1

and

http://www.fsboutah.net/jpg.php?table=homeskey=4field=Picture1width=100

for contrasts.


-W

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Reading an MS Access Database file on *NIX platform using PHP

2003-08-25 Thread Weston Cann
On Sunday, August 24, 2003, at 05:31 PM, Giz wrote:

Access is a pc database.  It doesn't run on unix.  Why people insist on
beating their heads against the wall in this manner I will never know.
Ignorance I suppose.  The alternative is to have your friend use a
relational database and have a few simple forms that will allow him to
insert/update/delete.  Best of both worlds, and the open source/free
databases mysql/postgresql are used on thousands of websites every day.
I share a low regard for Access, and I've got a set of standard 
forms/code I use to set up a nice interface to MySQL, and I showed it to 
my friend. He likes that, but there's a problem:

He wants to be able to make changes offline, and then sync up.

This isn't an uncommon desire... I've run into people wanting to do this 
before (with Excel spreadsheets, no less).  And in fact, it's probably 
the most convenient way of doing things, as long as they're warned about 
certain dangers (overwrites from competing unsynced database files).  
There's a certain cumbersome nature about web forms and the time delay 
involved in HTTP transactions.

So anyway, that's the motivation for using Access here.

David Otton [EMAIL PROTECTED] wrote:

Suggestion: go backwards. Set up the data in, say, MySQL with an ODBC
driver, and use Access as a front-end onto that data (Access makes a 
good
front-end for manipulating other databases). I've done this with SQL 
Server,
but it should be possible with anything that can talk ODBC.

He gets the interface he's used to, you get a database that can run 
under
BSD. Of course, changes will be reflected in the site in real-time, 
which
may be a good thing or a bad thing.

Either that or export the data from Access in a readable format, and 
import
it at the other end.
These ideas might work better; especially the latter. If COM doesn't 
work under UNIX and ODBC can only talk to FoxPro, Access, and other 
document (rather than server) oriented databases with the help of some 
special Win32 control panel/dll, then it would seem that the only way to 
do offline updates that are then synced would be exporting from Access 
in some standard format.

But it seems somewhat odd to me that there aren't any UNIXy (PHP, Perl, 
something) for parsing Access files. I know there's a few CPAN 
modules for Excel, but it's interesting that there's apparently nothing 
for Access.

~ == ~
http://weston.canncentral.org/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Reading an MS Access Database file on *NIX platform using PHP

2003-08-24 Thread weston
I'm building a small web application for a friend using PHP. He'd like to
use MS Access to keep the data in, and update the data on the site by FTP'ing 
Access files he edits on his machine up to the web host.

The web host is unix-based (FreeBSD, slightly hacked by Verio, I believe), so
this means COM functions aren't available. ODBC was my next thought, but I've
never used it, and there are a few things I don't understand. Setting up a 
DSN is one of them -- apparently this isn't as simple as constructing a string,
and all the tutorials I can find seem to involve going into a Windows control
panel and making a setting. This of course will not be possible, since there
are no windows control panels on FreeBSD.

In short: can anyone offer any quick tips on how to use the odbc database functions or 
PEAR::DB to query data from an MS Access file sitting on a UNIX box?

Thanks,
Weston

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Fatal Error: Call to undefined function: *mail()*? What's next, echo?

2003-06-25 Thread weston
I was testing a boring little FormMail script I've used on dozens of PHP
installations (Apache and IIS), when I got an error:

Fatal error: Call to undefined function: mail() in 
/usr/local/apache/vweb/redfishinsurance/form2mail.php on line 65

What? How? I quote from the PHP manual entry for the mail() function:

Requirements

No external libraries are needed to build this extension.

Installation

There is no installation needed to use these functions; they are part of the PHP core.

I wouldn't be so surprised and perplexed if it just somehow failed, but nope,
it's *undefined* ... should I be worried echo() and print() are going to go next?

Help.

-W


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Namespace like C++

2003-06-03 Thread Weston Houghton
Nope.
They've been looking to add it in the next version of the Zend Engine, 
but to be honest, it isn't working out well for a language like PHP. As 
of last week, the decision was actually to remove the somewhat dubious 
namespace support that had already been added.

Cheers,
Wes
On Monday, June 2, 2003, at 05:22  PM, Steven Walker wrote:

Hi,

I was wondering if there is a way in PHP to define namespaces (as in 
C++ or some similar scope classification technique). I didn't find any 
related documentation. Is it possible?

Steven J. Walker
Walker Effects
www.walkereffects.com
[EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] request

2003-05-30 Thread Weston Houghton
I would imagine that you have to add:
$random = gmp_strval($random);
In between the two lines to convert the resource to a string value.

Wes

On Thursday, May 29, 2003, at 04:24  PM, Marius wrote:

?
$random = gmp_random(10);
echo $random;
?
how to do that it echoes a random number and not a
Resource id #1,
--
 Marius
 [EMAIL PROTECTED]


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Anyone have oci8 working on MacOSX?

2003-05-30 Thread Weston Houghton
What version of PHP are you using, and are you using both CLI and 
Apache module at the same time?

I compiled it at work with no huge problems.

Wes

On Thursday, May 29, 2003, at 06:45  PM, Sapporo wrote:

Hi,

is anyone sucessfully using the oci8 Oracle extension on MacOSX?

Whenever I try to connect using OCILogon(), oci8 crashes:

May 30 00:33:19 localhost crashdump: Unable to write crash report to 
/Library/Logs/CrashReporter/httpd.crash.log for uid: 70  Date/Time:  
2003-05-30 00:33:19 +0200 OS Version: 10.2.6 (Build 6L60) Host:   
myhostname.local.  Command:httpd PID:1400  Exception:  
EXC_BAD_ACCESS (0x0001) Codes:  KERN_PROTECTION_FAILURE (0x0002) 
at 0x  Thread 0 Crashed:  #0   0x9f20 in strlen  #1   
0x0193a0e8 in snauca_check_adapter  #2   0x01913670 in nau_viat  #3   
0x0190ba18 in nau_gettab  #4   0x0190a100 in nau_ini  #5   0x018ba6f4 
in nainit  #6   0x018dad3c in nsnainit  #7   0x0189c478 in nsopen  #8  
 0x0189b160 in nscall1  #9   0x0189a948 in nscall  #10  0x018fdc38 in 
niotns  #11  0x0188749c in osncon  #12  0x01713c6c in upiini  #13  
0x0172428c in upiah0  #14  0x016e6ae4 in kpuatch  #15  0x0171b7d0 in 
OCIServerAttach  #16  0x007834e4 in _oci_open_server (oci8.c:2437)  
#17  0x00783b68 in oci_do_connect (oci8.c:2590)  #18  0x00855758 in 
execute (zend_execute.c:1596)  #19  0x0084769c in zend_execute_script

TIA,
-sapporo.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Resizing Images Uploaded to Web Page

2003-03-08 Thread Weston Houghton
You'll need to either use the gd functions, or my recommendation, get  
the imagick module and use it. Both should do an excellent job. iMagick  
is in PEAR.

Wes

On Saturday, March 8, 2003, at 03:15  PM, Vernon wrote:

I have users uploading images to a server and need to have those files
resized on upload. I looked under filesystem, but found nothing like  
that.
Anyone?

Thanks



--  
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



 
---
The selection and placement of letters on this page was
determined automatically by a computer program. Any
resemblance to actual words, sentences, or paragraphs is
pure coincidence, and no liability will be assumed for
such coincidences.
 
---

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: Fw: [PHP] Resizing Images Uploaded to Web Page

2003-03-08 Thread Weston Houghton
iMagick offers all of the functionality of imageMagick, which is a  
substantially different subset than GD. iMagick is primarily geared  
toward modifying existing images. Resizing, converting formats, apply  
effects to, etc. It also works with a far larger set of base image  
formats.

Check out imagemagick itself, and then for access to that functionality  
in php, head out and grab iMagick.

Wes

On Saturday, March 8, 2003, at 03:34  PM, Liam Gibbs wrote:

You'll need to either use the gd functions, or my recommendation, get
the imagick module and use it. Both should do an excellent job.  
iMagick
is in PEAR.
How is PEAR making out? What makes it better than using the GD  
extension? I
will need to do image manipulation (much like the original question,  
I'll
have to make thumbnails of images on upload) and I want to know which  
is the
better option, in what circumstances, etc.

--  
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



 
---
The selection and placement of letters on this page was
determined automatically by a computer program. Any
resemblance to actual words, sentences, or paragraphs is
pure coincidence, and no liability will be assumed for
such coincidences.
 
---

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] mailing with SMTP server requiring authentication

2003-02-02 Thread Weston Houghton

For a bit more in depth answer, I would recommend using the Mail class  
in Pear:
http://pear.php.net/manual/en/core.mail.mail.php

Should make it very easy.
Wes


On Sunday, February 2, 2003, at 01:10  PM, Jason Wong wrote:

On Monday 03 February 2003 00:32, Johan Köhne wrote:

Is it possible and if so, how to send emails through SMTP servers that
require authentication (logging in)?


Yes. Search the archives.

--  
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
A computer lets you make more mistakes faster than any other invention,
with the possible exceptions of handguns and Tequilla.
	-- Mitch Ratcliffe
*/


--  
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




 
---
The selection and placement of letters on this page was
determined automatically by a computer program. Any
resemblance to actual words, sentences, or paragraphs is
pure coincidence, and no liability will be assumed for
such coincidences.
 
---


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] 4.3 Install on Solaris

2003-01-31 Thread Weston Houghton

All,

I seem to be getting a silly error on Solaris when trying to do a PHP  
4.3 make. I get an error that looks to me like the liner arguments are  
just too long. to be honest, I'm a bit stupified as to why this is  
happening or how to fix it. FWIW, I have compiled 4.23 just fine on  
that box.

Thanks,
Wes


p.s. here's the last bit of the error:

/bin/sh libtool --silent --mode=link gcc -export-dynamic -g -O2   
-avoid-version -module -L/usr/ucblib  
-L/usr/local/lib/gcc-lib/sparc-sun-solaris2.6/2.8.1  
-L/export/home/oracle/OraHome/lib  -R /usr/ucblib -R  
/usr/local/lib/gcc-lib/sparc-sun-solaris2.6/2.8.1 -R  
/export/home/oracle/OraHome/lib ext/ctype/ctype.lo ext/ftp/php_ftp.lo  
ext/ftp/ftp.lo ext/mysql/php_mysql.lo ext/mysql/libmysql/libmysql.lo  
ext/mysql/libmysql/errmsg.lo ext/mysql/libmysql/net.lo  
ext/mysql/libmysql/violite.lo ext/mysql/libmysql/password.lo  
ext/mysql/libmysql/my_init.lo ext/mysql/libmysql/my_lib.lo  
ext/mysql/libmysql/my_static.lo ext/mysql/libmysql/my_malloc.lo  
ext/mysql/libmysql/my_realloc.lo ext/mysql/libmysql/my_create.lo  
ext/mysql/libmysql/my_delete.lo ext/mysql/libmysql/my_tempnam.lo  
ext/mysql/libmysql/my_open.lo ext/mysql/libmysql/mf_casecnv.lo  
ext/mysql/libmysql/my_read.lo ext/mysql/libmysql/my_write.lo  
ext/mysql/libmysql/errors.lo ext/mysql/libmysql/my_error.lo  
ext/mysql/libmysql/my_getwd.lo ext/mysql/libmysql/my_div.lo  
ext/mysql/libmysql/mf_pack.lo ext/mysql/libmysql/my_messnc.lo  
ext/mysql/libmysql/mf_dirname.lo ext/mysql/libmysql/mf_fn_ext.lo  
ext/mysql/libmysql/mf_wcomp.lo ext/mysql/libmysql/typelib.lo  
ext/mysql/libmysql/safemalloc.lo ext/mysql/libmysql/my_alloc.lo  
ext/mysql/libmysql/mf_format.lo ext/mysql/libmysql/mf_path.lo  
ext/mysql/libmysql/mf_unixpath.lo ext/mysql/libmysql/my_fopen.lo  
ext/mysql/libmysql/mf_loadpath.lo ext/mysql/libmysql/my_pthread.lo  
ext/mysql/libmysql/my_thr_init.lo ext/mysql/libmysql/thr_mutex.lo  
ext/mysql/libmysql/mulalloc.lo ext/mysql/libmysql/string.lo  
ext/mysql/libmysql/default.lo ext/mysql/libmysql/my_compress.lo  
ext/mysql/libmysql/array.lo ext/mysql/libmysql/my_once.lo  
ext/mysql/libmysql/list.lo ext/mysql/libmysql/my_net.lo  
ext/mysql/libmysql/dbug.lo ext/mysql/libmysql/strmov.lo  
ext/mysql/libmysql/strxmov.lo ext/mysql/libmysql/strnmov.lo  
ext/mysql/libmysql/strmake.lo ext/mysql/libmysql/strend.lo  
ext/mysql/libmysql/strfill.lo ext/mysql/libmysql/is_prefix.lo  
ext/mysql/libmysql/int2str.lo ext/mysql/libmysql/str2int.lo  
ext/mysql/libmysql/strinstr.lo ext/mysql/libmysql/strcont.lo  
ext/mysql/libmysql/strcend.lo ext/mysql/libmysql/bchange.lo  
ext/mysql/libmysql/bmove.lo ext/mysql/libmysql/bmove_upp.lo  
ext/mysql/libmysql/longlong2str.lo ext/mysql/libmysql/strtoull.lo  
ext/mysql/libmysql/strtoll.lo ext/mysql/libmysql/charset.lo  
ext/mysql/libmysql/ctype.lo ext/oci8/oci8.lo ext/overload/overload.lo  
ext/pcre/pcrelib/maketables.lo ext/pcre/pcrelib/get.lo  
ext/pcre/pcrelib/study.lo ext/pcre/pcrelib/pcre.lo ext/pcre/php_pcre.lo  
ext/posix/posix.lo ext/session/session.lo ext/session/mod_files.lo  
ext/session/mod_mm.lo ext/session/mod_user.lo ext/standard/array.lo  
ext/standard/base64.lo ext/standard/basic_functions.lo  
ext/standard/browscap.lo ext/standard/crc32.lo ext/standard/crypt.lo  
ext/standard/cyr_convert.lo ext/standard/datetime.lo  
ext/standard/dir.lo ext/standard/dl.lo ext/standard/dns.lo  
ext/standard/exec.lo ext/standard/file.lo ext/standard/filestat.lo  
ext/standard/flock_compat.lo ext/standard/formatted_print.lo  
ext/standard/fsock.lo ext/standard/head.lo ext/standard/html.lo  
ext/standard/image.lo ext/standard/info.lo ext/standard/iptc.lo  
ext/standard/lcg.lo ext/standard/link.lo ext/standard/mail.lo  
ext/standard/math.lo ext/standard/md5.lo ext/standard/metaphone.lo  
ext/standard/microtime.lo ext/standard/pack.lo ext/standard/pageinfo.lo  
ext/standard/parsedate.lo ext/standard/quot_print.lo  
ext/standard/rand.lo ext/standard/reg.lo ext/standard/soundex.lo  
ext/standard/string.lo ext/standard/scanf.lo ext/standard/syslog.lo  
ext/standard/type.lo ext/standard/uniqid.lo ext/standard/url.lo  
ext/standard/url_scanner.lo ext/standard/var.lo  
ext/standard/versioning.lo ext/standard/assert.lo  
ext/standard/strnatcmp.lo ext/standard/levenshtein.lo  
ext/standard/incomplete_class.lo ext/standard/url_scanner_ex.lo  
ext/standard/ftp_fopen_wrapper.lo ext/standard/http_fopen_wrapper.lo  
ext/standard/php_fopen_wrapper.lo ext/standard/credits.lo  
ext/standard/css.lo ext/standard/var_unserializer.lo  
ext/standard/ftok.lo ext/standard/aggregation.lo ext/standard/sha1.lo  
ext/tokenizer/tokenizer.lo ext/xml/xml.lo ext/xml/expat/xmlparse.lo  
ext/xml/expat/xmlrole.lo ext/xml/expat/xmltok.lo regex/regcomp.lo  
regex/regexec.lo regex/regerror.lo regex/regfree.lo TSRM/TSRM.lo  
TSRM/tsrm_strtok_r.lo TSRM/tsrm_virtual_cwd.lo main/main.lo  
main/snprintf.lo main/spprintf.lo main/php_sprintf.lo main/safe_mode.lo  
main/fopen_wrappers.lo main/alloca.lo main/php_ini.lo 

[PHP] Using CVS through PHP

2003-01-30 Thread Weston Houghton

I'm looking at building a system script for build management. I would  
very much prefer to do this in PHP. Are there any integrated means of  
using CVS with php, or am I limited to using system calls from cvs?

Thanks,
Wes


 
---
The selection and placement of letters on this page was
determined automatically by a computer program. Any
resemblance to actual words, sentences, or paragraphs is
pure coincidence, and no liability will be assumed for
such coincidences.
 
---


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] __PHP_Incomplete_Class Object

2003-01-29 Thread Weston Houghton

Ok, now I'm frustrated.

I'm trying to register an object in the session, and access that object  
from 2 different pages.

I start off in the first file, and do:
?php
include(nycmgMail.php);
session_start();
$myMailer = new nycmgMail();
$myMailer-buildRecipients();
$_SESSION['myMailer'] = $myMailer;
?

If I print_r the $_SESSION on that page, everything looks fine. So I  
then move to my second page, and use:

?php
session_start();

$myMailer = $_SESSION['myMailer'];
if ($myMailer) {
	$addressArray = $myMailer-getRecipients();
} else {
	$addressArray = null;
}

?

Now when I do this, if I look at the $_SESSION object I see that that  
class is now listed as:
[myMailer] = __PHP_Incomplete_Class Object
(
[__PHP_Incomplete_Class_Name] = nycmgmail
...

and in the error log I see:
[29-Jan-2003 23:58:09] PHP Fatal error:  Unknown(): The script tried to  
execute a method or access a property of an incomplete object. Please  
ensure that the class definition bnycmgmail/b of the object you are  
trying to operate on was loaded _before_ the session was started in  
/.../.../.../.../admin/addresses.php on line 6

I swear I have done all of this before, but it is just not working now,  
and for the life of me I can't see anything right in front of me.

Help! Please?

thanks,
Wes



 
---
The selection and placement of letters on this page was
determined automatically by a computer program. Any
resemblance to actual words, sentences, or paragraphs is
pure coincidence, and no liability will be assumed for
such coincidences.
 
---


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Blueshoes App Framework

2003-01-21 Thread Weston Houghton

Does anyone have any experience with or comments on blueshoes? I've not 
investigated it much, as the license seems a bit odd, but I thought I'd 
get some info on it if anyone had any, so far I haven't found anyone 
who has tried it, which seems a tad weird to me.

http://www.blueshoes.org/

Cheers,
Wes


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] fit window to image

2003-01-16 Thread Weston Houghton

This wouldn't really be done in PHP. This is a Javascript element, as 
it requires work to be done on the client side. You could easily make a 
combination of PHP and Javascript to do this with any set of images 
though.

Wes


On Thursday, January 16, 2003, at 08:37  PM, Ezequiel Sapoznik wrote:

Hi!

Is there anyway in php to fit the window to the size of an image?

Thanks!

Ezequiel



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php





--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Nested Arrays

2002-12-26 Thread Weston Houghton

Sure... for the longwinded approach, just do this:

$row1 = array(col1, col2, col3, ...);
$row2 = array(col1, col2, col3, ...);
$row3 = array(col1, col2, col3, ...);
$row4 = array(col1, col2, col3, ...);
$row5 = array(col1, col2, col3, ...);

$main_array = array($row1, $row2, $row3, $row4, $row5);

Obviously these could include key-value pairs in the arrays as well. 
Then to prove it to yourself:

print_r($main_array);

Cheers,
Wes


On Thursday, December 26, 2002, at 06:14  PM, Beauford.2002 wrote:

Hi,

Is there anyway to do a nested array, I have looked at the various 
array
functions and can't figure this out (if possible).

I want to be able to put each field of  a row into an array, and then 
put
that entire row and into another array.

so when I display it, I would have:

row1 - col1  col2  col3 col4 col5
row2 - col1  col2  col3 col4 col5
row3 - col1  col2  col3 col4 col5
row4 - col1  col2  col3 col4 col5
row5 - col1  col2  col3 col4 col5

etc. (depending on how many rows there are).

TIA



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Nested Arrays

2002-12-26 Thread Weston Houghton

Sure... for the longwinded approach, just do this:

$row1 = array(col1, col2, col3, ...);
$row2 = array(col1, col2, col3, ...);
$row3 = array(col1, col2, col3, ...);
$row4 = array(col1, col2, col3, ...);
$row5 = array(col1, col2, col3, ...);

$main_array = array($row1, $row2, $row3, $row4, $row5);

Obviously these could include key-value pairs in the arrays as well. 
Then to prove it to yourself:

print_r($main_array);

Cheers,
Wes



On Thursday, December 26, 2002, at 06:14  PM, Beauford.2002 wrote:

Hi,

Is there anyway to do a nested array, I have looked at the various 
array
functions and can't figure this out (if possible).

I want to be able to put each field of  a row into an array, and then 
put
that entire row and into another array.

so when I display it, I would have:

row1 - col1  col2  col3 col4 col5
row2 - col1  col2  col3 col4 col5
row3 - col1  col2  col3 col4 col5
row4 - col1  col2  col3 col4 col5
row5 - col1  col2  col3 col4 col5

etc. (depending on how many rows there are).

TIA



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] str_replace

2002-12-26 Thread Weston Houghton

All,

In using str_replace, I glanced at the manual and found that it can 
take arrays for it's arguments. Great! I thought that I could have a 
single search string, an array of replacement vars, and no subject. It 
would then replace each successive instance of the search string with 
the next element in the replacement array.

Sadly this is not the case.

Anyone have any recommendations on how to go about this? Best idea 
using p/ereg_replace? Or just a loop system in which I replace the 
first instance of the string each time?

I'm not great at p/ereg yet, anyone have any pointers?

Cheers,
Wes


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] str_replace

2002-12-26 Thread Weston Houghton
okey dokey, here goes:

this gets really complicated to explain without showing the code, which 
I really can't do (damned NDA's) and ultimately it's a bit big to post 
anyhow. But I'm going to try.

I let the user specify a number of rows to input 2 pieces of data. I 
then replace a template containing one row with that number of 
replacement rows when displaying the form. In the process of creating 
the final data to send to the user I of course have to fill in a couple 
of details.

So I start with a base form field:
input type=hidden value=!value! name=!field_id! !value! input 
type=text name=!field_id![]

So that line has to be repeated as many times as the user enters. With 
the !**! values being replaced by the correct information. The !value! 
needs to just be a simple incremented count. What I was hoping to do 
was build an array of the correct data for each row, then insert it 
into the template. The template doesn't distinguish each row at all, so 
I am trying to shove different data in for each row, when at this 
stage, I just have a template that looks roughly like:

table
tr
td!insert_row!/td
/tr
tr
td!insert_row!/td
/tr
tr
td!insert_row!/td
/tr
/table

I was hoping the str_replace with an array would work here, but it 
isn't, so I am looking for other options. I know I have a way to do it 
now, by just looping through and replacing them one by one. I was just 
trying to find a little bit more elegant solution I guess.

Thanks,
Wes


On Thursday, December 26, 2002, at 08:14  PM, John W. Holmes wrote:

In using str_replace, I glanced at the manual and found that it can
take arrays for it's arguments. Great! I thought that I could have a
single search string, an array of replacement vars, and no subject. It
would then replace each successive instance of the search string with
the next element in the replacement array.

Sadly this is not the case.

Anyone have any recommendations on how to go about this? Best idea
using p/ereg_replace? Or just a loop system in which I replace the
first instance of the string each time?

I'm not great at p/ereg yet, anyone have any pointers?


Can you explain exactly what you want replaced and with what? Give an
example of the string and what will be replaced and what it will be
replaced with. Then someone can write/help with the regex.

---John W. Holmes...

PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php





--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Free Util: apxDebug

2002-12-07 Thread Weston Houghton

Hey all,

I've been meaning to write a simple debug tracking class for use in my 
own projects. So this week I finally did. I have no clue if anyone else 
would ever use it, or have any interest in looking at it, but I've set 
it up for people to download it if you have any interest. Regardless, I 
would love if people wanted to take a look at it and just give me 
general comments on the code.

http://www.anapraxis.com/os/apxDebug/

What does it do?
It's just a simple tool for logging debug messages from within any 
other php development. Being a MacOS X user for developing and serving, 
I find that many of the nice tools, such as Zend's aren't available for 
real debugging. So I frequently am writing values out to screen for 
debugging. This tool separates them mostly from whatever you are 
working on and let's you classify them, and show/hide groups of them 
when browsing. I've set up a simple online demo, but since it really is 
for development it may be hard to understand without just trying it out 
in your own code.

I've been developing tools for installations on clients intranet 
servers lately too, to where I cannot see in, but they can see out. So 
I have written the tool to both log the debug info to a text file, as 
well as email the logfile to an address through the browser pop-up. 
Right now it only does html emails, but I am working on getting it 
setup to handle plain text and mixed mode as well.

It uses css, dhtml, and javascript for the display so likely requires 
gecko or MSIE 5 or higher. Also, if you are just interested in seeing 
php and javascript work together, it might be a good introduction for 
you, nothing complicated, I just use php to feed in some of the js 
variables.

Anyhow, drop me a line with any questions if you have them, or feature 
requests, I'd love to know if anyone else besides me would actually use 
this thing. :) Oh, and if it just completely screws up for you, let me 
know too. I'd call this a 0.9 beta version, so I'm sure it will find a 
way to surprise me.

Cheers,
Wes


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: [PHP-INST] OS X and Curl Issues

2002-12-01 Thread Weston Houghton

I found two main things that were hampering my install.

1. While I thought I had updated cURL, I believe I may have only 
upgraded the executable itself the first time, while leaving the 
libraries themselves at an older version.

2. OS X install cURL with a prefix of /usr, whereas the standard cURL 
install uses /usr/local. /usr has a higher preference in the 
compiler/linker's environment path, so it continues to use the old 
version if you do not change the prefix of the new cURL.

The solution is just to grab the new cURL, then configure and make it. 
I used a configure of:
./configure --prefix=/usr --with-ssl

Then went ahead with my php install, and everything outside of 
phpMagick worked great, and that subject is a whole different story.

Good luck,
Wes


On Sunday, December 1, 2002, at 07:31  PM, Randall Perry wrote:

I've got curl 7.10 and am getting the same error on Mac OS 10.2.2 
server.
Here's my config:

./configure --with-apxs=/usr/sbin/apxs --with-pgsql --with-xml
--with-openssl=/usr/local/ssl --with-pear --with-curl=/usr/lib/curl


Here's curl:

[systame:local/src/php-4.2.3] randy% /usr/bin/curl -V
curl 7.10 (powerpc-apple-darwin6.2) libcurl/7.10 ipv6 zlib/1.1.3


Here's the error:

checking for CURL support... yes
checking for CURL in default path... found in /usr/local
found in /usr
checking for cURL 7.9 or greater... configure: error: cURL version 7.9 
or
later is required to compile php with cURL support


I'm working on getting the following install working under OS 10.2.2:

./configure --prefix=/usr \
--sysconfdir=/etc \
--localstatedir=/var \
--mandir=/usr/share/man \
--with-apxs=/usr/sbin/apxs \
--with-mysql \
--with-gd=/usr/local \
--with-png-dir=/usr/local \
--with-zlib-dir=/usr/local \
--with-jpg-dir=/usr/local \
--with-freetype-dir=/usr/local \
--enable-trans-sid \
--enable-exif \
--enable-ftp \
--enable-calendar \
--with-curl=/usr/lib \
--with-flatfile \
--with-ming=/Users/whoughto/src/ming-0.2a \
--enable-sockets \
--with-jave=/Library/Java/Home \
--with-xml

And Curl keeps throwing me the following error, but as you can see, I
do indeed have 7.9.8 installed. Any ideas?

checking for CURL support... yes
checking for CURL in default path... found in /usr
checking for cURL 7.9.8 or greater... configure: error: cURL version
7.9.8 or later is required to compile php with cURL support
[user/src/php4rc2] root# curl --help
curl 7.9.8 (powerpc-apple-darwin5.5) libcurl 7.9.8

Thanks,
Wes



--
Randall Perry
sysTame

Xserve Web Hosting/Co-location
Website Development/Promotion
Mac Consulting/Sales

http://www.systame.com/



--
PHP Install Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php





--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] OS X and cURL Issues

2002-11-30 Thread Weston Houghton
I'm working on getting the following install working under OS 10.2.2:

./configure --prefix=/usr \
--sysconfdir=/etc \
--localstatedir=/var \
--mandir=/usr/share/man \
--with-apxs=/usr/sbin/apxs \
--with-mysql \
--with-gd=/usr/local \
--with-png-dir=/usr/local \
--with-zlib-dir=/usr/local \
--with-jpg-dir=/usr/local \
--with-freetype-dir=/usr/local \
--enable-trans-sid \
--enable-exif \
--enable-ftp \
--enable-calendar \
--with-curl=/usr/lib \
--with-flatfile \
--with-ming=/Users/whoughto/src/ming-0.2a \
--enable-sockets \
--with-jave=/Library/Java/Home \
--with-xml

And Curl keeps throwing me the following error, but as you can see, I 
do indeed have 7.9.8 installed. Any ideas?

checking for CURL support... yes
checking for CURL in default path... found in /usr
checking for cURL 7.9.8 or greater... configure: error: cURL version 
7.9.8 or later is required to compile php with cURL support
[user/src/php4rc2] root# curl --help
curl 7.9.8 (powerpc-apple-darwin5.5) libcurl 7.9.8

Thanks,
Wes


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] ImageMagick Extension v0.2a Released (UPDATED)

2002-11-21 Thread Weston Houghton

I had no idea anyone was actively working on something like this. Are 
you looking for help? Do you plan on perhaps making this a Sourceforge 
project, or something similar?

Cheers and great job,
Wes


On Thursday, November 21, 2002, at 05:56  PM, Michael Montero wrote:

Just released the next version of magick, the PHP ImageMagick 
extension.
It is located here:

http://apc.communityconnect.com/magick/magick-0.2a.tar.gz

Here's the ChangeLog:

November 21, 2002   0.2a

o functions added:
magick_rotate()
magick_shear()
magick_contrast()
magick_equalize()
magick_gamma()
magick_level()
magick_modulate()
magick_negate()
magick_normalize()
magick_drawellipse()
o slight changes to output of gen_configm4
o fixed comments in all examples after the initial
	  magick_readimage(), they were wrong
o fixed all examples so they exit properly on errors
o fixed all examples so they work as either standalone script 
or
	  web page; they do better output as well
o fixed output of magick info. when calling phpinfo()
o more commenting
o significantly better error handling

--
Michael C. Montero
Chief Technology Officer
Community Connect Inc. Co-founder
[EMAIL PROTECTED]

-=-=-=-=-=  Community Connect Inc.  
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

The Premier Source of Interactive Online Communities149 Fifth 
Avenue
http://www.CommunityConnectInc.com/ New York, NY 
10010

http://www.AsianAvenue.com/ http://www.BlackPlanet.com/
Click into Asian AmericaThe World Is Yours

http://www.MiGente.com/ 
http://www.DiversityJobMarket.com/
	The Power of LatinosIn partnership with The New
		York Times

-  Your Message May Appear Below This Line



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Apache query error affecting PHP?

2002-05-28 Thread Weston Houghton


Hello...

I'm wondering if I have found an oddity in httpd. I'm currently writing a
PHP directory listing system. I am pretty sure that this is not a php issue,
but I have not been able to test it on a httpd install sans php, but it can
be seen when requesting an image file, which should not invoke the PHP
parser.

So here it is, if you try hitting the URL:
http://www.anapraxis.com/assets/global/en_solutions.gif?element=../../../

Or if you would like to see it on the httpd site:
http://httpd.apache.org/images/httpd_logo_wide.gif?element=../../

Apache will actually return the directory listing of the assets/ directory
(assuming you have directory listing enabled, otherwise it returns the
standard forbidden error). It does not seem to matter what the actual
variable name following the ? is. However, shouldn't apache ignore
anything following the ? as it should really just be a part of the query
string variables?

This really seems to be buggering my attempt at passing directories in
variables, but it seems that a lot of scripts must do this, am I just doing
something stupid?

Thanks,
Wes


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Apache query error affecting PHP?

2002-05-28 Thread Weston Houghton


How silly of me not to think of this problem in the first place. It is not
an error in the server, but in the browser. I didn't bother testing it in
any other browser initially. So this problem only occurs in MSIE 5.1.4 under
MacOS X.

Ugh, thank you for showing I am somewhat silly in this one (but not fully
crazy). Now I have to try to convince Microsoft that they have a bug... ooh
fun.

Thanks for the reply here, it seems my mail from the apache list is not
coming through, so I hadn't seen the response there.

Cheers,
Wes


 Weston Houghton [EMAIL PROTECTED] wrote:
 Apache will actually return the directory listing of the assets/
 directory (assuming you have directory listing enabled, otherwise it
 returns the standard forbidden error). It does not seem to matter
 what the actual variable name following the ? is. However,
 
 Both URLs display the images as expected from here.
 
 shouldn't apache ignore anything following the ? as it should
 really just be a part of the query string variables?
 
 If you are requesting a static resource (e.g. an image file) Apache will
 ignore the query string.
 
 This really seems to be buggering my attempt at passing directories in
 variables, but it seems that a lot of scripts must do this, am I just
 doing something stupid?
 
 I gave the same answer when you asked on the httpd mailing list. Have I
 misunderstood your problem?
 
 --
 Stuart
 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] _() ???

2002-05-28 Thread Weston Houghton


Oddly, I get the following error on the page when trying to view it though:

Fatal error: Call to undefined function: _() in
/Library/WebServer/Documents/admin/horde/config/prefs.php on line 5

Here's the exact offending code:
$prefGroups['language'] = array(
'column' = _(Your Information),
'label' = _(Language),
'desc' = _(Set your preferred display language.),
'members' = array('language'));

Where the 'column' = line is line #5, so the parser seems to think it is
a function?

Thanks for the help,
Wes



 What exactly does the underscore in _(Select your preferred
 language:)
 mean?
 
 It doesn't do anything. It's just a naming convention the author chose
 to use. Usually when you name a function like that, it's meant to be
 private or shouldn't be called directly. Other functions will use it,
 but you shouldn't use it directly in your code. Of course, nothing is
 stopping you from doing that though...
 
 ---John Holmes...
 
 
 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] _() ???

2002-05-28 Thread Weston Houghton


Of course this had to come in after I sent my email.

Thanks again Rasmus, you seem to always be there with the answer.

Wes


 No, the _() function is the standard gettext() alias.  See
 http://php.net/gettext
 
 -Rasmus
 
 On Tue, 28 May 2002, John Holmes wrote:
 
 What exactly does the underscore in _(Select your preferred
 language:)
 mean?
 
 It doesn't do anything. It's just a naming convention the author chose
 to use. Usually when you name a function like that, it's meant to be
 private or shouldn't be called directly. Other functions will use it,
 but you shouldn't use it directly in your code. Of course, nothing is
 stopping you from doing that though...
 
 ---John Holmes...
 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Missing functions??

2002-05-27 Thread Weston Houghton


Hello again all,

I'm using the Mac OS X binary of PHP 4.2.1 provided by Mark Liyanage
(http://www.entropy.ch/software/macosx/php/), and I am starting to notice
some oddities, I was wondering if anyone else had seen these errors in other
ports.

I'm getting some base php functions that seem to be missing, such as:

bindtextdomain
textdomain

And it doesn't seem to like the _() references in array declarations. I
would appreciate any guidance on these...

Thanks,
Wes


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] PHP 4.2x changes

2002-05-14 Thread Weston Houghton


All,

I've recently upgraded from 4.1.2 to 4.2.0. And of course my script has
stopped working. I know a lot with the globals has changed, but to be
honest, I am not sure how or why. Can anyone give me an initial lead as to
what I should look for first?

I know I use the following elements:

$_SERVER[PATH_TRANSLATED]
$PHP_SELF

I can't believe it is $PHP_SELF. What should I be wary of when using PHP
Environment vars like: $_SERVER[PATH_TRANSLATED]

Thanks!
Wes


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] PHP 4.2x changes

2002-05-14 Thread Weston Houghton


Ok, makes sense based on previous threads I have gleaned over. Can you point
me to any reading material that fills in the details on all of this though?
Would like to know more about why I am doing this, and if I should change my
coding based on how PHP is progressing.

Thanks!
Wes


 Turn on register_globals in your php.ini file and things should start
 working again.
 
 On Tue, 14 May 2002, Weston Houghton wrote:
 
 
 All,
 
 I've recently upgraded from 4.1.2 to 4.2.0. And of course my script has
 stopped working. I know a lot with the globals has changed, but to be
 honest, I am not sure how or why. Can anyone give me an initial lead as to
 what I should look for first?
 
 I know I use the following elements:
 
 $_SERVER[PATH_TRANSLATED]
 $PHP_SELF
 
 I can't believe it is $PHP_SELF. What should I be wary of when using PHP
 Environment vars like: $_SERVER[PATH_TRANSLATED]
 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] PHP 4.2x changes

2002-05-14 Thread Weston Houghton


Thanks for the link. Everything there makes sense, and I'm not sure if I
need to turn register_globals on to make this work. Is there a way to get
either:

$_SERVER[PATH_TRANSLATED]
Or
$HTTP_SERVER_VARS[SCRIPT_FILENAME]   (perhaps??)

Without turning register_globals on? Oh, and I am doing this from within a
class. I'm guessing I could do it outside of the class and pass it into the
constructor, but I'd prefer to just get it inside the constructor if
possible... Essentially I am just trying to find out from whereon the
filesystem the script is being called initially.

Thanks for the patience and help.
Wes



 http://www.php.net/manual/en/security.registerglobals.php
 
 On Wed, 15 May 2002, Weston Houghton wrote:
 
 
 Ok, makes sense based on previous threads I have gleaned over. Can you point
 me to any reading material that fills in the details on all of this though?
 Would like to know more about why I am doing this, and if I should change my
 coding based on how PHP is progressing.
 
 Thanks!
 Wes
 
 
 Turn on register_globals in your php.ini file and things should start
 working again.
 
 On Tue, 14 May 2002, Weston Houghton wrote:
 
 
 All,
 
 I've recently upgraded from 4.1.2 to 4.2.0. And of course my script has
 stopped working. I know a lot with the globals has changed, but to be
 honest, I am not sure how or why. Can anyone give me an initial lead as to
 what I should look for first?
 
 I know I use the following elements:
 
 $_SERVER[PATH_TRANSLATED]
 $PHP_SELF
 
 I can't believe it is $PHP_SELF. What should I be wary of when using PHP
 Environment vars like: $_SERVER[PATH_TRANSLATED]
 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Not A PHP question but I need help in a big way...

2002-04-22 Thread Weston Houghton


Check out ChiliSoft:
http://www.chilisoft.com/

Wes


 Hi,
 
 I just got finish will a meeting from HELL, I need to ask can some one tell
 me is there an Apache Mailing List like this. I have to ask if I can do ASP
 page on Apache, I know I know please don't flame me, I kept trying to get
 them to switch to PHP, but I been told to shut my mouth and just find out
 this information. So I am sorry that I am asking but I not sure where to
 start.
 
 Chuck Payne
 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] POST form File Upload Progress Bar?

2002-04-16 Thread Weston Houghton


My cheap trick around this is to have an onClick event on the form submit
button that brings up a small window with a progress note in it, and an
animated gif of a prgress bar.

As the page does not unLoad until the upload is finished, I use the unLoad
event of the body tag to close that progress window.

Generally works really well for me. I can show you an example if you like.

Wes



 I have a POST form with a file upload field. Users will be uploading
 pictures. What would be the most professional way to tell them their
 file is
 uploading and to please wait? Since the action page won't execute until
 after the image is done uploading, is there a way to have an
 intermediary
 page load telling them to please wait, and that page will take the image
 and
 upload it? Or should I just put a note in the upload form warning them
 about
 the long upload times and gray out the submit button with javascript
 after
 it's clicked?
 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] POST form File Upload Progress Bar?

2002-04-16 Thread Weston Houghton


Let me isolate it out of the project tonight, and I'll try to post a simple
example for everyone.

Wes


 could you give us some samples im also searching for that. thanks.
 
 Regards,
 mike
 
 
 My cheap trick around this is to have an onClick event on the form submit
 button that brings up a small window with a progress note in it, and an
 animated gif of a prgress bar.
 
 As the page does not unLoad until the upload is finished, I use the unLoad
 event of the body tag to close that progress window.
 
 Generally works really well for me. I can show you an example if you like.
 
 Wes
 
 
 
 I have a POST form with a file upload field. Users will be uploading
 pictures. What would be the most professional way to tell them their
 file is
 uploading and to please wait? Since the action page won't execute until
 after the image is done uploading, is there a way to have an
 intermediary
 page load telling them to please wait, and that page will take the image
 and
 upload it? Or should I just put a note in the upload form warning them
 about
 the long upload times and gray out the submit button with javascript
 after
 it's clicked?
 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Read and Escape file

2002-04-04 Thread Weston Houghton


Hey all,

I am looking to build a bit of a weird templating system for a project I am
working on. Currently, I am looking at building these templates in separate
text files, and allowing certain elements to be replaced within those files.

I'm thinking then of reading these text files into php through filesystem
functions, turning the template into a string assigned to a php variable. Is
there anyway I can do this and escape any elements in the file that might
terminate the string? So if the file contains a quote () that it does not
kill the string?

Or would this not be an issue if I just used fread to assign the data to the
var?

Thanks,
Wes


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] PHP 5?

2002-02-23 Thread Weston Houghton


Are there rumblings of what to look for in the next major release of PHP
yet? Is there a different, better place to ask? I'm just curious...

Wes



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] argh!

2002-02-19 Thread Weston Houghton


Is it an array, or a single variable?

Wes

 Ok this is getting frustrating!  I am serializing a variable and passing it
 through the url, in the url and when I echo it on the next page it shows
 s:608:, and when I unserialize it and echo it, it doesnt show anything!  How
 can I pull that data out in the next page?
 
 Rick
 
 It is the mark of an educated mind to be able to entertain a thought
 without accepting it. - Aristotle
 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] RANT: Why doesn't PHP have built-in support for dynamicimage generation?

2002-02-02 Thread Weston Houghton


Anybody interested in working on a PEAR module to interface PHP with
something like ImageMagick directly? I would love to see it. Maybe if I am
unemployed long enough soon I can work on it myself. Not that I really want
that to happen...

I think that might be the best solution for PHP's lack of image
functionality though...

Wes



 Hi Erica,
 
 I feel your pain - I've been dealing with the same thing this week.  I
 finally got the compile to complete and the system up and running, but it
 was painful.  It seemed like everything was finished, but I've noticed high
 server loads (.8), trouble accessing web pages (I tested using wget and it
 had to try 6 times to get the page and kept reporting EOF in headers), and
 my MySQL server keeps reporting errors communicating with the web server,
 and dropped connections to the MySQL server.  Safe to say, something didn't
 work and I need to start over and pray for the best.
 
 Have you gotten it to work properly?  If so, what files did you use and
 what steps did you take in the install?
 
 -Ed
 
 
 At 11:24 PM 2/2/2002 -0800, Erica Douglass wrote:
 Forgive my grumpiness, but I've spent the last several hours trying to
 install GD, etc.
 
 Let's be honest. PHP needs built-in support for creating dynamic images. JSP
 already has this. Heck, you could even make it a configure option. As it
 stands now, you have to do the following:
 
 -- Install GD
 -- Install all of GD's numerous dependencies
 -- Install zlib
 -- Install freetype
 -- Install libttf
 
 THEN you have to compile PHP with all of the requisite options to enable GD
 here and Freetype there, and PHP often won't compile without specifying
 /path/to/various/options, so you have to dig around your system to find out
 where everything was installed. This results in a long and unwieldy
 configure statement which often does not work.
 
 PHP needs to have a simple configure option called --enable-dynamic-images
 or something similar. This should use built-in libraries that are downloaded
 with the PHP source to create PNG images. Images can then be created with
 standard PHP functions. This would be much more useful than relying on
 several third-party solutions which do not easily work with each other. This
 would also have the benefit of being more portable -- as I plan to release
 my code to several different people running different types of servers, I
 would like to minimize compatibility issues.
 
 If anyone has a better solution, feel free to email me. As it stands, I am
 very frustrated with this, and I haven't yet seen the light at the end of
 the tunnel.
 
 Thanks,
 Erica
 
 
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Beginner's CURL

2001-12-12 Thread Weston Houghton


Ok,

So I'm an admitted newbie to using CURL, and idea why this doesn't work?

curl -O http://www.php.net/do_download.php?download_file=php-4.1.0.tar.gz
curl: No match.

Thanks,
Wes


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] PHP 4.1.0 Compiling on OS X

2001-12-12 Thread Weston Houghton


Hey all,

So I'm experimenting trying to get PHP 4.1 running under MacOS 10.1.1,
running the following for configure:

./configure --with-apxs2=/Volumes/ego/apache2/bin/apxs --enable-calendar
--enable-ftp --with-gd --enable-mailparse --with-mysql --enable-trans-sid

Getting through configure ok, but getting this on the make:

/bin/sh /Users/whoughto/Desktop/src/php-4.1.0/libtool --silent
--mode=compile cc  -I. -I/Users/whoughto/Desktop/src/php-4.1.0/ext/standard
-I/Users/whoughto/Desktop/src/php-4.1.0/main
-I/Users/whoughto/Desktop/src/php-4.1.0 -I/Volumes/ego/apache2/include
-I/Users/whoughto/Desktop/src/php-4.1.0/Zend
-I/Users/whoughto/Desktop/src/php-4.1.0/ext/mysql/libmysql
-I/Users/whoughto/Desktop/src/php-4.1.0/ext/xml/expat  -traditional-cpp
-I/Users/whoughto/Desktop/src/php-4.1.0/TSRM -DTHREAD=1 -g -O2 -DZTS
-prefer-pic  -c dl.c
dl.c:212: conflicting types for `php_dl'
dl.h:26: previous declaration of `php_dl'
make[3]: *** [dl.lo] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all-recursive] Error 1


Anyone have ANY thoughts? I'm a bit lost now...

Wes


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] PHP 4.1.0 Compiling on OS X

2001-12-12 Thread Weston Houghton


P.S. From my checking all php_dl functions are declared as returning
voids...

Wes


 
 Hey all,
 
 So I'm experimenting trying to get PHP 4.1 running under MacOS 10.1.1,
 running the following for configure:
 
 ./configure --with-apxs2=/Volumes/ego/apache2/bin/apxs --enable-calendar
 --enable-ftp --with-gd --enable-mailparse --with-mysql --enable-trans-sid
 
 Getting through configure ok, but getting this on the make:
 
 /bin/sh /Users/whoughto/Desktop/src/php-4.1.0/libtool --silent
 --mode=compile cc  -I. -I/Users/whoughto/Desktop/src/php-4.1.0/ext/standard
 -I/Users/whoughto/Desktop/src/php-4.1.0/main
 -I/Users/whoughto/Desktop/src/php-4.1.0 -I/Volumes/ego/apache2/include
 -I/Users/whoughto/Desktop/src/php-4.1.0/Zend
 -I/Users/whoughto/Desktop/src/php-4.1.0/ext/mysql/libmysql
 -I/Users/whoughto/Desktop/src/php-4.1.0/ext/xml/expat  -traditional-cpp
 -I/Users/whoughto/Desktop/src/php-4.1.0/TSRM -DTHREAD=1 -g -O2 -DZTS
 -prefer-pic  -c dl.c
 dl.c:212: conflicting types for `php_dl'
 dl.h:26: previous declaration of `php_dl'
 make[3]: *** [dl.lo] Error 1
 make[2]: *** [all-recursive] Error 1
 make[1]: *** [all-recursive] Error 1
 make: *** [all-recursive] Error 1
 
 
 Anyone have ANY thoughts? I'm a bit lost now...
 
 Wes
 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Help! Large File Uploads, max file sizes and timeouts

2001-09-23 Thread Weston Houghton


Does no one have a clue on this one? I'm really in need of leads here.

Thanks,
Wes

 
 Hey all,
 
 Two related questions. If I remember correctly this has been beaten to death
 before on the list, but here I am having issues with it, and ending up at
 somewhat of a loss still.
 
 I've built a media management system for a video company. It is built to
 handle large data assets, such as extended full size video files. As such,
 I've set the max upload file size in the php.ini file to around 3GB.
 
 I'm running into a bug where the system seems to think that the file upload
 is done at about 140MB on a 300MB file. Everything seems to close out fine
 within the system, acting like the file was originally 140MB and it uploaded
 just fine in the system. But it really is a 300MB file, I promise. Does this
 ring any bells with anyone? This is all over a local network, so I'm not
 inclined to believe that it is network lag triggering the connection to
 close...
 
 Second, can anyone point me in the right direction within the documentation
 to tell how to override the php.ini fiole on a particular page to allow a
 larger file upload size and a longer session timeout?
 
 Thanks all,
 Wes
 
 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Large File Uploads, max file sizes and timeouts

2001-09-21 Thread Weston Houghton


Hey all,

Two related questions. If I remember correctly this has been beaten to death
before on the list, but here I am having issues with it, and ending up at
somewhat of a loss still.

I've built a media management system for a video company. It is built to
handle large data assets, such as extended full size video files. As such,
I've set the max upload file size in the php.ini file to around 3GB.

I'm running into a bug where the system seems to think that the file upload
is done at about 140MB on a 300MB file. Everything seems to close out fine
within the system, acting like the file was originally 140MB and it uploaded
just fine in the system. But it really is a 300MB file, I promise. Does this
ring any bells with anyone? This is all over a local network, so I'm not
inclined to believe that it is network lag triggering the connection to
close...

Second, can anyone point me in the right direction within the documentation
to tell how to override the php.ini fiole on a particular page to allow a
larger file upload size and a longer session timeout?

Thanks all,
Wes



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] PHP Imagemagick

2001-07-22 Thread Weston Houghton


Does anyone know if there are PHP specific bindings for ImageMagick out
there? If not, anyone want to work on them...

:)

Thanks,
Wes


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] PHP Imagemagick

2001-07-22 Thread Weston Houghton


Yup, a native PHP module for ImageMagick that accesses their API. This would
allow one to actually pass parameters a bit easier and test for success or
failure more consistently, at least, I think it would...

Wes


 How do you mean bindings?
 
 I've used PHP and Imagemagick.. but only from the point of view of exec
 
 Do you mean building them into PHP functions?
 
 - Original Message -
 From: Weston Houghton [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Sunday, July 22, 2001 11:05 PM
 Subject: [PHP] PHP  Imagemagick
 
 
 
 Does anyone know if there are PHP specific bindings for ImageMagick out
 there? If not, anyone want to work on them...
 
 :)
 
 Thanks,
 Wes
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Browscap.ini

2001-05-19 Thread Weston Houghton


So...

I cannot for the life of me get browscap.ini to work.

Also the browserhawk version of the browscap.ini is sadly out of date.
Anyone have any leads for me on getting this to work? I consistently get an
empty array returned.

Thanks,
Wes


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]