PHP的网站并不鲍勃迪伦PHP版本后工作 [英] Php websites don't work after changin php version
问题描述
我用PHP在Ubuntu的13.04环境中工作。
我已经配置好Apache,这样我的主目录我有一个的public_html
目录,我把我工作的所有网站,我可以用<$ C $访问它们C>本地主机/〜HOMEDIR /网站。一切都用来工作正常,但前几天我降级的PHP 5.3版,试图解决一个问题(当时我没有),然后我又回到了PHP 5.4.9。这件事发生前几天,我不记得,如果这一切后我检查我的任何网站。不管怎么说,今天我试图访问一个和它没有工作。关于Apache的error.log文件,我有这样的:
I work with php in a Ubuntu 13.04 environment.
I've configured apache so that in my home directory I have a public_html
directory where I keep all the websites I'm working on and I can access them with localhost/~homedir/website
. Everything used to work fine, but some days ago I downgraded php to version 5.3 to try and solve a problem (which then I didn't) and then I came back to php 5.4.9. This happened some days ago and I don't remember if after all this I checked any of my websites. Anyway, today I tried accessing one and it didn't work. On the apache error.log file I have this:
File does not exist: /home/carlo/public_html/website/index.php/welcome
Negotiation: discovered file(s) matching request: /home/carlo/public_html/website/index (None could be negotiated).
的的.htaccess
我通常使用的是这样的:
The .htaccess
I usually use is like this:
RewriteEngine on
RewriteBase /~carlo/website/
RewriteCond $1 !^(index\.php|cache|captcha|fonts|forum|media|img|min|css|js|scripts|images|uploads|docs|robots.txt|sitemap.xml|sitemap|public|tools|assets|xd_receiver.htm)
RewriteRule ^(.*)$ index.php/$1 [L]
在一个侧面说明,phpMyAdmin是工作。我可以用本地主机/ phpmyadmin的
访问它。在 /etc/apache2/conf.d/apache.conf
我有这样的:
On a side note, phpmyadmin is working. I can access it with localhost/phpmyadmin
. In /etc/apache2/conf.d/apache.conf
I have this:
Alias /phpmyadmin /usr/share/phpmyadmin
<Directory /usr/share/phpmyadmin>
Options FollowSymLinks
DirectoryIndex index.php
<IfModule mod_php5.c>
AddType application/x-httpd-php .php
php_flag magic_quotes_gpc Off
php_flag track_vars On
php_flag register_globals Off
php_admin_flag allow_url_fopen Off
php_value include_path .
php_admin_value upload_tmp_dir /var/lib/phpmyadmin/tmp
php_admin_value open_basedir /usr/share/phpmyadmin/:/etc/phpmyadmin/:/var/lib/phpmyadmin/:/usr/share/php/php-gettext/
</IfModule>
我认为是降级和升级的PHP一些配置文件改变了,但我不知道哪一个,做些什么。你能不能帮我想出来的?我将发布其他一些信息?
What I think is that downgrading and upgrading php some configuration file changed, but I don't know which one and what to do. Can you help me figuring it out? Shall I post some other info?
编辑:
我想我已经发现了这个问题。
显然,升级PHP下面的说明进行激活:
I think I've found out the problem. Apparently, upgrading php the following instructions were reactivated:
# To re-enable php in user directories comment the following lines
# (from <IfModule ...> to </IfModule>.) Do NOT set it to On as it
# prevents .htaccess files from disabling it.
<IfModule mod_userdir.c>
<Directory /home/*/public_html>
php_admin_value engine Off
</Directory>
</IfModule>
所以,他们发表意见解决问题(我希望)
So, commenting them solved the issue (I hope)
推荐答案
添加在的.htaccess
文件,并尝试
Options +FollowSymLinks
这篇关于PHP的网站并不鲍勃迪伦PHP版本后工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!