Hi,
I am trying to setup trade script (www.arrowscripts.com) on my website. When I include <?php virtual ("/cgi-bin/at3/in.cgi"); ?> in the top of my 'index.php' I have thease errors:
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent in /home/morazzia/public_html/includes/bootstrap.inc on line 862
Warning: Cannot modify header information - headers already sent by (output started at /home/morazzia/public_html/includes/bootstrap.inc:862) in /home/morazzia/public_html/includes/bootstrap.inc on line 531
Warning: Cannot modify header information - headers already sent by (output started at /home/morazzia/public_html/includes/bootstrap.inc:862) in /home/morazzia/public_html/includes/bootstrap.inc on line 532
Warning: Cannot modify header information - headers already sent by (output started at /home/morazzia/public_html/includes/bootstrap.inc:862) in /home/morazzia/public_html/includes/bootstrap.inc on line 533
Warning: Cannot modify header information - headers already sent by (output started at /home/morazzia/public_html/includes/bootstrap.inc:862) in /home/morazzia/public_html/includes/bootstrap.inc on line 534
But, when I include <?php virtual ("/cgi-bin/at3/in.cgi"); ?> bettwen <head></head> tags in 'page.tpl.php' file everything works fine and then my CPU and server LOAD increase dramatically. The problem is not in 'in.cgi', but in virtual() command. When I run virtual command and call an external file I actually execute two processes instead of one. When 1 surfer load my site, he loads 'index.php' only. That is one process. But when I virtual() include something (anything) then I calling another process. So for each load of my page there are two processes now. Even if 'in.cgi' would only print out "hello world" and nothing else, the problem would be the same.
Btw, I try to setup meny other trade scripts in drupal but the problems was the same!
Does anyone have solution for my problem?
Regards,
Rale
Comments
This is usually caused by
This is usually caused by whitespace at the beginning or the end of your include file.
Took a look at the file you
Took a look at the file you sent, and it's not going to work that way.
The CGI script is outputting text to the browser. Doing that at the top of index.php means Drupal can't send session headers - they can only be sent when no text has yet been output to the browser.
You'll want to put the virtual() call at the top of your theme's page.tpl.php, most likely, or write a custom module to call it at the top of pages. That should work much better.
Another option
Same here. Maybe a blank space in a file or a file got corrupted during FTP transfer. If you can't locate the file that's causing the error here is another option:
1-Backup your database and your files so you can roll back if the following doesn't work.
3-Delete all Drupal core files. I mean ALL. But you should keep non core files. Such as the 'sites' folder and 'settings.php' file.
4-Download appropriate Drupal version at http://drupal.org/node/3060/release
You must download the same Drupal version as your broken site. For example if your Drupal version is 6.13 then download 6.13. Do not download a more recent version. You can upgrade later anyway.
5-That's it. If successful you should be able to access your site.
If it doesn't work try to create a new settings.php file. And make sure all files security permissions are set appropriately.
I just open the database,
I just open the database, marked the following tables:
and also any table with
cache_prefix and emptied all these table.The site is now working again :)
Mohammed J. Razem
http://www.vardot.com