Re: [PHP] Best way to sort?

2004-06-06 Thread Burhan Khalid
Brian Dunning wrote:
I'm not sure if this is a complex SQL query or a PHP array sorting 
thing, but what's the best way to take this data:

  Tom
  Greg
  Brian
  Tom
  Brian
  Tom
And return the following results, sorted by number of records:
  Tom - 3
  Brian - 2
  Greg - 1
Any thoughts?
I'm not a SQL expert, but try :
select field, count(field) from TableName
group by field
having count(*) > 1
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Multiple URL Redirection

2004-06-06 Thread Marek Kilimajer
[EMAIL PROTECTED] wrote:
Hi I have the following situation:
I've got a domain that is hosted at a certain host. This host allows me
to create subdomains, and also to add several domains to the same account.
The thing is if I add a domain like xxx.com to my yyy.com both will be directed
to my index.php page. I want to know if there is a way to recognize if the
user typed to the url xxx.om or yyy.com and then send it to a certain folder.
I thank any word of wisdom from you guys.
Rodrigo
You can also use mod_rewrite
Untested:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^(www\.)?yyy\.com
RewriteRule ^(.*)$ /yyy/$1
RewriteCond %{HTTP_HOST} ^(www\.)?xxx\.com
RewriteRule ^(.*)$ /xxx/$1
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Session Garbage Collection (session.gc_maxlifetime)

2004-06-06 Thread Marek Kilimajer
coopster wrote:
Do I need to change the session.save_path directive for each virtual 
host to use their own directory other than the system and/or PHP default 
(/tmp) in order to effectively override each virtual host 
session.gc_maxlifetime directive?
Yes. But I did not read bellow ;-)
Let me offer an example for clarification.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] "lasso" (a bit 0T)

2004-06-06 Thread Roddie Grant
on 30/5/04 6:59 pm, Ryan A at [EMAIL PROTECTED] wrote:

> Hey,
> A prospective client has asked me to try to convert his Swedish site so that
> visitors have a choice between Swedish and English, which is not a problem
> as I am fluent in both languages. After going through the site to convert I
> was just checking out the current pages and I saw that all the links have a
> .lasso extension instead of the "normal" .htm,.html,.php etc
> 
> Did a quick search on google and found this
> http://store.blueworld.com/lp7.lasso
> 
> sure looks like the same stuff but am not sure...
> 
> Anybody here worked with Lasso? any suggestions or comments?
> 
> Thanks,
> -Ryan


Hi Ryan

Lasso is a flourishing middleware program that does much the same job as
PHP. Its downside is that it is proprietry (owned by Blue World) so you have
to pay for it, and ISP charges are higher. The upside is that it is
generally (everyone - please don't start a war over this!) quicker to
develop in Lasso than PHP. It is more tag based than PHP, so probably less
intimidating to HTML programmers than PHP is. For example if constructions
look like this:
> if:(condition);
>   code here;
> /if;
You must close with the /if; but you don't get tied up in lots of {} pairs.

It is also generally (no war please!) much more secure than PHP. Or rather
the security is built in, and access can be set even on a tag by tag basis.
(I'm a PHP novice, so can't fully compare the two).

Its roots are in FileMaker, and it is still likely to be the best way to get
a Filemaker database on-line, but don't let that fool you. Since Mac OSX
came along, Lasso comes with an integrated version of MySQL and can connect
to stand-alone installations of MySQL directly (and other databases
indirectly I believe). It's very powerful and has  OO capabilities.

That's enough about Lasso on a PHP list. If you want to know more, by all
means email me off list, or join LassoTalk (email to
[EMAIL PROTECTED]).

Roddie Grant
[EMAIL PROTECTED]

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



[PHP] asp.net vs. php

2004-06-06 Thread Kathleen Ballard
I have been asked to make a fact based comparison of
the pros and cons of asp.net and php.  I am not trying
to start a war and apologize if this is too off topic,
but I know make of the list members work in other
coding languages.

Three areas of concern are robustness, scalability and
development time.  Also important is the availability
of existing code (goes to development time).  I have
experience in asp and php, but have only read about
.net.  One big difference seems to be that .net is
event driven vs. php which is increasingly oo.

I am a bit concerned that I will be too biased in my
judgement, because if immediate development time is
considered, I will have to pass and lose a potentially
good client.  I am sure I can get up to speed quickly
in .net, but not quickly enough to answer immediate
needs.

Any experiences, links to online articles and
discussions would be welcome.

Kathleen

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



Re: [PHP] generating graphs

2004-06-06 Thread Nitin
At last I've decided to upgrade it.
Could you please tell me, which version is best candidate yet to upgrade to?
And the procedure to upgrade with tar..

Thanks in advance


"Thomas Seifert" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> On Sat, 5 Jun 2004 19:31:34 +0530 [EMAIL PROTECTED] (Nitin) wrote:
>
> > thanks for the help, but my PHP ver is 4.0.6...
> > Any other suggestions??
> >
>
> hmm, upgrade? :)
>
> really, its worth it!
>
>
> thomas
>
> -- 
> 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] [OT?] Apache/PHP error/warning(s)

2004-06-06 Thread PHP LIsts
Hi list

I can understand the difference between 'world writable' and 'writable
by the webserver' in concept, but how would I go about manipulating
these variables?

Specifically, theses are error reports generated when setting up
eGroupware (sourceforge.net)

Thanks in advance.

Stuart

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



[PHP] Re: [OT?] Apache/PHP error/warning(s)

2004-06-06 Thread Thomas Seifert
Php Lists wrote:
Hi list
I can understand the difference between 'world writable' and 'writable
by the webserver' in concept, but how would I go about manipulating
these variables?
Specifically, theses are error reports generated when setting up
eGroupware (sourceforge.net)
Thanks in advance.
Stuart
'man chmod'
should help you.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Difficult SQL (for me) - please help!

2004-06-06 Thread Brian Dunning
THANKS!!  :)  :)
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] asp.net vs. php

2004-06-06 Thread Curt Zirzow
* Thus wrote Kathleen Ballard ([EMAIL PROTECTED]):
> I have been asked to make a fact based comparison of
> the pros and cons of asp.net and php.  I am not trying
> to start a war and apologize if this is too off topic,
> but I know make of the list members work in other
> coding languages.

Here is a 191 documents related to php vs. asp:

http://groups.google.com/groups?q=asp+vs+php&meta=group%3Dphp.general

GGIYF


Curt
-- 
"I used to think I was indecisive, but now I'm not so sure."

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



Re: [PHP] asp.net vs. php

2004-06-06 Thread Aidan Lister
Hehe Curt, point made :)

"Curt Zirzow" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> * Thus wrote Kathleen Ballard ([EMAIL PROTECTED]):
> > I have been asked to make a fact based comparison of
> > the pros and cons of asp.net and php.  I am not trying
> > to start a war and apologize if this is too off topic,
> > but I know make of the list members work in other
> > coding languages.
>
> Here is a 191 documents related to php vs. asp:
>
> http://groups.google.com/groups?q=asp+vs+php&meta=group%3Dphp.general
>
> GGIYF
>
>
> Curt
> -- 
> "I used to think I was indecisive, but now I'm not so sure."

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



