Jump to content

Recommended Posts

it dosent matter that you have put your file in the var/www file. if you do not have php installed on the server then you have nothing to compile the php. your image shows that you are seeing a raw text page with php tags in it. if it was compiled properly you would not see:

<?php
echo 'test';
?>

you would see:

test

Link to comment
https://forums.phpfreaks.com/topic/251542-helpp-indexphp/#findComment-1290027
Share on other sites

I think there are 2 issues here,

 

I think that SURAT has not removed the default index page in /var/www/ and has also not set the default document type for php

 

Also, The screenshot when navigating to index.php suggests that the php code is not being parsed, so i would guess its either not installed or libapache2-mod-php5 (dependant on OS) is not installed.

 

You could also check the Apache OPTS in the /etc/conf.d/apache2 file, ensure you have php5 listed

 

APACHE2_OPTS="-D DEFAULT_VHOST -D SSL -D SSL_DEFAULT_VHOST -D PHP5"

 

Just my thoughts anyway,

 

Regards

 

DK

Link to comment
https://forums.phpfreaks.com/topic/251542-helpp-indexphp/#findComment-1290046
Share on other sites

Hah!  You're right, I didn't even see that link, my brain filtered it out as a signature.

 

SURAT, you do not have PHP installed or your apache is not configured for PHP.  The best recommendation is to simply uninstall apache and install a PHP/Apache stack appropriate for your operating system.  XAMPP for linux and WAMP for windows.

Link to comment
https://forums.phpfreaks.com/topic/251542-helpp-indexphp/#findComment-1290078
Share on other sites

  • 2 weeks later...
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.