Jump to content

[SOLVED] Include errors on my new website


tyrant001

Recommended Posts

Good night everyone,

 

I apologize if this question is way too : "amateur, newbie, noob" etc

 

I'm making a new webcomic site with a friend :

 

www.comicnoobs.com

 

I wanted to add a news section, instead of manually creating everything (database + user interface) I decided to use WordPress (it generates an rss feed) and then upload that feed to the site.

 

I don't know if it was the best idea but well, you guys will clear things up.

 

This is the info so far, the errors can be seen at the indexText.php:

 

INCLUDE: <?php include("rss2html.php?XMLFILE=http://www.comicnoobs.com/news/?feed=rss2"); ?>

 

TEST INDEX: http://www.comicnoobs.com/indexTest.php

 

RSS: http://www.comicnoobs.com/news/?feed=rss2

 

I don't know what I'm doing wrong, I already checked the access rights on the server and all files have the "read" check enabled.

 

I'm really at a loss here, I'm used to work with .net and php is a new beast for me so...

 

I trust you guys will help me shed some light on the matter.

 

Please advice.

 

Regards,

 

Leo

 

PD: Let me know what you think of the site-comics !

 

Link to comment
Share on other sites

That error means that the files you are including don't exist. Try to make sure that the includes you use are including the right files at the right URLs

 

by the way, in the future, try posting some code if you want some good answers. You haven't given us anything to work with... at all

Link to comment
Share on other sites

Good night mikesta707,

 

Thanks for your reply.

 

Those files do exist, I have checked their physical position in the server, and I dont know what else to try.

 

Im attaching the php file for the indexTest.php where the include and errors are found.

 

What other file would you need?

 

Thanks in advance.

 

Regards,

 

Leo

 

[attachment deleted by admin]

Link to comment
Share on other sites

Hmm, well if your sure all the files are in the right place im not sure...

 

however try this, On line 103 in the file you gave me change this:

<?php include("rss2html.php?XMLFILE=http://www.comicnoobs.com/news/?feed=rss2"); ?>

to the following

<?php include("http://www.comicnoobs.com/news/?feed=rss2"); ?>

OR

<?php include("rss2html.php"); ?>

and see what happens.

 

It may also be helpful to see the page rss2html.php

and news/index.php (if there is one)

 

Hope that helps

Link to comment
Share on other sites

Hi!

 

Once, again, I appreciate your help.

 

No luck, but I have some data for you.

 

 

Hmm, well if your sure all the files are in the right place im not sure...

 

however try this, On line 103 in the file you gave me change this:

<?php include("rss2html.php?XMLFILE=http://www.comicnoobs.com/news/?feed=rss2"); ?>

to the following

<?php include("http://www.comicnoobs.com/news/?feed=rss2"); ?>

OR

<?php include("rss2html.php"); ?>

and see what happens.

 

It may also be helpful to see the page rss2html.php

and news/index.php (if there is one)

 

Hope that helps

 

The first change made this error appear:

 

Parse error: syntax error, unexpected T_STRING in http://www.comicnoobs.com/news/?feed=rss2 on line 1

 

Your second suggestiong trigger this one:

 

Fatal error: Call to undefined function feedforall_scripts_readfile() in /home/noobs/public_html/rss2html.php on line 765

 

Im attaching both news/index.php and rss2html.php for you to see.

 

Regards,

 

Leo

 

PD: Im also attaching a screenshot of my folder structure in the server. Maybe some folders or files need to be elsewhere?

 

[attachment deleted by admin]

Link to comment
Share on other sites

hmmm. Yeah this got me stumped. I've been looking at the rss2html.php page and that seems to want to take the rss feed and make it into html. Its kind of ridiculous but from what I can tell, the ?XMLFILE=http://www.comicnoobs.com/news/?feed=rss2" part of the include tells the page which rss feed to parse.

 

this is a real real long shot, but on line 29 of rss2html.php, try changing this line

 

$XMLfilename = "sample.xml";

to

$XMLfilename = $_REQUEST['XMLFILE'];

 

Remember to back up the original page that. That might just break everything horribly. Sorry if that doesn't help, this really got me stumped =(

Link to comment
Share on other sites

No luck, still shows up the same errors.

 

Now, if I already have an rss feed:

 

http://www.comicnoobs.com/news/?feed=rss2

 

Could I use that info as my NEWS section, in a different way?

 

I mean, isnt there a way to make that rss part of the site (without this include that clearly isnt working for me)

 

Any advice or suggestion will be appreciated.

 

Regards,

 

Leo

 

