Page 1 of 1

PHP not being executed within INCLUDE function

PostPosted: 09. April 2010 12:25
by SEOCoder
Hi all,

I have just set up on a new computer running Windows 7. I have downloaded and installed XAMPP 1.7.3. The issue that has arisen is that the INCLUDE function is working, it is including the content of the external files, but it is not executing the PHP scripts located within the external files.

The files used are fine, this works on other machines and has been running on websites on several different servers for months. Does anyone know what is causing this problem on my machine, is it a compatibility or a configuration issue.

I really need to fix this urgently, any help is greatly appreciated.

Re: PHP not being executed within INCLUDE function

PostPosted: 09. April 2010 13:40
by Altrea
SEOCoder wrote:I really need to fix this urgently, any help is greatly appreciated.

Why don't you post us your include line (and the lines around) and your included file?
Without code it's very difficult to analyse what's going wrong.

Do you use short open tags?

Re: PHP not being executed within INCLUDE function

PostPosted: 19. April 2010 17:19
by JessicaD
SEOCoder,

Microsoft does have an official Windows 7 Support Forum located here http://tinyurl.com/9fhdl5 . It is supported by product specialists as well as engineers and support teams. You may want to also check the threads available there for additional assistance and guidance.

Jessica
Microsoft Windows Client Team

Re: PHP not being executed within INCLUDE function

PostPosted: 02. May 2010 01:03
by krenliance
I have the same problem. It's just a simply code, but it doesn't works.

Include:

<?php
include("dosomething.php");
do_something();
?>

====================================================================
External file: (called "dosomething.php" - In the same path directory)
<?php
function do_something(){
echo "I'm doing something";
}
?>

====================================================================

If anyone can tell me why it doesn't work i'll be very thankfull

Re: PHP not being executed within INCLUDE function

PostPosted: 02. May 2010 02:03
by JonB
I have a simple test to confirm a suspicion I have.

Try moving one of those includes that will not execute so the source is inside the Program Files hierarchy.

If it executes correctly, then its a Windows script execution issue.

can't hurt.

:-)