RE: [PHP] asp.net vs. php

2004-06-06 Thread chris
Curt, I know  you're well meaning, but ASP.old has nothing to do with
ASP.NET, so much of what  you provided is irrelevant. I just finished a
largish .NET project and will follow with a response to Kathleen's question.

-chris

-Original Message-
From: Curt Zirzow [mailto:[EMAIL PROTECTED] 
Sent: Sunday, June 06, 2004 7:51 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] asp.net vs. php


* Thus wrote Kathleen Ballard ([EMAIL PROTECTED]):
> I have been asked to make a fact based comparison of
> the pros and cons of asp.net and php.  I am not trying
> to start a war and apologize if this is too off topic,
> but I know make of the list members work in other
> coding languages.

Here is a 191 documents related to php vs. asp:

http://groups.google.com/groups?q=asp+vs+php&meta=group%3Dphp.general

GGIYF


Curt
-- 
"I used to think I was indecisive, but now I'm not so sure."

-- 
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] asp.net vs. php

2004-06-06 Thread raditha dissanayake
chris wrote:
Curt, I know  you're well meaning, but ASP.old has nothing to do with
ASP.NET, so much of what  you provided is irrelevant.
Curt's point is very valid none the less.  just replace asp with asp.net 
when searching.

* Thus wrote Kathleen Ballard ([EMAIL PROTECTED]):
 

I have been asked to make a fact based comparison of
the pros and cons of asp.net and php.  I am not trying
to start a war and apologize if this is too off topic,
but I know make of the list members work in other
coding languages.
   

Here is a 191 documents related to php vs. asp:
http://groups.google.com/groups?q=asp+vs+php&meta=group%3Dphp.general
 


--
Raditha Dissanayake.
-
http://www.raditha.com/megaupload/upload.php
Sneak past the PHP file upload limits.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP] asp.net vs. php

2004-06-06 Thread chris
and you'll find that there is not a comprehensive comparison. Don't be so
quick to assume that someone hasn't done their homework. I've the spent the
past 6 months learning .NET and searching for comprehensive discussions of
how it compares to other web development approaches. I can assure you that
there are very few comprehensive ROI or technical comparisons being made. 

There are, however, plenty of .02 about m$ and open source.

-Original Message-
From: raditha dissanayake [mailto:[EMAIL PROTECTED] 
Sent: Sunday, June 06, 2004 9:12 AM
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] asp.net vs. php


chris wrote:

>Curt, I know  you're well meaning, but ASP.old has nothing to do with 
>ASP.NET, so much of what  you provided is irrelevant.
>
Curt's point is very valid none the less.  just replace asp with asp.net 
when searching.

>
>* Thus wrote Kathleen Ballard ([EMAIL PROTECTED]):
>  
>
>>I have been asked to make a fact based comparison of
>>the pros and cons of asp.net and php.  I am not trying
>>to start a war and apologize if this is too off topic,
>>but I know make of the list members work in other
>>coding languages.
>>
>>
>
>Here is a 191 documents related to php vs. asp:
>
>http://groups.google.com/groups?q=asp+vs+php&meta=group%3Dphp.general
>
>  
>


-- 
Raditha Dissanayake.
-
http://www.raditha.com/megaupload/upload.php
Sneak past the PHP file upload limits.

-- 
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] religius war: was:Re: [PHP] asp.net vs. php

2004-06-06 Thread raditha dissanayake
chris wrote:
and you'll find that there is not a comprehensive comparison. Don't be so
quick to assume that someone hasn't done their homework. I've the spent the
past 6 months learning .NET and searching for comprehensive discussions of
how it compares to other web development approaches. I can assure you that
there are very few comprehensive ROI or technical comparisons being made. 
 

You have in turn assumed that i am not familiar with .net, my first 
encounter was more than 2 years ago.
In any case it's futile  talking about aps.net vs php in this list for 
the obvious reason that 99% of the people on this list are PHP enthusiasts.

--
Raditha Dissanayake.
-
http://www.raditha.com/megaupload/upload.php
Sneak past the PHP file upload limits.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re[2]: [PHP] asp.net vs. php

2004-06-06 Thread Richard Davey
Hello Chris,

Sunday, June 6, 2004, 5:27:31 PM, you wrote:

c> and you'll find that there is not a comprehensive comparison. Don't be so
c> quick to assume that someone hasn't done their homework. I've the spent the
c> past 6 months learning .NET and searching for comprehensive discussions of
c> how it compares to other web development approaches. I can assure you that
c> there are very few comprehensive ROI or technical comparisons being made.

c> There are, however, plenty of .02 about m$ and open source.

It's a bit of a non-starter from the outset though. The .NET framework
is vast and extends well beyond the confines that PHP operates within.
To compare them on a single web level would be relatively pointless,
not to say misleading for both parties concerned. I don't believe
there is anything that compares to the .NET framework as a whole, other
than maybe Java. So if you want accurate comparisons that would be
the place to look. Anyone who thinks ASP.NET is even remotely similar
to ASP just doesn't understand what .NET is about. Yet comparing PHP
with ASP is a perfectly valid exercise in terms of cost benefits, ROI,
development times, etc.

These are, however, just my .02 worth - though I have used the .NET
framework (specifically C#) commercially for nearly 4 years (and PHP
for considerably longer than that).

Best regards,

Richard Davey
-- 
 http://www.launchcode.co.uk - PHP Development Services
 "I am not young enough to know everything." - Oscar Wilde

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



[PHP] mkdir after mkdir

2004-06-06 Thread Gerben
Hello,

I have a problem with the mkdir function.
I'm trying to make a seperate folder every photoalbum. inside I want to
create another folder ('.../thumbnails/') for, you can guess, the
thumbnails.

At first it didn't work at all:

>Warning: mkdir() failed (Permission denied) in
/home/virtual/site43/fst/var/www/html/beheer/albums/index.php on line 42

When I changed the rights of the folder I wanted to create the new folder in
to chmod 0777, the first MKDIR did work, but the second did not.

>SAFE MODE Restriction in effect. The script whose uid is 1042 is not
allowed to access
/home/virtual/site43/fst/var/www/html/uploaded/images/albums/album_0 owned
by uid 48 in /home/virtual/site43/fst/var/www/html/beheer/albums/index.php
on line 43

this is very strange because the folders are both made in the same script.
Another strange thing is that I user mkdir($dir, 0777), but when I look at
the created folder it is 0755 and I can not change it.

That's pritty much my problem. Your help would be very much appreciated.

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



Re: [PHP] mkdir after mkdir

2004-06-06 Thread Daniel Clark
I think PHP and mkdir() is using the web servers rights.   So the web server would 
need rights to create directories.

