PHP "include" fails (redux) -


sorry "php include" chapter searching on gives 90,000 entries , feel i've read 1/2 of 'em.

i'm resurrecting web page wrote 9 years ago on win 2000 pro. since i've ported ubuntu 10.0, windows 7 , published online through 2 different hosting sites. i'm on ubuntu 14.04 , cannot php "include" command work. code follows:

<!doctype html public "-//w3c//dtd html 4.01 transitional//en"> <html> <head> <title>main menu movietime.php</title> <meta http-equiv="content-type" content="text/html; charset=iso-8859-1"> </head>  <?php error_reporting(e_all);?>  <body background="wood.gif"> <form method="post"> <input type="hidden" name="hiddenn" value="hide & "> <hidden name="hidden" value="well hid"> </form>  <?php include dirname(__file__).'menu.php'; ?>  <h1 align="center"><strong>movie database</strong></h1> <h2 align="center"><strong>main menu  </strong></h2>   <br>   <br>   <br> <?php echo '<h3 align="center"><strong>'.$status.'</strong></h3>'; ?> 

the problem here include 'menu.php' never happens links rest of application don't appear. code menu.php is:

<div align="center"> <font size="2"> <a href="../">home page</a> &nbsp;&nbsp; <a href="create.php">create movie table</a> &nbsp;&nbsp; <a href="drop.php">delete movie table </a>&nbsp;&nbsp; <a href="list_radio.php">list</a>&nbsp;&nbsp; <a href="add.php">add movie</a> <a href="delete.php">delete movie</a></font> </div> 

the follow-on php statement display $status works. i'd show resultant page don't have enough points ( think ... first time on here ).

things have tried are:

  • ctrl-u on firefox shows source. source displayed ctrl-u no different original code.

  • i set php_errors.log file in /var/log , pointed within
    php.ini. nothing ever goes it. permissions 755. even
    misspelled "include" , still no errors.

  • substituted php.ini_development php.ini , still no go.
    (error_reporting , display_errors enabled in both).

  • i tail -f apache access.log in 1 xterm window , tail -f error.log in another. time see output in error.log when shutdown/startup apache. time see output in access.log when reload page. shows movietime.php , wood.gif , that's it.

  • tried substituting full directory reference "dirname(file)" in include statement ... nogo.

don't know else @ point. i'm running apache 2.4.7 , php 5.5.9

i forward , suggestions / insights.

--thanks --gary

make sure urls have absolute path, like: /path/file.php not path/file.php


Comments

Popular posts from this blog

Django REST Framework perform_create: You cannot call `.save()` after accessing `serializer.data` -

Why does Go error when trying to marshal this JSON? -