 |
 |
 |
 |
 |
| Author |
Message |
Hawk
Joined: 29 Aug 2006 Posts: 6
|
|
Parsing errors |
|
Hello!
Today, when I transfered my websites to new hosts (has php5) from previous one (which had php4) I started getting hell alot of errors everywhere.
Here are the examples of errors on the page:
 |  | Warning: Error parsing /home/***/public_html/code/cms/data/urls.ini on line 5 in /home/***/public_html/code/cms/inc/plugins.inc.php on line 401
Warning: Error parsing /home/***/public_html/code/cms/data/urls.ini on line 5 in /home/***/public_html/code/cms/inc/plugins.inc.php on line 357
Warning: Error parsing /home/***/public_html/code/cms/data/urls.ini on line 5 in /home/***/public_html/code/cms/inc/functions.inc.php on line 495 |
Inside the admin panel, I'm getting errors aswell:
 |  | Warning: Error parsing /home/***/public_html/code/cms/inc/lang/en/templates.ini on line 33 in /home/***/public_html/code/cms/inc/functions.inc.php on line 768
Warning: Error parsing /home/***/public_html/code/cms/data/urls.ini on line 5 in /home/***/public_html/code/cms/inc/plugins.inc.php on line 401 |
Inside the templates, under "Comments":
 |  | Warning: ksort() expects parameter 1 to be array, null given in /home/***/public_html/code/cms/inc/mod/templates.mdu on line 231
Warning: reset() [function.reset]: Passed variable is not an array or object in /home/***/public_html/code/cms/inc/mod/templates.mdu on line 232
Warning: Invalid argument supplied for foreach() in /home/***/public_html/code/cms/inc/mod/templates.mdu on line 238 |
_________________ Oo |
|
| Fri Oct 06, 2006 9:43 am |
|
 |
Guest
|
|
|
Please login to hide the ads.
|
|
|
|
 |
Hawk
Joined: 29 Aug 2006 Posts: 6
|
|
|
|
Nvm, all fixed, bloody php5 doesn't like brackets 
_________________ Oo |
|
| Fri Oct 06, 2006 9:50 am |
|
 |
ksen

Joined: 04 Jun 2006 Posts: 142
|
|
|
|
so are u saying that u have made some fixes and cutenews is fully functional on PHP5 now?? if thats so, thats grt!! i read several post with php5 errors! Wud be really grt if u wid post the fixes that u did??
|
|
| Fri Oct 06, 2006 12:45 pm |
|
 |
Hawk
Joined: 29 Aug 2006 Posts: 6
|
|
|
|
Yes, from what I see everything works fine on php5 after the fixes.
First of all, FI-DD said that the brackets seem to give trouble to Cutenews powered on PHP5. So, I went in the files which throwed out the errors. Those were ***/data/urls.ini & ***/inc/lang/en/templates.ini . First I edited the templates.ini, I just replaced all [ & ], & after that { & } with empty box. Now the templates.ini looks like this:
 |  | header = "Templates"