>>Hello,
>>
>>I have a problem with the mkdir function.
>>I'm trying to make a seperate folder every photoalbum. inside I want to
>>create another folder ('.../thumbnails/') for, you can guess, the
>>thumbnails.
>>
>>At first it didn't work at all:
>>
>>>Warning: mkdir() failed (Permission denied) in
>>/home/virtual/site43/fst/var/www/html/beheer/albums/index.php on line 42
>>
>>When I changed the rights of the folder I wanted to create the new folder in
>>to chmod 0777, the first MKDIR did work, but the second did not.
>>
>>>SAFE MODE Restriction in effect. The script whose uid is 1042 is not
>>allowed to access
>>/home/virtual/site43/fst/var/www/html/uploaded/images/albums/album_0 owned
>>by uid 48 in /home/virtual/site43/fst/var/www/html/beheer/albums/index.php
>>on line 43
>>
>>this is very strange because the folders are both made in the same script.
>>Another strange thing is that I user mkdir($dir, 0777), but when I look at
>>the created folder it is 0755 and I can not change it.
>>
>>That's pritty much my problem. Your help would be very much appreciated.

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



Re: [PHP] mkdir after mkdir

2004-06-06 Thread Marek Kilimajer
Gerben wrote:
Hello,
I have a problem with the mkdir function.
I'm trying to make a seperate folder every photoalbum. inside I want to
create another folder ('.../thumbnails/') for, you can guess, the
thumbnails.
At first it didn't work at all:

Warning: mkdir() failed (Permission denied) in
/home/virtual/site43/fst/var/www/html/beheer/albums/index.php on line 42
When I changed the rights of the folder I wanted to create the new folder in
to chmod 0777, the first MKDIR did work, but the second did not.

SAFE MODE Restriction in effect. The script whose uid is 1042 is not
allowed to access
/home/virtual/site43/fst/var/www/html/uploaded/images/albums/album_0 owned
by uid 48 in /home/virtual/site43/fst/var/www/html/beheer/albums/index.php
on line 43
this is very strange because the folders are both made in the same script.
Another strange thing is that I user mkdir($dir, 0777), but when I look at
the created folder it is 0755 and I can not change it.
That's pritty much my problem. Your help would be very much appreciated.
The first directory your script creates is owned by the uid apache runs 
under (48 in your case). Safe mode allows access only to files and 
directories owned by the uid of the executing script (1042 in your case).

The workaround is to use ftp functions to create the directories. Simply 
 use your ftp username and password to login to localhost and create 
the directories.

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


Re: [PHP] mkdir after mkdir

2004-06-06 Thread Gerben
I have those rights since the first dir is created. the problem is that the
2nd is not created

"Daniel Clark" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I think PHP and mkdir() is using the web servers rights.   So the web
server would need rights to create directories.
>
> >>Hello,
> >>
> >>I have a problem with the mkdir function.
> >>I'm trying to make a seperate folder every photoalbum. inside I want to
> >>create another folder ('.../thumbnails/') for, you can guess, the
> >>thumbnails.
> >>
> >>At first it didn't work at all:
> >>
> >>>Warning: mkdir() failed (Permission denied) in
> >>/home/virtual/site43/fst/var/www/html/beheer/albums/index.php on line 42
> >>
> >>When I changed the rights of the folder I wanted to create the new
folder in
> >>to chmod 0777, the first MKDIR did work, but the second did not.
> >>
> >>>SAFE MODE Restriction in effect. The script whose uid is 1042 is not
> >>allowed to access
> >>/home/virtual/site43/fst/var/www/html/uploaded/images/albums/album_0
owned
> >>by uid 48 in
/home/virtual/site43/fst/var/www/html/beheer/albums/index.php
> >>on line 43
> >>
> >>this is very strange because the folders are both made in the same
script.
> >>Another strange thing is that I user mkdir($dir, 0777), but when I look
at
> >>the created folder it is 0755 and I can not change it.
> >>
> >>That's pritty much my problem. Your help would be very much appreciated.

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



Re: [PHP] mkdir after mkdir

2004-06-06 Thread Gerben
Unfortunately my server has no ftp (but SSH).
It makes much sence what you said, but how can PHP (with uid=48) make a
directory with uid=1042.
both folder are (to be) made the same script, but only one is (with
uid=1042).

This is what makes it very peculiar.
I think I have skip the idea of creating 2 nested folders.

Thanks anyway

"Marek Kilimajer" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Gerben wrote:
> > Hello,
> >
> > I have a problem with the mkdir function.
> > I'm trying to make a seperate folder every photoalbum. inside I want to
> > create another folder ('.../thumbnails/') for, you can guess, the
> > thumbnails.
> >
> > At first it didn't work at all:
> >
> >
> >>Warning: mkdir() failed (Permission denied) in
> >
> > /home/virtual/site43/fst/var/www/html/beheer/albums/index.php on line 42
> >
> > When I changed the rights of the folder I wanted to create the new
folder in
> > to chmod 0777, the first MKDIR did work, but the second did not.
> >
> >
> >>SAFE MODE Restriction in effect. The script whose uid is 1042 is not
> >
> > allowed to access
> > /home/virtual/site43/fst/var/www/html/uploaded/images/albums/album_0
owned
> > by uid 48 in
/home/virtual/site43/fst/var/www/html/beheer/albums/index.php
> > on line 43
> >
> > this is very strange because the folders are both made in the same
script.
> > Another strange thing is that I user mkdir($dir, 0777), but when I look
at
> > the created folder it is 0755 and I can not change it.
> >
> > That's pritty much my problem. Your help would be very much appreciated.
> >
>
> The first directory your script creates is owned by the uid apache runs
> under (48 in your case). Safe mode allows access only to files and
> directories owned by the uid of the executing script (1042 in your case).
>
> The workaround is to use ftp functions to create the directories. Simply
>   use your ftp username and password to login to localhost and create
> the directories.
>
> HTH

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



[PHP] Intalling PHP 4.3.7 with PGSQL support and Heimdal

2004-06-06 Thread Robert Fitzpatrick
Trying to portupgrade my PHP 4.3.6 package with PostgreSQL 7.4.2 support and getting 
this error below. Trying to setup postgresql with Heimdal Kerberos 5 support, believe 
I have, but not tried anything with it, yet.

