ben-xo / dir2cast

Turn a directory of MP3s into a podcast - automatically.
http://www.ben-xo.com/dir2cast
BSD 3-Clause "New" or "Revised" License
152 stars 20 forks source link

it doesn't generate the XML file #49

Closed marloostudio closed 3 years ago

marloostudio commented 3 years ago

Thanks for fixing the other issue, however, I have tried the file in a different config and still, it is not generating the XML path for iTunes submission.

i did the following in .ini file:


; If you want the script to write the RSS to a file instead of to stdout
; you can set OUTPUT_FILE. This is useful if your RSS takes a long time 
; to generate and you would not ever want a podcast client to trigger a 
; cache refresh. You probably would want to setup dir2cast.php so only
; You run it after adding new files to the directory.
;OUTPUT_FILE = podcast.xml
ben-xo commented 3 years ago

Can you give me a bit more information on how you use it?

If you want it to output a file called podcast.xml, then you will have to uncomment that line (take the ; away before OUTPUT_FILE)

marloostudio commented 3 years ago

I did ucomment it and also created the Folder /XML myselef manually but still generates following error:

Writing RSS to: /xml
Warning: Cannot modify header information - headers already sent by (output started at /home/library/public_html/newversion5/dir2cast.php:1923) in /home/library/public_html/newversion5/dir2cast.php on line 1480
marloostudio commented 3 years ago

`fopen(/xml): Failed to open stream: Permission denied

This error occurred on line 1924 of /home/library/public_html/newversion5/dir2cast.php.`

ben-xo commented 3 years ago

I'll get around to fixing the warning at some point, ultimately it's harmless

fopen(/xml): Failed to open stream: Permission denied <- this is your problem. I presume you've configured OUTPUT_FILE = /xml. Try configuring OUTPUT_FILE = xml/podcast.xml or OUTPUT_FILE = XML/podcast.xml if the folder you created was in uppercase.

"/xml" would refer to a file in the root of the whole filesystem, not within the podcast folder.

As is often the case - the error message tells you exactly what the problem is!

ben-xo commented 3 years ago

Normally you wouldn't configure OUTPUT_FILE at all, you'd just set the URL to yourwebsite.com/dir2cast.php and let dir2cast.php take care of the rest. If you can get it to work without changing the .ini file at all, then you can tailor it to your needs later.

marloostudio commented 3 years ago

Ben got it fixed, thanks so much. This is a great software, it is going to make my life easier.

do you know I have to regenerate the podcast xml everytime i add mp3 file?? or it will do it on intervals?

ben-xo commented 3 years ago

Glad you got it fixed.

If you use the OUTPUT_FILE setting, you will have to regenerate it yourself.

If you leave the OUTPUT_FILE setting comment out, but put dir2cast.php in the same folder as your mp3 files, and then set your itunes URL to website.com/dir2cast.php, then it will regenerate by itself with no need for you to do anything.

marloostudio commented 3 years ago

let me give it a try again, but it wasn't generating the XML file for iTunes before automatically. It was actually dumping them into temp.

ben-xo commented 3 years ago

That’s right. It doesn’t actually “generate a file”, it outputs the file to the browser. (It caches in temp, so that next time you load the URL it is faster).

You got it working right first time!

Whatever URL you looked at, that’s the podcast!