[PHP] Running PHP on a windows server-your views

2007-03-19 Thread Angelo Zanetti

HI all.

I would like some honest answers and if you have any experience with 
problems or no problems running PHP on a windows server.


Basically we are interested to know if there are any problems/security 
issues/stability issues/performance issues or any other issues running a 
production site (big live site) on a windows server.


Im assuming it will be running IIS.

The site is very important and any issues will hamper the functionality 
and accessibility of the site.


All your responses will be greatly appreciated.

TIA
Angelo
--

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



[PHP] Is there a open_basedir and curl followlocation bypass/fix?

2007-03-19 Thread Mathijs

Hello there,

I Need a bypass to have followlocation working while open_basedir is in 
affect.


I Don't see why we can't enable/disable this protection by our selfs 
when needed.


Keep the protection enabled by default, and let the ppl disable it if 
they realy want to.


Anyway, how can i bypass this the easy way.

Thx in advanced.

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



Re: [PHP] Running PHP on a windows server-your views

2007-03-19 Thread Jochem Maas
Angelo Zanetti wrote:
> HI all.
> 
> I would like some honest answers and if you have any experience with
> problems or no problems running PHP on a windows server.
> 
> Basically we are interested to know if there are any problems/security
> issues/stability issues/performance issues or any other issues running a
> production site (big live site) on a windows server.

how big is big? serverfarm big? if it is that big then you have probably already
missed the boat - stability, security, performance & scalability should be
with in the realm of the known if your site is that high traffic. jmho.

> 
> Im assuming it will be running IIS.

from memory I recall Zend going into partnership with M$ and they
were/are pushing the use of the FastCGI php SAPI in conjunction with IIS.

from what I gather this combo is stable and fast - you'd think Zend+M$ would 
have
enough resources to make it work ... I have no experience (and don't intend
to get any ;-) with this setup but you can STW for more info on this and maybe
come to some kind of useful conclusion.

> 
> The site is very important and any issues will hamper the functionality
> and accessibility of the site.

I have N*100 customers that say exactly the same thing about their own sites ;-)

> 
> All your responses will be greatly appreciated.
> 
> TIA
> Angelo

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



Re: [PHP] Is there a open_basedir and curl followlocation bypass/fix?

2007-03-19 Thread Jochem Maas
Mathijs wrote:
> Hello there,
> 
> I Need a bypass to have followlocation working while open_basedir is in
> affect.
> 
> I Don't see why we can't enable/disable this protection by our selfs
> when needed.

we can't see past the choices we don't understand though can we?

> 
> Keep the protection enabled by default, and let the ppl disable it if
> they realy want to.

well you go and code the routines that make that work without completely
raping any form of security that is currently offered by open_basedir - put 
another
way: if it was that easy someone would have done it by now.

> 
> Anyway, how can i bypass this the easy way.

add the symlinked location to the the open_basedir directive??

> 
> Thx in advanced.
> 

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



[PHP] was: some chinese barf

2007-03-19 Thread Jochem Maas
Tijnema ! wrote:
> On 3/15/07, Andrei <[EMAIL PROTECTED]> wrote:
>> LOL...
>> Why you even bother to read it?
> 
> Because i hate SPAM !

wtf - how twisted is that logic?

by that logic I'd have to conclude that you regularly
gouge your own eyes out with a rusty spoon - based on the
assumption that you'd hate that too.

besides have you ever tasted SPAM? it's pretty cheap and nasty
but I don't think it's so bad that it warrants outright hatred -
any childhood SPAM trauma not withstanding.

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



Re: [PHP] Is there a open_basedir and curl followlocation bypass/fix?

2007-03-19 Thread Mathijs

Jochem Maas wrote:

Mathijs wrote:

Hello there,

I Need a bypass to have followlocation working while open_basedir is in
affect.

I Don't see why we can't enable/disable this protection by our selfs
when needed.


we can't see past the choices we don't understand though can we?


Keep the protection enabled by default, and let the ppl disable it if
they realy want to.


well you go and code the routines that make that work without completely
raping any form of security that is currently offered by open_basedir - put 
another
way: if it was that easy someone would have done it by now.


Anyway, how can i bypass this the easy way.


add the symlinked location to the the open_basedir directive??


Thx in advanced.



Well it is an HTTP site where the re-location come's from.
And it is very irritating when i need to do the header locations my self.

But if there is no setting i can change i think i need to do it my self.
a shame that this can't be fixed on an easy way.

Thx anyway :).

Regards,
Mathijs.

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



[PHP] php search engine

2007-03-19 Thread Ross
Hi,

I am looking for a php search engine that provides a suggested words 
(soundex?) when items are misspelt, the way google does.

I have used http://www.site-search-pro.com/ i n the past which is great but 
as far as I know this feature is not included.


Ross 

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



[PHP] PHP code only works on 1 server

2007-03-19 Thread PHP
Dear All,
I wrote a simple PHP 404 handler (index.php)(see the code below) to catch
missing pages for instance. But it only works on 1 server and not the other.

This is the server where it works:
My Server:
http://www.orbitalnets.com/support/info.php

This is the server where it won't work (which is the server where it should
work):
Setarnet:
http://www.kabga.aw/info.php

Could it be the version difference? How should it be coded to work on all
php servers?



Here is the code of the index.php file.

http://www.kabga.aw/nl/index.php\";> ";
 $errormsg .= "";
 $errormsg .= "404 File not foundmailto:[EMAIL PROTECTED]">[EMAIL PROTECTED]";
 $errormsg .= " Tel: +297 582-4455Fax: +297 582-2018";
 $navsignthing = "$page";
 $extension = "php";

if(file_exists("$navsignthing.$extension"))
{
include "$navsignthing.$extension";
}
elseif($navsignthing=="")
{
include "default.$extension";
}
else
{
echo "$errormsg";
}
?>


Please let me know,

Dwayne Heronimo

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



[PHP] Re: PHP code only works on 1 server

2007-03-19 Thread Myron Turner

PHP wrote:

Dear All,
I wrote a simple PHP 404 handler (index.php)(see the code below) to catch
missing pages for instance. But it only works on 1 server and not the other.

This is the server where it works:
My Server:
http://www.orbitalnets.com/support/info.php

This is the server where it won't work (which is the server where it should
work):
Setarnet:
http://www.kabga.aw/info.php

Could it be the version difference? How should it be coded to work on all
php servers?



Here is the code of the index.php file.

http://www.kabga.aw/nl/index.php\";> ";
 $errormsg .= "";
 $errormsg .= "404 File not foundmailto:[EMAIL PROTECTED]">[EMAIL PROTECTED]";
 $errormsg .= " Tel: +297 582-4455Fax: +297 582-2018";
 $navsignthing = "$page";
 $extension = "php";

if(file_exists("$navsignthing.$extension"))
{
include "$navsignthing.$extension";
}
elseif($navsignthing=="")
{
include "default.$extension";
}
else
{
echo "$errormsg";
}
?>


Please let me know,

Dwayne Heronimo


This isn't a php issue but an apache issue.  Have you checked to make 
sure that apache redirects the 404 to your custom error message?


 http://httpd.apache.org/docs/2.2/mod/core.html#errordocument

--

_
Myron Turner
http://www.room535.org
http://www.bstatzero.org
http://www.mturner.org/XML_PullParser/

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



Re: [PHP] logging erros and user access to logs

2007-03-19 Thread Németh Zoltán
2007. 03. 15, csütörtök keltezéssel 16.08-kor Jason Joines ezt írta:
> Richard Lynch wrote:
> > On Thu, March 15, 2007 2:47 pm, Jason Joines wrote:
> >> Richard Lynch wrote:
> >>> On Thu, March 15, 2007 8:25 am, Jason Joines wrote:
>  Richard Lynch wrote:
> > Get the errors OFF the web page (display_errors OFF) and into the
>  error_reporting(E_PARSE);
>  ini_set('display_errors','On');
>  ini_set('display_startup_errors','On');
>  include('mypage.php');
>    ?>
>  Then when debugging was done, just delete the debug script.
> 
>  I moved it to a test server and could get it to work but only
>  if
>  display_errors was set to on in the global php.ini file.  I can't
>  do
>  that on the production server.  The manual says display_errors can
>  be
>  overridden in a script.  I used ini_get() to see if the value was
>  actually being changed, it was.  However, it still doesn't print
>  the
>  errors unless the global ini is set.
> 
>  Any ideas as to why it's not working?
> >>> Put  into the mypage.php and see if its "Master"
> >>> and
> >>> "Local" values are different for display_errors.
> >>>
> >>> If they are, then it worked, and you SHOULD see the errors.
> >>>
> >>
> >>
> >> Well they weren't different so I guess it didn't work.  Seems odd
> >> to
> >> me that get_ini would show it has having been changed but phpinfo
> >> doesn't.
> > 
> > Sounds like a bug to me -- They ought to at least agree on what the
> > setting is, even if you weren't allowed to change it...
> > 
> > Check the bug reports and file one, I guess:
> > http://bugs.php.net
> > 
> 
> 
> I thought I might try a modification of your virtual hosts
> suggestion.  Perhaps create a virtual host with the same document root
> as the main virtual host but turn display_errors on globally for the
> debug vhost using phpflag.  First I tried it in a .htaccess file and
> then in my main apache config file, httpd.conf.  Each time resulted in
> the error:
> "Invalid command 'phpflag', perhaps mis-spelled or defined by a module
> not included in the server configuration."

you misspelled it, there is no "phpflag" command actually.
there is php_flag command and php_value command which you can use
in .htaccess files (php_flag for flags which can have On/Off states
only, php_value for others)

hope that helps
Zoltán Németh

> 
> I'm starting to think that all of the ini override stuff was
> implemented in a later version of PHP than I'm using.  Haven't figured
> out when it was implemented yet though.
> 
> 
> Jason
> ===
> 

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



Re: [PHP] displaying image from MySQL DB using HTML/PHP

2007-03-19 Thread Németh Zoltán
2007. 03. 14, szerda keltezéssel 19.30-kor Børge Holen ezt írta:
> On Tuesday 13 March 2007 22:09, Tijnema ! wrote:
> > On 3/13/07, Bruce Gilbert <[EMAIL PROTECTED]> wrote:
> > > On 3/13/07, Tijnema ! <[EMAIL PROTECTED]> wrote:
> > > > So you just need to set the content-type and output
> > > > add this to the bottom of the script:
> > > > header("Content-Type: ".$encodeddata);
> > > > echo $title;
> > > >
> > > > If i understand you right.
> > > >
> > > > Tijnema
> > >
> > > Thanks,
> > >
> > > I changed the code around some and now have:
> > > [php]
> > >  > > //check for validity of user
> > > $db_name="bruceg_mailinglist";
> > > $table_name ="image_holder";
> > > $connection = @mysql_connect("db_address", "uasername", "password")
> > > or die (mysql_error());
> > > $db = @mysql_select_db($db_name, $connection) or die (mysql_error());
> > >
> > > $img = $_REQUEST["img"];
> > >
> > > $result = @mysql_query("SELECT * FROM image_holder WHERE id=" . $img .
> > > "");
> > >
> > > if (!$result)
> > > {
> > > echo("Error performing query: " . mysql_error() . "");
> > > exit();
> > > }
> > > while ( $row = @mysql_fetch_array($result) )
> > > {
> > > $imgid = $row["id"];
> > > header("Content-Type: ".$encodeddata);
> > > echo $title;}
> > >
> > > ?>
> > > [/php]
> > >
> > > and in the HTML
> > > 
> > >
> > > but I am getting a MySQL error
> > > "Error performing query: You have an error in your SQL syntax; check
> > > the manual that corresponds to your MySQL server version for the right
> > > syntax to use near '' at line 1"
> > >
> > > --
> > >
> > > ::Bruce::
> >
> > You changed your html code, you have id=1, and in your PHP code you
> > are requesting img, so change
> > 
> > to
> > 
> >
> > But i must also say, it is NOT safe to input data from ?img= directly
> > into your database, someone could do a SQL injection right away with
> > this code!.
> 
> He's not using image.php to insert. Earlier he mentioned using phpmyadmin to 
> insert the image, that was the way I used too. First learn to display an 
> image, this way its easier to know if any upload script you make up later is 
> working correctly.

evil code can be injected into any sort of sql statement. so it is not
depending on whether he's using the php for insert or not.

greets
Zoltán Németh

> 
> >
> > Then about this piece of code
> > while ( $row = @mysql_fetch_array($result) )
> > {
> > $imgid = $row["id"];
> > header("Content-Type: ".$encodeddata);
> > echo $title;
> > }
> > I hope for you that there's only one item with this id, if not, there
> > would come an error again, so a while loop is not needed, and second,
> > now you don't define $encodeddata and $title anymore, try this piece
> > of code instead of the one above:
> >
> > $row = @mysql_fetch_array($result);
> > header("Content-Type: ".row['mimetype']);
> > echo $row['filecontents'];
> >
> > ps. Reply to the full PHP list, not just me...
> 
> -- 
> ---
> Børge
> Kennel Arivene 
> http://www.arivene.net
> ---
> 

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



Re: [PHP] php search engine

2007-03-19 Thread Tijnema !

On 3/19/07, Ross <[EMAIL PROTECTED]> wrote:

Hi,

I am looking for a php search engine that provides a suggested words
(soundex?) when items are misspelt, the way google does.

I have used http://www.site-search-pro.com/ i n the past which is great but
as far as I know this feature is not included.


Ross


I've never heard of such search machine, except from google then. But
i know the google code was released on warez boards. I'm not giving
you a link where to download, as it is illegal to have that code.

Tijnema


--
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] Running PHP on a windows server-your views

2007-03-19 Thread Tijnema !

On 3/19/07, Angelo Zanetti <[EMAIL PROTECTED]> wrote:

HI all.

I would like some honest answers and if you have any experience with
problems or no problems running PHP on a windows server.

Basically we are interested to know if there are any problems/security
issues/stability issues/performance issues or any other issues running a
production site (big live site) on a windows server.

Im assuming it will be running IIS.

The site is very important and any issues will hamper the functionality
and accessibility of the site.

All your responses will be greatly appreciated.

TIA
Angelo
--


I was running PHP under windows, but not with IIS, i used Apache.
After some time i thought i might wanted to try linux, and since that
i didn't even thought about getting back. First of all is that it is a
lot more secure, a lot of scripts don't do any harm on a normal
configured linux server, while they do as running on a microsoft
server, because php has more rights in windows (not to mention my
server, running PHP as root...) and stability is a lot better, my
linux server can handle more connections at the same time
(multitasking is better on linux) and i noted the difference in RAM
usage. On the other side i don't see any reason why to run windows on
it. The most important reasion was that microsoft could execute ASP
code, but since the coming of mono (mono-project.org), it is also
possible to use ASP code on a linux server running apache.

If you have things that require windows, go for a windows server, if
not, go for LAMP. maybe with perl, cgi, and asp support.

Tijnema




--
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] Running PHP on a windows server-your views

2007-03-19 Thread Edward Kay
> On 3/19/07, Angelo Zanetti <[EMAIL PROTECTED]> wrote:
> > HI all.
> >
> > I would like some honest answers and if you have any experience with
> > problems or no problems running PHP on a windows server.
> >
> > Basically we are interested to know if there are any problems/security
> > issues/stability issues/performance issues or any other issues running a
> > production site (big live site) on a windows server.
> >
> > Im assuming it will be running IIS.
> >
> > The site is very important and any issues will hamper the functionality
> > and accessibility of the site.
> >
> > All your responses will be greatly appreciated.
> >
> > TIA
> > Angelo
> > --
>

>From my experience, it seems many more people in the web community run PHP
under Linux than Windows. Therefore, if, no, when you get stuck with
something, the chances of you finding the answer quickly would be much
higher with Linux.

Edward

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



Re: [PHP] Running PHP on a windows server-your views

2007-03-19 Thread Tijnema !

On 3/19/07, Edward Kay <[EMAIL PROTECTED]> wrote:

> On 3/19/07, Angelo Zanetti <[EMAIL PROTECTED]> wrote:
> > HI all.
> >
> > I would like some honest answers and if you have any experience with
> > problems or no problems running PHP on a windows server.
> >
> > Basically we are interested to know if there are any problems/security
> > issues/stability issues/performance issues or any other issues running a
> > production site (big live site) on a windows server.
> >
> > Im assuming it will be running IIS.
> >
> > The site is very important and any issues will hamper the functionality
> > and accessibility of the site.
> >
> > All your responses will be greatly appreciated.
> >
> > TIA
> > Angelo
> > --
>

From my experience, it seems many more people in the web community run PHP
under Linux than Windows. Therefore, if, no, when you get stuck with
something, the chances of you finding the answer quickly would be much
higher with Linux.

Edward


That's not totally true, as PHP doesn't differ a lot if running on
linux/windows. And even users that run PHP on linux know sometimes
answers for people running PHP on windows...

Tijnema.


--
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] Name Capitalization

2007-03-19 Thread Leonard Burton

HI All,

Does anyone use a library to properly capitalize last names?

For instance, McDonald needs to remain that way even if it comes in as
MACDONALD, or macdonald.

Of course I can write it on my own but would prefer not to reinvent the wheel.

Thanks,

--
Leonard Burton, N9URK
http://www.jiffyslides.com
[EMAIL PROTECTED]
[EMAIL PROTECTED]

"The prolonged evacuation would have dramatically affected the
survivability of the occupants."

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



RE: [PHP] Running PHP on a windows server-your views

2007-03-19 Thread Brad Fuller
> Im assuming it will be running IIS.

(shudder)

> The site is very important and any issues will hamper the functionality
> and accessibility of the site.

LOL

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



Re: [PHP] Name Capitalization

2007-03-19 Thread Tijnema !

On 3/19/07, Leonard Burton <[EMAIL PROTECTED]> wrote:

HI All,

Does anyone use a library to properly capitalize last names?

For instance, McDonald needs to remain that way even if it comes in as
MACDONALD, or macdonald.

Of course I can write it on my own but would prefer not to reinvent the wheel.

Thanks,


Six days ago somebody wanted also to capitalize the last name, and
there also was discussed how impossible it was.

the thread can be found here:
http://www.zend.com/lists/php-general/200703/msg00785.html

Tijnema


--
Leonard Burton, N9URK
http://www.jiffyslides.com
[EMAIL PROTECTED]
[EMAIL PROTECTED]

"The prolonged evacuation would have dramatically affected the
survivability of the occupants."

--
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] Name Capitalization

2007-03-19 Thread LeaseWeb - Poelwijk

Hello.

You could use the ucfirst() function for most names:
http://nl2.php.net/manual/en/function.ucfirst.php

But that would make Mcdonald and not McDonalds

Regards,

Sander Poelwijk



Leonard Burton wrote:

HI All,

Does anyone use a library to properly capitalize last names?

For instance, McDonald needs to remain that way even if it comes in as
MACDONALD, or macdonald.

Of course I can write it on my own but would prefer not to reinvent 
the wheel.


Thanks,



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



Re: [PHP] Name Capitalization

2007-03-19 Thread Jochem Maas
Leonard Burton wrote:
> HI All,
> 
> Does anyone use a library to properly capitalize last names?
> 
> For instance, McDonald needs to remain that way even if it comes in as
> MACDONALD, or macdonald.

for starters you'll have a hard time getting any routine to 'correct'
the missing 'a' - especially given that sometime is 'Mc' and sometimes
it's 'Mac'

> 
> Of course I can write it on my own but would prefer not to reinvent the
> wheel.

probably any wheel out there is going to be fairly lame, yours included,
no offence meant as to your skills, it's just that I believe the task is
nigh on impossible - and I'm not the only one (to quote John Lennon).
this was discussed on this list within the last 7 days.

in short the given routine will be massive and it will be error prone because
computers are stupid and trying to get them to understand the intracasies
of name capitilization and grammar is a nightmare you probably don't
want to be part of.

of course if you do come up with something workable there are plenty
that would be interested in what you came up with :-)

> 
> Thanks,
> 

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



RE: [PHP] Running PHP on a windows server-your views

2007-03-19 Thread Edward Kay
> On 3/19/07, Edward Kay <[EMAIL PROTECTED]> wrote:
> > > On 3/19/07, Angelo Zanetti <[EMAIL PROTECTED]> wrote:
> > > > HI all.
> > > >
> > > > I would like some honest answers and if you have any experience with
> > > > problems or no problems running PHP on a windows server.
> > > >
> > > > Basically we are interested to know if there are any
> problems/security
> > > > issues/stability issues/performance issues or any other
> issues running a
> > > > production site (big live site) on a windows server.
> > > >
> > > > Im assuming it will be running IIS.
> > > >
> > > > The site is very important and any issues will hamper the
> functionality
> > > > and accessibility of the site.
> > > >
> > > > All your responses will be greatly appreciated.
> > > >
> > > > TIA
> > > > Angelo
> > > > --
> > >
> >
> > From my experience, it seems many more people in the web
> community run PHP
> > under Linux than Windows. Therefore, if, no, when you get stuck with
> > something, the chances of you finding the answer quickly would be much
> > higher with Linux.
> >
> > Edward
> >
> That's not totally true, as PHP doesn't differ a lot if running on
> linux/windows. And even users that run PHP on linux know sometimes
> answers for people running PHP on windows...
>
> Tijnema.

You're right, PHP scripting doesn't differ that much between operating
systems and the few inconsistencies are generally known from both sides.

>From my interpretation of the OP though, the question is not so much about
PHP coding but rather the web server setup. I think that there is generally
more support on the web for running web servers on Linux than Windows, and
this is especially true when using PHP.

Edward

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



Re: [PHP] php search engine

2007-03-19 Thread tedd

At 4:50 PM +0100 3/19/07, Tijnema ! wrote:

On 3/19/07, Ross <[EMAIL PROTECTED]> wrote:

Hi,

I am looking for a php search engine that provides a suggested words
(soundex?) when items are misspelt, the way google does.

I have used http://www.site-search-pro.com/ i n the past which is great but
as far as I know this feature is not included.

Ross


I've never heard of such search machine, except from google then. But
i know the google code was released on warez boards. I'm not giving
you a link where to download, as it is illegal to have that code.

Tijnema


Ross:

I may be off-base here, (not a soundex example) but if a site search 
is all your after, try this one:


http://sperling.com/examples/search/

Cheers,

tedd
--
---
http://sperling.com  http://ancientstones.com  http://earthstones.com

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



[PHP] Name Capitalization

2007-03-19 Thread Leonard Burton

HI Guys,

Oops, I messed this request up.

It should have read:

For instance, McDonald needs to remain that way even if it comes in as
MCDONALD, or mcdonald.


probably any wheel out there is going to be fairly lame, yours included,
no offence meant as to your skills, it's just that I believe the task is
nigh on impossible - and I'm not the only one (to quote John Lennon).
this was discussed on this list within the last 7 days.


Yeah, nothing is a "perfect solution" but anything is better than nothing.

Guys, Thanks for the replies and the link to the recent thread, even
though that didn't discuss any solutions to the problem I am asking
about (other than to point it out which helps because it points out a
few of the name problems)!

Would anyone care to work on this project together?

Thanks,

Take Care,

--
Leonard Burton, N9URK
http://www.jiffyslides.com
[EMAIL PROTECTED]
[EMAIL PROTECTED]

"The prolonged evacuation would have dramatically affected the
survivability of the occupants."

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



[PHP] Out source files

2007-03-19 Thread Manuel Vacelet

Hi all,

I would like to know if there is some common patterns to "out source"
the files served by a LAMP stack.

Technicaly speaking I would like to store my files (application data)
on another machine than the one that runs my PHP app. (as I already do
with MySql).

The best would be to use a secure connexion between my app. server and
the storage one (communication can be tunneled in SSH though).

Thanks,
Regards,
Manuel

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



Re: [PHP] Out source files

2007-03-19 Thread Richard Lynch
On Mon, March 19, 2007 12:46 pm, Manuel Vacelet wrote:
> I would like to know if there is some common patterns to "out source"
> the files served by a LAMP stack.
>
> Technicaly speaking I would like to store my files (application data)
> on another machine than the one that runs my PHP app. (as I already do
> with MySql).
>
> The best would be to use a secure connexion between my app. server and
> the storage one (communication can be tunneled in SSH though).

For a media rich site, it's super common to move the images (or other
large-size files) off to a different server, with the hard drives and
OS tuned for large files.  (Or for small files, if they are, say,
email bodies or somesuch.)

This works especially well for content that is acquired by the visitor
through a separate HTTP request anyway.

What sort of application data are you looking at, though?...

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some starving artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

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



RE: [PHP] Can't get PHP errors to display or log consistently

2007-03-19 Thread Chris W. Parker
On Friday, March 16, 2007 4:04 PM Robert Cummings
 said:

Update:

Now that I've corrected my mistake in php.ini and set the level of error
reporting that I want I can see *most* errors.

But shouldn't the following produce a visible error?



If I comment the x I see 'hello'. If I uncomment the x I don't see
anything.



Thanks,
Chris.

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



RE: [PHP] Can't get PHP errors to display or log consistently

2007-03-19 Thread Brad Fuller
> -Original Message-
> From: Chris W. Parker [mailto:[EMAIL PROTECTED]
> Sent: Monday, March 19, 2007 1:57 PM
> Cc: php-general@lists.php.net
> Subject: RE: [PHP] Can't get PHP errors to display or log consistently
> 
> On Friday, March 16, 2007 4:04 PM Robert Cummings
>  said:
> 
> Update:
> 
> Now that I've corrected my mistake in php.ini and set the level of error
> reporting that I want I can see *most* errors.
> 
> But shouldn't the following produce a visible error?
> 
>  
> error_reporting(E_ALL);
> ini_set('display_errors','On');
> 
> x
> echo 'hello';
> 
> ?>
> 
> If I comment the x I see 'hello'. If I uncomment the x I don't see
> anything.
> 
> 
> 
> Thanks,
> Chris.

Syntax errors like that will cause a startup error, which means your code
can't be evaluated.  So those 2 lines of code that turn the error reporting
on never get executed.

Make sure the ini file you're editing is the one PHP is actually using.  You
can see the path to the ini file in 

Also make sure you are restarting apache after editing ;)

I believe .htaccess also can override your ini setting, so check for the
existence of one of those too :D

HTH,

Brad

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



RE: [PHP] Can't get PHP errors to display or log consistently

2007-03-19 Thread Chris W. Parker
On Monday, March 19, 2007 11:28 AM Brad Fuller
 said:

> Syntax errors like that will cause a startup error, which means your
> code 
> can't be evaluated.  So those 2 lines of code that turn the error
> reporting 
> on never get executed.

Oooohh it's a "startup error". Didn't know that.

Now everything seems to be working the way I want it to.



Thanks!
Chris.

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



Re: [PHP] Out source files

2007-03-19 Thread Manuel Vacelet

2007/3/19, Richard Lynch <[EMAIL PROTECTED]>:

On Mon, March 19, 2007 12:46 pm, Manuel Vacelet wrote:
> I would like to know if there is some common patterns to "out source"
> the files served by a LAMP stack.
>
> Technicaly speaking I would like to store my files (application data)
> on another machine than the one that runs my PHP app. (as I already do
> with MySql).
>
> The best would be to use a secure connexion between my app. server and
> the storage one (communication can be tunneled in SSH though).

For a media rich site, it's super common to move the images (or other
large-size files) off to a different server, with the hard drives and
OS tuned for large files.  (Or for small files, if they are, say,
email bodies or somesuch.)

This works especially well for content that is acquired by the visitor
through a separate HTTP request anyway.

What sort of application data are you looking at, though?...


Ooops, forgot to precise my request ;)

I don't want the user to perform a direct connexion to another server.
It's not a matter of performances but security.

It's often recommended in some security guidelines to not store
application data on the same server than the one that runs the
application (for instance to avoid a apache or php failure expose your
files directly to anyone, or to let user execute a file she uploaded
thanks to another hole in another software).

This is already possible with any DB to have a second server and to
connect to this server through an SSL tunnel. I would like to have the
same approach for all the files not in the DB.

Note: obviously, there are security concerns in my request and there
are access rights on the files.

I hope this clarify my needs.

-- Manuel

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



[PHP] time or date picker ?

2007-03-19 Thread Alain Roger

Hi,

I've already seen some webpages which include a time or date picker (like a
calendar) written in PHP and on which user could type the year and after,
select the month and date (using month).
I'm looking for something like that.

Where can i find one for free ?

thanks

--
Alain

Windows XP SP2
PostgreSQL 8.1.4
Apache 2.0.58
PHP 5


RE: [PHP] Name Capitalization

2007-03-19 Thread Chris W. Parker
On Monday, March 19, 2007 10:24 AM Leonard Burton
 said:

> For instance, McDonald needs to remain that way even if it comes in as
> MCDONALD, or mcdonald.
[snip]
> Yeah, nothing is a "perfect solution" but anything is better than
> nothing.

That's probably true when you're talking about cash in your pocket but
probably not in this case.

> Guys, Thanks for the replies and the link to the recent thread, even
> though that didn't discuss any solutions to the problem I am asking
> about (other than to point it out which helps because it points out a
> few of the name problems)!

That's because there are no solutions. There are "options" but not
solutions.

Here is one option. Make a long list (array) of search/replace pairs and
loop through your text replacing as necessary.

'mcdonald' => 'McDonald'
'mcdowell' => 'McDowell'
'o\'reilly' => 'O\'Reilly'
'de la rosa' => 'De La Rosa'
etc ad nauseum...


Let us know when you're done! :)

Also, there's no difference between MCDONALD and mcdonald if you convert
everything to lower (or upper) case first.

Thanks,
Chris.

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



Re: [PHP] time or date picker ?

2007-03-19 Thread Tijnema !

On 3/19/07, Alain Roger <[EMAIL PROTECTED]> wrote:

Hi,

I've already seen some webpages which include a time or date picker (like a
calendar) written in PHP and on which user could type the year and after,
select the month and date (using month).
I'm looking for something like that.

Where can i find one for free ?

thanks

--
Alain


This is client side PHP is server side...

Go to the javascript list.

Tijnema



Windows XP SP2
PostgreSQL 8.1.4
Apache 2.0.58
PHP 5



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



[PHP] Re: time or date picker ?

2007-03-19 Thread Manuel Lemos
Hello,

on 03/19/2007 04:11 PM Alain Roger said the following:
> Hi,
> 
> I've already seen some webpages which include a time or date picker (like a
> calendar) written in PHP and on which user could type the year and after,
> select the month and date (using month).
> I'm looking for something like that.
> 
> Where can i find one for free ?

You may want to take a look at this forms generation class that comes
with a plug-in precisely for what you ask.

http://www.phpclasses.org/formsgeneration

Here you can see a live example of what date picker:

http://www.meta-language.net/forms-examples.html?example=test_date_input

Here you can watch a tutorial video with a section that explains about
this plug-in:

http://www.phpclasses.org/browse/video/1/package/1/section/plugin-date.html

-- 

Regards,
Manuel Lemos

Metastorage - Data object relational mapping layer generator
http://www.metastorage.net/

PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/

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



Re: [PHP] Name Capitalization

2007-03-19 Thread Leonard Burton

HI Chris,


Here is one option. Make a long list (array) of search/replace pairs and
loop through your text replacing as necessary.

'mcdonald' => 'McDonald'
'mcdowell' => 'McDowell'
'o\'reilly' => 'O\'Reilly'
'de la rosa' => 'De La Rosa'
etc ad nauseum...


I think the better solution would be some pregs that would go through
and look for "mc" then have it turn the name into "Mc" then Capitalize
the next letter. [same thing for "mac"]

Then Do the same thing with "O'Henry" it would look for "o\' " then it
would turn it into "O' " and capitalize the "H".


Let us know when you're done! :)


This project shouldn't be that hard as there are probably only 10 to
15 rules for names.

Take Care,

--
Leonard Burton, N9URK
http://www.jiffyslides.com
[EMAIL PROTECTED]
[EMAIL PROTECTED]

"The prolonged evacuation would have dramatically affected the
survivability of the occupants."

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



Re: [PHP] Name Capitalization

2007-03-19 Thread Robert Cummings
On Mon, 2007-03-19 at 15:33 -0400, Leonard Burton wrote:
>
> This project shouldn't be that hard as there are probably only 10 to
> 15 rules for names.

Ummm, April 1st is still almost 3 weeks away.

Cheers,
Rob.
-- 
..
| InterJinn Application Framework - http://www.interjinn.com |
::
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for   |
| creating re-usable components quickly and easily.  |
`'

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



[PHP] newbie question

2007-03-19 Thread bob pilly
Hi all

Can anyone tell me what '&' means before a var?

e.g function(&$var) 

Thanks for any help in advance





___ 
What kind of emailer are you? Find out today - get a free analysis of your 
email personality. Take the quiz at the Yahoo! Mail Championship. 
http://uk.rd.yahoo.com/evt=44106/*http://mail.yahoo.net/uk 

Re: [PHP] Name Capitalization

2007-03-19 Thread Paul Fierro
On 3/19/07 12:24 PM, Leonard Burton <[EMAIL PROTECTED]> wrote:

> Yeah, nothing is a "perfect solution" but anything is better than nothing.
> 
> Guys, Thanks for the replies and the link to the recent thread, even
> though that didn't discuss any solutions to the problem I am asking
> about (other than to point it out which helps because it points out a
> few of the name problems)!
> 
> Would anyone care to work on this project together?

Hi Leonard,

Take a look at this Perl module - it may be of use to you:

http://search.cpan.org/~summer/Lingua-EN-NameCase-1.13/NameCase.pm

Paul

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



Re: [PHP] newbie question

2007-03-19 Thread Robert Cummings
On Mon, 2007-03-19 at 20:10 +, bob pilly wrote:
> Hi all
> 
> Can anyone tell me what '&' means before a var?
> 
> e.g function(&$var) 

It means the variable is passed into the function as a reference.
Changes to the value of the variable will be reflected outside of the
function in the variable passed to the function.

Oh, almost forgot... RTFM :)

Cheers,
Rob.
-- 
..
| InterJinn Application Framework - http://www.interjinn.com |
::
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for   |
| creating re-usable components quickly and easily.  |
`'

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