/usr/local/lib/libpq.so: undefined reference to `krb5_cc_get_principal'
/usr/local/lib/libpq.so: undefined reference to `krb5_sname_to_principal'
/usr/local/lib/libpq.so: undefined reference to `krb5_cc_default'
/usr/local/lib/libpq.so: undefined reference to `krb5_cc_close'
/usr/local/lib/libpq.so: undefined reference to `error_message'
/usr/local/lib/libpq.so: undefined reference to `krb5_free_error'
/usr/local/lib/libpq.so: undefined reference to `krb5_sendauth'
/usr/local/lib/libpq.so: undefined reference to `krb5_free_principal'
/usr/local/lib/libpq.so: undefined reference to `krb5_unparse_name'
/usr/local/lib/libpq.so: undefined reference to `krb5_free_context'
/usr/local/lib/libpq.so: undefined reference to `krb5_init_context'
*** Error code 1

Stop in /usr/ports/lang/php4/work/php-4.3.7.

I've posted this around a few weeks ago on some lists and still no success. I had a 
suggestion to add lines to the spec file, but not sure which file that is. Seems PHP 
is having a problem with the PGSQL support and its libraries for krb5. Nonetheless, 
from the looks of the Makefile for postgresql, everything should be there for it to 
build with krb5 support. I receive no errors when building or installing posgresql 
with heimdal support and have tried 'make deinstall' and 'make reinstall'. I have the 
WITH_HEIMDAL_KRB5, HEIMDAL_HOME is set to /usr/local where it resides with libs and 
includes. Someone also suggested adding a -lkrb5, but again, I have not been able to 
figure out where to place this setting in the file. Should I add it to the line that 
produces the error building PHP above (I think the libtool command) or in the 
postgresql Makefile.

esmtp# ldd /usr/local/bin/psql
/usr/local/bin/psql:
libpq.so.3 => /usr/local/lib/libpq.so.3 (0x28096000)
libkrb5.so.20 => /usr/local/lib/libkrb5.so.20 (0x280b2000)
...

Anyone know where I can make these changes needed or what to try next?

--
Robert

Re: [PHP] mkdir after mkdir

2004-06-06 Thread Kevin Murphy
I'm still kind of a newbie at this, but couldn't you accomplish this by 
doing each MKDIR separately with a series of ELSE/IF statements. The 
basic logic would be:

Check if parent DIR exists.
If not, create one and then go on
If yes:
Check if Child DIR Exists
If Not, Create one,
if yes, go on
Etc.
--
Kevin Murphy
Web Designer - Stubborn Donkey Productions
www.stubborndonkey.com
On Jun 6, 2004, at 11:08 AM, Gerben wrote:
Unfortunately my server has no ftp (but SSH).
It makes much sence what you said, but how can PHP (with uid=48) make a
directory with uid=1042.
both folder are (to be) made the same script, but only one is (with
uid=1042).
This is what makes it very peculiar.
I think I have skip the idea of creating 2 nested folders.
Thanks anyway
"Marek Kilimajer" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
Gerben wrote:
Hello,
I have a problem with the mkdir function.
I'm trying to make a seperate folder every photoalbum. inside I want 
to
create another folder ('.../thumbnails/') for, you can guess, the
thumbnails.

At first it didn't work at all:

Warning: mkdir() failed (Permission denied) in
/home/virtual/site43/fst/var/www/html/beheer/albums/index.php on 
line 42

When I changed the rights of the folder I wanted to create the new
folder in
to chmod 0777, the first MKDIR did work, but the second did not.

SAFE MODE Restriction in effect. The script whose uid is 1042 is not
allowed to access
/home/virtual/site43/fst/var/www/html/uploaded/images/albums/album_0
owned
by uid 48 in
/home/virtual/site43/fst/var/www/html/beheer/albums/index.php
on line 43
this is very strange because the folders are both made in the same
script.
Another strange thing is that I user mkdir($dir, 0777), but when I 
look
at
the created folder it is 0755 and I can not change it.
That's pritty much my problem. Your help would be very much 
appreciated.

The first directory your script creates is owned by the uid apache 
runs
under (48 in your case). Safe mode allows access only to files and
directories owned by the uid of the executing script (1042 in your 
case).

The workaround is to use ftp functions to create the directories. 
Simply
  use your ftp username and password to login to localhost and create
the directories.

HTH
--
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] 2 Websites on 1 url

2004-06-06 Thread jos.de.nijs
Hello there,

I'm looking for some code to split a website that is hosted on one server.

For example: I have the domain www.firstone.com and www.secondone.nl
They're both hosted at one provider. So far no problems. The ISP makes the
changes in the dns and when you type in the urls you'll arrive at the same
website's index.html

But, I want to create a separate entrance for the english part of the
website and a separate entrance for the dutch website.

I know there is some javascript to do this, but hey ! Who wants to use that
 ?

Can anyone help me out with this one ?

Jos de Nijs

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



[PHP] Re: 2 Websites on 1 url

2004-06-06 Thread Torsten Roehr
"Jos De Nijs" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hello there,
>
> I'm looking for some code to split a website that is hosted on one server.
>
> For example: I have the domain www.firstone.com and www.secondone.nl
> They're both hosted at one provider. So far no problems. The ISP makes the
> changes in the dns and when you type in the urls you'll arrive at the same
> website's index.html
>
> But, I want to create a separate entrance for the english part of the
> website and a separate entrance for the dutch website.
>
> I know there is some javascript to do this, but hey ! Who wants to use
that
>  ?
>
> Can anyone help me out with this one ?

This was discussed earlier today in another thread. Go to the list archive
and look out for "Multiple URL Redirection":
http://marc.theaimsgroup.com/?l=php-general&r=1&b=200406&w=2

Regards,

Torsten Roehr

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



Re: [PHP] mkdir after mkdir

2004-06-06 Thread Marek Kilimajer
Gerben wrote:
Unfortunately my server has no ftp (but SSH).
It makes much sence what you said, but how can PHP (with uid=48) make a
directory with uid=1042.
both folder are (to be) made the same script, but only one is (with
uid=1042).
This is what makes it very peculiar.
I think I have skip the idea of creating 2 nested folders.
Ask your hosting company to install ftp server (and ftp support in php) 
that is at least accessible from localhost. Otherwise you will have to 
give up the idea of creating folders whatsoever as you will not be able 
to copy images to those folders. Or change your host.

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


Re: [PHP] Intalling PHP 4.3.7 with PGSQL support and Heimdal

2004-06-06 Thread Marek Kilimajer
Robert Fitzpatrick wrote:
Trying to portupgrade my PHP 4.3.6 package with PostgreSQL 7.4.2 support and getting 
this error below. Trying to setup postgresql with Heimdal Kerberos 5 support, believe 
I have, but not tried anything with it, yet.
/usr/local/lib/libpq.so: undefined reference to `krb5_cc_get_principal'
/usr/local/lib/libpq.so: undefined reference to `krb5_sname_to_principal'
/usr/local/lib/libpq.so: undefined reference to `krb5_cc_default'
/usr/local/lib/libpq.so: undefined reference to `krb5_cc_close'
/usr/local/lib/libpq.so: undefined reference to `error_message'
/usr/local/lib/libpq.so: undefined reference to `krb5_free_error'
/usr/local/lib/libpq.so: undefined reference to `krb5_sendauth'
/usr/local/lib/libpq.so: undefined reference to `krb5_free_principal'
/usr/local/lib/libpq.so: undefined reference to `krb5_unparse_name'
/usr/local/lib/libpq.so: undefined reference to `krb5_free_context'
/usr/local/lib/libpq.so: undefined reference to `krb5_init_context'
*** Error code 1
Stop in /usr/ports/lang/php4/work/php-4.3.7.
I've posted this around a few weeks ago on some lists and still no success. I had a 
suggestion to add lines to the spec file, but not sure which file that is. Seems PHP 
is having a problem with the PGSQL support and its libraries for krb5. Nonetheless, 
from the looks of the Makefile for postgresql, everything should be there for it to 
build with krb5 support. I receive no errors when building or installing posgresql 
with heimdal support and have tried 'make deinstall' and 'make reinstall'. I have the 
WITH_HEIMDAL_KRB5, HEIMDAL_HOME is set to /usr/local where it resides with libs and 
includes. Someone also suggested adding a -lkrb5, but again, I have not been able to 
figure out where to place this setting in the file. Should I add it to the line that 
produces the error building PHP above (I think the libtool command) or in the 
postgresql Makefile.
Add -lkrb5 to LDFLAGS variable in the Makefile.
And please don't crosspost
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Get Column Names for mySQL...

