Jump to content

Recommended Posts

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! :D

 

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.

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?

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 :)

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.