Re: [PHP] newbie question

2007-03-19 Thread Janet Valade

bob pilly wrote:


Hi all

Can anyone tell me what '&' means before a var?

e.g function(&$var) 


http://us3.php.net/manual/en/language.references.php

Janet


--
Janet Valade -- janet.valade.com

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



[PHP] Amazon AWS + SimpleXML

2007-03-19 Thread Brad Fuller
Hey guys,

I'm having trouble trying to parse XML results from an Alexa Web information
service from amazon.com, using SimpleXML.

Here is an example response:


http://alexa.amazonaws.com/doc/2005-10-05/";>http://awis.amazonaws.com/doc/2005-07-11";><
aws:RequestId>cdfcc49c-5c01-4fc1-87e4-06f2f151e205
  
  
3
amazon.com
2007-03-15

  
2007-03-15

  1491
  5.7

30

  17359

  
  
2007-03-16

  1531
  6.0

29

  16796

  
  
2007-03-17

  1411
  5.6

32

  16475

  

  
http://alexa.amazonaws.com/doc/2005-10-05/";>Succe
ss


$xml = new SimpleXMLElement($result);
var_dump($xml); // produces: object(SimpleXMLElement)#1 (0) {}


I found these posts in the amazon developer forums:
http://developer.amazonwebservices.com/connect/thread.jspa?messageID=55124
http://developer.amazonwebservices.com/connect/thread.jspa?messageID=54000&#
54000

I've tried to register the namespace, but that didn't seem to help...

$xml->registerXPathNamespace( "aws",
"http://alexa.amazonaws.com/doc/2005-10-05/"; );

var_dump($xml->xpath("//aws:Response")); // produces array(0){}

(I tried it with the other url as well, same result)

Any advice is much appreciated.

Thx,

Brad 

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



Re: [PHP] time or date picker ?

2007-03-19 Thread Richard Lynch
On Mon, March 19, 2007 2:11 pm, Alain Roger wrote:
> I've already seen some webpages which include a time or date picker
> (like a
> calendar) written in PHP and on which user could type the year and
> after,
> select the month and date (using month).
> I'm looking for something like that.
>
> Where can i find one for free ?

Actually, you haven't seen that.

You thought you saw that, because the URL ended in .php

But what you really saw was some JavaScript.

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some starving artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

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



Re: [PHP] Name Capitalization

2007-03-19 Thread Richard Lynch
On Mon, March 19, 2007 11:22 am, Leonard Burton wrote:
> Does anyone use a library to properly capitalize last names?
>
> For instance, McDonald needs to remain that way even if it comes in as
> MACDONALD, or macdonald.
>
> Of course I can write it on my own but would prefer not to reinvent
> the wheel.

We just beat that horse last week, didn't we?

MacDonald
Macdonald
Mcdonald
McDonald
O'Rrien
von Freeman
Von Freeman
Del Castillo
del Castillo
SONiA
Bo3b

All of the above are the CORRECT spelling of names, though I confess I
cheated and put in two first names (the last two).

Note that these are literally people I know, or know of, whose names
are spelled that way.  There are millions more.

And that's just legal names, not getting into artists' stage names,
except where they filed papers to make it their legal name.

You cannot possibly write software to "fix" this.

Make the user double-check the spelling is your only recourse.

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some starving artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

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



Re: [PHP] Name Capitalization

2007-03-19 Thread Richard Lynch
On Mon, March 19, 2007 12:24 pm, Leonard Burton wrote:

> Oops, I messed this request up.
>
> It should have read:
>
> For instance, McDonald needs to remain that way even if it comes in as
> MCDONALD, or mcdonald.

You're wrong.

You're wrong, because for some people, it is NOT capitalized McDonald,
but just Mcdonald.

Don't even ask me why they insist on spelling their name that way, but
they do, and they accept that computers will mess it up, but you're
better off to leave their spelling alone on their name.

How do you "fix" Bo3b's name?

He was a developer on the early Apple Macintosh.

The 3 in his name is not a typo.

His parents were hippies.

I am not making this up.

I believe he's also the one who claimed that his dog that came to work
with him wrote most of the Mac OS file system code. :-)

> Would anyone care to work on this project together?

I don't think you've even scoped out the project yet, or you wouldn't
ask that :-)

Might as well ask if anybody wants to help you build a rocket to the
moon.

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some starving artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

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



Re: [PHP] Out source files

2007-03-19 Thread Richard Lynch
On Mon, March 19, 2007 1:46 pm, Manuel Vacelet wrote:
> 2007/3/19, Richard Lynch <[EMAIL PROTECTED]>:
>> On Mon, March 19, 2007 12:46 pm, Manuel Vacelet wrote:
>> > I would like to know if there is some common patterns to "out
>> source"
>> > the files served by a LAMP stack.
>> >
>> > Technicaly speaking I would like to store my files (application
>> data)
>> > on another machine than the one that runs my PHP app. (as I
>> already do
>> > with MySql).
>> >
>> > The best would be to use a secure connexion between my app. server
>> and
>> > the storage one (communication can be tunneled in SSH though).
>>
>> For a media rich site, it's super common to move the images (or
>> other
>> large-size files) off to a different server, with the hard drives
>> and
>> OS tuned for large files.  (Or for small files, if they are, say,
>> email bodies or somesuch.)
>>
>> This works especially well for content that is acquired by the
>> visitor
>> through a separate HTTP request anyway.
>>
>> What sort of application data are you looking at, though?...
>
> Ooops, forgot to precise my request ;)
>
> I don't want the user to perform a direct connexion to another server.
> It's not a matter of performances but security.
>
> It's often recommended in some security guidelines to not store
> application data on the same server than the one that runs the
> application (for instance to avoid a apache or php failure expose your
> files directly to anyone, or to let user execute a file she uploaded
> thanks to another hole in another software).
>
> This is already possible with any DB to have a second server and to
> connect to this server through an SSL tunnel. I would like to have the
> same approach for all the files not in the DB.
>
> Note: obviously, there are security concerns in my request and there
> are access rights on the files.
>
> I hope this clarify my needs.

One common pattern in PHP is to not put the file in the web tree at
all, and write a PHP script with 'readfile' (or fopen/fread/echo loop
for larger files).

You can then control access to the file, and log any kind of stats you
need about accessing the file.

Once you have that, then you can also put the files on some other
server, and use URL fopen to read them, if you like.

I've done that for one site where a webhost a like has limited hard
drive space, and have made it appear as if a Terabyte of music is
available on a 500 meg site.

Or you could use PHP ftp functions to shuffle them around.

Or, if you like, I suppose you could exec scp or something.

It depends more on what you are trying to secure, and why, than it
does on any sort of general principle, really...  And just personal
preference on how to do this sort of thing... And your performance
needs are a big factor, sometimes.

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some starving artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

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



Re: [PHP] php search engine

2007-03-19 Thread Richard Lynch
On Mon, March 19, 2007 5:21 am, Ross wrote:
> I am looking for a php search engine that provides a suggested words
> (soundex?) when items are misspelt, the way google does.
>
> I have used http://www.site-search-pro.com/ i n the past which is
> great but
> as far as I know this feature is not included.

I suppose you could hack your own with http://php.net/soundex or any
of the other 3 or 4 similar packages available in PHP...

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some starving artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

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



Re: [PHP] Running PHP on a windows server-your views

2007-03-19 Thread Richard Lynch
On Mon, March 19, 2007 3:39 am, Angelo Zanetti wrote:
> I would like some honest answers and if you have any experience with
> problems or no problems running PHP on a windows server.

Let me put it this way:
Core PHP will not make Windows any less stable than it already is.

That means that if you have one of the 0.01% of Windows SysAdmins who
actually is competent, then you should be fine.

If not, then PHP isn't going to help matters.

If you start adding in some seldom-used DLL extensions...  No
promises. :-)

Check with people who actually USE PHP on Windows with heavy volume,
if you can find any...

Is there still a php-windows@ list from php.net?

> Basically we are interested to know if there are any problems/security
> issues/stability issues/performance issues or any other issues running
> a
> production site (big live site) on a windows server.
>
> Im assuming it will be running IIS.

You really shouldn't, as Apache on Windows is a good way to transition
to a real server. :-)

Disclosure:
I hate MS and have a severe bias.

YMMV

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some starving artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

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



Re: [PHP] install problems

2007-03-19 Thread jekillen


On Mar 18, 2007, at 10:54 PM, Chris wrote:


jekillen wrote:

Hello;
Well, this one I cannot seem to figure out:
I installed Apache 1.3.37 with
./configure --enable-module=so --enable-module=rewrite 
--enable-shared=max

Then tried to install
php 5.2.1 --with-apxs=/usr/local/apache/bin etc etc
libphp5.so is no where to be found. It sure is not
in apache/libexec


Did you run 'make' ?

Running configure doesn't create this file, 'make' does.

A rather obvious question but I couldn't see whether you ran it or not.



Yes, I did, an oversight on my part not to mention it.
It went all the way through configure, make, and make install
I watched all the text fill up the screen and fly by and I did
not get and bail outs. How ever I suspect that part of the
problem is the way I configured Apache, I know I had
trouble with Apache not editing the .conf file by putting
all the AddModule and LoadModule lines in. I got that
fixed then encountered the php problem. I even went
through and removed everything related to php I could
find and started again from scratch. No luck.
Thanks for the reply
Jeff k

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



Re: [PHP] PECL help

2007-03-19 Thread Richard Lynch
On Sun, March 18, 2007 9:28 pm, Mike Payson wrote:
> I'm trying to install the extension runkit on my shared server. I

E.

I don't think you want to do that...

I mean, it's just going to be WAY too easy to crash things in a Big
Way and have your webhost very angry with you...

Set it up on your own "dedicated" box in your house or something.

A 386 out of the computer graveyard would be fine, most likely.

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some starving artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

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



Re: [PHP] Preventing unwanted chars from outputting

2007-03-19 Thread Richard Lynch
On Sun, March 18, 2007 5:57 am, Don Don wrote:
>   my program outputs some characters along with text from the
> database, these texts contain chars like ‘ ’.  How can i get rid
> of theses chars and display their meaning instead ?  I am thinking
> htmlspecialchars or html entities will do the job will it ?

Without knowing what those chars are, or what you expect them to be,
it's hard to say...

Perhaps try setting your php.ini default charset to UTF-8 and add a
META tag in your HTML HEAD to set the charset to UTF-8.

Or, perhaps, you want to use htmlentities to get, errr, whatever it is
you want to get.

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some starving artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

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



Re: [PHP] Running PHP on a windows server-your views

2007-03-19 Thread Bruce Cowin
Yes, there is a PHP-WIN list.  Much less volumn than this list.

We run PHP on Windows using IIS.  So far haven't had any problems.  But we've 
been using it on intranet only sites and not very intensive or complicated.



Regards,

Bruce

