toasty Posted October 13, 2007 Share Posted October 13, 2007 I'm modifying a webpage that has about 3 different PHP scripts on it, so far all of them work together flawlessly. I'm trying to incorporate a blog app (cutephp), however when I perform a specific operation (adding a comment), the script fails and it outputs an error. Under normal working conditions the inclusion of the blog's code looks like this (which is NOT in the page's php header tag): <?PHP $template = "HomePage"; $number = "1"; $category = "1"; include("cutenews/show_news.php"); ?> The weird thing is that if I take cutephp's include and place it in the header, the problem with the comment goes away, however it opens up numerous other complications that would probably be even harder to work around. When I leave the code as-is, the script works great, but the comments is jacked. If I remove all the other PHP includes from the page so that only CutePHP's remains, then the blog works totally as intended. I've asked for help on the script's forum page, and while they're very helpful, they also tend to take a very long time to respond (usually). I don't imagine that anyone around here happens to know the in and outs of CutePHP's script, but I was wondering/hoping that maybe there is some general PHP practice I'm unaware of that might help. Thanks guys! The page it's being tested on is located here. - after you click the comment link at the bottom of the article and then fill out the comment form, the problem manifests when you hit the "Add comment" button. Quote Link to comment https://forums.phpfreaks.com/topic/73127-includes-from-multiple-scripts-conflicting/ Share on other sites More sharing options...
kratsg Posted October 13, 2007 Share Posted October 13, 2007 Well, what do you mean PHP header? The code for cutenews can go anywhere. I've worked with that script before (very clean and nice) and I've not encountered any problems like that. After testing on your site, I can't post since it says that I didn't type in a name... Could you show a little bit more of the code so I can understand what's before and after it? Quote Link to comment https://forums.phpfreaks.com/topic/73127-includes-from-multiple-scripts-conflicting/#findComment-368766 Share on other sites More sharing options...
toasty Posted October 14, 2007 Author Share Posted October 14, 2007 Well, what do you mean PHP header? The code for cutenews can go anywhere. I've worked with that script before (very clean and nice) and I've not encountered any problems like that. After testing on your site, I can't post since it says that I didn't type in a name... Could you show a little bit more of the code so I can understand what's before and after it? Thanks for the reply Kratsg. Someone in another forum mentioned that there might have been an issue with conflicting variables or functions between CutePHP and another script; sure enough that was the case. Took me a few hours but I was able to find the duplicated variables and after Replace All in about 13 files, I was able to rename the variable in the other script and everything seems hunky doory. Thanks again for taking the time Quote Link to comment https://forums.phpfreaks.com/topic/73127-includes-from-multiple-scripts-conflicting/#findComment-369460 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.