Mostly a Zend question I guess, but I am playing with having PHP handle
other phases of the Apache request_rec and currently have working code
that lets a PHP script get run during the uri translation hook. This is a
nice one to start with because it can really open up some cool things that
can otherwise only be done through an ErrorDocument handler, and even then
you are somewhat limited in what you can do there.
What I am not sure of is how to communicate the new translated uri back to
the calling handler function in mod_php4.c. Right now I have:
php_admin_value uri_handler /full/path/uri.php
And I have some code that takes that uri_handler script filename and
trickles it down to a call to:
zend_execute_scripts(ZEND_REQUIRE TSRMLS_CC, 1, primary_file);
Where primary_file is:
primary_file.type = ZEND_HANDLE_FILENAME;
primary_file.handle.fd = 0;
primary_file.filename = uri_handler;
primary_file.opened_path = NULL;
primary_file.free_filename = 0;
That all seems to work fine and the PHP executes at the required stage
during the request handling. But what should uri.php look like?
I think something like this would be nice:
Obviously a simple handler, but it would take a request like
http://php.net/blah.php and actually cause http://php.net/foo/blah.php to
be opened up during the content parsing request_rec phase.
I don't see a way to currently do such a return and get at the returned
value after the call to zend_execute_scripts(). Any suggestions?
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]