>>> "Richard Lynch" <[EMAIL PROTECTED]> 20/03/2007 11:28:14 a.m. >>>
On Mon, March 19, 2007 3:39 am, Angelo Zanetti wrote:
> I would like some honest answers and if you have any experience with
> problems or no problems running PHP on a windows server.

Let me put it this way:
Core PHP will not make Windows any less stable than it already is.

That means that if you have one of the 0.01% of Windows SysAdmins who
actually is competent, then you should be fine.

If not, then PHP isn't going to help matters.

If you start adding in some seldom-used DLL extensions...  No
promises. :-)

Check with people who actually USE PHP on Windows with heavy volume,
if you can find any...

Is there still a php-windows@ list from php.net?

> Basically we are interested to know if there are any problems/security
> issues/stability issues/performance issues or any other issues running
> a
> production site (big live site) on a windows server.
>
> Im assuming it will be running IIS.

You really shouldn't, as Apache on Windows is a good way to transition
to a real server. :-)

Disclosure:
I hate MS and have a severe bias.

YMMV

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some starving artist.
http://cdbaby.com/browse/from/lynch 
Yeah, I get a buck. So?

-- 
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] Preventing unwanted chars from outputting

2007-03-19 Thread Richard Lynch
On Sun, March 18, 2007 2:55 pm, Larry Garfield wrote:
>> I found the following to be quite informative:
>>
>> http://www.joelonsoftware.com/articles/Unicode.html
>
> I do like Joel's style... :-)

His style is fine, though his factually incorrect rant about PHP some
years ago was annoying...

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some starving artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

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



Re: [PHP] Is there a open_basedir and curl followlocation bypass/fix?

2007-03-19 Thread Richard Lynch
So open_basedir settings are mucking with curl's CURLOPT_FOLLOWLOCATION?

That seems pretty whack to this naive reader...

Guess you are stuck reading the headers and doing as many more
curl_exec()s on the Location: as it takes.

On Mon, March 19, 2007 5:15 am, Mathijs wrote:
> Jochem Maas wrote:
>> Mathijs wrote:
>>> Hello there,
>>>
>>> I Need a bypass to have followlocation working while open_basedir
>>> is in
>>> affect.
>>>
>>> I Don't see why we can't enable/disable this protection by our
>>> selfs
>>> when needed.
>>
>> we can't see past the choices we don't understand though can we?
>>
>>> Keep the protection enabled by default, and let the ppl disable it
>>> if
>>> they realy want to.
>>
>> well you go and code the routines that make that work without
>> completely
>> raping any form of security that is currently offered by
>> open_basedir - put another
>> way: if it was that easy someone would have done it by now.
>>
>>> Anyway, how can i bypass this the easy way.
>>
>> add the symlinked location to the the open_basedir directive??
>>
>>> Thx in advanced.
>>>
>
> Well it is an HTTP site where the re-location come's from.
> And it is very irritating when i need to do the header locations my
> self.
>
> But if there is no setting i can change i think i need to do it my
> self.
> a shame that this can't be fixed on an easy way.
>
> Thx anyway :).
>
> Regards,
> Mathijs.
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some starving artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

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



Re: [PHP] glob(path_pattern, GLOB_ONLYDIR)

2007-03-19 Thread Richard Lynch
On Sun, March 18, 2007 4:30 am, Jim Lucas wrote:
> Al wrote:

>> print_r(glob('../*', GLOB_ONLYDIR));
> well, double check your php version, because this should be built in
> whit the version that you are running.
>
>>
>> And I get: "Warning: glob() expects parameter 2 to be long, string
>> given
>> in foo"
>>
>> I can't find anything in the manual or when Googling.
>>
>> Anyone can explain this for me?
>>

Also crank up your error_reporting to include E_NOTICE, so that you
are given an error message when you use a constant that just plain
does not exist, and PHP has to "guess" that you meant to put quotes
around it.

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some starving artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

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



Re: [PHP] Getting last record ID created from DB

2007-03-19 Thread Richard Lynch
On Fri, March 16, 2007 10:28 pm, Jeff wrote:
> Is there a way to get the last Record # created by the DB.

Yes, but...

> Example:
>
> User_ID = auto_increment
> f_name = varchar
> l_name = varchar
> e-mail = varchar
> b_date = varchar
> pic = varchar
>
>
> Since user_id is an auto_inc field I submit it as a NULL, also I
> haven't
> started the code for a picture yet either so I have it set to NULL at
> this
> moment.
> My code is:
>
> $query = "INSERT INTO `t_users` (`user_id`, `f_name`, `l_name`,
> `e_mail`,
> `b_date`, `pic`) VALUES ('', '$f_name', '$l_name', '$e_mail',
> '$b_date',
> '')";
> $result = mysql_query($query);
> if(!$result)
> {
> die("Could not query the database: ".mysql_error());
> }
> echo "Your Player information has been stored OK.";
>
> what code could I add here to make the following line work?
>
> echo "REMEMBER your USER ID# you will need it when creating
> Characters!! It
> is: $user_id"; <- I want to show the "user_id" just created here.

What you think you want is this function:
http://php.net/mysql_insert_id

You REALLY shouldn't do this in this case, for several reasons.

#1.
Never expose an internal ID to the end user as if it had meaning.
There are several reasons for this, ranging from security to data
integrity, and there are times to break this rule, but you're not in
one of those situations.

#2.
Don't make me remember some stupid number.  That's just Bad User
Interface.

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some starving artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

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



Re: [PHP] Getting last record ID created from DB

2007-03-19 Thread Richard Lynch
On Fri, March 16, 2007 10:37 pm, Rod Person wrote:
> select user_id from t_users where user_id = (select max(user_id) from
> t_users)

Noo!

This is a "race condition"

Imagine, if you will, that *TWO* users sign up and create characters
on your site at the exact same time:

Lee Francis
insert into user... insert into user...
auto_inc: #5auto_inc: #6
select max(user_id) select max(user_id)
#6  #6

You'll tell BOTH of them that they are #6, even though Lee was really #5.

Yes, this can easily happen.

In fact, on a moderately busy site, it *WILL* happen quite quickly.

You REALLY do want to use http://php.net/mysql_insert_id to find out
the last ID used FOR THIS CONNECTION.

The MySQL guys worked really really really hard to do this right.

Don't be an [bleep] and not use their hard-won experience.

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some starving artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

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



Re: [PHP] Re: Re: Getting last record ID created from DB

2007-03-19 Thread Richard Lynch
On Sat, March 17, 2007 9:48 am, Mark wrote:
> I often wonder, looking at these questions, what is the state of the
> web? If
> any notable percent of it is written with this much basic ignorance of
> computing, then the web is basically broken.

The web *IS* basically broken.

But large chunks of it seem to work until they are put under the
inordinate stress of two users at one time. :-v

I don't even want to estimate how many sites fall into this or a
similar category.

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some starving artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

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



Re: [PHP] Is there a open_basedir and curl followlocation bypass/fix?

2007-03-19 Thread Chris

Richard Lynch wrote:

So open_basedir settings are mucking with curl's CURLOPT_FOLLOWLOCATION?

That seems pretty whack to this naive reader...

Guess you are stuck reading the headers and doing as many more
curl_exec()s on the Location: as it takes.


Yep, from version 5.2.0.

http://www.php.net/ChangeLog-5.php#5.2.0

Seems pretty silly to me too but *shrug* ;)

--
Postgresql & php tutorials
http://www.designmagick.com/

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



Re: [PHP] Can't get PHP errors to display or log consistently

2007-03-19 Thread Richard Lynch
On Fri, March 16, 2007 2:30 pm, Chris W. Parker wrote:
> Using CentOS 4 and I can't get errors to display on the page AT ALL or
> log errors consistently. Some errors get logged (forgetting to us
> $this-> in a class for example) but most don't.
>
> I've tried:
> * using .htaccess to set the error reporting.
> * checking and double checking my php.ini file for the correct
> setting.
> * using error_reporting(E_ALL) at the top of my page.
>
> Nothing works.
>
> When a page has an error it's goes blank. Nothing is sent to the
> client.
>
> There must be a setting somewhere that is overriding all of this. Any
> ideas?

If you have a syntax error, and PHP craps out before it can even begin
to run the script to produce output, exactly what output would you
expect to go to the browser?...

Don't display the errors, just log them.

Test the code to be sure it at least has a chance of running.

You can play with http://php.net/set_error_handler to try and do nifty
things on errors, but some errors fall ouside the pervue of that
function -- namely syntax errors caught before PHP can even begin to
run the script.

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some starving artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

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



Re: [PHP] Re: Getting last record ID created from DB

2007-03-19 Thread Chris

markw@mohawksoft.com wrote:

markw@mohawksoft.com wrote:

On Sat, 2007-03-17 at 12:19 -0400, Mark wrote:



There in lies the biggest problem with LAMP, and that's MySQL. The
architecture of your methodology *only* works with MySQL, and not more
capable databases like Oracle, DB2, or even PostgreSQL.

I too thought the same thing, but was corrected when I starting working
on a redesign for the billing system for the company that I am working
for.  They use PostgreSQL and we do have a auto incremented unique id
field.  It isn't call AUTO_INCREMENT, but rather a sequence value.  It
is a value that is controlled by the default value entry.

It then runs this:
nextval('customers_customer_id_seq'::regclass)

and uses this as the value of the id field for the newly inserted row.


Yea, I've been using PG for over 10 years now. Sequences are awesome, but
there have an "auto number" column type as well. It simply creates a
sequence but it's there.

I guess maybe most databases support the notion of "auto number" in some
form. I haven't used MSSQL recently, but I think their solution is a GUID.


Then instead of running a command like SELECT LAST_INSERT_ID(); you have
to do some other stuff like this:

$SQL = "SELECT currval('{$table}_{$column}_seq');";



Again, this is absolutely wrong unless it is wrapped in a transaction. You
will need a "begin" and a "commit" in an MVCC type system. If you don't
wrap it in a transaction you don't know who got the last "nextval" of the
sequence.


Check the documentation - currval returns the last one *for that 
session* - it does not return the last global change.


http://www.postgresql.org/docs/current/static/functions-sequence.html

It is perfectly safe to use this.

--
Postgresql & php tutorials
http://www.designmagick.com/

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



Re: [PHP] form not submitting inofrmation

