Jump to content


What would cause php to not be parsed?


3 replies to this topic

#1 Jynxis

    Young Padawan

  • Members
  • Pip
  • 132 posts
  • Location:The Shadows

Posted 01 June 2007 - 04:14 PM

My computer crashed a while ago, and i finally decided to re-install PHP,MySQL,Apache.
All is great, until until i try installing this script.

Whats giving me a problem is this:
include("template.class.php");
will output the files code.While
include("template.php");
will act normally.

I installed everything like i normally would.\

If i had my backup of the PHP folder/Apache folder. i would use them as refrence, however, that is not the case at this time as those backups are on a disc, which happend to go missing from my desk.

Is it to do with the php.ini or httpd.conf?

#2 Demonslay

    P2L Jedi

  • Members
  • PipPipPip
  • 970 posts
  • Gender:Male
  • Location:A strange world where water falls out of the sky... for no reason.
  • Interests:Graphic Design, Coding, Splinter Cell, Cats

Posted 01 June 2007 - 05:11 PM

It should parse normally, I don't see why it wouldn't, since the very last extension is valid, and on most systems that is the only part that seems to matter.

To answer your last question though, it would have to do with the httpd.conf files, under the AddType. You could simply edit it to look like this and see if that changes anything (after restarting your server of course).

AddType application/x-httpd-php .php .phtml .class.php .html .htm


#3 rc69

    PHP Master PD

  • P2L Staff
  • PipPipPipPip
  • 3,827 posts
  • Gender:Male
  • Location:Here
  • Interests:Web Development

Posted 01 June 2007 - 06:13 PM

His problem could be short-tags. Seeing as .php is parsing, i don't see why the .htaccess file would need to be modified.

Make sure the template.class.php file has a proper <?php opening tag and not just <?.

His problem could be short-tags. Seeing as .php is parsing, i don't see why the .htaccess file would need to be modified.

Make sure the template.class.php file has a proper <?php opening tag and not just <?.

#4 Jynxis

    Young Padawan

  • Members
  • Pip
  • 132 posts
  • Location:The Shadows

Posted 01 June 2007 - 08:58 PM

i dont use short tags because i know that not all web hosts have it enabled.

This is quite wierd, because this is the first time i've had this problem... and i've installed apache/php/mysql countless times, with success.


:EDIT:

I dont know what i did.. but i fixed it. Hmm.
Here's hoping it doesnt break.

Edited by PlaGuEX, 01 June 2007 - 09:28 PM.






1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users