运行codeigniter服务器 [英] running codeigniter in server

查看:205
本文介绍了运行codeigniter服务器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在codeigniter初学者。我写我的code和运行在本地主机在我的电脑。但是,当我把它上传在主机我给这个错误:

I'm a beginner in codeigniter. I write my code and run it in localhost in my PC. But when I upload it in host I give this error:

一个PHP遇到错误

严重性:核心警告

消息:PHP的启动:无法加载动态库   /usr/local/lib/php/extensions/no-debug-non-zts-20100525/sqlite.so -   /usr/local/lib/php/extensions/no-debug-non-zts-20100525/sqlite.so:   未定义的符号:zval_property_ctor

Message: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20100525/sqlite.so' - /usr/local/lib/php/extensions/no-debug-non-zts-20100525/sqlite.so: undefined symbol: zval_property_ctor

文件名:未知

行号:0

回溯:

和404未找​​到错误。 起初我觉得问题应该从htaccess文件并将其删除。但问题仍没有解决。 任何人可以帮助我吗? 多谢。

and "404 not found" error. At first I think problem should be from htaccess file and delete it. But problem is not solved. can anybody help me please? thanks a lot.

推荐答案

您必须安装源码

的Ubuntu

sudo apt-get install php-sqlite 

的CentOS

yum install php-sqlite

编译从头开始(命令行):

  1. 下载PHP源$ C ​​$ C 。你需要下载一个符合你的系统中已经安装的版本。要找出哪一个你正在使用,键入 PHP -v 在命令行。
  2. 提取您下载使用,随后由文件存档焦油-zxvf
  3. 键入 CD PHP-5.3.x /转/ sqlite3的/ (其中5.3.x应替换为您的版本号和sqlite3的可以是任何你想从你的清单上面减去PHP_preFIX)安装的模块。
  4. 键入运行phpize
  5. 键入 ./配置
  6. 键入
  7. 键入须藤使安装
  8. 添加扩展= sqlite3.so 的php.ini 再次请务必将源码与其他扩展名是.so如果编译别人)。
  1. Download the PHP's source code. You'll need to download the one that matches the version already installed on your system. To find out which one you're using, type php -v from the command line.
  2. Extract the archive you downloaded using tar -zxvf followed by the filename.
  3. Type cd php-5.3.x/ext/sqlite3/ (where "5.3.x" should be replaced with your version number and "sqlite3" can be any of the modules you want to install from your list above minus the "php_" prefix).
  4. Type phpize.
  5. Type ./configure.
  6. Type make.
  7. Type sudo make install.
  8. Add extension=sqlite3.so to your php.ini (again make sure to replace sqlite.so with the name of the other extensions if you compile the others).

最后,重新启动Apache,你应该做的。

Finally, restart Apache and you should be done.

如果您没有访问php.ini文件,然后,让下面一样在你的的.htaccess 文件条目。

If you don't have access to the php.ini file then, make entry like below in your .htaccess file.

# supress php errors
php_flag display_startup_errors off
php_flag display_errors off
php_flag html_errors off
php_flag ignore_repeated_errors off
php_flag ignore_repeated_source off
php_flag report_memleaks on
php_flag track_errors on
php_value docref_root 0
php_value docref_ext 0

# enable PHP error logging
php_flag  log_errors on
php_value error_log  /home/path/public_html/domain/PHP_errors.log

# prevent access to PHP error log
<Files PHP_errors.log>
 Order allow,deny
 Deny from all
 Satisfy All
</Files>

这篇关于运行codeigniter服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