2007-03-19 Thread Richard Lynch
On Fri, March 16, 2007 1:05 pm, Bruce Gilbert wrote:
> I have a form on my website, that used to work, but I just realized
> that now it doesn't. You don't get any errors, but I am not receiving
> an email with the information after the submittal.
>
> The form is located at http://www.inspired-evolution.com/Contact.php
>
> and the PHP is:
>
> [php]
>  include("emailval.php");
> $site_name = "Inspired-Evolution.com";
> $site_owner_email = "[EMAIL PROTECTED]";
> $your_domain = "www.inspired-evolution.com";
> $current_url = $_SERVER['REQUEST_URI'];
>
> $submit = $_REQUEST['submit'];
>
> if(isset($submit)){
>
>   $name = $_REQUEST['name'];
>   $flizzum_flazzum = $_REQUEST['flizzum_flazzum'];
>   $subject = $_REQUEST['subject'];
>   $msg = $_REQUEST['msg'];
>
>   if(strlen($name) < 2){
>   $name_warn = "true";
>   }
>   if (MailVal($flizzum_flazzum, 2)){
>   $email_warn = "true";
>   }
>   if(strlen($msg) < 2){
>   $msg_warn = "true";
>   }
>
>   if (preg_match("/$your_domain/i", "$flizzum_flazzum")) {
> $bogus_warn = "true";
>   }
>
>   if((!isset($name_warn))&&
>   (!isset($email_warn))&&
>   (!isset($bogus_warn))&&
>   (!isset($msg_warn))){
>
>   // headers for the email listed below
>   $headers .= "From: $name <$flizzum_flazzum>\n";  // your email client
> will show the person's email address like normal
>   $headers .= "Content-Type: text/plain; charset=iso-8859-1\n"; // sets
> the mime type
>   $recipient = "[EMAIL PROTECTED]";
>
>   $subject = "Contact From $site_name - $subject"; // this is the
> subject of the email
>
>   $msg = wordwrap( $msg, 1024 );

Word-wrap for email at 1024 columns?

Ugh.

>   mail($recipient, $subject, stripslashes($msg), $headers); // the
> mail() function sends the message to you

First off, mail() returns a value true/false to indicate whether its
attempt to inject the email into the sending queue succeeded.

It does NOT tell you if the email actually went out, but it at least
tells you if it has any chance at all of going out "soon".

Check the return value, and if it's FALSE, don't lie to the user and
say that the email was sent, when you know from the get-go that it
wasn't :-)

Also, you REALLY are wide open to spammer email header injection
attack here...

If I POST data where $_POST['name'] consists of the data between the
ASCII lines:

-
"PHP Spammer" <[EMAIL PROTECTED]>
Cc: [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED]
-

Then I have just used YOUR form mail to send out my spam to you, and 3
victimes.

Multiply that Cc: line by, oh, 1000 Cc: lines, and you see a problem, eh?

A quick simple check that nobody's name, email, or subject has a
newline in it will foil this.  Do it.

After that, there are several things that could go wrong.

To diagnose them, try some or all of the following:

1. send email from the command line, and see if that works.

2. su to the User PHP runs as (User in httpd.conf for PHP Apache
Module) and repeat test 1

3. Check if sendmail is even running and/or processing the mail queues.
   3a. ps aux | grep sendmail
   3b. ls /var/spool/
   Then ls /var/spool/XXX where XXX looks like any of:
   mail, sendmail, mqueue, clientmqueue, etc

If you find a big honking list of all the email that never went out,
then you probably don't have sendmail running.

WARNING:
A quick way at that point to bring your server to its knees is to fire
up sendmail...  It will then attempt to process all that backlog of
email.  If you just don't care about the old emails, blow them away
before firing up sendmail.  If you NEED those emails to go out, no
matter how late, then consider figuring out how to throttle sendmail
before you fire it up.

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some starving artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

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



Re: [PHP] a php stats package

2007-03-19 Thread Richard Lynch
On Fri, March 16, 2007 10:57 am, Ross wrote:
> Can someone recommend one please?

Do you mean like 'webalizer' or 'anacron' which give stats about web
traffic?

Or do you mean a statistical analysis package for things like
'average'a and 'amortization' written in PHP? [shudder]

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some starving artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

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



[PHP] PHP stats package thread

2007-03-19 Thread Richard Lynch
I just realized I typed 'anacron' where I meant 'analog'

Duh.

Sorry.

And this isn't even threaded properly because I already deleted the
other messages.

Sigh.

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some starving artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

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



Re: [PHP] CONTENT-type for sending HTML attachments

2007-03-19 Thread Richard Lynch
On Fri, March 16, 2007 10:16 am, Angelo Zanetti wrote:
> Im using the HTML Mime Mail
>  class from phpguru.org.
> Anyway I've written a few scripts that use the class to attach files
> to
> it. These files are HTML reports but Im not sure what MIME
> content-type
> to use.
>
> The content type I use to for the attachments is text/html. But Im not
> sure that the content type for the email itself should be plain/text
> as
> this just displays the HTML attachment as garbage in the body text.
>
> Please could anyone advise, what the content type should be.

I would hazard a guest that is should be text/html, if you are sending
html enhanced (cough, cough) email...

Hopefully you realize that doing this drastically reduces the number
of people who will actually get the email, as the spammers all use
html enhanced email, so the spam filters all penalize for it.

And, of course, some of us use mail clients that won't display html
email unless we click a couple extra times, since html enhanced email
is a blatant security hole waiting to be exploited.

So even if the email gets to my Inbox, the odds that I'll bother to
read it are much much worse.

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some starving artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

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



Re: [PHP] php bar/graph scripts/library

2007-03-19 Thread Richard Lynch

JP Graph is often recommended.

So often that you probably should have been able to find it on your
own...


On Thu, March 15, 2007 10:07 pm, Ron Croonenberg wrote:
> hello all,
>
> I am looking for some  scripts/libraries etc to produce some bar
> graphs etc.
>
> Does anyone know of something "nice (that works on Linux)
>
> thanks,
> Ron
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some starving artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

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



Re: [PHP] php bar/graph scripts/library

2007-03-19 Thread Richard Lynch
On Fri, March 16, 2007 4:29 am, Shafiq Rehman wrote:
> You can create graphs with Flash. Here is the link
> http://www.maani.us/charts/index.php

This didn't create any graphs for me.

Just puzzle pieces. :-) :-) :-)

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some starving artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

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



Re: [PHP] logging erros and user access to logs

2007-03-19 Thread Richard Lynch
On Thu, March 15, 2007 4:08 pm, Jason Joines wrote:

> "Invalid command 'phpflag', perhaps mis-spelled or defined by a module

php_flag error_reporting 0


Or, perhaps, these days:
php_value error_reporting 0

I forget what the outcome of the php_flag debacle was...

but phpflag with no _ in it ain't never gonna work, no matter what
version you got.

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some starving artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

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



RE: [PHP] Can't get PHP errors to display or log consistently

2007-03-19 Thread Richard Lynch
On Mon, March 19, 2007 12:57 pm, Chris W. Parker wrote:
> On Friday, March 16, 2007 4:04 PM Robert Cummings
>  said:
>
> Update:
>
> Now that I've corrected my mistake in php.ini and set the level of
> error
> reporting that I want I can see *most* errors.
>
> But shouldn't the following produce a visible error?
>
> 
> error_reporting(E_ALL);
> ini_set('display_errors','On');
>
> x
> echo 'hello';
>
> ?>
>
> If I comment the x I see 'hello'. If I uncomment the x I don't see
> anything.

Syntax errors caught by the compile phase abort the running of the
script long before PHP has begun any output.

Do a basic syntax check on the command line with:
php -l whatever.php


-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some starving artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

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



Re: [PHP] PECL help

2007-03-19 Thread Mike Payson

PHP runs as CGI, so it shouldn't cause any problem other then possibly with
my script-- or am I missing something?

On 3/19/07, Richard Lynch <[EMAIL PROTECTED]> wrote:


On Sun, March 18, 2007 9:28 pm, Mike Payson wrote:
> I'm trying to install the extension runkit on my shared server. I

E.

I don't think you want to do that...

I mean, it's just going to be WAY too easy to crash things in a Big
Way and have your webhost very angry with you...

Set it up on your own "dedicated" box in your house or something.

A 386 out of the computer graveyard would be fine, most likely.

--
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some starving artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?




Re: [PHP] Hive Dekoder [SOLVED]

2007-03-19 Thread Richard Lynch
On Fri, March 9, 2007 5:07 pm, Richard Lynch wrote:
> Short Version:
> Anybody got a good quick clean hack to "crack" Hive Logic Enkoder?

First, thanks for all the leads and ideas and pointers on this!

The short version solution is:
Get Spidermonkey.


Long version:

After dinking around for a couple weeks with:

phpjs - failed to parse the first test input
Perl::JavaScript - failed to install *
j4p5 - N/A I'm running PHP 4, for various reasons
njs (f.k.a. ngs) - syntax errors on test inputs

I *finally* found references to "spidermonkey"

Spidermonkey is the exact same JS interpreter that is embedded in
Mozilla-based browsers (Firefox, Netscape, Mozilla, etc)

It is released as a stand-alone body of code by Mozilla.

It's even in the Gentoo ports-like system, so I can get updates easily.

And I figure that if the JS isn't going to work in Spidermonkey, it's
not going to work in Firefox/Netscape/Mozilla, so they'd have to be a
pretty stupid IE-only site I wouldn't care about anyway, right? :-)

And, best of all, Spidermonkey just works, out of the box.

Well, okay, technically not "out of the box" as it complained about
'document' not being an object when I passed in my JS obfuscasted
email.

So I tried this:

var document = new Document;
[insert JS obfuscated email junk here.]

but that puked on a non-existent 'Document' class.

Then I tried:

var document = new Object;
[insert JS obfuscated email junk here.]

That got me to a new error message (progress!) about object method
'write' not being defined.

Next try:

var document = new Object;
document.write = print;
[insert JS obfuscated email junk here.]

And, voila, I am now web-scraping JS obfuscated emails as well as the
spammers who we want to stop from doing that, by getting the emails
back server-side, and providing throttled sender-blind form-mail
instead.

Our old business process managed to "lose" these email addresses and I
had only the JS obfuscated content to work with.

I can soon turn on the crank and web-scrape 55,000 JS obfuscated
emails overnight.

Whoo hooo!

I presume the really good (as in competent, not moral) spammers figure
all this out in even less time than I did. :-v

Notes to all web developers:
JS obfuscated emails will not stop the really determined developer.
Any obfuscation at all will stop the moronic (most) spammers.
Paying for a JS obfuscator is probably not a good investment.
Spidermonkey rocks.

YMMV
NAIAA
IANAL

* Actually, first Bundle::CPAN itself failed to install repeatedly,
with maddening messages about Zlib and something about a non-C version
of Utils::Scaler, then I uninstalled/re-installed Utils::Scaler, then
I got to where CPAN was up-to-date, but JavaScript extension never did
manage to install, and I just plain gave up on Perl.  Again.  For the
umpteenth time.  Here is the kind of crap I simply will not put up
with:
http://l-i-e.com/perl.log
http://l-i-e.com/perl2.log

But huge thanks to Andy Lester (Chicago Perl guru) for helping me to
at least get CPAN installed.

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some starving artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

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



Re: [PHP] Re: Getting last record ID created from DB

2007-03-19 Thread Richard Lynch
On Sat, March 17, 2007 9:43 am, Myron Turner wrote:
> An earlier post called attention to a concurrency problem.  Wouldn't
> getting the last inserted ID from LAST_INSERT_ID()
> suffer from the same limitations as any of the other solutions which
> do
> a select to get the last ID?  I assume if you are completely in
> control
> of the database, you could create a lock file using flock() and remove
> the lock once the Id is retrieved using any of these methods.  I guess
> what I'm wondering is whether the simplest suggestion is the one that
> would use the email address as a condition in the WHERE clause to
> extract the ID?

No, no, and no.

The MySQL developers spent a zillion hours making the LAST_INSERT_ID()
function be tied to YOUR database connection.

You get *your* LAST_INSERT_ID(), not some random one from some other
database connection.

That's why http://php.net/mysql_insert_id takes the connection as an
argument.  Okay, so it's an optional arg, and PHP uses the last-used
connection by default, but that's another issue entirely...

Use the function provided, which was expressly designed to avoid the
concurrency problem, which already has all the locking and whatnot
built into it.

Do not roll your own.

You will only end up re-inventing a wheel, at best, and probably just
screwing it up, most likely.

