You are not logged in.
Hello. I have a big problem. I installed php. For an example, script <? print "hello"; ?> working good, but script like that:
<? print "labas"; ?>
<?php
session_start();
include("config.php");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=windows-1257" />
<title>4Friends</title>
<meta name="keywords" content="" />
<meta name="description" content="" />
<link href="default.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="header">
<div id="logo">
<h1><a href="#">Hello</a></h1>
<h2><a href="?">Bla bla bla </a></h2>
</div>
</div>
<div id="menu">
<ul>
<li class="first"><a href="#" title="">News</a></li>
<li><a href="#" title="">Menu</a></li>
<li><a href="#" title="">Skyrelis 1 </a></li>
<li><a href="#" title="">Skyrelis 2 </a></li>
<li><a href="#" title="">Skyrelis 3 </a></li>
</ul>
</div>
<div id="content">
<div id="sidebar">
<div id="login" class="boxed">
<h2 class="title">Wah</h2>
<div class="content">
<? include("nevermind :)"); ?>
</div>
</div>
<div id="updates" class="boxed">
<h2 class="title">Bla bla bla </h2>
<div class="content">
<ul>
<li>
<h3>Balandio 20, 2007</h3>
<p><a href="#">Pew pew</a></p>
</li>
</ul>
</div>
</div>
<div id="partners" class="boxed">
<h2 class="title">Aaa</h2>
<div class="content"></div>
</div>
</div>
<?
PHP CODE WITCH DOESNT MATTER HERE
?>
</div>
<div id="footer"><p>
<a href="http://validator-test.w3.org/check?uri=referer"><img
src="http://www.w3.org/Icons/valid-xhtml10-blue"
alt="Valid XHTML 1.0 Strict" height="31" width="88" /></a>
</p>
<p>
<a href="http://jigsaw.w3.org/css-validator/">
<img style="border:0;width:88px;height:31px"
src="http://jigsaw.w3.org/css-validator/images/vcss"
alt="Valid CSS!" />
</a>
</p>
</div>
</body>
</html>
<?
sql_disconn();
?>
Displays only white screen. short_open_tag is on in php.ini. Can anyone say what is the problem? I tryed to run this script on windows WAMP, and this goes good.
Last edited by neXTPeer (2007-07-28 08:09:09)
Offline
It's got to be some misconfiguration on your end. I just put the file in my server and works fine.
R
Offline
It's got to be some misconfiguration on your end. I just put the file in my server and works fine.
R
Am. I still don't get it what is the problem.
Offline
Read your web server's logs. Always a great source of info for misbehaving scripts.
Depending on whether you're using cgi/mod_php/whatever, you may need to chmod +x the php file.
James
Offline
Also, you can try to add full tags to a copy and see if that one runs okay. That will narrow down whether it is indeed a short tags config issue or not. Another idea is to put a phpinfo.php file containing <?php phpinfo() ?> in the same directory then surf to it and check out exactly what your server wide and local config settings are for the current web docroot.
Offline
ralvez wrote:It's got to be some misconfiguration on your end. I just put the file in my server and works fine.
R
Am. I still don't get it what is the problem.
The whole extent of your code is 5 php statements and the rest is HTML but you get a blank page ... take the php code out and see if the HTML shows. Make sure you set the permissions of that file to 744, and test. You should be able to see the html document. If you do not see anything then type on a console (as root) "tail -f /var/log/httpd/error_log" so you can see the errors that the server returns.
If HTML works, then begin to add the php code one block at a time (you only have 5 so that should not be too hard) until it fails and then analyze the logs to see what upsets your server.
Hope this helps.
R
Offline