ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

Main Area and Open Discussion > General Software Discussion

Bumfuzzled again: PHP doesn't work on ONE (1) page <whimper /> ...

(1/3) > >>

barney:
I don't even know how to troubleshoot/research this one.  There's a local Apache/MySQL/PHP installation on my dev box, latest - I think? - versions of each.

PHP files load just fine from most of the subdirs of the Web root.  However, there's one HTML (index.html) file that simply does not allow PHP to be recognized.  It's driving me buggy.  I've tried reinstalling both Apache and PHP, to no avail.  Nothing I can find in the HTML and related CSS file(s) would appear to be normal.  But a simple
--- Code: PHP ---<?php include 'file.ext'; ?> doesn't work, nor does it highlight properly in the editor (Komodo Edit).  As stated in the post title, I'm bumfuzzled :'(.

Eóin:
One guess, shouldn't the extension have to be .php, i.e. index.php?

mouser:
umm...

the lack of syntax highlighting should be a clue.

in php you need parentheses to use parentheses with include, as its a function.  e.g. include('file.ext'), don't you?
actually i see from php help pages you don't need parentheses.. though clearly your ide syntax highlighter thinks you do.. bah stupid language kludges.

barney:


One guess, shouldn't the extension have to be .php, i.e. index.php?
-Eóin (March 22, 2011, 07:46 PM)
--- End quote ---

That lets PHP know it's a PHP page, but I've oft included
--- ---<?php ... ?> in html pages w/o harm.  Although, perhaps I need to make some adjustment to httpd.conf?


--- --- <?php
    echo "Menu";
    include ('sidemenu.html');
  ?>is the particular bit that's not being recognized.

Have I forgotten some httpd.conf configuration?  This is  a new installation, so I may have overlook some configuration, but I cannot see it (after many reviews of both httpd.conf and php.ini)

the lack of syntax highlighting should be a clue.
-mouser (March 22, 2011, 08:14 PM)
--- End quote ---

Yeah, I concur, but I cannot determine what the clue indicates.  Other pages indicate properly , some .html , some .php.

barney:
 :-[ :-[ :-[ :-[ :-[ :-[ :-[
I was calling the wrong file.
 :-[ :-[ :-[ :-[ :-[ :-[ :-[

Doesn't change the rest of my confusion, though.

I was so certain of the file name that I never bothered to check that it was in place.  Damned dumb tyro error, ya know?

<sigh> Will I ever learn?</sigh>

Navigation

[0] Message Index

[#] Next page

Go to full version