These guys have spent a good chunk of their lives figuring this stuff
out and becoming experts on it.  Let them expertise.

And to address a very specific suggestion: You never know when some
goof is going to register twice with the same email, possibly hitting
re-load, and so that's not a Good Idea.

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some starving artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

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



Re: [PHP] Re: Getting last record ID created from DB

2007-03-19 Thread Richard Lynch
On Sat, March 17, 2007 10:16 am, Robert Cummings wrote:
> No, it's a MySQL specific feature that is atomic with the insert and
> so
> you are guaranteed that the the returned ID is the exact automatic ID
> associated with the most recent INSERT for the connection handle.
> Unfortunately auto increment is MySQL specific and so it isn't
> transferrable to other database engines.

Every database package has SOME way to do this.

It's practically criminal that db vendors won't standardize the
mechanics.

SQL-92, SQL-99, SQL-2002 (2004? whatever it was) they STILL can't sit
down and come up with a single mechanism?

One of the most basic fundamental database needs, never standardized.

Probably never will be.

Sigh.

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some starving artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

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



Re: [PHP] Re: Getting last record ID created from DB

2007-03-19 Thread Jim Lucas

Chris wrote:

markw@mohawksoft.com wrote:

markw@mohawksoft.com wrote:

On Sat, 2007-03-17 at 12:19 -0400, Mark wrote:



There in lies the biggest problem with LAMP, and that's MySQL. The
architecture of your methodology *only* works with MySQL, and not more
capable databases like Oracle, DB2, or even PostgreSQL.

I too thought the same thing, but was corrected when I starting working
on a redesign for the billing system for the company that I am working
for.  They use PostgreSQL and we do have a auto incremented unique id
field.  It isn't call AUTO_INCREMENT, but rather a sequence value.  It
is a value that is controlled by the default value entry.

It then runs this:
nextval('customers_customer_id_seq'::regclass)

and uses this as the value of the id field for the newly inserted row.


Yea, I've been using PG for over 10 years now. Sequences are awesome, but
there have an "auto number" column type as well. It simply creates a
sequence but it's there.

I guess maybe most databases support the notion of "auto number" in some
form. I haven't used MSSQL recently, but I think their solution is a 
GUID.



Then instead of running a command like SELECT LAST_INSERT_ID(); you have
to do some other stuff like this:

$SQL = "SELECT currval('{$table}_{$column}_seq');";



Again, this is absolutely wrong unless it is wrapped in a transaction. 
You

will need a "begin" and a "commit" in an MVCC type system. If you don't
wrap it in a transaction you don't know who got the last "nextval" of the
sequence.


Check the documentation - currval returns the last one *for that 
session* - it does not return the last global change.


http://www.postgresql.org/docs/current/static/functions-sequence.html

It is perfectly safe to use this.


Thanks!

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



Re: [PHP] Re: Getting last record ID created from DB

2007-03-19 Thread Richard Lynch
On Sat, March 17, 2007 11:19 am, Mark wrote:
> insert into the_table (..., email,..);
> select user_id from the_table where email = '...';
>
> Is probably the best way given the nature of the table and skill level
> of
> the developer asking the question.

$query = "insert into the_table(...)";
mysql_query($query);
$user_id = mysql_insert_id();

If you are writing a PHP/MySQL web application, and your skill level
is not up to typing that last line of code above, stop writing a
PHP/MySQL web application and go do something else.

Something that requires no skill whatsoever. :-)

Even if you just plain don't "get" what the concurrency problem is,
you can STILL follow the basic instruction of "do this":

$user_id = mysql_insert_id();

right after the INSERT is done, and you will get your auto_increment
ID back.

Anything else you try to do is just a time bomb ticking away.

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some starving artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

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



Re: [PHP] Re: Getting last record ID created from DB

2007-03-19 Thread Richard Lynch
On Sat, March 17, 2007 1:08 pm, markw@mohawksoft.com wrote:
> There in lies the biggest problem with LAMP, and that's MySQL. The
> architecture of your methodology *only* works with MySQL, and not more
> capable databases like Oracle, DB2, or even PostgreSQL.

Therein lies the biggest problem of money-hungry commercial vendors
refusing to use transportable standards so that they can maintain a
vendor lock.

Put the blame squarely where it belongs, please, on the SQL
"standards" committee that squelches anything that might actually open
up competition  because it is weighted down with "legacy" requirements
by biased committee members (read: employees of the vendors who would
lose market share) and simply refuses to migrate to something
cross-platform.

It's not as if they didn't have the problem and viable solutions in
front of them in 1992, 1999, and 2004.

Notice a complete lack of a workable solution in the standards?

Don't expect this problem to be solved anytime soon.

Microsoft, Oracle, DB2 etc don't *want* you to be able to transfer
your SQL code cleanly and easily to another vendor!

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some starving artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

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



Re: [PHP] install problems

2007-03-19 Thread Chris

jekillen wrote:


On Mar 18, 2007, at 10:54 PM, Chris wrote:


jekillen wrote:

Hello;
Well, this one I cannot seem to figure out:
I installed Apache 1.3.37 with
./configure --enable-module=so --enable-module=rewrite 
--enable-shared=max

Then tried to install
php 5.2.1 --with-apxs=/usr/local/apache/bin etc etc
libphp5.so is no where to be found. It sure is not
in apache/libexec


Did you run 'make' ?

Running configure doesn't create this file, 'make' does.

A rather obvious question but I couldn't see whether you ran it or not.



Yes, I did, an oversight on my part not to mention it.


Just wanted to check :)

After 'make' you should have a libs/libphp5.a and/or libs/libphp5.so

No need to do the 'make install' step if those files don't get created 
(depending on your configure options you may only get one of them, but 
there should be something created there).


If you're not getting them at all, does 'make' finish properly - ie do 
you get:



Build complete.
(It is safe to ignore warnings about tempnam and tmpnam).


as the last two lines?

--
Postgresql & php tutorials
http://www.designmagick.com/

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



Re: [PHP] Re: Getting last record ID created from DB

2007-03-19 Thread Richard Lynch
On Sun, March 18, 2007 4:14 am, Jim Lucas wrote:
>> There in lies the biggest problem with LAMP, and that's MySQL. The
>> architecture of your methodology *only* works with MySQL, and not
>> more
>> capable databases like Oracle, DB2, or even PostgreSQL.
> I too thought the same thing, but was corrected when I starting
> working
> on a redesign for the billing system for the company that I am working
> for.  They use PostgreSQL and we do have a auto incremented unique id
> field.  It isn't call AUTO_INCREMENT, but rather a sequence value.  It
> is a value that is controlled by the default value entry.
>
> It then runs this:
>   nextval('customers_customer_id_seq'::regclass)
>
> and uses this as the value of the id field for the newly inserted row.
>
> Then instead of running a command like SELECT LAST_INSERT_ID(); you
> have
> to do some other stuff like this:
>
> $SQL = "SELECT currval('{$table}_{$column}_seq');";

If you haven't turned OFF the built-in OID, you can also use
http://php.net/pg_last_oid to get the PostgreSQL internal OID (kind of
like a built-in auto_increment on each table, only not) and then use
that in a query to find your own ID by matching the built-in OID
field:

$query = "insert whatever into yeah ";
pg_exec($connection, $query) or die(pg_last_error($connection));
$oid = pg_last_oid($connection);
$query = "select whatever_id from yeah where oid = $oid";
$whatever_id = pg_exec($connection, $query) or
die(pg_last_error($connection));
$whatever_id = pg_result($whatever_id, 0, 0);

Same thing.

Different spelling.

They all do the same thing, pretty much, one way or another, no matter
which db you use.

And none of them match the other.

Well, okay, MS SQL and Sybase are probably the same, since MS bought
their code from Sybase originally.

And Oracle and SQL Server often end up supporting each other's syntax
oddities eventually, as one of them is trying to steal the other's
clients.

But God forbid they should just standardize on a single syntax/mechanism.

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some starving artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

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



Re: [PHP] Name Capitalization

2007-03-19 Thread Paul Novitski
Applying capitalization rules to names by itself is easy.  What 
defeats the effort is that there are no consistent rules for name 
capitalization, only inconsistent ones.  MacDonald and Macdonald are 
both common and are both correct.  de la Rosa, De la Rosa, De La 
Rosa, Delarosa.  Van der Berg, van der Berg, Van Der Berg, 
Vanderberg.  Mix dozens of languages with dozens of spelling 
conventions with Ellis Island and you've got that rich, chaotic human 
loam that's defiant to simplistic solutions.


I love parsing problems and would be happy to collaborate on a 
project, but name capitalization seems doomed.


Regards,

Paul
__

Paul Novitski
Juniper Webcraft Ltd.
http://juniperwebcraft.com 


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



Re: [PHP] Name Capitalization

2007-03-19 Thread Leonard Burton

HI Paul,

Thanks for the reply.


Applying capitalization rules to names by itself is easy.  What
defeats the effort is that there are no consistent rules for name
capitalization, only inconsistent ones.


What my case is that I have came across a list of names that I need to
use and all of the names were in caps.  From there anything is a step
in the right direction.

As you know, anytime you parse anything in bulk there will be
exceptions to the rule.

My goal would be to just pick the most common usage.  If von Dielengan
is supposed to be VonDielengan in one case or Von Dielengan in another
is ok, it can be manually retouched later.

The CPAN class that someone posted earlier has some good points except
its not in PHP.

I will be working on some code sometime over the next 3 to 5 days and
might send it to you if you are willing to look at it.

Also, this would be a good work around for those moogles that must use
ALL CAPS ALL THE TIME ;).  It could give them the choice to pick the
right capitalization.

Take Care,

--
Leonard Burton, N9URK
http://www.jiffyslides.com
[EMAIL PROTECTED]
[EMAIL PROTECTED]

"The prolonged evacuation would have dramatically affected the
survivability of the occupants."

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



Re: [PHP] Re: Getting last record ID created from DB

2007-03-19 Thread markw
> markw@mohawksoft.com wrote:
>>> markw@mohawksoft.com wrote:
> On Sat, 2007-03-17 at 12:19 -0400, Mark wrote:
>>
 There in lies the biggest problem with LAMP, and that's MySQL. The
 architecture of your methodology *only* works with MySQL, and not more
 capable databases like Oracle, DB2, or even PostgreSQL.
>>> I too thought the same thing, but was corrected when I starting working
>>> on a redesign for the billing system for the company that I am working
>>> for.  They use PostgreSQL and we do have a auto incremented unique id
>>> field.  It isn't call AUTO_INCREMENT, but rather a sequence value.  It
>>> is a value that is controlled by the default value entry.
>>>
>>> It then runs this:
>>> nextval('customers_customer_id_seq'::regclass)
>>>
>>> and uses this as the value of the id field for the newly inserted row.
>>
>> Yea, I've been using PG for over 10 years now. Sequences are awesome,
>> but
>> there have an "auto number" column type as well. It simply creates a
>> sequence but it's there.
>>
>> I guess maybe most databases support the notion of "auto number" in some
>> form. I haven't used MSSQL recently, but I think their solution is a
>> GUID.
>>
>>> Then instead of running a command like SELECT LAST_INSERT_ID(); you
>>> have
>>> to do some other stuff like this:
>>>
>>> $SQL = "SELECT currval('{$table}_{$column}_seq');";
>>
>> Again, this is absolutely wrong unless it is wrapped in a transaction.
>> You
>> will need a "begin" and a "commit" in an MVCC type system. If you don't
>> wrap it in a transaction you don't know who got the last "nextval" of
>> the
>> sequence.
>
> Check the documentation - currval returns the last one *for that
> session* - it does not return the last global change.
>
> http://www.postgresql.org/docs/current/static/functions-sequence.html
>
> It is perfectly safe to use this.

