debian

Why doesn't .htaccess have any effect?

浪尽此生 提交于 2019-12-18 12:16:46
问题 I have a .htaccess file in a directory, but it has no effect (no matter what I put in it). My apache2.conf file contains AccessFileName .htaccess <Directory "/var/www"> AllowOverride All </Directory> It already said AccessFileName .htaccess but I added the Directory tag myself, thus I'm not sure if it's correct. Thanks for any advice and requests for more information. My .htaccess content (for now) Options +FollowSymlinks RewriteEngine on RewriteRule .* page.php?arg=$0 回答1: You're on Debian,

Error while loading shared libraries: libpq.so.5: cannot open shared object file: No such file or directory

梦想的初衷 提交于 2019-12-18 11:45:23
问题 I am trying to execute pg_dump on PostgreSQL 9.0.4 server running on Debian and I am getting the error below: ./pg_dump: error while loading shared libraries: libpq.so.5: cannot open shared object file: No such file or directory libpq.so.5 is a link to libpq.so.5.3 as shown below lrwxrwxrwx 1 root root 12 Jun 27 16:24 libpq.so.5 -> libpq.so.5.3 -rwxr-xr-x 1 root root 180749 Jun 21 02:43 libpq.so.5.3 What is it that I am doing wrong? 回答1: Try this: 1: Know the path of libpq.so.5 find / -name

PostgreSQL Query to Excel Sheet

限于喜欢 提交于 2019-12-18 11:45:01
问题 I need to export some data from PostgreSQL to Excel (quick customer wish), and the last time Excel had serious problems opening or importing my COPYd csv files (line endings, utf-8 encoding, etc), and it took me an hour at best. Does someone know a quick, elegant solution that generates a real Excel file? Like a small shell script or the like? I want this to be done either on my Linux box (Debian 5.0 Lenny) or on Windows (XP or higher). 回答1: You could install the PostgreSQL ODBC driver on the

使用MySql管理层次结构的数据

与世无争的帅哥 提交于 2019-12-18 09:49:13
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> 概述 我们知道,关系数据库的表更适合扁平的列表,而不是像 XML 那样可以直管的保存具有父子关系的层次结构数据。 首先定义一下我们讨论的层次结构,是这样的一组数据,每个条目只能有一个父条目,可以有零个或多个子条目(唯一的例外是根条目,它没有父条目)。许多依赖数据库的应用都会遇到层次结构的数据,例如论坛或邮件列表的线索、企业的组织结构图、内容管理系统或商城的分类目录等等。我们如下数据作为示例: Mike Hillyer 考虑了两种不同的模型——邻接表(Adjacency List)和嵌套集(Nested Set)来实现这个层次结构。 邻接表(Adjacency List)模型 我们可以很直观的使用下面的方式来保存如图所示的结构。 创建名为 distributions 的表: CREATE TABLE distributions ( id INT NOT NULL AUTO_INCREMENT, name VARCHAR(32) NOT NULL, parent INT NULL DEFAULT NULL, PRIMARY KEY (id) ) ENGINE = InnoDB DEFAULT CHARACTER SET = utf8; 插入数据: INSERT INTO distributions VALUES

PHP MySQLi doesn't recognize login info

丶灬走出姿态 提交于 2019-12-18 09:38:38
问题 I can't login to the database using mysqli class. I get the next error: Warning: mysql_query(): Access denied for user 'www-data'@'localhost' (using password: NO) I have the next code: $this->mysqlCon = new mysqli($siteConfig['db']['hostname'], $siteConfig['db']['username'], $siteConfig['db']['password'], $siteConfig['db']['database']); var_dump() of $siteConfig['db'] returns: array(4) { ["hostname"]=> string(9) "localhost" ["username"]=> string(4) "root" ["password"]=> string(*) "***Censored

g++ Linker errors after upgrading to gcc-4.8 on Debian, libc6

拟墨画扇 提交于 2019-12-18 08:56:24
问题 I have just dist-upgraded a Debian Weezy machine to run gcc-4.8 from gcc-4.7. Previously the build environment was sane and was compiling normally. Now it gives the following linker errors, with any program (even a trivial hello world): /usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 0 has invalid symbol index 11 /usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 1 has invalid symbol index 12 /usr/bin/ld: /usr/lib/debug

g++ Linker errors after upgrading to gcc-4.8 on Debian, libc6

六眼飞鱼酱① 提交于 2019-12-18 08:56:01
问题 I have just dist-upgraded a Debian Weezy machine to run gcc-4.8 from gcc-4.7. Previously the build environment was sane and was compiling normally. Now it gives the following linker errors, with any program (even a trivial hello world): /usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 0 has invalid symbol index 11 /usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 1 has invalid symbol index 12 /usr/bin/ld: /usr/lib/debug

Merging MP3 files in Linux Debian using PHP

无人久伴 提交于 2019-12-18 07:23:59
问题 What's the easiest way to merge the contents of several MP3 files into one using PHP 5.2 on Linux Debian system? I found some scripts that are supposed to do in PHP only, but they seem to be buggy. Perhaps there is a way to accomplish this task using command line programs, that I could install on my Linux Debian machine? 回答1: check this: http://lists.mplayerhq.hu/pipermail/ffmpeg-user/2009-September/022171.html first you have to install sox. sudo apt-get install sox. $ sox first.mp3 -r 44100

Disable prompts while installing a Debian package

China☆狼群 提交于 2019-12-18 07:07:25
问题 How can i disable totally the prompts that appear while installing a Debian package, i've used all the options that i've found but there are some packages that are still prompting. I'm using this command: apt-get -y --allow-unauthenticated --force-yes -o DPkg::Options::="--force-overwrite" -o DPkg::Options::="--force-confdef" install x11-common Why the x11-common package is still prompting? how can i get rid of these prompts? Thanks in advance --Victor 回答1: You don't provide any details about

How do I enable curl for php

只愿长相守 提交于 2019-12-18 05:03:13
问题 I'm using NGINX with PHP-FPM on Debian Wheezy via DotDeb repo. This is the only curl reference in my php.ini file and I'm not sure what I need to do. Any help is appreciated (it's already installed) [curl] ; A default value for the CURLOPT_CAINFO option. This is required to be an ; absolute path. ;curl.cainfo = ; Local Variables: ; tab-width: 4 ; End: 回答1: Check whether you have php5-curl installed dpkg -l | grep 'php5-curl' If isn't installed, apt-get install php5-curl Ensure the path in