Search found 197 matches

by chris
Wed Feb 01, 2012 9:18 am
Forum: General
Topic: Solved: How to check urls in linux
Replies: 4
Views: 28895

Re: How to check urls in linux

You can use wget. It is not the best tool but it is probably already installed on your system. wget -r -nd --spider -o links.txt -np -p http://www.sitetocheck.com It shows the results in links.txt . just search for the 404 errors. A better tool is linkchecker ( http://linkchecker.sourceforge.net ) Y...
by chris
Sun Aug 07, 2011 9:33 pm
Forum: Apache
Topic: Apache redirect domain to another domain
Replies: 1
Views: 24994

Re: Apache redirect domain to another domain

I think what you are looking for is ServerAlias redirect . In you virtualhost config files you can put the following: <VirtualHost *:80> ServerAlias yoursite.net redirect permanent / http://yoursite.com/ </VirtualHost> It will respond with a permanent redirect status (301), and redirect all request ...
by chris
Sun Jul 31, 2011 3:00 pm
Forum: General
Topic: phpBB error: Could not get style data
Replies: 1
Views: 27950

Re: phpBB error: Could not get style data

I had the same problem once.
Delete the contents of the folder cache/; except index.html and .htaccess.

Make also sure the folder is writable by apache (or whatever user you webserver has),
Same for the folder store/.
by chris
Tue Apr 19, 2011 7:31 pm
Forum: SQL
Topic: Solved: How to execute a SQL query from shell
Replies: 1
Views: 18824

Re: How to execute a SQL query from shell

The easiest way I know is with the SQL-command. mysql -u user -p -e 'SELECT data FROM table;' database If you want juts the data: mysql -u user -p'password' -sNe 'SELECT data FROM table;' database -s : separates the values with only tabs N : skips the column names -p the password (without spaces, no...
by chris
Mon Mar 14, 2011 5:08 pm
Forum: Apache
Topic: Solved:You don't have permission to access / on this server.
Replies: 2
Views: 27115

Re: You don't have permission to access / on this server.

Perhaps i you post your config-files we could help you.

It sounds like file permission problems.
Makes sure the user www-data has read access.
by chris
Wed Feb 09, 2011 8:19 pm
Forum: PHP
Topic: solved: split() is deprecated
Replies: 2
Views: 23469

Re: split() is deprecated

Yes, you should use explode().

It has the same syntax so it 's just renaming.

Code: Select all

array explode ( string $delimiter , string $string [, int $limit ] )

Code: Select all

array split ( string $pattern , string $string [, int $limit ] )
by chris
Mon Dec 27, 2010 6:42 pm
Forum: SQL
Topic: How do I load a csv file in MYSQL
Replies: 4
Views: 24948

Re: How do I load a csv file in MYSQL

The following line is a more complete command:

Code: Select all

LOAD DATA INFILE '/tmp/postcodes.csv' INTO TABLE i_city COLUMNS TERMINATED BY ';' ENCLOSED BY '"';
by chris
Sun Oct 03, 2010 12:42 am
Forum: General
Topic: Save webpage with firefox command line
Replies: 1
Views: 23211

Re: Save webpage with firefox command line

You can use something like Pearl Crescent Page Saver.

It is Firefox screen capture extension,
and when installed it can capture the page and save it as a image (PNG)

Full explanation can be found here:
http://www.zubrag.com/forum/index.php?topic=82.0
by chris
Wed Sep 22, 2010 12:10 pm
Forum: SQL
Topic: How do I load a csv file in MYSQL
Replies: 4
Views: 24948

Re: How do I load a csv file in MYSQL

MYSQL needs not only read access on the file, but also execution rights on directory. It reads using the rights of the mysqld process (user: mysql) You probably don't want your home-dir accessible by everyone. So a quick solution it to copy the file to the /tmp -dir and load it from there. LOAD DATA...
by chris
Thu Sep 16, 2010 10:40 pm
Forum: SQL
Topic: How do I load a csv file in MYSQL
Replies: 4
Views: 24948

Re: How do I load a csv file in MYSQL

You can login in mysql:

Code: Select all

mysql -u You -p database
and the you can use the LOAD DATA INFILE command

Code: Select all

LOAD DATA INFILE 'data.csv' INTO TABLE table
You can get the complete explanation here:
http://dev.mysql.com/doc/refman/5.0/en/load-data.html