2004-06-06 Thread Russell P Jones
How would one cycle through and get all of the column names in a mysql
table?

say that i have...

id | title | name | description
1  | MR.   | russ | age XX height XX
2  | MRS.  | jan  | age XX height XXX


and I want to print out the 4 column names...

how would one accomplish this?

Russ

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



Re: [PHP] Get Column Names for mySQL...

2004-06-06 Thread Marek Kilimajer
Russell P Jones wrote:
How would one cycle through and get all of the column names in a mysql
table?
say that i have...
id | title | name | description
1  | MR.   | russ | age XX height XX
2  | MRS.  | jan  | age XX height XXX
and I want to print out the 4 column names...
how would one accomplish this?
Russ
This will get you started:
mysql_query('DESCRIBE table_name');
Please don't hijack threads.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Get Column Names for mySQL...

2004-06-06 Thread John W. Holmes
Russell P Jones wrote:
How would one cycle through and get all of the column names in a mysql
table?
say that i have...
id | title | name | description
1  | MR.   | russ | age XX height XX
2  | MRS.  | jan  | age XX height XXX
and I want to print out the 4 column names...
how would one accomplish this?
Either parse the results of a "DESC tablename" query or use the 
mysql_list_fields() function.

--
---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/
php|architect: The Magazine for PHP Professionals – www.phparch.com

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


Re: [PHP] Newbie question about good coding practice [isset]

2004-06-06 Thread Justin Patrin
Curt Zirzow wrote:
* Thus wrote K.Bogac Bokeer ([EMAIL PROTECTED]):
When $var is 0?

or
  $var = '';
  $var = array();
  $var = false;

 // Output: $var: $var not exists
 if ( $var )
   echo '$var: $var exists';
 else


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


Re: [PHP] generating graphs

2004-06-06 Thread Justin Patrin
It depends on what you're running it on. Linux (which flavor), Unix 
(which onw?), Mac OS X, Windows

Nitin wrote:
At last I've decided to upgrade it.
Could you please tell me, which version is best candidate yet to upgrade to?
And the procedure to upgrade with tar..
Thanks in advance
"Thomas Seifert" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
On Sat, 5 Jun 2004 19:31:34 +0530 [EMAIL PROTECTED] (Nitin) wrote:

thanks for the help, but my PHP ver is 4.0.6...
Any other suggestions??
hmm, upgrade? :)
really, its worth it!
thomas
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

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


[PHP] Re: Multiple URL Redirection

2004-06-06 Thread Justin Patrin
[EMAIL PROTECTED] wrote:
Hi I have the following situation:
I've got a domain that is hosted at a certain host. This host allows me
to create subdomains, and also to add several domains to the same account.
The thing is if I add a domain like xxx.com to my yyy.com both will be directed
to my index.php page. I want to know if there is a way to recognize if the
user typed to the url xxx.om or yyy.com and then send it to a certain folder.
I thank any word of wisdom from you guys.
Rodrigo
Or, if they'll do it, you can have your provider set up a virtualhost in 
apache for each of the subdomains. That's really the best way to do 
it... It seems strange to me that they would give you subdomains but not 
 the ability to give them different content...

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


Re: [PHP] Refresh Page

2004-06-06 Thread Chris Shiflett
--- Mike Mapsnac <[EMAIL PROTECTED]> wrote:
> I want to refresh page every 10 seconds, without clicking on
> "Refresh" button.

Use the Refresh header:

header('Refresh: 10; url=http://example.org/foo.php');

Hope that helps.

Chris

=
Chris Shiflett - http://shiflett.org/

PHP Security - O'Reilly
 Coming Fall 2004
HTTP Developer's Handbook - Sams
 http://httphandbook.org/
PHP Community Site
 http://phpcommunity.org/

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



[PHP] Doubling up...

2004-06-06 Thread rjones
Using the code below, im getting a problem where it is printing out TWO 
of each field value instead of one...

For example, a table like

id | name | age

1  | russ | 22
2  | jon  | 23


would print out for the first row...

11russruss


any ideas on whats going wrong? THanks in advance, and thanks to all 
who helped out w/ my last question. answered it in a second!

--

$query = "SELECT * FROM volunteers"; 
$result = mysql_query($query);
while($row = mysql_fetch_array($result)){ 

echo '';

foreach($row as $key=>$value) 

{ echo '' . $value . '';}

echo '';


} 

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



Re: [PHP] Doubling up...

