简体   繁体   中英

php file doesn't work

i have problem with php on my dedicated server

apache2 doesen't want to execute php files

when i try to open my site in browser for example mysite.com/index.php

my browser just downloaded file index.php

any suggestions?

here my php.conf

<IfModule prefork.c>
  LoadModule php5_module modules/libphp5.so
</IfModule>
<IfModule worker.c>
  LoadModule php5_module modules/libphp5-zts.so
</IfModule>

AddHandler php5-script .php
AddType text/html .php

DirectoryIndex index.php

AddType Application/x-httpd-php .php

In my http.conf I have this. Obviously the path are different but this can help. About php I have no more than this 3 lines:

LoadModule php5_module PATH/TO/PHP/php5apache2_2.dll
AddType application/x-httpd-php .php
PhpIniDir "PATH/TO/PHP"

So I think you can delete all your lines about php and try to just add these.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM