included files not parsed in php in wamp server 1.7.0
Posted by: sweet_nancy_21 (---.pacenet-india.com)
Date: March 26, 2007 06:24PM

i build one website in which for header and footer part of my pages i have created seperate include file. it is working fine in previous version but on wamp 1.7.0 it is not displaying the included file..is there any settings in php.ini file for that or something else?
Please Help.

Options: ReplyQuote
Re: included files not parsed in php in wamp server 1.7.0
Posted by: CyberSpatium (71.237.217.---)
Date: March 26, 2007 09:57PM

for security reasons, php is set to not display all error messages, since some messages could be used by a potential hacker to get information about your server. since wamp is for development, you should turn on all error reporting, so all php errors get displayed.

to do this, left click on the wamp tray icon menu -> config files -> php.ini

find:
error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT

change it to:
error_reporting = E_ALL

now save the file and restart apache for the new setting to take effect. now try your code again, and you will see any errors it generates.


CyberSpatium
----------------------
WAMP English Forum Admin

Need help? Check out my WAMP User Manual/Guide here!


Please visit my latest website Clarify Loans:
ClarifyLoans.com

Options: ReplyQuote
Re: included files not parsed in php in wamp server 1.7.0
Posted by: sweet_nancy_21 (---.pacenet-india.com)
Date: March 27, 2007 07:38AM

thanks for reply..

I have tried it ..but still it is not working. it is not showing any error message or any content of include files.. i don't know what the problem is.. please help..urgently...

Options: ReplyQuote
Re: included files not parsed in php in wamp server 1.7.0
Posted by: CyberSpatium (71.237.217.---)
Date: March 27, 2007 08:55AM

make sure you are using full php tags, not short tags. take a look at the first line of your php code, full php tags look like:
<?php

short tags look like:
<?

so, make sure you are using full tags.


CyberSpatium
----------------------
WAMP English Forum Admin

Need help? Check out my WAMP User Manual/Guide here!


Please visit my latest website Clarify Loans:
ClarifyLoans.com

Options: ReplyQuote
Re: included files not parsed in php in wamp server 1.7.0
Posted by: craigypoos (---.nott.cable.ntl.com)
Date: April 12, 2007 08:01PM

I too am having a similar problem. When viewing a site with some php includes on my machine, all I get is a "Parse Error: Syntax Error - Unexpected ';' in......on line 5" error when the first php include happens. Strange thing is, there is no semi-colon on line 5 anyway, so how it can possibly come across an unexpected one is beyond me! However, when I upload the site to my web host server, it works fine.

History: Had XAMMP installed on old XP machine and my php worked fine. Machine blew up so bought a new machine with Vista (Bluch!) and installed XAMMP on that. Problem starts to occur. So hunted round and found WAMP which is Vista (Bluch!) compatible, but seemingly the problem persists. Changed Error reporting as suggested and also I always use long php tags.

Please help.

Craigypoos



Post Edited (04-12-07 21:18)

Options: ReplyQuote
Re: included files not parsed in php in wamp server 1.7.0
Posted by: yfastud (72.236.169.---)
Date: April 12, 2007 08:21PM

Change error report to see what the problem are but not solve the problem

Have fun,

[www.jlbn.net] (testing WAMPS)
[test.jlbn.net] (testing codes)

Options: ReplyQuote
Re: included files not parsed in php in wamp server 1.7.0
Posted by: CyberSpatium (71.237.217.---)
Date: April 12, 2007 09:29PM

post your code.


CyberSpatium
----------------------
WAMP English Forum Admin

Need help? Check out my WAMP User Manual/Guide here!

Please visit my latest website Clarify Loans:
clarifyloans.com


Like my free support? Help support me by making a donation today!

Options: ReplyQuote
Re: included files not parsed in php in wamp server 1.7.0
Posted by: craigypoos (---.nott.cable.ntl.com)
Date: April 12, 2007 09:48PM

Here's the code from the problem page (leftbar.php)...

<?php
switch ($content){
case "contact":
echo ?>
<h2>...Just html in here, but it does include a couple of ampersandXXXXsemicolon type chars....</h2>
<?php ;break;
default:
echo ?>
<h1>....More html....</h1>
<?php ; break;}
?>

....which is the entire contents of an include using this code...

<?php
include 'leftbar.php';
?>

Like I said, it all works fine when I upload to my remote 'live' server (which I happen to know runs php4.1) but the problem arises through both WAMP and ZAMMP instalations on my VISTA machine.

Many thanks by the way for your continued help.

Craigypoos

Options: ReplyQuote
Re: included files not parsed in php in wamp server 1.7.0
Posted by: yfastud (72.236.169.---)
Date: April 12, 2007 10:17PM

What is the soft you're trying? If it's free, I try out then let you know the outcome

Have fun,

[www.jlbn.net] (testing WAMPS)
[test.jlbn.net] (testing codes)

Options: ReplyQuote
Re: included files not parsed in php in wamp server 1.7.0
Posted by: CyberSpatium (71.237.217.---)
Date: April 13, 2007 08:33AM

<?php

switch ($content) {
case "contact":
echo "<h2>...Just html in here, but it does include a couple of ampersandXXXXsemicolon type chars....</h2>";
break;
default:
echo "<h1>....More html....</h1>";
break;
}

?>



CyberSpatium
----------------------
WAMP English Forum Admin

Need help? Check out my WAMP User Manual/Guide here!

Please visit my latest website Clarify Loans:
clarifyloans.com


Like my free support? Help support me by making a donation today!

Options: ReplyQuote


Sorry, only registered users may post in this forum.