LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices



Reply
 
Search this Thread
Old 07-27-2012, 04:34 PM   #1
eantoranz
Senior Member
 
Registered: Apr 2003
Location: Colombia
Distribution: Kubuntu, Debian, Knoppix
Posts: 1,982
Blog Entries: 1

Rep: Reputation: 83
How to create a new stream type for php (the interpreter itself)


Hi!

I guess I could rename this thread to something like: How to create your own php_stream custom reader (like a plugin)?

Suppose (well, don't suppose, it'd be rather more correct to say: know) I want to hack php to be able to get/interpret php files from a new source that's not supported in mainline php.

What would be the right "hooks" to hack in order to do it?

I'm working on php 5.2 (I'll move to later versions when I get this right) and at the time I'm able to "tell" that I want to use an alternate method inside _php_stream_fopen_with_path. This function has to return a php_stream. Now, I think I could create my own php_stream structure where I would set my own methods in order to handle I/O for the file I want to read so that it's read correctly.... but I'd love not to have to learn everything from scratch. Perhaps someone has experience doing this kind of trick? Is it documented somewhere?

Thanks in advance.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Could not find mime type application/octet-stream (thanks only) kozaki Mandriva 1 04-07-2010 12:18 PM
Mod_python: make it work, avoid 'python_handler: Can't get/create interpreter.' xcristi Linux - Software 0 12-07-2008 03:00 PM
Could not find mime type application/octet-stream jon rouse Mandriva 11 02-14-2007 02:18 AM
mime type application/octet-stream SLP Suse/Novell 1 03-20-2006 06:29 PM
mime type/ocet stream error ?? mnchur Linux - Software 3 02-25-2004 10:42 AM


All times are GMT -5. The time now is 02:47 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration