使用codeigniter出现404有关问题
程序员文章站
2022-05-09 16:42:03
...
使用codeigniter出现404问题
各位好,初使用codeigniter出现了如下问题:
1、windows xp下运行正常,linux下运行出现404错误。
2、访问主页可以显示(http://ip地址/项目名/或http://ip地址/项目名/index.php/index),但是点登录时(http://ip地址/项目名/index/login)出现404错误,index控制器中是存在public的login方法。
3、linux环境为red hat 企业版5 ,apache为2.0.64,php为5.4.3 apache配置了rewrite也 加了path info
尝试过修改config.php中的uri_request 为各个可能的值(query_string,auto等)现象依旧。
看codeigniter的日志似乎login.php已经发送到浏览器了,但是为什么还是404呢
同样的程序在windows下没有问题,请问大家问题可能出在哪里呢?谢谢!
附codeigniter日志:
DEBUG - 2012-06-01 09:42:54 --> Config Class Initialized
DEBUG - 2012-06-01 09:42:54 --> Hooks Class Initialized
DEBUG - 2012-06-01 09:42:54 --> Utf8 Class Initialized
DEBUG - 2012-06-01 09:42:54 --> UTF-8 Support Enabled
DEBUG - 2012-06-01 09:42:54 --> URI Class Initialized
DEBUG - 2012-06-01 09:42:54 --> Router Class Initialized
DEBUG - 2012-06-01 09:42:54 --> Output Class Initialized
DEBUG - 2012-06-01 09:42:54 --> Security Class Initialized
DEBUG - 2012-06-01 09:42:54 --> Input Class Initialized
DEBUG - 2012-06-01 09:42:54 --> XSS Filtering completed
DEBUG - 2012-06-01 09:42:54 --> Global POST and COOKIE data sanitized
DEBUG - 2012-06-01 09:42:54 --> Language Class Initialized
DEBUG - 2012-06-01 09:42:54 --> Loader Class Initialized
DEBUG - 2012-06-01 09:42:54 --> Controller Class Initialized
DEBUG - 2012-06-01 09:42:54 --> Helper loaded: form_helper
DEBUG - 2012-06-01 09:42:54 --> Form Validation Class Initialized
DEBUG - 2012-06-01 09:42:54 --> Session Class Initialized
DEBUG - 2012-06-01 09:42:54 --> Helper loaded: string_helper
DEBUG - 2012-06-01 09:42:54 --> Encrypt Class Initialized
DEBUG - 2012-06-01 09:42:54 --> Database Driver Class Initialized
DEBUG - 2012-06-01 09:42:54 --> Session routines successfully run
DEBUG - 2012-06-01 09:42:54 --> DX Auth Initialized
DEBUG - 2012-06-01 09:42:54 --> Session class already loaded. Second attempt ignored.
DEBUG - 2012-06-01 09:42:54 --> Config file loaded: application/config/dx_auth.php
DEBUG - 2012-06-01 09:42:54 --> Language file loaded: language/japanese/dx_auth_lang.php
DEBUG - 2012-06-01 09:42:54 --> Model Class Initialized
DEBUG - 2012-06-01 09:42:54 --> Model Class Initialized
DEBUG - 2012-06-01 09:42:54 --> Model Class Initialized
DEBUG - 2012-06-01 09:42:54 --> utilityies class already loaded. Second attempt ignored.
DEBUG - 2012-06-01 09:42:54 --> Helper loaded: url_helper
DEBUG - 2012-06-01 09:42:54 --> Config file loaded: application/config/access_limit.php
ERROR - 2012-06-01 09:42:54 --> Severity: Notice --> Undefined variable: message /usr/local/apache2/htdocs/tab/application/views/login.php 44
DEBUG - 2012-06-01 09:42:54 --> File loaded: application/views/login.php
DEBUG - 2012-06-01 09:42:54 --> Final output sent to browser
DEBUG - 2012-06-01 09:42:54 --> Total execution time: 0.0547
------解决方案--------------------
先尝试一下这样是否可以
http://ip地址/项目名/index.php/index/login
http://ip地址/项目名/index.php/login
各位好,初使用codeigniter出现了如下问题:
1、windows xp下运行正常,linux下运行出现404错误。
2、访问主页可以显示(http://ip地址/项目名/或http://ip地址/项目名/index.php/index),但是点登录时(http://ip地址/项目名/index/login)出现404错误,index控制器中是存在public的login方法。
3、linux环境为red hat 企业版5 ,apache为2.0.64,php为5.4.3 apache配置了rewrite也 加了path info
尝试过修改config.php中的uri_request 为各个可能的值(query_string,auto等)现象依旧。
看codeigniter的日志似乎login.php已经发送到浏览器了,但是为什么还是404呢
同样的程序在windows下没有问题,请问大家问题可能出在哪里呢?谢谢!
附codeigniter日志:
DEBUG - 2012-06-01 09:42:54 --> Config Class Initialized
DEBUG - 2012-06-01 09:42:54 --> Hooks Class Initialized
DEBUG - 2012-06-01 09:42:54 --> Utf8 Class Initialized
DEBUG - 2012-06-01 09:42:54 --> UTF-8 Support Enabled
DEBUG - 2012-06-01 09:42:54 --> URI Class Initialized
DEBUG - 2012-06-01 09:42:54 --> Router Class Initialized
DEBUG - 2012-06-01 09:42:54 --> Output Class Initialized
DEBUG - 2012-06-01 09:42:54 --> Security Class Initialized
DEBUG - 2012-06-01 09:42:54 --> Input Class Initialized
DEBUG - 2012-06-01 09:42:54 --> XSS Filtering completed
DEBUG - 2012-06-01 09:42:54 --> Global POST and COOKIE data sanitized
DEBUG - 2012-06-01 09:42:54 --> Language Class Initialized
DEBUG - 2012-06-01 09:42:54 --> Loader Class Initialized
DEBUG - 2012-06-01 09:42:54 --> Controller Class Initialized
DEBUG - 2012-06-01 09:42:54 --> Helper loaded: form_helper
DEBUG - 2012-06-01 09:42:54 --> Form Validation Class Initialized
DEBUG - 2012-06-01 09:42:54 --> Session Class Initialized
DEBUG - 2012-06-01 09:42:54 --> Helper loaded: string_helper
DEBUG - 2012-06-01 09:42:54 --> Encrypt Class Initialized
DEBUG - 2012-06-01 09:42:54 --> Database Driver Class Initialized
DEBUG - 2012-06-01 09:42:54 --> Session routines successfully run
DEBUG - 2012-06-01 09:42:54 --> DX Auth Initialized
DEBUG - 2012-06-01 09:42:54 --> Session class already loaded. Second attempt ignored.
DEBUG - 2012-06-01 09:42:54 --> Config file loaded: application/config/dx_auth.php
DEBUG - 2012-06-01 09:42:54 --> Language file loaded: language/japanese/dx_auth_lang.php
DEBUG - 2012-06-01 09:42:54 --> Model Class Initialized
DEBUG - 2012-06-01 09:42:54 --> Model Class Initialized
DEBUG - 2012-06-01 09:42:54 --> Model Class Initialized
DEBUG - 2012-06-01 09:42:54 --> utilityies class already loaded. Second attempt ignored.
DEBUG - 2012-06-01 09:42:54 --> Helper loaded: url_helper
DEBUG - 2012-06-01 09:42:54 --> Config file loaded: application/config/access_limit.php
ERROR - 2012-06-01 09:42:54 --> Severity: Notice --> Undefined variable: message /usr/local/apache2/htdocs/tab/application/views/login.php 44
DEBUG - 2012-06-01 09:42:54 --> File loaded: application/views/login.php
DEBUG - 2012-06-01 09:42:54 --> Final output sent to browser
DEBUG - 2012-06-01 09:42:54 --> Total execution time: 0.0547
------解决方案--------------------
先尝试一下这样是否可以
http://ip地址/项目名/index.php/index/login
http://ip地址/项目名/index.php/login
相关文章
相关视频
推荐阅读
-
Oracle Max函数使用中出现的问题
-
解决Node.js使用MySQL出现connect ECONNREFUSED 127.0.0.1:3306的问题
-
解决Vue2.0中使用less给元素添加背景图片出现的问题
-
firefox火狐浏览器出现问题怎么使用自带修复功能?
-
ASP.NET使用X509Certificate2出现一系列问题的解决方法
-
PHP中使用substr()截取字符串出现中文乱码问题该怎么办
-
ASP.NET使用X509Certificate2出现一系列问题的解决方法
-
解决vuejs 使用value in list 循环遍历数组出现警告的问题
-
解决vue中使用Axios调用接口时出现的ie数据处理问题
-
使用wordpress的$wpdb类读mysql数据库做ajax时出现的问题该如何解决