开发者

php scripts will not execute in browser

开发者 https://www.devze.com 2023-01-18 01:26 出处:网络
I\'m trying to install wordpress...The 开发者_开发问答install script will not run in firefox or chrome. I\'m on ubuntu. I only get an option for downloading the file in both browsers. Any thoughts?

I'm trying to install wordpress...The 开发者_开发问答install script will not run in firefox or chrome. I'm on ubuntu. I only get an option for downloading the file in both browsers. Any thoughts?

EDIT: Do I need to install libapache2-mod-php5?


That's a server setting in which the server is not set to process the .php file, but rather feed the file as a download... Inquire with your web host..


you need to install apache and PHP running before trying to run any PHP script. download this. http://www.sph.umich.edu/csg/abecasis/LAMP/download/


Try out this one,

http://www.supriyadisw.net/2006/12/wordpress-installation-on-ubuntu-with-lamp


As others have said, you need the server, but you've said you already have the server installed. Did you access the PHP file via the server, or via the file path? Server would be http://127.0.0.1 (or localhost, or your IP)

If so, you may not have set PHP up correctly with Apache.

The easiest way to set it up is to install Lampp, it is my favourite, and is really easy to install and remove. Once installed, just copy the Wordpress files into the /opt/lampp/htdocs directory, and go from there.


I had to install libapache2-mod-php5, make sure the module was loaded in apache, then restart apache. All seemed to work fine in firefox afterwards, but not in chrome. I also had to move the wordpress install to /var/www


At the end of the day, and in any case, if your *.php files are downloading rather than being run, it means that there is no handler on your host for interpreting/processing these the correct way.

If one browser reports a problem, and the other doesn't - something is terribly wrong and could be something to do with caching, and is usually indicative of running a local web server on the same machine.

Apache is the webserver and it could be configured to see your website at /var/www - but you still need PHP and its applicable apache-related libraries installed for PHP pages to be delivered by the webserver the correct way.

If you are using a Windows computer, I would ditch it and buy a Mac.

0

精彩评论

暂无评论...
验证码 换一张
取 消