2004-06-06 Thread John W. Holmes
[EMAIL PROTECTED] wrote:
Using the code below, im getting a problem where it is printing out TWO 
of each field value instead of one...
[snip]
while($row = mysql_fetch_array($result)){ 
fetch_array returns an array where the indexes are numeric and where 
they are the column names. So $row has four elements in it. You're 
seeing exactly what should happen. Use fetch_row() or fetch_assoc() 
instead.

--
---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/
php|architect: The Magazine for PHP Professionals – www.phparch.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Intalling PHP 4.3.7 with PGSQL support and Heimdal

2004-06-06 Thread Robert Fitzpatrick
On Sun, 2004-06-06 at 16:49, Marek Kilimajer wrote:
> Robert Fitzpatrick wrote:
> > Trying to portupgrade my PHP 4.3.6 package with PostgreSQL 7.4.2 support and 
> > getting this error below. Trying to setup postgresql with Heimdal Kerberos 5 
> > support, believe I have, but not tried anything with it, yet.
> > 
> > /usr/local/lib/libpq.so: undefined reference to `krb5_cc_get_principal'
> > /usr/local/lib/libpq.so: undefined reference to `krb5_sname_to_principal'
> > /usr/local/lib/libpq.so: undefined reference to `krb5_cc_default'
> > /usr/local/lib/libpq.so: undefined reference to `krb5_cc_close'
> > /usr/local/lib/libpq.so: undefined reference to `error_message'
> > /usr/local/lib/libpq.so: undefined reference to `krb5_free_error'
> > /usr/local/lib/libpq.so: undefined reference to `krb5_sendauth'
> > /usr/local/lib/libpq.so: undefined reference to `krb5_free_principal'
> > /usr/local/lib/libpq.so: undefined reference to `krb5_unparse_name'
> > /usr/local/lib/libpq.so: undefined reference to `krb5_free_context'
> > /usr/local/lib/libpq.so: undefined reference to `krb5_init_context'
> > *** Error code 1
> > 
> > Stop in /usr/ports/lang/php4/work/php-4.3.7.
> > 
> > I've posted this around a few weeks ago on some lists and still no success. I had 
> > a suggestion to add lines to the spec file, but not sure which file that is. Seems 
> > PHP is having a problem with the PGSQL support and its libraries for krb5. 
> > Nonetheless, from the looks of the Makefile for postgresql, everything should be 
> > there for it to build with krb5 support. I receive no errors when building or 
> > installing posgresql with heimdal support and have tried 'make deinstall' and 
> > 'make reinstall'. I have the WITH_HEIMDAL_KRB5, HEIMDAL_HOME is set to /usr/local 
> > where it resides with libs and includes. Someone also suggested adding a -lkrb5, 
> > but again, I have not been able to figure out where to place this setting in the 
> > file. Should I add it to the line that produces the error building PHP above (I 
> > think the libtool command) or in the postgresql Makefile.
> > 
> 
> Add -lkrb5 to LDFLAGS variable in the Makefile.

Thanks, I tried and it doesn't seem to help. This is in the Makefile
now. I am trying this when building PostgreSQL, do the links shown in my
last post to psql show the libs are setup correctly after installation
of PostgreSQL? I have WITH_HEIMDAL_KRB5 set to 'yes' and
/usr/bin/krb5-config is a symlink to /usr/local/bin/krb5-config which
has the correct locations for libs and includes.

.if defined(WITH_HEIMDAL_KRB5)
KRB5CONF=   /usr/bin/krb5-config
WITH_KRB5=  yes
.endif

.include 
.if defined(WITH_KRB5)
CONFIGURE_ARGS+=--with-krb5="`${KRB5CONF} --prefix krb5`"
LDFLAGS+=   `${KRB5CONF} --libs krb5`
CONFIGURE_ENV=  LDFLAGS="${LDFLAGS}"
.endif

That should set things up, but if I add LDFLAGS+=`-lkrb5`, I get an
error.

> 
> And please don't crosspost

Sorry, won't do.

-- 
Robert

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



[PHP] ini_get

2004-06-06 Thread Dennis Gearon
CC me please.
Does anyone know if ini_get returns the values BEFORE or AFTER the 
.htaccess modifies them? i.e., does it return the server or local version?

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


Re: [PHP] help needed with tiger tree hashes

2004-06-06 Thread Carl S. in 't Veld
Ah yes! Thanks, I see the problem; I have to switch the 8-byte chunks in
byte-order! (Why is Directconnect doing this...)
Thanks for your help. Greetings, Carl.

"Thijs Lensselink" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> check: http://www.cs.technion.ac.il/~biham/Reports/Tiger/testresults.html
> The results you posted seem to be right.
>
> Carl S. in 't Veld wrote on vrijdag 4 juni 2004 0:52:
>
> > I am trying to generate tiger tree hashes the same way as
> > directconnect does, but I am failing.
> >
> > I checked the output from php with the reference vectors from
> > http://www.cs.technion.ac.il/~biham...ssie-format.dat
> > and they appear to be different!
> >
> > echo bin2hex(mhash(MHASH_TIGER, 'abc'))."\n";
> > outputs
> > f258c1e88414ab2a527ab541ffc5b8bf935f7b951c132951
> > instead of
> > 2AAB1484E8C158F2BFB8C5FF41B57A525129131C957B5F93
> >
> > and, for example,
> > echo bin2hex(mhash(MHASH_TIGER, 'message digest'))."\n";
> > outputs
> > 951a2078cbf881d91c441e754830cf0df6295aa51aca7f51
> > instead of
> > D981F8CB78201A950DCF3048751E441C517FCA1AA55A29F6
> >
> > What am I doing wrong here?

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



Re: [PHP] Intalling PHP 4.3.7 with PGSQL support and Heimdal

2004-06-06 Thread Marek Kilimajer
Robert Fitzpatrick wrote:
On Sun, 2004-06-06 at 16:49, Marek Kilimajer wrote:
Robert Fitzpatrick wrote:
Trying to portupgrade my PHP 4.3.6 package with PostgreSQL 7.4.2 support and getting 
this error below. Trying to setup postgresql with Heimdal Kerberos 5 support, believe 
I have, but not tried anything with it, yet.
/usr/local/lib/libpq.so: undefined reference to `krb5_cc_get_principal'
/usr/local/lib/libpq.so: undefined reference to `krb5_sname_to_principal'
/usr/local/lib/libpq.so: undefined reference to `krb5_cc_default'
/usr/local/lib/libpq.so: undefined reference to `krb5_cc_close'
/usr/local/lib/libpq.so: undefined reference to `error_message'
/usr/local/lib/libpq.so: undefined reference to `krb5_free_error'
/usr/local/lib/libpq.so: undefined reference to `krb5_sendauth'
/usr/local/lib/libpq.so: undefined reference to `krb5_free_principal'
/usr/local/lib/libpq.so: undefined reference to `krb5_unparse_name'
/usr/local/lib/libpq.so: undefined reference to `krb5_free_context'
/usr/local/lib/libpq.so: undefined reference to `krb5_init_context'
*** Error code 1
Stop in /usr/ports/lang/php4/work/php-4.3.7.
I've posted this around a few weeks ago on some lists and still no success. I had a 
suggestion to add lines to the spec file, but not sure which file that is. Seems PHP 
is having a problem with the PGSQL support and its libraries for krb5. Nonetheless, 
from the looks of the Makefile for postgresql, everything should be there for it to 
build with krb5 support. I receive no errors when building or installing posgresql 
with heimdal support and have tried 'make deinstall' and 'make reinstall'. I have the 
WITH_HEIMDAL_KRB5, HEIMDAL_HOME is set to /usr/local where it resides with libs and 
includes. Someone also suggested adding a -lkrb5, but again, I have not been able to 
figure out where to place this setting in the file. Should I add it to the line that 
produces the error building PHP above (I think the libtool command) or in the 
postgresql Makefile.
Add -lkrb5 to LDFLAGS variable in the Makefile.

Thanks, I tried and it doesn't seem to help. This is in the Makefile
now. I am trying this when building PostgreSQL, do the links shown in my
last post to psql show the libs are setup correctly after installation
of PostgreSQL? I have WITH_HEIMDAL_KRB5 set to 'yes' and
/usr/bin/krb5-config is a symlink to /usr/local/bin/krb5-config which
has the correct locations for libs and includes.
.if defined(WITH_HEIMDAL_KRB5)
KRB5CONF=   /usr/bin/krb5-config
WITH_KRB5=  yes
.endif
.include 
.if defined(WITH_KRB5)
CONFIGURE_ARGS+=--with-krb5="`${KRB5CONF} --prefix krb5`"
LDFLAGS+=   `${KRB5CONF} --libs krb5`
CONFIGURE_ENV=  LDFLAGS="${LDFLAGS}"
.endif
That should set things up, but if I add LDFLAGS+=`-lkrb5`, I get an
error.

Is /usr/local/lib in /etc/ld.so.conf file?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Array keys referencing value from another array key???

2004-06-06 Thread Gerard Samuel
Not sure if the subject was worded correctly, but
I was looking to see if this (or something like it) is possible.

$array = array('key_1' => 'This is some text',
'key_2' => '' .  $array['key_1'] . ''
  );

And the array structure would be something like ->
array('key_1' => 'This is some text',
 'key_2' => 'This is some text')

Just wanted to see if it were possible, as my attempts were futile.
Its not a requirement on my end, just wanted to see if it were possible... :)