PD: It JUST ocurred to me that maybe if I show you guys what I did it could clear things up.

 

I followed this tutorial:

 

http://www.bytescout.com/how_to_create_news_section_on_your_website.html

Link to comment
Share on other sites

Well, as it is an RSS feed, you can really just let people subscribe to it. Just make a link to the rss file, and most browsers will be able to handle letting people subscribe to it. There are also buttons you can get from google/yahoo etc. to let people put your feeds in their igoogle, my yahoo, msn accounts

Link to comment
Share on other sites

Well, as it is an RSS feed, you can really just let people subscribe to it. Just make a link to the rss file, and most browsers will be able to handle letting people subscribe to it. There are also buttons you can get from google/yahoo etc. to let people put your feeds in their igoogle, my yahoo, msn accounts

 

Thanks mikesta707, however Im trying to create a "NEWS" section, something that can be easily manipulated by my and my friend.

 

Thats why I added wordpress (which generates the rss feed i plan to use as "news).

 

Problem I have is that I followed this tutorial (it seemed great): http://www.bytescout.com/how_to_create_news_section_on_your_website.html

 

But the last step (the include), isnt working at all.

 

Now Im wondering if theres a different way to create what I want (a news section taken out of an rss feed generated by wordpress)

 

Deep regards,

 

Leo.

 

PD: You have been great btw, this forum has proven really good so far.

Link to comment
Share on other sites

ahhh I see you want to convert your RSS feed from your blog and turn it into a type of news for your site. To be honest, there are much easier ways of making news on your site that don't involve RSS feeds. For example, you could make a simple php script that added news articles to your database (just make a news table, and make a form that inserts entries into it) Then you could make functions to access the news information a lot easier. Actually, once you get a simple news system working with Mysql, it would be easy to convert it into an RSS feed, rather than turning an RSS feed into a news section.

 

Hope that helps!

Link to comment
Share on other sites

ahhh I see you want to convert your RSS feed from your blog and turn it into a type of news for your site. To be honest, there are much easier ways of making news on your site that don't involve RSS feeds. For example, you could make a simple php script that added news articles to your database (just make a news table, and make a form that inserts entries into it) Then you could make functions to access the news information a lot easier. Actually, once you get a simple news system working with Mysql, it would be easy to convert it into an RSS feed, rather than turning an RSS feed into a news section.

 

Hope that helps!

 

Good day!

 

I wanted to avoid messing with the database itself, but Im gonna give it a try.

 

Regarding the error itself, no one else has any idea in why isnt it working?

Link to comment
Share on other sites

UPDATE:

 

Guys, Im pretty good with flash, Im thinking that, seeing as I already have he xml (rss feed), I can programm it on flash to display that feed (the title news, date and descriptions).

 

I will let you all know how it goes.

 

However, seeing as this is an all knowing php forum, I still find it weird that my "include" didnt work at all. So I want to leave this thread open. Maybe one of you will find the answer?

Link to comment
Share on other sites

Here's your problem: http://www.comicnoobs.com/rss2html.php?XMLFILE=http://www.comicnoobs.com/news/?feed=rss2

 

It returns a 403 error - Forbidden. You don't have permission to read the file, that is why PHP is throwing an error at you. It is strange though, seeing as you can view the file with no parameters in the URL. Check read/write permissions just incase though.

Link to comment
Share on other sites

Here's your problem: http://www.comicnoobs.com/rss2html.php?XMLFILE=http://www.comicnoobs.com/news/?feed=rss2

 

It returns a 403 error - Forbidden. You don't have permission to read the file, that is why PHP is throwing an error at you. It is strange though, seeing as you can view the file with no parameters in the URL. Check read/write permissions just incase though.

 

Thanks Mattal999,

 

I will check that specific file permissions on the server, be right back.

 

Update:

 

Ok back, Im attaching a screenshot of the file: rss2html.php , and the current permisions. Should I change something?

 

[attachment deleted by admin]

Link to comment
Share on other sites

Well, it obviously is a problem with rss2html.php, as the code isn't echoing as it should do.

 

Try finding another script that does the same job, or email the makers of rss2html.com (I guess that's where you got it :P) asking them for any tech support. All I can suggest I'm afraid.

Link to comment
Share on other sites

Hi guys!

 

I want to thank you all for your help. I really appreciate it.

 

I couldn't do what I originally wanted with php, but was able to do it with flash.

 

Is a beta (meaning that I'm working on it as we speak), but you can check how it works now:

 

www.comicnoobs.com

 

(told you all I was gonna keep you updated)

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.