I’ve implemented the simple search form tag into my site, but when I test it out I get an error:
Warning: Cannot modify header information - headers already sent by (output started at /path.php:14) in /core/core.functions.php on line 296This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.
The active forums are here.
June 15, 2009 7:51pm
Subscribe [4]#1 / Jun 15, 2009 7:51pm
I’ve implemented the simple search form tag into my site, but when I test it out I get an error:
Warning: Cannot modify header information - headers already sent by (output started at /path.php:14) in /core/core.functions.php on line 296#2 / Jun 15, 2009 8:02pm
Check your path.php file. There is probably white space below the the closing php tag ( ?> ). You can simply remove that tag & reupload the file.
-greg
#3 / Jun 15, 2009 8:04pm
No white space…
#4 / Jun 15, 2009 8:06pm
can you delete the ending php tag, upload & try it again?
-greg
#5 / Jun 15, 2009 8:08pm
Done… same result
#6 / Jun 15, 2009 8:11pm
can you post your path.php file here? Please change the name of your system directory to simply “system”
Also, please use [ code ] tags around the code. 😊
=greg
#7 / Jun 15, 2009 8:13pm
<?php
// DO NOT ALTER THIS FILE UNLESS YOU HAVE A REASON TO
// Path to the directory containing your backend files
$system_path = "./system/";
$template_group = "";
$template = "";
$site_url = "";
$site_index = "";
?>Is it because my items are empty?
#8 / Jun 15, 2009 8:15pm
You still have a closing php tag at the bottom of the file. Did you remove it?
#9 / Jun 15, 2009 8:16pm
Yes, I did originally, but then I downloaded the file again and you see the system put it back.
#10 / Jun 15, 2009 8:19pm
I just did it again and it’s working now… Now the issue is that it’s not going to the correct “search_results” template_group/template even though I have it specified.
results_page="catalog/search"#11 / Jun 15, 2009 8:19pm
ExpressionEngine wouldn’t be putting the closing php tag back in there. Download path.php, delete the closing PHP tag, delete path.php on your server & reupload.
Do you have any kind of PHP caching going on in your system?
-=greg
#12 / Jun 15, 2009 8:22pm
No PHP caching that I know of… I didn’t turn anything on.
#13 / Jun 15, 2009 9:16pm
Did you replace the file? by deleting & uploading?
#14 / Jun 15, 2009 9:21pm
Yes… Did you see the other post, I mentioned it’s working now, but not pulling the right template_group and template.
{exp:search:simple_form weblog="movies" results_page="catalog/search"}It’s defaulting to “search/results”.
#15 / Jun 15, 2009 9:26pm
ah, oops, looks like we posted over eachother & I plum missed it. 😊
try result_page=’‘ not results_page
=greg