Thanks

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



Re: [PHP] Array keys referencing value from another array key???

2004-06-06 Thread Marek Kilimajer
Gerard Samuel wrote:
Not sure if the subject was worded correctly, but
I was looking to see if this (or something like it) is possible.
$array = array('key_1' => 'This is some text',
'key_2' => '' .  $array['key_1'] . ''
  );
And the array structure would be something like ->
array('key_1' => 'This is some text',
 'key_2' => 'This is some text')
Just wanted to see if it were possible, as my attempts were futile.
Its not a requirement on my end, just wanted to see if it were possible... :)
Thanks
It is possible in 2 steps:
1. create the array:
$array = array('key_1' => 'This is some text');
2. Add the second key:
$array['key_2'] => '' .  $array['key_1'] . '';
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] A follow up on my question about good coding practice [isset]

2004-06-06 Thread Al
I could use one additional clarification regarding good practice.
As I understand the php manual the following is acceptable.
$foo= TRUE;
if($foo) do..  ;
where $foo is a binary; but not a variable.
Use isset($var) for variables and be careful with $var= ' '; etc.  
because $var is assigned, i.e., "set". 

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


[PHP] Help installing imagick

2004-06-06 Thread Robert Duran
PHP 4.3.6
Image Magick 5.5.7
imagick 0.9.10
OS: Mac OS X (10.3.4)
  I'm trying to install imagick so that I can use ImageMagick functions 
in PHP.  I was using GD, but I need to load images from TIFF and write 
thumbnails in jpeg with added text.  I had it all working with jpegs, 
but got stumped on reading in full sized TIFF images with GD.

  I've been using PHP 4.3.6 for a while and have successfully worked 
with GD and installed a module for openbase support.   I'm totally 
stumped with imagick however.  It seems I just can't get PHP to 
recognize that the imagick module is installed.
  The installation instructions include:

1) make sure the path to Magick-config (the ImageMagick configuration
   script) is in your PATH environment variable
2) cd /usr/src/php/ext
3) untar the imagick tar
4) if the directory created is anything other then imagick, rename it to
   imagick
5) cd /usr/src/php/ext/imagick
6) phpize
7) cd /usr/src/php
8) rm ./configure
9) ./buildconf
10) run configure as you normally would and add --with-imagick
If Imagemagick is installed in a non standard dir, add this dir to 
--with-im
agick=dir
If you want GraphicsMagick instead of ImageMagick as backend, add 
--with-ima
gick-gm
11) make
12) make install

  When I go thru these steps, phpinfo shows no reference to imagick.  
Yes, I used --with-imagick and tried --with-imagick= as well.
  I've noticed when I rebuild the configure file, there is no reference 
in it for imagick.  Conversely, there ARE references for my openbase 
module, so I am assuming the problem is in the module installation 
itself (i.e. telling php that the module exists).  Is that the job of 
phpize?

  Any help would be appreciated.
Robert
p.s. During the install process I never got errors, but did get a few 
warnings that look like they are just complaining about doing things 
the "old way":

./buildconf --force
Forcing buildconf
using default Zend directory
buildconf: checking installation...
buildconf: autoconf version 2.57 (ok)
buildconf: Your version of autoconf likely contains buggy cache code.
   Running cvsclean for you.
   To avoid this, install autoconf-2.13 and automake-1.5.
buildconf: libtool version 1.5 (ok)
rebuilding configure
rebuilding main/php_config.h.in
WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot'
WARNING: and `config.h.top', to define templates for `config.h.in'
WARNING: is deprecated and discouraged.
WARNING: Using the third argument of `AC_DEFINE' and
WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without
WARNING: `acconfig.h':
WARNING:   AC_DEFINE([NEED_MAIN], 1,
WARNING: [Define if a function `main' is needed.])
WARNING: More sophisticated templates can also be produced, see the
WARNING: documentation.
-
Robert Duran
[EMAIL PROTECTED]
-
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Dynamic Function Call

2004-06-06 Thread [-^-!-%-

Hello everyone!

I'm trying to call a class method dynamically, but keep getting a SYNTAX
ERROR. Can anyone shed some light on this? Is this impossible?

==The Code

function &modCall($_class){
  $this->LoadClass($_class);   //LoadClass includes the class file, but
   //does not initialize it.

  //if the class has the method, then call it.

  if(in_array('sayHello',get_class_methods($_class)){

   $_class::sayHello();

   // this line reports a syntax error with $_class::sayHello()
   // but (assuming the value of $_class was 'myClass')
   // myClass::sayHello() works!

  }

//I've also tried the following:
//   ${_class)::sayHello();
//   {$_class}::sayHello();
//   $_class.'::sayHello()';

}

Any suggestions!






=P e p i e  D e s i g n s
 www.pepiedesigns.com
 Providing Solutions That Increase Productivity

 Web Developement. Database. Hosting. Multimedia.

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



Re: [PHP] Help installing imagick

2004-06-06 Thread Galen
Hey, I hope I'm not stating the obvious, but last time I used 
ImageMagick (5.5.7 - in my receipts folder, I just checked) for use 
with PHP under Mac OS X, I just downloaded a package from 
http://entropy.ch/ and installed it and life was good. I think it's 
still up for download. No messing with tar or anything else - just 
simple, straightforward GUI installation.

Also, fink ( http://fink.sf.net/ ) can install ImageMagick for you. 
Personally, unless you have special needs, I would say to go for the 
.pkg installed from entropy.ch, but whatever works for you.

As far as the specific process you're working on, if you really want 
_that_ installation, somebody else will have to tell you how to make it 
work. I don't know the specific process off hand.

-Galen
On Jun 6, 2004, at 5:03 PM, Robert Duran wrote:
PHP 4.3.6
Image Magick 5.5.7
imagick 0.9.10
OS: Mac OS X (10.3.4)
  I'm trying to install imagick so that I can use ImageMagick 
functions in PHP.  I was using GD, but I need to load images from TIFF 
and write thumbnails in jpeg with added text.  I had it all working 
with jpegs, but got stumped on reading in full sized TIFF images with 
GD.

  I've been using PHP 4.3.6 for a while and have successfully worked 
with GD and installed a module for openbase support.   I'm totally 
stumped with imagick however.  It seems I just can't get PHP to 
recognize that the imagick module is installed.
  The installation instructions include:

1) make sure the path to Magick-config (the ImageMagick configuration
   script) is in your PATH environment variable
2) cd /usr/src/php/ext
3) untar the imagick tar
4) if the directory created is anything other then imagick, rename it 
to
   imagick
5) cd /usr/src/php/ext/imagick
6) phpize
7) cd /usr/src/php
8) rm ./configure
9) ./buildconf
10) run configure as you normally would and add --with-imagick
If Imagemagick is installed in a non standard dir, add this dir to 
--with-im
agick=dir
If you want GraphicsMagick instead of ImageMagick as backend, add 
--with-ima
gick-gm
11) make
12) make install

  When I go thru these steps, phpinfo shows no reference to imagick.  
Yes, I used --with-imagick and tried --with-imagick= as well.
  I've noticed when I rebuild the configure file, there is no 
reference in it for imagick.  Conversely, there ARE references for my 
openbase module, so I am assuming the problem is in the module 
installation itself (i.e. telling php that the module exists).  Is 
that the job of phpize?

  Any help would be appreciated.
Robert
p.s. During the install process I never got errors, but did get a few 
warnings that look like they are just complaining about doing things 
the "old way":

./buildconf --force
Forcing buildconf
using default Zend directory
buildconf: checking installation...
buildconf: autoconf version 2.57 (ok)
buildconf: Your version of autoconf likely contains buggy cache code.
   Running cvsclean for you.
   To avoid this, install autoconf-2.13 and automake-1.5.
buildconf: libtool version 1.5 (ok)
rebuilding configure
rebuilding main/php_config.h.in
WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot'
WARNING: and `config.h.top', to define templates for `config.h.in'
WARNING: is deprecated and discouraged.
WARNING: Using the third argument of `AC_DEFINE' and
WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without
WARNING: `acconfig.h':
WARNING:   AC_DEFINE([NEED_MAIN], 1,
WARNING: [Define if a function `main' is needed.])
WARNING: More sophisticated templates can also be produced, see the
WARNING: documentation.
-
Robert Duran
[EMAIL PROTECTED]
-
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: A follow up on my question about good coding practice [isset]

2004-06-06 Thread Ligaya Turmelle
how about:

if (trim($foo) != '')

Respectfully,
Ligaya Turmelle

"Al" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I could use one additional clarification regarding good practice.
>
> As I understand the php manual the following is acceptable.
>
> $foo= TRUE;
>
> if($foo) do..  ;
>
> where $foo is a binary; but not a variable.
>
> Use isset($var) for variables and be careful with $var= ' '; etc.
> because $var is assigned, i.e., "set".

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



[PHP] PHP5-Perl extension

2004-06-06 Thread Umesh Deshmukh
Hi,
(B
(BWe are using PHP5 on linux, basically we are interested in working with
(BPHP5-perl extension.
(BWe are using Movable Type library for blog. We have problem in using object
(Bof Movable Type (perl library) in PHP.
(B
(BCan anybody guide me on how to use Perl Object in PHP5.
(B
(BThanking in anticipation.
(B
(BRegards,
(B
(BUmesh.

[PHP] PHP + Multiple MySQL-4.0.20

2004-06-06 Thread Minuk Choi
I have a RedHat9 machine.

I needed to have multiple MySQL installations, so I removed the RPM
installation and did a binary installation of MySQL-4.0.20.  As it stands, I
have the following installations

/usr/local/mysql-4.0.20-webpage
/usr/local/mysql-4.0.20-exp
/usr/local/mysql-4.0.20-def

These are all the same BINARY installations of MySQL-4.0.20, I just need to
have 3 distinct set of mysql databases(along with their specific custom
database/tables).  It seems to have worked, as I can get the mysql instances
up and running.

BUT, I can't seem to make PHP access these databases.  More specifically,
phpMyAdmin-2.5.6 says

cannot load MySQL extension,
please check PHP Configuration.
Documentation

I haven't a clue as to how to resolve this.  My guess is, like the MySQL
RPM, uninstall it and do a non-RPM install...

If I get the source and run configure... it seems like the --with-mysql=
field only takes 1 mysql path.  What should I do in my case, where there are
3 paths, 3 sockets, and 3 ports on which mysql resides?

Thanks in advance,

-Minuk

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



RE: [PHP] mkdir after mkdir

2004-06-06 Thread Uttam
guess it has something to do with default directory rights for newly created
directories??

the directory 'x' gives your script permission to create directory under it.
so you are able to create directory 'y' inside 'x'.  but the newly created
directory 'y' does not gives your script permission to create subdirectory.

Regards,
-Original Message-
From: Gerben [mailto:[EMAIL PROTECTED]
Sent: Sunday, June 06, 2004 23:39
To: [EMAIL PROTECTED]
Subject: Re: [PHP] mkdir after mkdir


Unfortunately my server has no ftp (but SSH).
It makes much sence what you said, but how can PHP (with uid=48) make a
directory with uid=1042.
both folder are (to be) made the same script, but only one is (with
uid=1042).

This is what makes it very peculiar.
I think I have skip the idea of creating 2 nested folders.

Thanks anyway

"Marek Kilimajer" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Gerben wrote:
> > Hello,
> >
> > I have a problem with the mkdir function.
> > I'm trying to make a seperate folder every photoalbum. inside I want to
> > create another folder ('.../thumbnails/') for, you can guess, the
> > thumbnails.
> >
> > At first it didn't work at all:
> >
> >
> >>Warning: mkdir() failed (Permission denied) in
> >
> > /home/virtual/site43/fst/var/www/html/beheer/albums/index.php on line 42
> >
> > When I changed the rights of the folder I wanted to create the new
folder in
> > to chmod 0777, the first MKDIR did work, but the second did not.
> >
> >
> >>SAFE MODE Restriction in effect. The script whose uid is 1042 is not
> >
> > allowed to access
> > /home/virtual/site43/fst/var/www/html/uploaded/images/albums/album_0
owned
> > by uid 48 in
/home/virtual/site43/fst/var/www/html/beheer/albums/index.php
> > on line 43
> >
> > this is very strange because the folders are both made in the same
script.
> > Another strange thing is that I user mkdir($dir, 0777), but when I look
at
> > the created folder it is 0755 and I can not change it.
> >
> > That's pritty much my problem. Your help would be very much appreciated.
> >
>
> The first directory your script creates is owned by the uid apache runs
> under (48 in your case). Safe mode allows access only to files and
> directories owned by the uid of the executing script (1042 in your case).
>
> The workaround is to use ftp functions to create the directories. Simply
>   use your ftp username and password to login to localhost and create
> the directories.
>
> HTH

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