make = "Create"
new = "Create new template"
newBasedOn = "based on"
name = "with name"
nameError_1 = "Characters You have entered are not allowed in a template's name"
nameError_2 = "A name of template You have entered is already used"
headerMaked = "Create template"
templateMaked = "Your template created"
areYouSureDelete = "Do you really want to delete this template "
yesDelete = "Yes, delete it"
headerDelete = "Delete template"
headerDeleted = "Delete template"
templateDeleted = "The template deleted."
delete = "[Delete template]"
managment = "Manage templates"
chosen = "Selected template"
choseOther = "Select other"
makeNew = "[Create template]"
help = "Help?"
editParts = "Edit templates"
part_active = "Active News"
part_full = "Full Story"
part_comment = "Comments"
part_commentform = "Comment form"
part_pagination = "Pagination"
part_commpagination = "Comments pagination"
part_dateheader = "Dateheader"
headerSaved = "Save template"
templateSaved = "The changes saved."
[template_variables_active]
title = "Title of the article"
id = "ID of the article"
avatar = "Show avatar image"
short-story = "Show the short story"
short-story-length = "Length of the short story"
full-story = "Show the full story"
full-story-length = "Length of the full story"
author = "Author of the article"
cutepath = "Path to the script"
imagepath = "Path to image directory"
link%3Dx/y = "For example: RSS of this article link=rss/post "
php-self = "$PHP_SELF"
date = "Shows the date"
if-logged.../if-logged = "Only displayed if the viewer is logged in"
not-logged.../not-logged = "Only displayed if the viewer is not logged in"
full-link.../full-link = "Link to the full story (only if there is any)"
comments = "Number of comments"
category = "Name of the category"
catheader.../catheader = "Link to the category (only if there is any)"
category-icon = "Shows the icon of the category"
views = "Number of views"
alternating = "Alternates the classes (Create 2 classes in your CSS: .cn_news_odd and .cn_news_even)"
[template_variables_full]
title = "Title of the article"
id = "ID of the article"
avatar = "Show avatar image"
short-story = "Show the short story"
short-story-length = "Length of the short story"
full-story = "Show the full story"
full-story-length = "Length of the full story"
author = "Author of the article"
cutepath = "Path to the script"
imagepath = "Path to the image directory"
link%3Dx/y = "For example: RSS of this article link=rss/post "
php-self = "$PHP_SELF"
date = "Shows the date"
if-logged.../if-logged = "Only displayed if the viewer is logged in"
not-logged.../not-logged = "Only displayed if the viewer is not logged in"
page-link.../page-link = "Shows the pages only when the article was splitted"
pages = "Number of pages when splitting an article with "<!--nextpage-->""
comments = "Number of comments"
category = "Name of the category"
catheader.../catheader = "Link to the category (only if there is any)"
category-icon = "Shows the icon of the category"
views = "Number of views"
[template_variables_comments]
author = "Author of the comment"
mail = "Author's e-mail"
title = "Title of the news"
id = "ID of the news"
date = "Date of the comments"
avatar = "Show the avatar"
comment = "Show the comments"
comment-id = "ID of the comment"
comnum = "Number of the comment"
cutepath = "Path to the script"
link = "Link to the article"
if-logged.../if-logged = "Only displayed if the viewer is logged in"
not-logged.../not-logged = "Only displayed if the viewer is not logged in"
answer.../answer = "Only displayed if there is an answer to the comment"
answer = "Answer to the comment"
alternating = "Alternates the classes (Create 2 classes in your CSS: .cn_comment_odd and .cn_comment_even)"
[template_variables_commentform]
title = "Title of the news"
id = "ID of the news"
username = "Username if logged in"
usermail = "Usermail if logged in"
password = "Password if logged in"
cutepath = "Path to the script"
if-logged.../if-logged = "Only displayed if the viewer is logged in"
not-logged.../not-logged = "Only displayed if the viewer is not logged in"
savedname = "Name of the poster if stored in a cookie"
savedmail = "Mail of the poster if stored in a cookie"
remember = "Shows the "Remember me" checkbox which saves the posters data in a cookie""
smilies...smilies:N = "Shows smilies (N smilies per line)"
[template_variables_prevnext]
prev-link.../prev-link = "Generates a link to the previous page (if there is any)"
next-link.../next-link = "Generates a link to the next page (if there is any)"
pages = "Shows the pages like this: <a href='#'>1</a> <a href='#'>2</a> <a href='#'>3</a> <a href='#'>4</a>"
current-page = "Displays the current page"
total-pages = "Displays the total pages"
[template_variables_cprevnext]
prev-link.../prev-link = "Not available"
next-link.../next-link = "Not available"
pages = "Not available"
[template_variables_dateheader]
date-link.../date-link = "Links to the news belonging to the dateheader"
dateheader = "Displays the dateheader" |
Next, I had to fix the urls.ini. Since in urls.ini only things to be fixed are the { & } brackets, so I did the same thing like with templates.ini. After that done, your links will be dead (it will say title.html, which will open the exact same page on which you were at that moment). So, you have to fix one more thing before everything works. On the first part of urls.ini,  |  | [home]
post = "title.html"
/* year/month/day/ */ | you have to put brackets back in order to get your links working again. so this part of code should look like this:
 |  | [home]
post = "{title}.html"
/* year/month/day/ */ |
Notice that for link I only use a {title}.html . If you use a date, you'll obviously put {year}, {month} & {date} for links to function.
Important thing is that you have to include the brackets in your template files like you used to, otherwise links won't work.
That's pretty much what I did & it works like a charm. Hope this info helps you out.
Cheers
_________________ Oo |
|
| Fri Oct 06, 2006 8:54 pm |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
|
|
 |
 |
 |
|