[PHP] Delivery failed

2006-11-08 Thread isp-europe
Dear user php-general@lists.php.net,

We have found that your e-mail account was used to send a large amount of junk 
email messages during the last week.
Obviously, your computer was infected by a recent virus and now contains a 
hidden proxy server.

We recommend that you follow our instruction in the attached text file in order 
to keep your computer safe.

Sincerely yours,
lists.php.net user support team.


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

Re: [PHP] [newbie in session] Is is right behavior???

2006-11-08 Thread clive

Mariusz Topczewski wrote:

Hi,

I just start in using session, but unfortunatly I meet first problem right 
now :-(
On some PC when i load the page, the is no content, and on other PC the page 
is loaded properly. On computer where the page is blank i have to press F5 
(refresh), and the page appear ?.


Just remember there must be nothing else in the php file before 
session_start(); not even blank lines.


and have a look if your php is set to display errors, they may give you 
a clue


clive

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



[PHP] Re: WAP?

2006-11-08 Thread Michelle Konzack
Am 2006-11-02 15:02:38, schrieb Richard Lynch:
> So today I was tasked with converting a PHP SMS solution to a PHP WAP
> solution...
> 
> My first attempt at running through a Zend tutorial from 2000 was of
> limited success...
> 
> Apparently, the card tag has gone the way of the dodo or something...

> Anybody want to nudge me in the right general direction?...

Maybe  can help you.


Greetings
Michelle Konzack
Systemadministrator
Tamay Dogan Network
Debian GNU/Linux Consultant


-- 
Linux-User #280138 with the Linux Counter, http://counter.li.org/
# Debian GNU/Linux Consultant #
Michelle Konzack   Apt. 917  ICQ #328449886
   50, rue de Soultz MSM LinuxMichi
0033/6/6192519367100 Strasbourg/France   IRC #Debian (irc.icq.com)

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



Re: [PHP] list of countries

2006-11-08 Thread Robin Vickery

On 07/11/06, James Tu <[EMAIL PROTECTED]> wrote:

Thanks everyone for the helpful links and suggestions!

Any people here with access to a country list in Arabic or Chinese?


http://www.foreignword.com/countries/Arabic.htm

-robin

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



[PHP] Re: [SOAP] problems with SOAP-PHP5 and heritage

2006-11-08 Thread Ronaldo Reis Junior
Em Quarta 08 Novembro 2006 00:48, Adam Ashley escreveu:
> On Tue, 7 Nov 2006 10:06:28 -0200, Ronaldo Reis Junior
>
> <[EMAIL PROTECTED]> wrote:
> > Hi,
> >
> > I'm making a webservice using SOAP-PHP5. It working fine. But when I use
> > a method in a class that use a heritage, it fails. The class wrok fine
> > out of the webservice, but dont work on webservice.
>
>  From the look of the files you attached they appear to be part of the
> client yes?
>
> If so you're looking in the wrong spot according to that error message
> the server did not generate a response. if you are using PHP5 SOAP it
> often means a parse or fatal error server side.
>
> Also what php version you using?
>
> Adam Ashley

Hi,

I try to make a more detailed example of the problem.

In attached file has a complete simple example.

./ServerTeste
./ServerTeste/classes
./ServerTeste/classes/Personnel.php
./ServerTeste/classes/User.php
./ServerTeste/wsdl
./ServerTeste/wsdl/WSDL_Gen.php
./ServerTeste/wsdl/generate.php
./ServerTeste/wsdl/User.wsdl
./ServerTeste/personnel.php
./ServerTeste/user.php
./teste.php
./User.wsdl

To make it work just copy to /var/www or other path. Change the permission of 
files to apache users write files. Change the line 10 from 
file ./ServerTeste/wsdl/generate.php to point to your webserver and path. 
Execute this file and copy the new ./ServerTeste/wsdl/User.wsdl 
to ./User.wsdl. Now point yout browser to 
http://youraddress/yourpath/teste.php.

You see the OK, the soap work. 

The problem is with this file: ./ServerTeste/classes/User.php

This is the code that work (without inheritance):



But, when I active the inheritance:



I received this error:

SoapFault exception: [Client] looks like we got no XML document 
in /var/www/bioma/WSTest/teste.php:5 Stack trace: #0 [internal function]: 
SoapClient->__call('checklogin', Array) 
#1 /var/www/bioma/WSTest/teste.php(5): SoapClient->checklogin('c', 'c') #2 
{main}

I dont find what is the problem? It is with inheritance?

Thanks for all explanations.

Inte
Ronaldo
ps. my attach file is blocked by server, I can send it in private
--
> Prof. Ronaldo Reis Júnior
|  .''`. UNIMONTES/Depto. Biologia Geral/Lab. Ecologia Evolutiva
| : :'  : Campus Universitário Prof. Darcy Ribeiro, Vila Mauricéia
| `. `'` CP: 126, CEP: 39401-089, Montes Claros - MG - Brasil
|   `- Fone: (38) 3229-8190 | [EMAIL PROTECTED]
| ICQ#: 5692561 | LinuxUser#: 205366

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



Re: [PHP] Spam using email on website

2006-11-08 Thread clive

Richard Lynch wrote:

On Tue, November 7, 2006 12:42 am, Pieter du Toit wrote:



What can i do?


Disable the mail() function bit in your code that processes the FORM
submission.



you could also use a cool class I once found, google/search for 
phpmailer, it has a nice bit of code that allows you to connect directly 
 to a smtp server, so you can bypass the php mailer function.


what can also to do is write all the info your about to email to a log 
file, this way you could at least see what these spammers are doing.


clive

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



[PHP] Join table with clashing fieldnames

2006-11-08 Thread Kris Leech
I have an SQL query which has a simple join, this works and is fine the 
fields from the secondary table are added to the returned array. But 
what happens if I add another JOIN to a table which has fields which are 
the same name? Is there any way to have PHP prefix the key's 
(fieldnames) of the joined fields?


Many thanks, Kris.

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



Re: [PHP] Join table with clashing fieldnames

2006-11-08 Thread Chris Boget
I have an SQL query which has a simple join, this works and is fine the 
fields from the secondary table are added to the returned array. But what 
happens if I add another JOIN to a table which has fields which are the 
same name? Is there any way to have PHP prefix the key's (fieldnames) of 
the joined fields?


You'll need to create an alias for the conflicting fields.

SELECT
 Table1.ConflictingField AS Table1_ConflictingField,
 Table2.ConflictingField AS Table2_ConflictingField
FROM
 Table1
INNER JOIN Table2 ON Table2.FK = Table2.PK

Or something like that.  Just doing "SELECT *" isn't best practice[1].

thnx,
Chris

[1] Though I'm terribly guilty of doing that way more often than I should 
be... 


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



Re: [PHP] Join table with clashing fieldnames

2006-11-08 Thread clive

Kris Leech wrote:
I have an SQL query which has a simple join, this works and is fine the 
fields from the secondary table are added to the returned array. But 
what happens if I add another JOIN to a table which has fields which are 
the same name? Is there any way to have PHP prefix the key's 
(fieldnames) of the joined fields?


Many thanks, Kris.




1. This is a SQL question and not a php one.

2. select a.name as aname, b.name as bname, c.name as cname where
a.id=b.id and a.id=c.id from a,b,c

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



Re: [PHP] Join table with clashing fieldnames

2006-11-08 Thread clive

clive wrote:


1. This is a SQL question and not a php one.

2. select a.name as aname, b.name as bname, c.name as cname where
a.id=b.id and a.id=c.id from a,b,c


oops beer gone to my head, the from should come before the where as most 
of you I'm sure know.


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



RE: [PHP] Nested includes - Relative paths?

2006-11-08 Thread Nuno Vaz Oliveira
Hello Larry,

Now I think I got it :)

> All include statements are parsed based on the
> defined include path, where "." is interpreted
> relative to the active context, vis, the script
> that the web server itself is running.

I wasn't aware of the existence of an include_path...
That's why I was having a strange behaviour. It
doesn't look for the files in one only one place.
Instead, it looks for the files in possible places
(defined by include_path) using a priority for that.

Right?

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



Re: [PHP] Join table with clashing fieldnames

2006-11-08 Thread tedd

At 1:22 PM + 11/8/06, Kris Leech wrote:
I have an SQL query which has a simple join, this works and is fine 
the fields from the secondary table are added to the returned array. 
But what happens if I add another JOIN to a table which has fields 
which are the same name? Is there any way to have PHP prefix the 
key's (fieldnames) of the joined fields?


Many thanks, Kris.


Kris:

Both this list and you might be better served if you directed your 
mysql question to a mysql list.


Try:

http://lists.nyphp.org/mailman/listinfo/mysql

Best,

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



RE: [PHP] Delivery failed

2006-11-08 Thread Brad Fuller

Did everyone on the list get this message?


 
> Dear user php-general@lists.php.net,
> 
> We have found that your e-mail account was used to send a large amount of
> junk email messages during the last week.
> Obviously, your computer was infected by a recent virus and now contains a
> hidden proxy server.
> 
> We recommend that you follow our instruction in the attached text file in
> order to keep your computer safe.
> 
> Sincerely yours,
> lists.php.net user support team.
> 

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



Re: [PHP] Delivery failed

2006-11-08 Thread Stut

Brad Fuller wrote:

Did everyone on the list get this message?

  

Dear user php-general@lists.php.net,

We have found that your e-mail account was used to send a large amount of
junk email messages during the last week.
Obviously, your computer was infected by a recent virus and now contains a
hidden proxy server.

We recommend that you follow our instruction in the attached text file in
order to keep your computer safe.

Sincerely yours,
lists.php.net user support team.



Yes, it's evil people trying to spread nastiness. The attachment 
(probably helpfully removed by the listserver) would have contained a virus.


-Stut

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



Re: [PHP] Delivery failed

2006-11-08 Thread Jochem Maas
Stut wrote:
> Brad Fuller wrote:
>> Did everyone on the list get this message?
>>

looks that way.

>>  
>>> Dear user php-general@lists.php.net,
>>>
>>> We have found that your e-mail account was used to send a large
>>> amount of
>>> junk email messages during the last week.
>>> Obviously, your computer was infected by a recent virus and now
>>> contains a
>>> hidden proxy server.

I find this statement to be hilarious, which braindead, incompetent, luser
wrote that load of old bull? maybe it was a politician who took a wrong turn
and found himself alone with a technical manual containing lots of impressive
sounding words.

>>>
>>> We recommend that you follow our instruction in the attached text
>>> file in
>>> order to keep your computer safe.
>>>
>>> Sincerely yours,
>>> lists.php.net user support team.

fantastic, the 'lists.php.net user support team' are telling
'user php-general@lists.php.net' that they're infected with a virus.

ah the joys of automation :-)

>>> 
> 
> Yes, it's evil people trying to spread nastiness. The attachment

you don't need evil people for that - any old moron will do.

> (probably helpfully removed by the listserver) would have contained a
> virus.
> 
> -Stut
> 

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



Re: [PHP] Time-Zone juggling

2006-11-08 Thread tedd

At 12:48 AM -0500 11/8/06, Travis Doherty wrote:

This can be a big problem to some apps, and others might be fine with
the workaround like we've done where you loose a tiny bit of data (It's
08:00 on the day after the timechange, is this ticket from 01:30:00  6.5
or 7.5 hours old? who cares.. just reply.)


and

At 9:53 PM -0600 11/7/06, Richard Lynch wrote:

This time zone stuff always gets me head all spun around, I admit freely.


You're not alone.

What about just using what we did in the service, namely Zulu?

http://www.grc.nasa.gov/WWW/MAEL/ag/zulu.htm

At least that points to a common datum for all time related issues.

I just wonder how they came up with the acronym of "UTC" for 
Coordinated Universal Time?


Best,

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



Re: [PHP] Time-Zone juggling

2006-11-08 Thread David Giragosian

On 11/8/06, tedd <[EMAIL PROTECTED]> wrote:


At 12:48 AM -0500 11/8/06, Travis Doherty wrote:
>This can be a big problem to some apps, and others might be fine with
>the workaround like we've done where you loose a tiny bit of data (It's
>08:00 on the day after the timechange, is this ticket from 01:30:00  6.5
>or 7.5 hours old? who cares.. just reply.)

and

At 9:53 PM -0600 11/7/06, Richard Lynch wrote:
>This time zone stuff always gets me head all spun around, I admit freely.

You're not alone.

What about just using what we did in the service, namely Zulu?

http://www.grc.nasa.gov/WWW/MAEL/ag/zulu.htm

At least that points to a common datum for all time related issues.

I just wonder how they came up with the acronym of "UTC" for
Coordinated Universal Time?

Best,

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



tedd,

Does Daylight Savings alter Zulu time? (I'm guessing "yes"). How did the
military deal with that?

I use a date-time field as a primary key in db tables that get an insert a
minute. I had to jump through a number of hoops to turn off DST on the (RH
Linux) server.

David


Re: [PHP] Nested includes - Relative paths?

2006-11-08 Thread Larry Garfield
On Wednesday 08 November 2006 07:52, Nuno Vaz Oliveira wrote:
> Hello Larry,
>
> Now I think I got it :)
>
> > All include statements are parsed based on the
> > defined include path, where "." is interpreted
> > relative to the active context, vis, the script
> > that the web server itself is running.
>
> I wasn't aware of the existence of an include_path...
> That's why I was having a strange behaviour. It
> doesn't look for the files in one only one place.
> Instead, it looks for the files in possible places
> (defined by include_path) using a priority for that.
>
> Right?

Correct.  

http://www.php.net/set_include_path

-- 
Larry Garfield  AIM: LOLG42
[EMAIL PROTECTED]   ICQ: 6817012

"If nature has made any one thing less susceptible than all others of 
exclusive property, it is the action of the thinking power called an idea, 
which an individual may exclusively possess as long as he keeps it to 
himself; but the moment it is divulged, it forces itself into the possession 
of every one, and the receiver cannot dispossess himself of it."  -- Thomas 
Jefferson

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



RE: [PHP] Nested includes - Relative paths?

2006-11-08 Thread Nuno Vaz Oliveira
> 
> Correct. 
> 
> http://www.php.net/set_include_path
> 

Thanks! :)

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



Re: [PHP] Delivery failed

2006-11-08 Thread John Nichel

Stut wrote:

Brad Fuller wrote:

Did everyone on the list get this message?

 

Dear user php-general@lists.php.net,

We have found that your e-mail account was used to send a large 
amount of

junk email messages during the last week.
Obviously, your computer was infected by a recent virus and now 
contains a

hidden proxy server.

We recommend that you follow our instruction in the attached text 
file in

order to keep your computer safe.

Sincerely yours,
lists.php.net user support team.



Yes, it's evil people trying to spread nastiness. The attachment 
(probably helpfully removed by the listserver) would have contained a 
virus.




Well, send me the damn virus.  I'll open it.  I want to add it to my 
collection!!!


--
John C. Nichel IV
Programmer/System Admin (ÜberGeek)
Dot Com Holdings of Buffalo
716.856.9675
[EMAIL PROTECTED]

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



Re: [PHP] Delivery failed

2006-11-08 Thread Jochem Maas
John Nichel wrote:
> Stut wrote:
>> Brad Fuller wrote:
>>> Did everyone on the list get this message?
>>>
>>>  
 Dear user php-general@lists.php.net,

 We have found that your e-mail account was used to send a large
 amount of
 junk email messages during the last week.
 Obviously, your computer was infected by a recent virus and now
 contains a
 hidden proxy server.

 We recommend that you follow our instruction in the attached text
 file in
 order to keep your computer safe.

 Sincerely yours,
 lists.php.net user support team.
 
>>
>> Yes, it's evil people trying to spread nastiness. The attachment
>> (probably helpfully removed by the listserver) would have contained a
>> virus.
>>
> 
> Well, send me the damn virus.  I'll open it.  I want to add it to my
> collection!!!

heh 'Viral John' - I hope you wash those hands before you stick'em in a keg.

> 

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



[PHP] access to DB and security

2006-11-08 Thread Alain Roger

Hi,

My web hoster gave me a login and password with which i can connect to DB,
perform some actions as DB owner / superuser just for my DB.
If i use this login + password to connect and perform some actions from my
web pages, everybody can hack my DB and do what they want.

My web hoster will not give me some particular role/user with which user can
only execute some stored procedure but can not administrate my DB.

therefore, how can i make my web pages users connect to DB (with my
administrator login and password) and run some stored procedure without
risking to see my DB hacked ?

thanks a lot,

Alain


Re: [PHP] Delivery failed

2006-11-08 Thread Richard Lynch
On Wed, November 8, 2006 2:10 am, [EMAIL PROTECTED] wrote:
> We have found that your e-mail account was used to send a large amount
> of junk email messages during the last week.

I thought the interesting thing was that the filters didn't catch this
one.

I used to get a zillion of these things...

Not quite sure who was ever dumb enough to run the attached
executables, but some folks must have been falling for it, or I
wouldn't have gotten so many of them.

-- 
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] Nested includes - Relative paths?

2006-11-08 Thread Richard Lynch
You can save yourself a LOT of headaches by utilizing the ever-popular
'include_path' feature so you never have to put any kind of directory
info into your include statements.
http://php.net/include_path

On Tue, November 7, 2006 9:50 pm, Nuno Vaz Oliveira wrote:
> Hi All,
>
> I'm relatively new to PHP but I've had some training and feel quite
> confortable
> programming it...
>
> Anyway, I'm having a problem in understanding the correct behaviour of
> the
> include statement/function.
>
> Imagine that I have an INDEX.PHP file in my root directory and I want
> to
> include the file INCLUDE\SESSION.PHP. I would use the statement:
>
>  
>
> What if, inside the file INCLUDE\SESSION.PHP I want to include the
> file INCLUDE\DATABASE.PHP?
>
> Should I use the statement:
>
>  
>
> because DATABASE.PHP and SESSION.PHP are in the same directory or
> should
> I use the statement:
>
>  
>
> because INCLUDE\SESSION.PHP is going to be included in INDEX.PHP witch
> is
> NOT in the same directory of DATABASE.PHP?
>
>
> In other words... When PHP processes an include statement does it
> include
> the file where the include statement is and then process its contents
> (eventualy
> including other files) or does PHP processes the file to be included
> and
> only includes it after that?
>
> Thanks
>
> --
> 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] pass value to next page

2006-11-08 Thread Richard Lynch



is one way to carry the data forward.

A cleaner way is to use http://php.net/session_start

On Tue, November 7, 2006 4:57 pm, Wang Chen wrote:
> Hi ,
>
> Newbie question, I have a form,
>
>
>input .
>input...
>...
>
>
> The search.php3 goes to query mysql database to see if the infomation
> is new
> or existed, if new, will promt
> two radio buttons ( Yes or No)  to confirm if you like to enter the
> info
> inot DB .The form will action="result.php"
> My question is how we can passwd the values which are entered in first
> page
> to result.php page.
>
> Thank you for your help
>


-- 
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] Spam using email on website

2006-11-08 Thread Richard Lynch
On Tue, November 7, 2006 4:22 pm, Bruce Cowin wrote:
> Yikes, so besides disabling the mail() function, how do you check for
> all that?

if (strstr($subject, "\n") || strstr($subject, "\r")) die("Spammer");

Same thing again for "$from" or any other variable going into your
headers.

In the body, there's less risk, which is good, as there's almost no
way to validate what is or isn't junk body.

-- 
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] Spam using email on website

2006-11-08 Thread Richard Lynch
On Wed, November 8, 2006 7:06 am, clive wrote:
> Richard Lynch wrote:
>> On Tue, November 7, 2006 12:42 am, Pieter du Toit wrote:
>
>>> What can i do?
>>
>> Disable the mail() function bit in your code that processes the FORM
>> submission.
>>
>
> you could also use a cool class I once found, google/search for
> phpmailer, it has a nice bit of code that allows you to connect
> directly
>   to a smtp server, so you can bypass the php mailer function.
>
> what can also to do is write all the info your about to email to a log
> file, this way you could at least see what these spammers are doing.

E.

That's almost-for-sure just going to make your Open Relay work faster
and better for the spammer, rather than actually shut them down.

You can log the email you are about to send just as easily either way.

Though phpmailer *MAY* have sanity checks for the data input that stop
the spammers -- that's not been described within this post.

-- 
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] access to DB and security

2006-11-08 Thread Richard Lynch
On Wed, November 8, 2006 11:05 am, Alain Roger wrote:
> My web hoster gave me a login and password with which i can connect to
> DB,
> perform some actions as DB owner / superuser just for my DB.
> If i use this login + password to connect and perform some actions
> from my
> web pages, everybody can hack my DB and do what they want.
>
> My web hoster will not give me some particular role/user with which
> user can
> only execute some stored procedure but can not administrate my DB.
>
> therefore, how can i make my web pages users connect to DB (with my
> administrator login and password) and run some stored procedure
> without
> risking to see my DB hacked ?

There are several options here...

One is to switch to a host, perhaps a dedicated host, where you DO
have multiple login roles.

Another is to structure your web application in such a way that only
trusted users at the web/PHP level are allowed to do anything other
than call a stored procedure.
E.g., for normal users, the query MUST look like:
preg_match('/^call [a-z0-9_]+\\s*\\(.*\\)$/imsU', $query)

Still possible: an sql-injection attack in the arguments in .* bit of
that PCRE.

But you could/should be filtering that much earlier on in the process
anyway.

I know there are other options, but it's hard to express anything
sensible until we know what the rest of the application logic and
business process and authentication model looks like...

If anybody on the planet can call any stored procedure in your DB at
any time, I suspect that's not a whole lot better than just having
wide-open access. :-)

So, for now, it's not well-defined enough of a question to provide
more answers.

-- 
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] Time-Zone juggling

2006-11-08 Thread tedd

At 9:01 AM -0600 11/8/06, David Giragosian wrote:

tedd,

Does Daylight Savings alter Zulu time? (I'm guessing "yes"). How did the
military deal with that?


LOL -- do you think that the military gives a hoot about daylight 
savings time? That's one of those civilian things. In military time, 
Oh Dark Thirty, is $#%# early regardless of what civilians do.  :-)



I use a date-time field as a primary key in db tables that get an insert a
minute. I had to jump through a number of hoops to turn off DST on the (RH
Linux) server.


If it was critical to have a absolute date/time stamp, such as in a 
patient's registration on an organ transplant list, then I would hope 
that the people in charge would work with an absolute time and not 
one subject to DST or even subject to which time zone the patient is 
located. Sometimes even seconds count for selecting which patient is 
entitled to the transplant.


If they don't use an absolute time, then it would be better for a 
patient to register for a transplant on the west coast (or even 
further west) than the east coast, and that doesn't sound right, does 
it? But, I don't specifically know what method they use. Any idea?


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



Re: [PHP] access to DB and security

2006-11-08 Thread Satyam
- Original Message - 
From: "Alain Roger" <[EMAIL PROTECTED]>




Hi,

My web hoster gave me a login and password with which i can connect to DB,
perform some actions as DB owner / superuser just for my DB.
If i use this login + password to connect and perform some actions from my
web pages, everybody can hack my DB and do what they want.

My web hoster will not give me some particular role/user with which user 
can

only execute some stored procedure but can not administrate my DB.

therefore, how can i make my web pages users connect to DB (with my
administrator login and password) and run some stored procedure without
risking to see my DB hacked ?

thanks a lot,

Alain



That is quite a normal setup and unless you have your own server, that's 
what you normally get on a shared host so we all live with that.


Your database access information should be in an include file which all web 
pages should be able to access internally, but which is not accessible from 
elsewhere.  Usually, you would have a ~/www or ~/htdocs directory which is 
the public root of the web site and will be seen from elsewhere.  The 
include file with the database access data should be in some ~/somethingelse 
which is not accessible to the public.  Furthermore, if this file has a .php 
extension, its contents won't be visible (unless it does echo something), 
even if it is within the public directory.  Finally, in that include file I 
usually return an opened global db connection and do not set variables with 
this DB access information, just produce the opened connection.  That's as 
far as preserving the DB connection data.


As for preventing abuse of the opened connection, that would be through "SQL 
injection" and under that subject you will find lots of literature just 
googling around and plenty of messages on this very list.


Satyam




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



Re: [PHP] OOP slow -- am I an idiot?

2006-11-08 Thread Stut

Stut wrote:
This is a question of design, not a question of whether to use OOP. 
For example, in several of the sites I maintain I have classes that 
inherit from a base class called Table. The base class provides a lot 
of the basic methods for working on a table (think ActiveRecord). It 
also has static methods for doing things like updates and deletes 
based on a where clause. The derived classes can override filter 
methods (AfterLoad and BeforeSave) to massage the data after it's 
loaded and before it's saved. They also add any methods needed for 
acting on that particular entity.


I'm the first to admit that OOP is not always the best methadology to 
use - the 'best methadology for all situations' does not exist. 
However, the general feeling people will get towards OOP from this 
list seems to be 'OOP bad, anything else better'. OOP is great as long 
as you follow OOD principles and have a fair amount of common sense. 
It should not be used just because it's there, but it should also not 
be dismissed.


In fact, in writing that I've just realised that OOP is not the key... 
OOD is. OOD can be applied (with no syntax or compiler assistance) in 
a functional system which will have great benefits, all of which I 
think most people are aware of but, for whatever reason, fail to 
adequately apply - which is where OOP can be useful since it enforces 
the structure and protection through the syntax (PHP4 sucked for this, 
PHP5 is better).


When you actually think about it, OOP is not a methadology - it's a 
syntax. OOD is the methadology. Ramble... ramble... ramble... over!


I know this is a fairly old thread, but I thought people might be 
interested in reading a write-up I've recently finished regarding my 
Table class and it's usage. I had been intending to write it for a 
while, but a request from Ed Lazor kicked me into actually doing it. 
Don't expect the quality to be too high - I'm more used to writing 
requirement/functional specs and user documentation than this type of thing.


   http://stut.net/articles/php_models.html

All comments are welcome, both on the article and on the code itself. 
However, please keep on-list replies to the code!


-Stut

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



[PHP] DLL error

2006-11-08 Thread Robert Hicks
In my php.ini file I have "c:\php\ext" as my extension_dir. When I go to 
configure PEAR I am getting DLL error:


PHP Warning:  PHP Startup: Unable to load dynamic library 
'c:\php\ext\php_oci8.dll' - The specified procedure could not be found.

 in Unknown on line 0

Since it is pointing exactly where I told it to and the error message 
even shows that, what else do I need to do?


Robert

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



Re: [PHP] opening .Z archive with gzopen

2006-11-08 Thread Giuseppe Giovinazzi

Please Do you have some examples of using the package File_Archive?. I'm
having much problem to use this package. The documentation in
http://pear.php.net/package/File_Archive is very poor.
For example, I can't extract a file from a gz or zip file.
thanks in advantage

On 3/27/06, Chris <[EMAIL PROTECTED]> wrote:


nicolas figaro wrote:
> Hi
>
> I'm using php 4.3.11 on linux RH9.
>
> I'd like to open a .Z archive with gzopen.
> I looked at the options of gzopen, but I'm not sure there is a way to
> specify the compression used by compress/uncompress.
>
> Has anyone ever tried and done this yet ? (without a system("uncompress
> $file")

Since a compressed file isn't the same as a gzipp'ed file I'd guess this
won't work.

This might:

http://pear.php.net/package/File_Archive

but it doesn't mention .Z files specifically.

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

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




[PHP] Re: DLL error

2006-11-08 Thread Jo�o C�ndido de Souza Neto
Try to copy your dll file into your system32 folder.

"Robert Hicks" <[EMAIL PROTECTED]> escreveu na mensagem 
news:[EMAIL PROTECTED]
> In my php.ini file I have "c:\php\ext" as my extension_dir. When I go to 
> configure PEAR I am getting DLL error:
>
> PHP Warning:  PHP Startup: Unable to load dynamic library 
> 'c:\php\ext\php_oci8.dll' - The specified procedure could not be found.
>  in Unknown on line 0
>
> Since it is pointing exactly where I told it to and the error message even 
> shows that, what else do I need to do?
>
> Robert 

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



[PHP] Re: DLL error

2006-11-08 Thread Robert Hicks

Same error...  : (

João Cândido de Souza Neto wrote:

Try to copy your dll file into your system32 folder.

"Robert Hicks" <[EMAIL PROTECTED]> escreveu na mensagem 
news:[EMAIL PROTECTED]
In my php.ini file I have "c:\php\ext" as my extension_dir. When I go to 
configure PEAR I am getting DLL error:


PHP Warning:  PHP Startup: Unable to load dynamic library 
'c:\php\ext\php_oci8.dll' - The specified procedure could not be found.

 in Unknown on line 0

Since it is pointing exactly where I told it to and the error message even 
shows that, what else do I need to do?


Robert 


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



[PHP] Re: Time-Zone juggling

2006-11-08 Thread Colin Guthrie
Going a bit OT but who cares :)

tedd wrote:
> I just wonder how they came up with the acronym of "UTC" for Coordinated
> Universal Time?

In 1970 the Coordinated Universal Time system was devised by an
international advisory group of technical experts within the
International Telecommunication Union (ITU). The ITU felt it was best to
designate a single abbreviation for use in all languages in order to
minimize confusion. Since unanimous agreement could not be achieved on
using either the English word order, CUT, or the French word order, TUC,
the acronym UTC was chosen as a compromise.

Copy+Paste from: http://tf.nist.gov/general/misc.htm#Anchor-14550

Col :)

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



[PHP] Re: DLL error

2006-11-08 Thread Jo�o C�ndido de Souza Neto
I do not have a windows server here to try something but, when i get home i 
shall try it. If i get some success i shall tell you.


"Robert Hicks" <[EMAIL PROTECTED]> escreveu na mensagem 
news:[EMAIL PROTECTED]
> Same error...  : (
>
> João Cândido de Souza Neto wrote:
>> Try to copy your dll file into your system32 folder.
>>
>> "Robert Hicks" <[EMAIL PROTECTED]> escreveu na mensagem 
>> news:[EMAIL PROTECTED]
>>> In my php.ini file I have "c:\php\ext" as my extension_dir. When I go to 
>>> configure PEAR I am getting DLL error:
>>>
>>> PHP Warning:  PHP Startup: Unable to load dynamic library 
>>> 'c:\php\ext\php_oci8.dll' - The specified procedure could not be found.
>>>  in Unknown on line 0
>>>
>>> Since it is pointing exactly where I told it to and the error message 
>>> even shows that, what else do I need to do?
>>>
>>> Robert 

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



[PHP] Re: DLL error

2006-11-08 Thread Robert Hicks
Thanks, I am searching the web for the error as well and nothing "good" 
yet. "Good" meaning that it seems to be a problem.


João Cândido de Souza Neto wrote:
I do not have a windows server here to try something but, when i get home i 
shall try it. If i get some success i shall tell you.




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



[PHP] Permanent Links - Blog

2006-11-08 Thread Raphael Martins

Hi,

How do I implement that 
"http://myhost/blog/date/of/post/name-of-the-post"; thing, instead of 
"http://myhost/blog/view.php?id=id-of-the-post"; ?

I´ve seen this in many blogs, but it´s easy to implement?
See it in action at wikipedia, blogger blogs, simplebits 
.


Both simplebits and wikipedia is written in PHP, I guess.

Help!

Thank you

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



[PHP] Permanent Links - Blog

2006-11-08 Thread Raphael Martins

Hi,

How do I implement that
"http://myhost/blog/date/of/post/name-of-the-post"; thing, instead of
"http://myhost/blog/view.php?id=id-of-the-post"; ?
I´ve seen this in many blogs, but it´s easy to implement?
See it in action at wikipedia, blogger blogs, simplebits
.

Both simplebits and wikipedia is written in PHP, I guess.

Help!

Thank you

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



Re: [PHP] Permanent Links - Blog

2006-11-08 Thread Dave Goodchild

Are you writing the blog from scratch? I think you will have to get to grips
with mod_rewrite (Apache).


[PHP] Re: DLL error

2006-11-08 Thread Robert Hicks

Possible problem. I am getting this error as well:

"The procedure entry point OCILobRead2 could not bel located in the 
dynamic link library OCI.dll"


I am using Oracle9i and OCILobRead2 is not available in my version. So 
what the heck do I do now?


So with PHP 5.2 you pretty much have to use the Oracle instant client. I 
am exploring options.


Robert

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



Re: [PHP] Permanent Links - Blog

2006-11-08 Thread Jürgen Wind



Raphael Martins-2 wrote:
> 
> Hi,
> 
> How do I implement that
> "http://myhost/blog/date/of/post/name-of-the-post"; thing, instead of
> "http://myhost/blog/view.php?id=id-of-the-post"; ?
> I´ve seen this in many blogs, but it´s easy to implement?
> See it in action at wikipedia, blogger blogs, simplebits
> .
> 
> Both simplebits and wikipedia is written in PHP, I guess.
> 
> Help!
> 
> Thank you
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 
> 
superb work: http://richardlynch.blogspot.com/

-- 
View this message in context: 
http://www.nabble.com/Permanent-Links---Blog-tf2597419.html#a7245708
Sent from the PHP - General mailing list archive at Nabble.com.

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



Re: [PHP] access to DB and security

2006-11-08 Thread Alain Roger

Hi Satyam,

if i understood well, in this special hidden (from web) folder, you write an
include file, where you only return an opened connection... something like
$db (where $db =mysql_connect("$host", "$user",
"$user_pwd",false,CLIENT_MULTI_STATEMENTS) ; for example)
and only this $db open connection is return to your PHP files (accessible on
web).

did i understood well ?

Al.

On 11/8/06, Satyam <[EMAIL PROTECTED]> wrote:


- Original Message -
From: "Alain Roger" <[EMAIL PROTECTED]>


> Hi,
>
> My web hoster gave me a login and password with which i can connect to
DB,
> perform some actions as DB owner / superuser just for my DB.
> If i use this login + password to connect and perform some actions from
my
> web pages, everybody can hack my DB and do what they want.
>
> My web hoster will not give me some particular role/user with which user
> can
> only execute some stored procedure but can not administrate my DB.
>
> therefore, how can i make my web pages users connect to DB (with my
> administrator login and password) and run some stored procedure without
> risking to see my DB hacked ?
>
> thanks a lot,
>
> Alain
>

That is quite a normal setup and unless you have your own server, that's
what you normally get on a shared host so we all live with that.

Your database access information should be in an include file which all
web
pages should be able to access internally, but which is not accessible
from
elsewhere.  Usually, you would have a ~/www or ~/htdocs directory which is
the public root of the web site and will be seen from elsewhere.  The
include file with the database access data should be in some
~/somethingelse
which is not accessible to the public.  Furthermore, if this file has a
.php
extension, its contents won't be visible (unless it does echo something),
even if it is within the public directory.  Finally, in that include file
I
usually return an opened global db connection and do not set variables
with
this DB access information, just produce the opened connection.  That's as
far as preserving the DB connection data.

As for preventing abuse of the opened connection, that would be through
"SQL
injection" and under that subject you will find lots of literature just
googling around and plenty of messages on this very list.

Satyam







[PHP] Gmail / RSS accessing from script

2006-11-08 Thread Chris Ditty

I am trying to write a small module to display my gmail email on my custom
startup page.  I am using this url with the correct userid and password -
https://USERNAME:[EMAIL PROTECTED]/gmail/feed/atom .

When I put it in the web browser, it acts like it is supposed to.  But when
I try and script it, it returns a 401 unauthorized error.  I get the same
error when I try a wget also.

Has anyone had any success in getting this to work from a script?  The
output is supposed to be simple RSS once I get past this error.


Re: [PHP] access to DB and security

2006-11-08 Thread Satyam


- Original Message - 
From: "Alain Roger" <[EMAIL PROTECTED]>

To: "PHP General List" 
Sent: Wednesday, November 08, 2006 9:22 PM
Subject: Re: [PHP] access to DB and security



Hi Satyam,

if i understood well, in this special hidden (from web) folder, you write 
an

include file, where you only return an opened connection... something like
$db (where $db =mysql_connect("$host", "$user",
"$user_pwd",false,CLIENT_MULTI_STATEMENTS) ; for example)
and only this $db open connection is return to your PHP files (accessible 
on

web).

did i understood well ?

Al.



Basically yes, the only other trick missing in your example (being utterly 
paranoid) would be to avoid using variables to hold the db information since 
those variables, if they are global, will persist all through the web page 
in which this file is included.  Use literals instead so no vital 
information ever leaves that include, except for the live connection.


$db =mysql_connect('host', 'user','user_pwd',false,CLIENT_MULTI_STATEMENTS)

Perhaps that is what you meant by indicating "$host", which otherwise is a 
pointless construct, since "$host" expands to $host evaluated as a string, 
which probably is, anyway.  I usually use single quotes instead of double 
quotes for fixed literals so I clearly tell the interpreter that it doesn't 
need to bother looking for variables or escape sequences to expand; unless, 
of course, if I meant to have variables or escapes in them.


Satyam






On 11/8/06, Satyam <[EMAIL PROTECTED]> wrote:


- Original Message -
From: "Alain Roger" <[EMAIL PROTECTED]>


> Hi,
>
> My web hoster gave me a login and password with which i can connect to
DB,
> perform some actions as DB owner / superuser just for my DB.
> If i use this login + password to connect and perform some actions from
my
> web pages, everybody can hack my DB and do what they want.
>
> My web hoster will not give me some particular role/user with which 
> user

> can
> only execute some stored procedure but can not administrate my DB.
>
> therefore, how can i make my web pages users connect to DB (with my
> administrator login and password) and run some stored procedure without
> risking to see my DB hacked ?
>
> thanks a lot,
>
> Alain
>

That is quite a normal setup and unless you have your own server, that's
what you normally get on a shared host so we all live with that.

Your database access information should be in an include file which all
web
pages should be able to access internally, but which is not accessible
from
elsewhere.  Usually, you would have a ~/www or ~/htdocs directory which 
is

the public root of the web site and will be seen from elsewhere.  The
include file with the database access data should be in some
~/somethingelse
which is not accessible to the public.  Furthermore, if this file has a
.php
extension, its contents won't be visible (unless it does echo something),
even if it is within the public directory.  Finally, in that include file
I
usually return an opened global db connection and do not set variables
with
this DB access information, just produce the opened connection.  That's 
as

far as preserving the DB connection data.

As for preventing abuse of the opened connection, that would be through
"SQL
injection" and under that subject you will find lots of literature just
googling around and plenty of messages on this very list.

Satyam









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



[PHP] php.ini and .htaccess not working for php parameters

2006-11-08 Thread James Tu
I've setup a few directories under my dev server's webroot...one for  
each project.
Under each project directory, I put php.ini files to set parameters  
such as include_path.
For some reason they are not taking effect.  Do I have to enable them  
somehow?
phpinfo() tells me that Server API is Apache, so that means PHP is  
running as a module not as CGI right?  So php.ini only works with PHP  
running as CGI?


I tried to use an .htaccess file instead and that didn't work either.

In my httpd.conf I have set

Options All
 AllowOverride All



Before, when I was using php.ini, i was getting an error from my  
include command...basically saying that it couldn't find the file.


Now that I'm using the .htaccess, I don't see any PHP errors, I put  
some print statements just to see where things go wrong.


include ('class.datetime_utility.php');
print "hello"; //shows up
$dd = new datetime_utility();
print "hello"; //doesn't show up!!!


What's happening here?

(In the past, I just modified the include_path of the main php.ini  
and this doesn't seem like a flexible solution.  I want to localize  
the settings in separate php.ini files for each project, so that when  
I have to deploy to production, I can also deploy the php.ini with  
minor adjustments.)


-James

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



[PHP] generate key with subjectAltName?

2006-11-08 Thread Markus Krause

hi all!

i am trying to setup a php-page to create certificate signing requests  
for webserver certificates. without any extensions i got it working  
without problems, but we need to have  
subjectAltName=DNS:host1,DNS:hos2 set.

(how) can this be done? any examples?

thanks in advance for any help!

regards
   markus

--
Markus Krause   email: [EMAIL PROTECTED]
Mogli-Soft: Support for Mac OS X, Webmail/Horde, LDAP, RADIUS
by order of the Computing Center of the Max-Planck-Institute of Biochemistry
Tel.: 089 - 89 40 85 99 Fax.: 089 - 89 40 85 98

--
 This message was sent using https://webmail2.biochem.mpg.de
If you encounter any problems please report to [EMAIL PROTECTED]

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



[PHP] Re: DLL error

2006-11-08 Thread Jo�o C�ndido de Souza Neto
It isn´t a problem.

Take a look at this link and you will see that you must have more than the 
php_oci8.dll.

http://www.php.net/manual/en/ref.oci8.php


"Robert Hicks" <[EMAIL PROTECTED]> escreveu na mensagem 
news:[EMAIL PROTECTED]
> Possible problem. I am getting this error as well:
>
> "The procedure entry point OCILobRead2 could not bel located in the 
> dynamic link library OCI.dll"
>
> I am using Oracle9i and OCILobRead2 is not available in my version. So 
> what the heck do I do now?
>
> So with PHP 5.2 you pretty much have to use the Oracle instant client. I 
> am exploring options.
>
> Robert 

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



Re: [PHP] php.ini and .htaccess not working for php parameters

2006-11-08 Thread James Tu
Sorry...it was my own sillyness.  After confirming that the .htaccess  
file was indeed setting the include_path directory, it turns out that  
the class file was renamed and PHP could not find it.


I'm surprised that PHP doesn't complain that it couldn't find the  
file...then I started to comment out stuff in my .htaccess and it  
turns out that the culprit for now displaying errors was:


php_value error_reporting E_ALL
When I commented that out, PHP reported the errors.  ugh!

Can I set that parameter in .htaccess?



-James

On Nov 8, 2006, at 5:14 PM, James Tu wrote:

I've setup a few directories under my dev server's webroot...one  
for each project.
Under each project directory, I put php.ini files to set parameters  
such as include_path.
For some reason they are not taking effect.  Do I have to enable  
them somehow?
phpinfo() tells me that Server API is Apache, so that means PHP is  
running as a module not as CGI right?  So php.ini only works with  
PHP running as CGI?


I tried to use an .htaccess file instead and that didn't work either.

In my httpd.conf I have set

Options All
 AllowOverride All



Before, when I was using php.ini, i was getting an error from my  
include command...basically saying that it couldn't find the file.


Now that I'm using the .htaccess, I don't see any PHP errors, I put  
some print statements just to see where things go wrong.


include ('class.datetime_utility.php');
print "hello"; //shows up
$dd = new datetime_utility();
print "hello"; //doesn't show up!!!


What's happening here?

(In the past, I just modified the include_path of the main php.ini  
and this doesn't seem like a flexible solution.  I want to localize  
the settings in separate php.ini files for each project, so that  
when I have to deploy to production, I can also deploy the php.ini  
with minor adjustments.)


-James

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






[PHP] Re: Time-Zone juggling

2006-11-08 Thread tedd

At 7:06 PM + 11/8/06, Colin Guthrie wrote:

Going a bit OT but who cares :)

tedd wrote:

 I just wonder how they came up with the acronym of "UTC" for Coordinated
 Universal Time?


In 1970 the Coordinated Universal Time system was devised by an
international advisory group of technical experts within the
International Telecommunication Union (ITU). The ITU felt it was best to
designate a single abbreviation for use in all languages in order to
minimize confusion. Since unanimous agreement could not be achieved on
using either the English word order, CUT, or the French word order, TUC,
the acronym UTC was chosen as a compromise.

Copy+Paste from: http://tf.nist.gov/general/misc.htm#Anchor-14550

Col :)


Interesting, apparently ego's at work. As such, they could have used:

CUTC

Which stands for Coordinated Universal Time, with Croissant, no?

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] Re: PHP in Kenya

2006-11-08 Thread Manuel Lemos
Hello,

on 11/05/2006 11:27 AM Mark Steudel said the following:
> I'm currently serving in Peace Corps in Kenya and I was looking for other
> PHP web developers that are doing e-commerce that I could ping about what
> requirements/paperwork etc is involved in setting up e-commerce accounts in
> Kenya.

I have no idea where you can find PHP developers from Kenya. What you
may want to do is to create a discussion group about PHP for Kenya users
and then submit it to the PHPClasses site directory of user groups.

Everytime a new user is logged in, the site shows all the registered
user groups from his country.

This way you can attract more Kenya users to your group and discuss your
problems with them.

Just go here to submit a Kenya user group:

http://www.phpclasses.org/browse/group/bycountry/country/ke/

-- 

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] Time-Zone juggling

2006-11-08 Thread Travis Doherty
David Giragosian wrote:

> Does Daylight Savings alter Zulu time? (I'm guessing "yes"). How did the
> military deal with that?
>
> I use a date-time field as a primary key in db tables that get an
> insert a
> minute. I had to jump through a number of hoops to turn off DST on the
> (RH
> Linux) server.
>
> David
>
UTC (or GMT, or Zulu, or Z) does not observe Daylight Savings Time.  In
any database that you store timestamps and need to know exactly what
that timestamp means you should use UTC, then use application logic to
translate to the users time zone.

Another option would be to store epoch time (seconds since the OS's
epoch) and work the same result from that, I prefer storing
human-readable timestamps even if you have to do the datemath in your
head to read them in your own timezone.  Epoch does not count
leap-seconds like UTC so it can be off by a tiny bit at any given time. 
Epoch time also differs on different operating systems - Unix is
1970-01-01 at 00:00:00 UTC, Windows seems to use 1601-01-01 at 00:00:00
UTC... I don't know if that would ever matter though - I imagine the
database server would mask this and the application would port to
windows without problems (no idea.)

UTC has no DST from: http://en.wikipedia.org/wiki/Time_zone
>>
Due to daylight saving time, UTC is local time at the Royal Observatory,
Greenwich 
only between 01:00 UTC on the last Sunday in October and 01:00 UTC on
the last Sunday in March. For the rest of the year, local time there is
UTC+1 , known in the United
Kingdom  as British Summer
Time  (BST). Similar
circumstances apply in many places.
<<
**
Travis Doherty
TixTime

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



[PHP] Re: Permanent Links - Blog

2006-11-08 Thread Myron Turner
Extra information, constructed as path info, is returned by the apache 
PATH_INFO environment variable.


Assume this script is called path_info.php:

PATH_INFO




Call it with the following URL:

  http:/my_server/path_info.php/news-item/june3/2005

It will return the following to the screen:

PATH_INFO
/news-item/june3/2005

Myron
Raphael Martins wrote:

Hi,

How do I implement that 
"http://myhost/blog/date/of/post/name-of-the-post"; thing, instead of 
"http://myhost/blog/view.php?id=id-of-the-post"; ?

I´ve seen this in many blogs, but it´s easy to implement?
See it in action at wikipedia, blogger blogs, simplebits 
.


Both simplebits and wikipedia is written in PHP, I guess.

Help!

Thank you



--

_
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] Gmail / RSS accessing from script

2006-11-08 Thread Ryan Creaser

Chris Ditty wrote:
I am trying to write a small module to display my gmail email on my 
custom

startup page.  I am using this url with the correct userid and password -
https://USERNAME:[EMAIL PROTECTED]/gmail/feed/atom .

When I put it in the web browser, it acts like it is supposed to.  But 
when

I try and script it, it returns a 401 unauthorized error.  I get the same
error when I try a wget also.

Has anyone had any success in getting this to work from a script?  The
output is supposed to be simple RSS once I get past this error.



I'm only guessing, but you probably need to set the http Authorization
header in the request. If you are using curl, do something like:
   curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
   curl_setopt($curl, CURLOPT_USERPWD, "USERNAME:PASSWORD");

Check out wget's --http-user and --http-password options too.

Ryan

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



[PHP] dns_get_record()

2006-11-08 Thread Ed

Hi,

Is there a corresponding php method that would
accomplish the same thing as:

dig @ns_srvr_name thisdomain.com

So far, dns_get_record() uses the default nameserver
values from the /etc/resolve.conf (afaik, at least);
how do I get it to lookup the domain name using
 ns_srvr_name  as the name server?

Any help appreciated.

Ed

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



Re: [PHP] [newbie in session] Is is right behavior???

2006-11-08 Thread Sumeet

clive wrote:

Mariusz Topczewski wrote:

Hi,

I just start in using session, but unfortunatly I meet first problem 
right now :-(
On some PC when i load the page, the is no content, and on other PC 
the page is loaded properly. On computer where the page is blank i 
have to press F5 (refresh), and the page appear ?.


u also try to turn the error_reporting on

error_reporting(E_ALL);

this will display you all the errors.

--
Thanking You

Sumeet Shroff
http://www.prateeksha.com
Web Designers and PHP / Mysql Ecommerce Development, Mumbai India

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



[PHP] Simple logic but can't get it right

2006-11-08 Thread Choy, Wai Yew
Hi gurus,

 

I've the following piece of PHP codeIt is a simple logic but I can't
get it rightThe output result of $id is "b"!!...It should be
"outside", right??

 

I think it is the variable $bCoz' it depend on the previous check (
if ($a == 0) ) for the value... If this is the case, how can I get this
logic works??

 

Thanks a million,

Choy

 

 

 

 

"; //Output is "b"...WHY?? It should be "outside"...

 

 

 

?>



RE: [PHP] Simple logic but can't get it right

2006-11-08 Thread Daevid Vincent
Since you don't declare variables in PHP, they are preinitialized for you as
'false' or '0'

So since $b is not set initially, it is 0 therefore second elseif passes. 

> -Original Message-
> From: Choy, Wai Yew [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, November 08, 2006 9:34 PM
> To: php-general@lists.php.net
> Subject: [PHP] Simple logic but can't get it right
> 
> Hi gurus,
> 
>  
> 
> I've the following piece of PHP codeIt is a simple logic 
> but I can't
> get it rightThe output result of $id is "b"!!...It should be
> "outside", right??
> 
>  
> 
> I think it is the variable $bCoz' it depend on the 
> previous check (
> if ($a == 0) ) for the value... If this is the case, how can 
> I get this
> logic works??
> 
>  
> 
> Thanks a million,
> 
> Choy
> 
>  
> 
>  
> 
>  
> 
>  
> 
>  
>  
> 
> $a = 1;
> 
> $id = "outside";
> 
> 
> 
> if ($a == 0) {
> 
>   
> 
> $b = 1;
> 
> $id = "a";
> 
>   
> 
> }
> 
>  
> 
>  
> 
> elseif ($b == 0) {
> 
>   
> 
> $c = 1;
> 
> $id = "b";
> 
>   
> 
> }
> 
>  
> 
>  
> 
> elseif ($c == 0){
> 
>   
> 
> $d = 1;
> 
> $id = "c";
> 
>   
> 
> }
> 
>  
> 
> 
> 
>  echo "ID = $id"; //Output is "b"...WHY?? It should be 
> "outside"...
> 
>  
> 
>  
> 
>  
> 
> ?>
> 
> 

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



Re: [PHP] Simple logic but can't get it right

2006-11-08 Thread Chris

comments inline

Choy, Wai Yew wrote:



  

this if statement is false, because $a == 1
if ($a == 0) { 

  


$b = 1;

$id = "a";

  


}

 

 

  
this if statement is true, because $b has not been defined, and is 
evaluating to 0

elseif ($b == 0) {

  


$c = 1;

  
$id = "b";


  


}

 

 

  

this statement never gets reached, because the previous statement was true

elseif ($c == 0){

  


$d = 1;

$id = "c";

  


}

 




 echo "ID = $id"; //Output is "b"...WHY?? It should be "outside"...

 

 

 


?>


  


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



[PHP] imap_getmailboxes - how to understand the values of "attributes"?

2006-11-08 Thread Jens Meyer

Hello!

For a small webmail-client I want to use the mailbox-attributes to make 
a difference between mailservers and their folder-handling.


Unfortunately I don't understand the meaning of the attributes-value in 
detail.

In PHP-manual I found that "Attributes is a bitmask".
In comments/notes the bitmasks are described as:

1 LATT_NOINFERIORS
2 LATT_NOSELECT
4 LATT_MARKED
8 LATT_UNMARKED

But when debugging with my mailservers/folders I received the following 
values: 1, 32, 40, 64.


It would be great if anyone could help me with a short explanation how 
to sum up the bitmasks to get these values (or vice versa...).


Thank you,
kind regards,

   Jens


smime.p7s
Description: S/MIME Cryptographic Signature


[PHP] SOAP and MSSQL

2006-11-08 Thread Kencana

hi all, 

I am a new user of php & SOAP..I got one question about using SOAP. 
I have try to run SOAP and it runs successfully without any problem 

the following is the code of the SOAP server: 
class QuoteService { 
 private $quotes = array('V3' => 'password', 
  'kencana' =>'kencana', 
 'wisna' =>'wisna'); 

private $status = array('V3' => 'Admin', 
  'kencana' =>'user', 
 'wisna' =>'user'); 


function getQuote($symbol) { 
  if (isset($this->quotes[$symbol])) 
  { 
  return $this->quotes[$symbol]; 
  } 
  else 
  { 
  throw new SoapFault("Server","Unknown User Name '$symbol'."); 
  } 
  } 

function getStatus($symbol) { 
  if (isset($this->status[$symbol])) 
  { 
  return $this->status[$symbol]; 
  } 
  else 
  { 
  throw new SoapFault("Server","Unknown User Name '$symbol'."); 
  } 
  } 

as you can see, the code retrieved the data from the listed array, my
question is, is that possible to retrieve 
the data from mssql server?if yes, can i know how? 

I hope somebody can help me out, and pardon me as i am a new user of
this.therefore please bear with me. 

Regards, 
Kencana
-- 
View this message in context: 
http://www.nabble.com/SOAP-and-MSSQL-tf2600244.html#a7253893
Sent from the PHP - General mailing list archive at Nabble.com.

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