[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4326: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3501)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4328: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3501)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4329: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3501)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4330: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3501)
UMSP Plugin Development
Sign up here and you can log into the forum!

UMSP Plugin Development

Discussion, features, plugins--everything about zoster's UMSP UPnP Media Server software

UMSP Plugin Development   

Postby CrashX » Mon Jun 21, 2010 8:37 am

I have a couple of questions regarding UMSP plugin development:-

1) Where are php print/error_log/exit messages stored ?
-> I couldn't find in /tmp/php/error_log or web server logs

2) Are global or session variables wiped after each function call to _pluginMain ?

3) Do we need to have "_" before each function name ? ie function _pluginCreateList()
CrashX
Global Moderator
 
Posts: 143
Joined: Thu Apr 15, 2010 9:04 am

Re: UMSP Plugin Development   

Postby zoster » Tue Jun 22, 2010 8:09 am

1) The echo/print/exit functions write directly to the web server output. The error_log output is defined in /etc/php/.../php.ini and should write to /tmp/php/
I use my custom _var_dump_to_file function for any debugging output (it writes to /tmp/umsp-log.txt). If you're using the beta fw the php errors appear in the apache log.

2) Globals are wiped with every call of control-reply.php which I guess is what you mean in this case. I've never tried the session stuff, since I prefer the RESTful way (i.e. passing variables via the umsp:// pseudo URL)

3) No. The underscore is just a personal habit to quickly differentiate between standard and user defined functions.
zoster
WDLXTV Team
 
Posts: 218
Joined: Wed Apr 14, 2010 10:14 am

Re: UMSP Plugin Development   

Postby CrashX » Tue Jun 22, 2010 11:59 pm

Just an update to my findings on beta firmware:

1) Print/echo messages don't get output to logs as their sent via web page output.
2) error_log messages gets updated to /var/log/php5/error_log. Currently the file 'error_log' has the wrong premission set, and hence can't be overwritten. b-rad said he will fix it to 666.
3) php script error messages appear at /var/log/appache2/error.log.
CrashX
Global Moderator
 
Posts: 143
Joined: Thu Apr 15, 2010 9:04 am

Re: UMSP Plugin Development   

Postby CrashX » Sat Jul 10, 2010 12:52 pm

Couple of more questions if you don't mind:

1) I noticed that you can run UMSP plugins locally according to the code but I can't seem to get it to work ? I tried the following:
umsp://local/boot/test.php
-> Placed that file test.php in usb drive and change _pluginMain to _localMain but it still doesn't work.

2) How can I get UMSP to be detected outside the localhost by other media clients ie XBMC ?
CrashX
Global Moderator
 
Posts: 143
Joined: Thu Apr 15, 2010 9:04 am

Re: UMSP Plugin Development   

Postby zoster » Sat Jul 10, 2010 4:08 pm

1. 'Local' means local media, not plugins.

2. Writing a full fledged, standard compliant UPnP media server would require a lot of additional code.
zoster
WDLXTV Team
 
Posts: 218
Joined: Wed Apr 14, 2010 10:14 am

Re: UMSP Plugin Development   

Postby Jo2003 » Wed Oct 06, 2010 1:45 am

Jo2003
Developer
 
Posts: 32
Joined: Wed Jul 14, 2010 6:00 am
Location: Germany

Re: UMSP Plugin Development   

Postby zoster » Wed Oct 06, 2010 3:25 am

The http_build_query separator should work when left at default (&). Maybe you have some additional ampersands in your values? Check the raw $prmQuery value.
Afaik all encoding issues have been fixed. Are you using an older firmware?
If you're testing on a Xampp system make sure to explicitly set the separator to "&" as for some reason Xampp (and maybe others) default to "&".

Regarding object serialization: I don't use any OOP aspects in PHP but have a look .
zoster
WDLXTV Team
 
Posts: 218
Joined: Wed Apr 14, 2010 10:14 am

Re: UMSP Plugin Development   

Postby Jo2003 » Wed Oct 06, 2010 3:39 am

Thanks for the quick answer. I'm using 0.4.2.2, and also have tried 0.4.2.8.
In error case the $prmQuery was empty as well. I'll have a deeper look today.

Thinkung about the serialization of the class ... the whole problem in my case is, that I don't want to authenticate every time I request something from the provider. So it should be enough to pass this authentication (Session ID) as parameter to any function which should use the class. In that case I could instantiate the class witout the "overhead" of authentication. I'll try it and let you know.

Best regards,
Jo2003
Jo2003
Developer
 
Posts: 32
Joined: Wed Jul 14, 2010 6:00 am
Location: Germany

Re: UMSP Plugin Development   

Postby Jo2003 » Wed Oct 06, 2010 11:55 am

Jo2003
Developer
 
Posts: 32
Joined: Wed Jul 14, 2010 6:00 am
Location: Germany

Re: UMSP Plugin Development   

Postby zoster » Wed Oct 06, 2010 1:59 pm

I would separate the XML parsing from the other functions and check/debug it. DOM can throw all kinds of nasty stuff. Without the rest of the code I can't really tell.
zoster
WDLXTV Team
 
Posts: 218
Joined: Wed Apr 14, 2010 10:14 am

Next

Return to UMSP Media Server

Who is online

Users browsing this forum: No registered users and 1 guest

cron