我正在尝试处理一个已经创建的网站项目。该网站当前正在使用Apache2和PHP5在Ubuntu上运行。
我已经在APACHE2上安装了该项目。但是当我进入网站时,我会收到以下消息:
在此服务器上找不到请求的URL / connexion/。
位于本地主机端口80的Apache / 2.4.34(Ubuntu)服务器
我不知道该怎么办,因为在终端上写时:
sudo tail -100 /var/log/apache2/error.log
我遇到PDO错误:
[Thu Nov 22 09:17:30.492444 2018] [mpm_prefork:notice] [pid 2033] AH00163: Apache/2.4.34 (Ubuntu) configured -- resuming normal operations
[Thu Nov 22 09:17:30.492509 2018] [core:notice] [pid 2033] AH00094: Command line: '/usr/sbin/apache2'
[Thu Nov 22 09:48:49.461147 2018] [php7:warn] [pid 2070] [client ::1:51398] PHP Warning: Declaration of Client::create(PDO $bdd, $nom, $prenom, $email, $password, $telephone, $fax, $is_active, $site_id) should be compatible with Utilisateur::create(PDO $bdd, $nom, $prenom, $email, $password, $telephone, $fax, $is_active) in /var/www/html/{websitename}/model/Classes/Client.php on line 0, referer: http://localhost/
[Thu Nov 22 09:48:49.461201 2018] [php7:warn] [pid 2070] [client ::1:51398] PHP Warning: Declaration of Client::update(PDO $bdd, $utilisateur_id, $nom, $prenom, $email, $password, $telephone, $fax, $is_active, $client_id, $site_id) should be compatible with Utilisateur::update(PDO $bdd, $id, $nom, $prenom, $email, $password, $telephone, $fax, $is_active) in /var/www/html/{websitename}/model/Classes/Client.php on line 0, referer: http://localhost/
[Thu Nov 22 09:48:49.461218 2018] [php7:warn] [pid 2070] [client ::1:51398] PHP Warning: Declaration of Client::updateWithoutPassword(PDO $bdd, $utilisateur_id, $nom, $prenom, $email, $telephone, $fax, $is_active, $client_id, $site_id) should be compatible with Utilisateur::updateWithoutPassword(PDO $bdd, $id, $nom, $prenom, $email, $telephone, $fax, $is_active) in /var/www/html/{websitedown}/model/Classes/Client.php on line 0, referer: http://localhost/
[Thu Nov 22 09:48:49.463732 2018] [php7:warn] [pid 2070] [client ::1:51398] PHP Warning: Declaration of Employee::create(PDO $bdd, $nom, $prenom, $email, $password, $telephone, $fax, $is_active, $role_id, $agence_id) should be compatible with Utilisateur::create(PDO $bdd, $nom, $prenom, $email, $password, $telephone, $fax, $is_active) in /var/www/html/{websitedown}/model/Classes/Employee.php on line 0, referer: http://localhost/
[Thu Nov 22 09:48:49.463792 2018] [php7:warn] [pid 2070] [client ::1:51398] PHP Warning: Declaration of Employee::update(PDO $bdd, $utilisateur_id, $employe_id, $nom, $prenom, $email, $password, $telephone, $fax, $is_active, $role_id, $agence_id) should be compatible with Utilisateur::update(PDO $bdd, $id, $nom, $prenom, $email, $password, $telephone, $fax, $is_active) in /var/www/html/{websitedown}/model/Classes/Employee.php on line 0, referer: http://localhost/
[Thu Nov 22 09:48:49.463817 2018] [php7:warn] [pid 2070] [client ::1:51398] PHP Warning: Declaration of Employee::updateWithoutPassword(PDO $bdd, $utilisateur_id, $employe_id, $nom, $prenom, $email, $telephone, $fax, $is_active, $role_id, $agence_id) should be compatible with Utilisateur::updateWithoutPassword(PDO $bdd, $id, $nom, $prenom, $email, $telephone, $fax, $is_active) in /var/www/html/{websitedown}/model/Classes/Employee.php on line 0, referer: http://localhost/
所以我已经在PHP ini中启用了PHP PDO,试图安装PHP。该网站仍然无法正常运行...我该怎么办?
(我在Windows上遇到了这个问题,更改了PHP以使网站正常运行,但Ubuntu却无法运行)
答案 0 :(得分:0)
我认为,请检查您的文档路径
DocumentRoot:您将在其中提供文档的目录。
在与文件httpd.conf
中的apache配置类似的apache中,检查DocumentRoot=Your\document\path
并
<Directory Your\document\path>
<Directory Your\document\path>
# Possible values for the Options directive are "None", "All",
# or any combination of:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# The Options directive is both complicated and important. Please see
# http://httpd.apache.org/docs/2.4/mod/core.html#options
# for more information.
#
Options Indexes FollowSymLinks Includes ExecCGI
#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# AllowOverride FileInfo AuthConfig Limit
#
AllowOverride All
#
# Controls who can get stuff from this server.
#
Require all granted
</Directory>
还将您将ubuntu apache和php配置与Window apache和php配置进行比较
答案 1 :(得分:0)
好吧,所以经过几次试用后,我将其修复了……只需通过以下操作即可:
systemctl状态mysql
我的网站现在可以正常运行。
谢谢大家