Something wrong with Apache..
Posted by: shyghar (---.13-79-r.retail.telecomitalia.it)
Date: January 21, 2008 02:13PM

hi,
i have a problem.
i installed wamp, create a database, write some .php page and i tryed to test my site..
something didn't work.

i click on "my project" section on "localhost" page and it gave me the php code and not the "result"
on the browser i read:

setContent("slogan", date("F j, Y, G:i a"winking smiley."L'Aquila, Abruzzo"winking smiley; if(!isset($_SESSION['PROVINCIA'])) { $provincia = new DBProvincia(); $provincia->setAllProvincia(); $provincia->setPagingResult(5); $_SESSION['PROVINCIA'] = $provincia; } else { $provincia = $_SESSION['PROVINCIA']; } $content = $provincia->renderSearchPage(); switch($state) { case "main": $loginTmpl = new Template("dtml/login_form.html"winking smiley; $basemenu = new Template("dtml/default_menu.html"winking smiley; $main->setContent("basemenu", $basemenu->get()); $main->setContent("utilmenu", $loginTmpl->get()); break; case "logged": $basemenu = new Template("dtml/logged_menu.html"winking smiley; $main->setContent("basemenu", $basemenu->get()); switch($_SESSION['user']['level']){ case 'u': break; case 'a': $adminmenu = new Template("dtml/admin_menu.html"winking smiley; $main->setContent("utilmenu", $adminmenu->get()); break; } break; } $main->setContent("body", $content); if(isset($_SESSION['error'])){ $main->setContent("footer", $_SESSION['error']); } $main->close(); ?>

this is the php code generated by my code.. but i want to see the page T___T
on my friend's linux pc it work..


someone know why i have this problem? i think is a apache problem but i don't know how can i resolve

waiting 4 reply ^^



i have vista home on my pc, Apache version 2.2.6, php version 5.2.5

Options: ReplyQuote
Re: Something wrong with Apache..
Posted by: yfastud (Moderator)
Date: January 21, 2008 03:14PM

Make sure to use full tag <?php ... ?> if not enable shot_open_tag in php.ini

Have fun,

FREE One A Day
FREE Photo
FREE Games
FREE Websites
FREE Portable GPS
FREE WAMP Guides

Options: ReplyQuote
Re: Something wrong with Apache..
Posted by: shyghar (---.13-79-r.retail.telecomitalia.it)
Date: January 21, 2008 03:29PM

thank you!!
now it work ^^

Options: ReplyQuote
Re: Something wrong with Apache..
Posted by: yfastud (Moderator)
Date: January 21, 2008 04:06PM


Options: ReplyQuote
Re: Something wrong with Apache..
Posted by: Fracture (---.demon.co.uk)
Date: January 21, 2008 04:15PM

The Problem is not actually anything to do with Apache, its the PHP.ini file that holds the answer.

I believe the newer versions of PHP come with it set to strict tag mode i.e you must use <?php ?> instead of the <? ?> that has become common lazy coding practice.

You can change this is the PHP.ini file quite easily and after restarting WAMP, your problems should be sorted.

Options: ReplyQuote
Re: Something wrong with Apache..
Posted by: yfastud (Moderator)
Date: January 21, 2008 05:28PM

He he... he he... ;-)

Already pointed it out and he's already solved it too

Have fun,

FREE One A Day
FREE Photo
FREE Games
FREE Websites
FREE Portable GPS
FREE WAMP Guides

Options: ReplyQuote


Sorry, only registered users may post in this forum.