Welcome to Server Circle. It's a friendly site and all levels of experience are welcome. Be aware that we use cookies for your login.
Server Circle - Ask questions about Servers and get answers from experts.
Beta (0.24 sec)
PHP loading include files twice !

Basically any file mentioned in an include using normal PHP or @import in Smarty is loading twice on my homepage according to Apache logs. I can't think what might be causing it. I've looked for duplicate mentions.

Any ideas ? It's a mystery.
Asked by:
Bogofilter
1565 points
 Report Abuse
 Share Page - Category: Programming - Tags: PHP loading include files twice !
 Enter your response
Please use Pastie.org to paste lengthy code or to fix formatting issues with code
  • Responses in reverse (4)

Best Answer

Have you tried using include_once and see is the problem dissapears.

If it does then I suspect its a mod_php "multi-pass" issue. Upgrade php and mod_php to sort it out.

Response by:
JacquiCaren
80 points
Easy to miss these things with a few vhosts.

Response by:
Trinity
2782 points
I had set up logging so there were no images being logged to Apache's logs and then left both Customlog entries in the vhost and that fixed it. Thanks for your help though.

Response by:
Bogofilter
1565 points
Thanks very much.

I'm looking at two entries for Customlog in the vhost at the moment.

Response by:
Bogofilter
1565 points


  • Related Questions
About Us : Contact Us : Etiquette : Terms : CDN Failover : ShorterURL : CDN Fallback : © 2013 Server Circle