php-general Digest 9 Nov 2006 11:12:46 -0000 Issue 4449

Topics (messages 244409 through 244424):

generate key with subjectAltName?
        244409 by: Markus Krause

Re: DLL error
        244410 by: João Cândido de Souza Neto

Re: php.ini and .htaccess not working for php parameters
        244411 by: James Tu
        244424 by: Ford, Mike

Re: Time-Zone juggling
        244412 by: tedd
        244414 by: Travis Doherty

Re: PHP in Kenya
        244413 by: Manuel Lemos

Re: Permanent Links - Blog
        244415 by: Myron Turner

Re: Gmail / RSS accessing from script
        244416 by: Ryan Creaser

dns_get_record()
        244417 by: Ed

Re: [newbie in session] Is is right behavior???
        244418 by: Sumeet

Simple logic but can't get it right
        244419 by: Choy, Wai Yew
        244420 by: Daevid Vincent
        244421 by: Chris

imap_getmailboxes - how to understand the values of "attributes"?
        244422 by: Jens Meyer

SOAP and MSSQL
        244423 by: Kencana

Administrivia:

To subscribe to the digest, e-mail:
        [EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
        [EMAIL PROTECTED]

To post to the list, e-mail:
        [email protected]


----------------------------------------------------------------------
--- Begin Message ---
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]

--- End Message ---
--- Begin Message ---
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 

--- End Message ---
--- Begin Message --- 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




--- End Message ---
--- Begin Message ---
On 08 November 2006 23:04, James Tu wrote:

> 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?

Yes, of course -- but you need to take heed of the following CAUTION at 
http://uk.php.net/manual/en/configuration.changes.php:

+-----------------------------------------------------------------+
| PHP constants do not exist outside of PHP. For example, in      |
| httpd.conf you can not use PHP constants such as E_ALL or       |
| E_NOTICE to set the error_reporting directive as they will have |
| no meaning and will evaluate to 0. Use the associated bitmask   |
| values instead. These constants can be used in php.ini          |
+-----------------------------------------------------------------+

Cheers!

Mike

---------------------------------------------------------------------
Mike Ford,  Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Headingley Campus, LEEDS,  LS6 3QS,  United Kingdom
Email: [EMAIL PROTECTED]
Tel: +44 113 283 2600 extn 4730      Fax:  +44 113 283 3211 


To view the terms under which this email is distributed, please go to 
http://disclaimer.leedsmet.ac.uk/email.htm

--- End Message ---
--- Begin Message ---
At 7:06 PM +0000 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

--- End Message ---
--- Begin Message ---
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 <http://en.wikipedia.org/wiki/Royal_Observatory%2C_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 <http://en.wikipedia.org/wiki/UTC%2B1>, known in the United
Kingdom <http://en.wikipedia.org/wiki/United_Kingdom> as British Summer
Time <http://en.wikipedia.org/wiki/British_Summer_Time> (BST). Similar
circumstances apply in many places.
<<
**
Travis Doherty
TixTime

--- End Message ---
--- Begin Message ---
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/

--- End Message ---
--- Begin Message --- Extra information, constructed as path info, is returned by the apache PATH_INFO environment variable.

Assume this script is called path_info.php:

<H2>PATH_INFO</H2>
<H3>
<?php echo $_SERVER['PATH_INFO'] . "\n"; ?>
</H3>

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 <http://www.simplebits.com>.

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

Heeeeelp!

Thank you


--

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

--- End Message ---
--- Begin Message ---
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

--- End Message ---
--- Begin Message ---
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

--- End Message ---
--- Begin Message ---
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

--- End Message ---
--- Begin Message ---
Hi gurus,

 

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

 

I think it is the variable $b....Coz' 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

 

 

 

 

<?php

 

            $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<br>"; //Output is "b"...WHY?? It should be "outside"...

 

 

 

?>


--- End Message ---
--- Begin Message ---
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: [email protected]
> Subject: [PHP] Simple logic but can't get it right
> 
> Hi gurus,
> 
>  
> 
> I've the following piece of PHP code....It is a simple logic 
> but I can't
> get it right....The output result of $id is "b"!!...It should be
> "outside", right??
> 
>  
> 
> I think it is the variable $b....Coz' 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
> 
>  
> 
>  
> 
>  
> 
>  
> 
> <?php
> 
>  
> 
>             $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<br>"; //Output is "b"...WHY?? It should be 
> "outside"...
> 
>  
> 
>  
> 
>  
> 
> ?>
> 
> 

--- End Message ---
--- Begin Message ---
comments inline

Choy, Wai Yew wrote:
<?php
$a = 1;

            $id = "outside";

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<br>"; //Output is "b"...WHY?? It should be "outside"...

?>



--- End Message ---
--- Begin Message ---
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

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature


--- End Message ---
--- Begin Message ---
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.

--- End Message ---

Reply via email to