In theory that may be true, but can the application developer make any
assumption about the underlying architecture? Might you be familiar with
connection pooling? Where multiple threads or processes share a database
connection or "session?"

I'm not a web developer. I suck at PHP, I do know PHP, I've written a
number of PHP extensions, and have had my CVS account for about 8 years,
but I'm not a web developer. I'm an architect and it is problematic when
applications developers make assumptions about things that can change.


Open source is about more than simply getting the supposed job done, it is
about getting it done right too. It is about using best methods. And yes,
it is about ego and pride about doing it better.

In every profession there are many things that work within a limited range
of use, but break down quickly when the situations change subtly. A
professional knows their "craft" well enough to anticipate these things.

The authors of too many open source / GPL PHP projects take the easy way
out and ignore the larger architectural issues that would make their
projects more widely usable. How long did it take bugzilla to support
PostgreSQL? How any PHP projects on sourceforge are tied to MySQL instead
of being flexible?

Developers, either proprietary or OS/GPL, seek to create software of
lasting value. If you choose to limit your software design, then you limit
its value.


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



Re: [PHP] Re: Getting last record ID created from DB

2007-03-19 Thread Chris

markw@mohawksoft.com wrote:

markw@mohawksoft.com wrote:

markw@mohawksoft.com wrote:

On Sat, 2007-03-17 at 12:19 -0400, Mark wrote:

There in lies the biggest problem with LAMP, and that's MySQL. The
architecture of your methodology *only* works with MySQL, and not more
capable databases like Oracle, DB2, or even PostgreSQL.

I too thought the same thing, but was corrected when I starting working
on a redesign for the billing system for the company that I am working
for.  They use PostgreSQL and we do have a auto incremented unique id
field.  It isn't call AUTO_INCREMENT, but rather a sequence value.  It
is a value that is controlled by the default value entry.

It then runs this:
nextval('customers_customer_id_seq'::regclass)

and uses this as the value of the id field for the newly inserted row.

Yea, I've been using PG for over 10 years now. Sequences are awesome,
but
there have an "auto number" column type as well. It simply creates a
sequence but it's there.

I guess maybe most databases support the notion of "auto number" in some
form. I haven't used MSSQL recently, but I think their solution is a
GUID.


Then instead of running a command like SELECT LAST_INSERT_ID(); you
have
to do some other stuff like this:

$SQL = "SELECT currval('{$table}_{$column}_seq');";

Again, this is absolutely wrong unless it is wrapped in a transaction.
You
will need a "begin" and a "commit" in an MVCC type system. If you don't
wrap it in a transaction you don't know who got the last "nextval" of
the
sequence.

Check the documentation - currval returns the last one *for that
session* - it does not return the last global change.

http://www.postgresql.org/docs/current/static/functions-sequence.html

It is perfectly safe to use this.


In theory that may be true, but can the application developer make any
assumption about the underlying architecture? Might you be familiar with
connection pooling? Where multiple threads or processes share a database
connection or "session?"


If the developers of the database say it's safe, then I'm happy to take 
their word on it. If you can prove otherwise, please do so and post a 
bug report to them. In this case, tons of people are using connection 
pooling with postgres. If a problem had been discovered, then they would 
have complained and it would have been fixed.


Do I need to evaluate every section of code that a 3rd party provides to 
make sure the code does what the docs say it should? I'd never get 
anything done. At some point I just need to know how to use it and trust 
it works as it should. If it's a super critical application (eg 
financial information) where integrity is 100% required, then I'd test 
it. If I found a problem then I'd complain *shrug*.


As Richard mentioned in another reply, the developers (whether it's 
mysql or postgres or "other") have taken a lot of pain to make sure 
these things work properly.


Why would I try and do exactly the same thing myself and most likely get 
it completely wrong?



The rest of your rant I agree with in theory, but making something 
"flexible" is extremely difficult unless you understand what you're 
trying to accomplish from the beginning - and know each system well 
enough to know how each one works and the differences between them. Not 
even "LIMIT" is standard across databases let alone anything else like 
data types ('int(11)' compared to 'int', 'datetime' compared to 
'timestamp' etc etc etc) or even date formats that they store.


Taking all of that into account from the very beginning is pretty tough.

--
Postgresql & php tutorials
http://www.designmagick.com/

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



Re: [PHP] Name Capitalization

2007-03-19 Thread Paul Novitski

At 3/19/2007 07:17 PM, Leonard Burton wrote:

What my case is that I have came across a list of names that I need to
use and all of the names were in caps.  From there anything is a step
in the right direction.

As you know, anytime you parse anything in bulk there will be
exceptions to the rule.

My goal would be to just pick the most common usage.  If von Dielengan
is supposed to be VonDielengan in one case or Von Dielengan in another
is ok, it can be manually retouched later.

The CPAN class that someone posted earlier has some good points except
its not in PHP.

I will be working on some code sometime over the next 3 to 5 days and
might send it to you if you are willing to look at it.



Sure, it sounds like fun.  I've written de-cap routines before for 
whole addresses, names included.  It's an amusing challenge to 
whittle down the error rate.


I'll be interested to compare notes on strategies for implementing 
this efficiently in PHP.


Regards,

Paul
__

Paul Novitski
Juniper Webcraft Ltd.
http://juniperwebcraft.com 


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



Re: [PHP] Re: Getting last record ID created from DB

2007-03-19 Thread Robert Cummings
On Mon, 2007-03-19 at 23:58 -0400, markw@mohawksoft.com wrote:
>
> I'm not a web developer. I suck at PHP, I do know PHP, I've written a
> number of PHP extensions, and have had my CVS account for about 8 years,
> but I'm not a web developer. I'm an architect and it is problematic when
> applications developers make assumptions about things that can change.

Application developers must make the assumption that the documentation
they are reading is correct.

> 
> Open source is about more than simply getting the supposed job done, it is
> about getting it done right too. It is about using best methods. And yes,
> it is about ego and pride about doing it better.

Open source is about whatever the developer wants it to be about
provided their source is open. If that happens to coincide with your
vision fine, if not then it is still open source according to their
vision.

> In every profession there are many things that work within a limited range
> of use, but break down quickly when the situations change subtly. A
> professional knows their "craft" well enough to anticipate these things.

That depends on what aspect of the definition of profession you choose
to focus upon. I think that most professionals are such by virtue of
doing what they do by way of a profession, not necessarily by way of
being an expert.

> The authors of too many open source / GPL PHP projects take the easy way
> out and ignore the larger architectural issues that would make their
> projects more widely usable. How long did it take bugzilla to support
> PostgreSQL? How any PHP projects on sourceforge are tied to MySQL instead
> of being flexible?

This depends on the focus of the developer/development team. Supporting
multiple databases is a choice, that they can make at the expense of
other features. There's a 1 to 1 time trade here. They can choose to
support postgres as you say, or they can choose to add some other
feature that their thousands of MySQL fans want. The very nature of open
source allows Joe Coder to add Postgres support himself if it is that
important to him. if he doesn't have the skill, then it's time for him
to learn or suck it in and quit whining.

> Developers, either proprietary or OS/GPL, seek to create software of
> lasting value. If you choose to limit your software design, then you limit
> its value.

Value is such a subjective concept. What you suggest is that open source
developers should have to support every database platform out there so
that their user base can have lasting value in the event that they
should choose to suddenly switch to some other db platform than the one
the project creator originally cared about. It all comes down to one
man's trash being another man's treasure. If a bugzilla user never
wanted to switch to postgres then they've had lasting value regardless
of the missing feature.

Cheers,
Rob.
-- 
..
| InterJinn Application Framework - http://www.interjinn.com |
::
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for   |
| creating re-usable components quickly and easily.  |
`'

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



Re: [PHP] install problems

2007-03-19 Thread jekillen


On Mar 19, 2007, at 5:58 PM, Chris wrote:


jekillen wrote:

On Mar 18, 2007, at 10:54 PM, Chris wrote:

jekillen wrote:

Hello;
Well, this one I cannot seem to figure out:
I installed Apache 1.3.37 with
./configure --enable-module=so --enable-module=rewrite 
--enable-shared=max

Then tried to install
php 5.2.1 --with-apxs=/usr/local/apache/bin etc etc
libphp5.so is no where to be found. It sure is not
in apache/libexec


Did you run 'make' ?

Running configure doesn't create this file, 'make' does.

A rather obvious question but I couldn't see whether you ran it or 
not.



Yes, I did, an oversight on my part not to mention it.


Just wanted to check :)

After 'make' you should have a libs/libphp5.a and/or libs/libphp5.so

No need to do the 'make install' step if those files don't get created 
(depending on your configure options you may only get one of them, but 
there should be something created there).


If you're not getting them at all, does 'make' finish properly - ie do 
you get:



Build complete.
(It is safe to ignore warnings about tempnam and tmpnam).


as the last two lines?


Yes
I rm'd everything related to php and went and got a copy of php 5.1.2 
and tried that with the same

list of ./configure options read into ./configure from a file:
--with-apxs=/usr/local/sbin/apxs \
--with-openssl \
--with-zlib \
--enable-bcmath \
--with-gd \
--with-jpeg-dir \
--with-freetype-dir \
--with-ttf \
--enable-gd-native-ttf \
--with-mcrypt \
--with-mysql \
--with-mysql-sock \
--without-sqlite \
--with-regex=php
and the same thing happened.
It should be in /usr/local/libexec with all the other Apache modules, 
right?

find found nada.
I have done this twice before on FreeBSD v6.0 with out this trauma.
I subscribed to the install list to see what someone might have to say 
there.

Jeff K

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



Re: [PHP] References challenge with PHP4

2007-03-19 Thread Lluis Pamies

En/na Jochem Maas ha escrit:

Lluis Pamies wrote:

I've the following code:

 1 a = &$a;
 6   }
 7
 8   function run() {
 9 print "{$this->a->msg}\n";
 10   }
 11 }
 12
 13 class A {
 14   function A() {
 15 $this->b = new B(&$this);
 16   }
 17
 18   function &getInstance() {
 19 static $inst;
 20 if(!isset($inst)) $inst = new A();


if(!isset($inst)) $inst =& new A();


 21 return $inst;
 22   }
 23
 24   function run() {
 25 $this->b->run();
 26   }
 27 }
 28
 29 $a = &A::getInstance();
 30 $a->msg = "Hello world !";
 31
 32 // Some tasks, flow control, scope changes, ...
 33
 34 $a = &A::getInstance();
 35 print "{$a->msg}\n"; // This should print "Hello world !"
 36 $a->run(); // This should print "Hello world !"
 37
 38 ?>

My problem is that I don't know what I need to do in order to print
the same value in lines 35 and 36. Line 35 prints "Hello world !", but
in the 36 nothing appears.  What I'm doing wrong ?

Thanks for all !



Have you tried this ?
In my php4 installation it doesn't work !

$ php4 -version
PHP 4.4.2-1.1 (cli) (built: Jun 20 2006 02:33:21)
Copyright (c) 1997-2006 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies

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