运行codeigniter服务器

编程入门 行业动态 更新时间:2024-10-28 20:30:59
本文介绍了运行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

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

  • 下载PHP源$ C ​​$ C 。你需要下载一个符合你的系统中已经安装的版本。要找出哪一个你正在使用,键入 PHP -v 在命令行。
  • 提取您下载使用,随后由文件存档焦油-zxvf 。
  • 键入 CD PHP-5.3.x /转/ sqlite3的/ (其中5.3.x应替换为您的版本号和sqlite3的可以是任何你想从你的清单上面减去PHP_preFIX)安装的模块。
  • 键入运行phpize 。
  • 键入 ./配置。
  • 键入让。
  • 键入须藤使安装。
  • 添加扩展= sqlite3.so 您的php.ini (再次请务必将源码与其他扩展名是.so如果编译别人)。
  • 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.
  • Extract the archive you downloaded using tar -zxvf followed by the filename.
  • 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).
  • Type phpize.
  • Type ./configure.
  • Type make.
  • Type sudo make install.
  • 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服务器

    本文发布于:2023-10-31 18:20:29,感谢您对本站的认可!
    本文链接:https://www.elefans.com/category/jswz/34/1546895.html
    版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
    本文标签:服务器   codeigniter

    发布评论

    评论列表 (有 0 条评论)
    草根站长

    >www.elefans.com

    编程频道|电子爱好者 - 技术资讯及电子产品介绍!