简体   繁体   中英

wordpress downloading php file instead of viewing the webpage

I installed wordpress on my local machine (backtrack) for experimenting. After I got everything setup I moved it to an Ubuntu Server so that everybody can access those pages at work. I followed the same instructions, I moved the wordpress folder into /var/www but I created a new database with the same username, password and hostname.

The problem is whenever I access the webpage @ubuntu it tries to download the file, if access the page @backtrack it goes to the dashboard and everything is fine.

I did not have an .htaccess file on either machine sop I created one just to see if it will fix the problem but it did not.

Apache works fine because I can get to some folders I have setup by going to

"http://ubuntuserver/folder name" 

and the logs shows no errors because it is delivering the webpage to the client just fine but the client is downloading it instead.

Any Ideas why this is happening??

听起来您尚未为Apache安装PHP模块或通过Apache配置文件中的AddType使它能够使用PHP。

It seems that your WebServer ( Apache here, i suppose ) is not configured to use PHP module and/or is missing some PHP configuration options.
See here for some basic configuration tutorial.

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