[PHP] Re: [PHP-WIN] setting php for accepting the urls... phpinfo.php/extra/information/

2005-03-21 Thread Elizabeth Smith
Leif Gregory wrote:
Hello Rob,
Saturday, March 19, 2005, 2:39:08 AM, you wrote:
R> could someone possibly point me in the right direction for allow
R> PHP on IIS 6 to accept urls with the query string seperated by
R> slashes..
This is called "slash arguments" and IIS can not natively handle it. I
ran into this issue setting up a Moodle 
installation for a client. There is a 3rd party app you can install on
an IIS server which will allow you to do this. It is free for a single
website, but if you are virtual hosting, it costs money.
It's called ISAPI Rewrite 
I finally ended up building them an Win2K, Apache2, MySQL, PHP5 box so
they could use Moodle to the fullest with slash arguments.
Cheers,
Leif Gregory 

Um, no, you're wrong... it's called PATH_INFO and it IS possible on IIS, 
at least I have it working fine with 5.1 on windows xp.  The trick is to 
install php with the isapi/cgi as an application mapping, and when you 
do that make sure the "check that file exists" button is unchecked.

some additional information for cgi users
http://wordpress.org/support/topic.php?id=15197
according to the IIS 6 stuff, the scriptmap stuff works the same as the 
application mapping used to

http://www.microsoft.com/resources/documentation/iis/6/all/proddocs/en-us/ref_mb_scriptmaps.mspx
make sure the MD_SCRIPTMAPFLAG_CHECK_PATH_INFO is set to NOT be checked, 
you want it to hit the index.php and ignore the path info :)

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


[PHP] Re: Arrays not recognized in Simple XML Objects (using print_r)

2005-03-23 Thread Elizabeth Smith
Yashesh Bhatia wrote:
hi! i'm trying to use the simple_xml functions to get an arrray of
data from a sample xml file.
here's my sample_data.xml
 



 
   amit
   amar
 

 

the php file
 


$sample_data = simplexml_load_file("sample_data.xml");
print_r($sample_data);
print_r($sample_data->first_names);
print_r($sample_data->first_names->first_name);
?>
 

output of "$ php test_xml_1.php"
 

SimpleXMLElement Object
(
   [first_names] => SimpleXMLElement Object
   (
   [first_name] => Array
   (
   [0] => amit
   [1] => amar
   )
   )
)
SimpleXMLElement Object
(
   [first_name] => Array
   (
   [0] => amit
   [1] => amar
   )
)
SimpleXMLElement Object
(
   [0] => amit
)
 

The above output shows $sample_data->first_names->first_name as an
ARRAY in the first 2 print_r 's however when a print_r is run on
itself it shows it as a SimpleXMLElementObject.
Question is why the last print_r gives different information
compared to the other 2.
I also tried running
$key = array_rand($sample_data->first_names->first_name)
and it gives a warning message
"Warning: array_rand(): First argument has to be an array in 
/home/yvb/work/practice/php/XML/foo.php on line 16"

any clue how do i use the
$sample_data->first_names->first_name as an array ?
thx.
yashesh.

That's how print_r displays objects and nested objects - try a var_dump 
on the item and you'll see that simplexml does NOT return arrays but 
instead returns simplexml objects - if you want to use array_rand you 
can cast
(http://www.php.net/manual/en/language.types.type-juggling.php#language.types.typecasting)
the object to an array, or check out the user notes on simplexml
http://us2.php.net/manual/en/ref.simplexml.php
to find example functions to change a simplexml object to an array
personally I prefer dom and use a domtoarray function - but YMMV - 
please read the simplexml documentation again, it returns objects 
(nested ones) NOT arrays

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


[PHP] Re: phpDocumentor usage (specifically changelog capability?)

2005-03-29 Thread Elizabeth Smith
[EMAIL PROTECTED] wrote:
I didn't see a specific mailing list for phpDocumentor and wanted to get a 
general feel for people's experiances with it.  I see that Zend Studio 4 
supports it internally and I'd really like to get our group over to a 
standardized documentation scheme (and in the process, make use of what looks 
like a great auto-documentor).
Our documentation needs aren't extensive, so I think I got enough of a feel for 
phpDocumentor to do what we want to do, but one thing I don't see that would be 
really nice is the ability to do some kind of changelog type thing on at least 
pages if not individual functions and such.
Our current documentation is structured like this:
  /
  ** File Name:   FileName.php
  ** Description: Some Desc
  **
  ** Written By:  Trevor Gryffyn
  **
  ** Modification Log:
  ** --
  ** Created: Trevor Gryffyn - 11/06/2004
  ** Modified:Trevor Gryffyn - 11/07/2004 - Added new function
  /
Under phpDocutmentor, that might become something like:
/**
* Some short description
*
* Some longer description that spans
* a couple of lines   
*
* @author Trevor Gryffyn <[EMAIL PROTECTED]>
*
* @category Miscellaneous Functions
*
* @example SomeFunction($somevar)
*
* Modification Log:
* --
* Created: Trevor Gryffyn - 11/06/2004
* Modified:Trevor Gryffyn - 11/07/2004 - Added new function
*
*/

In this case, I'm not sure what phpDocumentor would do with the 
Modification Log or if there's a way to do something like this with 
phpDocumentor.
Any thoughts on how I can do this the 'right' way and possibly do some kind of 
changelog for pages and/or individual functions would be greatly appreciated.
Thanks in advance!
-TG
___
Sent by ePrompter, the premier email notification software.
Free download at http://www.ePrompter.com.
phpDocumentor is a seperate project from php and has serveral mailing 
lists http://sourceforge.net/mail/?group_id=11194 and even forums 
http://sourceforge.net/forum/?group_id=11194 where you can get answers 
to your questions - check out http://phpdoc.org for more information. 
php.general is not the place for questions about specific scripts

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