Im using an application that has MySQL as the backend We can no longer add new records without getting the error

!tell mrak about replication

mrak replication is restore from a backup and then an ongoing application of the binary log. You can think of replication as a constantly running recovery.

!tell jonathan about teh buttsechs

jonathan

!help

help

!m [name] [function] !man [function] !m41 !m50 !m51 !man !man41 !man50 !man51 !manmt !manndb !manqb manwb see aide (fr) hilfe (de) ayuda (es)

!man replicati

see http://dev.mysql.com/doc/refman/5.0/en/replication.html

tnx a lot

hi guys

hello

I'm trying to write an sql query that will basically give me a list of parents and descendants for a given member
id, parent_id, name

!tell Psykick about trees

http://www.dbazine.com/oracle/or-articles/tropashko4 and http://www.sitepoint.com/article/hierarchical-data-database, http://jan.kneschke.de/projects/mysql/sp/ http://jan.kneschke.de/projects/mysql/sp/sp_tree.sql http://www.vbmysql.com/articles/database-design/managing-hierarchical-data-in-mysql/ http://dev.mysql.com/tech-resources/articles/hierarchical-data.html

1, 0, item : 2, 1, item : 3, 0, item : 4, 3, item : 5, 4, item
thanks … I couldn't quite remember what it was called
was doing a search for linked lists

nested sets might be what you are looking for
i dont understand them but i know they are teh awshum!!!

trees are pretty much what I'm after … but I don't like the fact of an addiitional 2 fields just for locating items
I'm certain with a little bit of perserverance it is possible with a single db call and only 2 fields

you go girl!

errmm … I think you mean boi

Is there a mysql function to determine if data in TEXT field is numeric… similar to the php is)numeric function ?

!man mysqld_safe

see http://dev.mysql.com/doc/refman/5.0/en/mysqld-safe.html

Hi i am trying to select two rows from a table and treate them from one table so far i have this http://pastebin.ca/657892… Unfortuantly i dont think it works as union make anoither query and then just looses all my other querys making them invisble to
the second query
heres an example of what it looks like

kieran491, the union must both return the same number and types of fields

ohh really
well that query wont work
is there any other wya of doing it?

I think you just want a join

join wont work if your after two results on diffrent rows

Hi, I'm getting some hourly stats on my chat application (how man logins, how many signups) and I was wondering about performance..

or will it and i have been grossly miss informed

would it be better to keep the row I'm updating during the hour (constantly adding to it, several times a second) by itself and copy it across to a table of historic data.
I guess what I'm really getting at is, is there a big performance hit on updating the last row in a table with a few thousand rows in it, compared to updating the first and only row in a table?

a row being regularly updated would be best in an innodb table

its good idea to use [mysqld_safe] under debian like setting higher nice or somethink
?

this is what i tryed once it gave me no results http://pastebin.ca/658174

!man key_buffer

see http://dev.mysql.com/doc/refman/5.0/en/server-system-variables.html

we all die some day.

cant be done?

any ideas?

Is it possible to exclude tables during replication?

replicate-ignore-table

Thank you.

or Replicate_Wild_Ignore_Table
yw

hello
I have turned off my server and I can repair my database..could you please give me some advice?
my error message is
Can't find file: 'CARS' (errno: 2)
(when I type mysqlcheck -r for this table)

do you mean myisamchk ?

yes, I tryied also myisamchk

hi guys. anyone here used php mysql web hosting slow query log? where it says Query_time: , is that in seconds? milliseconds? other?

- recovering (with sort) MyISAM-table 'CARS.MYI'
26
- Fixing index 1
and nothing else.

EoN, seconds

ok thanks archivist
i got my web host to turn on the log for a week and send it to me. some of the queries of my site take 10 seconds, later they'll take 22, other times they'll take 210. this basically proves that it's not indexing/code performance, but rather the hosting environment, right?
(vastly differnt times for the same query)

maybe tool not finish yet?

Yes. "Join is all you need." [That might be a beatles song.]

finished, and I got this same result always when I run myisamchk -r

You haven't provided enough detail to know why you think the JOIN "didn't work." It's pretty obvious you simply want to join the tables.

do you try use this table after repaire?

yes

and so?

You have a design problem, but that isn't the issue here.

nothing changed.

what do you mean?
what error message?

anyone? re the mysql query log? trying to trouble shoot it, and the web host arent very smart

I get still this same error message, (error 2) can't find file

The time differences could have to do with buffering / caching.

!perror 2

No such file or directory

i know

But the difference could also be due to programs running outside of your control.

EoN, at 10 secs you have a problem sort them out on your dev box

but i have correct permissions

i did not web design the Database that what i have been given to work with

sakaata, its not there, not a permissions problem

wich output of show table status ?

I see my table in show tables;

who can give me bnc account?

without any error?

Xgc/archivist: yeah im trying to establish whether the fault lies in my code, or on the hosting environment (with issues outsid emy control)

in show table status

Provide the missing detail and someone will be able to help. So far you've said, "it doesn't work." But you haven't provided any detail.

due to the differences in time execution for the SAME query, im thinking it MUST be their fault?

but what i am after thought is a proccess in which one table contains a username and serverial referances to ID in another table now i would like to query all that data in one go but the data that is referanced is in serveral diffrent rows

!man max_allow_packet

Sorry - I have no idea what function you're talking about! but try http://dev.mysql.com/max\_allow\_packet

without any error. but I get error 2 if I try to describe or select from table.

!man max_allowed_packet

see http://dev.mysql.com/doc/refman/5.0/en/server-system-variables.html

SHOW TABLE STATUS not SHOW TABLES

avip:

tbla t1 LEFT JOIN tblb t2 ON … LEFT JOIN tblb t3 ON … etc.

EoN, only partly yes but at 10secs for a live query you must be using up to much processor/disk

hmm ok how dose that work?

Simple as that.
It works fine.

but wont the colums all be the same?

That's the general form of the FROM clause you need.

Can't find file: 'HLASOVANIE' (errno: 2)

No. The correlation names for the tables will all be difference, t1, t2, t3, t4, etc.

how can I join more than 2 tables?

.frm ?

See above.

ohh k this automated?

all other data is NULL.

sakaata, have you been copying databases

No. You have to type it yourself.

this file present phisically on the disk?

ahh k

yes.

sakaata, have you forgotton the ibdata files

FROM t1 JOIN t2 ON … JOIN t3 ON …

it's InnoDB?
good point

what is InnoDB?

avip seen a few do that

ibdata files?

!m sakaata InnoDB

sakaata see http://dev.mysql.com/doc/refman/5.0/en/innodb.html

ibdata1 ib_logfile0 etc or matbe you are use file_per_table option try to read about innodb

wait Xgc dose t1, t2 ,t3 repesent diffrent tables?

you think that i am not using myi db but innodb?

Different logical tables in the query.

so that means there all diffrent tables or are they all the same table? (sorry that termonlogy has gone over my head)

i don't know i'm just try to suggest

SELECT t1.id, t2.id FROM tname t1 LEFT JOIN tname t2 ON t1.id t2.id; — Do that on a small test table called tname and let id be type int.

I found /space/logs/innodb_logs

!m sakaata InnoDB

sakaata see http://dev.mysql.com/doc/refman/5.0/en/innodb.html

They can refer to the same or different base tables.

ok, i am reading it

In the example I showed yuo, there were two (2) base tables.
tbla and tblb were the base tables.

yep
i think i have an idea of what your talking about now

!man thread_cache_size

see http://dev.mysql.com/doc/refman/5.0/en/server-system-variables.html

If tableA has two columns refering to tableB: SELECT ta.*, tb1.*, tb2.* FROM tableA ta LEFT JOIN tableB tb1 ON ta.ref1=tb1.id LEFT JOIN tableB tb2 ON ta.ref2=tb2.id …;

Ohh i get it now

i have a quick question

thanks Xgc

if i am doing order by, should the column that i am ordering by be indexed?

hp_ probably but maybe part of a compound index that the where clause uses etc

How do i insert a sql file again from console?

by reading the manual

\.

http://www.google.com/search?q=mysql+insert+from+command+line

mysql dbname cantrememberthat.sql

Why does mysql ignore "ON DELETE CASCADE"? The table has been created with: create table aktuelles_ra (id_aktuelles int not null, img text, pos float, foreign key (id_aktuelles) references aktuelles(id_aktuelles) on delete cascade, unique (id_aktuelles, img(10)));

Muisje:or from mysql console ' source /path/file.sql;'

ok thanks :P

MyISAM?

pardon?

what's your default engine type?
If you want foreign key constraints, use Innodb, not Myisam

don't know, I simply created that table on a fresh db
O_o

CREATE TABLE tbl (id int PRIMARY KEY, …) ENGINE=Innodb;

Why didn't it complain when creating the table?
thx

the_wench innodb
!man innodb

see http://dev.mysql.com/doc/refman/5.0/en/innodb.html

myisam doesn't do foreign keys, it'll turn them all into indexes

I wonder what other side effects come next …

errno 150?

what engine type do I need if I want transactions?

innodb

(does mysql hosting support transactions?)

yes

ofc
what do you guys reckon is the best web hosting method of replicating mysql servers accross regions, we have servers in the UK but need to now add US based servers and have a requirement to keep them sync'd

is a 30 mb sql hosting file large?
Or relatively small.

no

can a foreign key of a innodb table reference a myisam table?

no

crap

bref, replication?

Xgc sorry to bother you again just wondering what has gone wrong here i get a error saying Unknow colum but the colum is there this is my query http://pastebin.ca/658238

isn't that slow though?

bref, slow in what way?

I was thinking about creating a cluster, but not done it before

bref, you can not do that with geographical distances like you want

how would a cluster solve your problem?

well the sync needs to be almost instant if possible

async or sync ?

bref, replication is pretty fast normally

because as far as I'm aware servers could be placed in differing locations

hi

wtf?

im converting an old perl script that is used to import delimited files by reading line by line and doing a prepared insert to using LOAD DATA LOCAL INFILE…. however, it seems that using that keeps the newline on the last field inserted. Is there a way to make it strip the
newline?

you aren't going to be to do synchronous replication with geographical distances

are user passwords also stored in /var/log/mysql/mysql-bin.00XX?

bref, iirc mysql doesn't yet support multi-master replication, so as long as you do inserts into the main UK database, you could have a replica in the US to speed up selects

I have a table with results, thats the structure of it: uid,pid,user_id,item_id,criterion_id,points. Now I want the total of points sorted like this: Sum all the points for entries in that table with the same item_id. Do this for every entry and sort it…

sounds good, as most of the DB work is reads anyway

mysql doesn't support multi-master?

it does with ndb cluster, but I didn't think it did with traditional replication…

you can do multi-master, but it doesn't do conflict resolution
so if you only update UK data in the UK and only US data in the US, then you are fine
if you update all data anywhere, it can be a problem

ah

it could potentially be any data anywhere

SELECT SUM(points) FROM tx_t3fratingtool_rating_results AS R WHERE R.item_id=2, Now I don't want that for a specific but for all of them that don't have equal item_id… So for all the entries with the same item_id seperately… but as one result. I hope someone understands what I mean. In the
end there should be something like: item_id:1:points:10,item_id2:points:20 and so on

Never mind sorted it out thanks

!man skip-bdb

see http://dev.mysql.com/doc/refman/5.0/en/server-system-variables.html

group by?

SELECT item_id,SUM(points) FROM tx_t3fratingtool_rating_results GROUP BY item_id …

flung, HarryR omg too easy
now I need to join before I do that… this should work without problems I guess

Right, I'm on the very first step here; should I delete the test accounts, add a new one or just change the password????

how can I sort afterwards by the summed points?

yah, SELECT SUM(points) AS total_points ORDER BY total_points

bref, sounds like you want something that doesn't exist, grats

great

be better.

is it possible to have mysql have conditions on what a querys result must have in order to be apart of the finaly result so say if a = 0 then dont return anything above 4?

hmm what do you mean?

cant be done?

wtf do you mean?
!man where

see http://dev.mysql.com/doc/refman/5.0/en/extended-show.html

!man select

see http://dev.mysql.com/doc/refman/5.0/en/select.html

looking for somthing more than where

like, WHAT?
be specific in what you ask
what did you try, why didn't it work

your question is absolutely terrible. it is appalling.

return 25

!m kieran491 control flow

kieran491 see http://dev.mysql.com/doc/refman/5.0/en/control-flow-functions.html

ahh k

SELECT IF(blah 20, blah, 25)

Thanks HarryR

or CASE for ansi

who needs ansi :P

!man show

see http://dev.mysql.com/doc/refman/5.0/en/show.html

any ideas on how to get LOAD DATA LOCAL INFILE to strip the newline instead of including it in the last column?

how can i send inserts, updates and deletes to a master database, and select queries on slaves?

hi !
how see the table of user and their password on mysql ?

seems google have done something that might help: http://code.google.com/p/google-mysql-tools/wiki/SemiSyncReplication

i 'm on database mysql

bref, not really, just because it is transfered doesn't mean it is applied yet

Whats wrong with this stament? " IF(t.`DeathSD` = -99999999, NULL AS t.`DeathSD`, DATE_FORMAT(DATE(t.`DeathSD`), '%d %b %Y') AS `DeathSD`) " i cant see anything wrong with it BUT Mysql gives me this error
"You have an error in your SQL syntax; 'AS t.`DeathSD`, DATE_FORMAT(DATE(t.`DeathSD`), '%d %b %Y') AS `DeathSD`) t.`I' at line 11"

true

bref, that is more for failover, not sync'ing stuff across continents

NULL AS t. why would you prefix a table before an alias?
NULL as `DeathSD`

http://pastebin.com/d75aad856 — Is there a way to automate retrieving the next highest groupid when inserting into the table?

ok

your query is terrible.. absolutely terrible.

thanks
how can i improve it then?

why are you testing for -99999999 ?

The only way I can think of is to select the highest id, and then increment it, before inserting another row…

its the result in the table i want to replace with null

the paradigm whereby you're having to do that, is almost definitely flawed.

sooo?
what should i do to fix it?

fail.
i dont know. keep trying.

Ahh
fail

i just think that you're thinking in 'procedural', and you need to start thinking in 'batch'/sql.

What do you mean?

exacctly.

Huh?

why dont you just STORE eitehr NULL or a DATE in DeathSD and do 'SELECT DeathSD'?
instead of that monstrosity you have there?

the database is created by a program that is writen in access then exported to Mysql so that i can use it i have no say in its design and nor do i like it

fair enough.

IF(t.`DeathSD` = -99999999, NULL) AS t.`DeathSD`

Hello, anyone who can point me to a good reference for storing ip-adresses in mysql (both v4 and v6 - if possible).

Thanks

php.net/ip2long

don't store them as strings please

hi. I'd appreciate one or more suggestions for an easy-to-install, easy-to-use UML generator for my mySQL database. it's for a one-shot use so I don't really need lots of features.

no, i was thinking of using php's ip2long, as EoN suggested, or Mysql's INET_ATON()/INET_NTOA(), but they return slightly different results, plus they are only ip v4 compatible from what i can see.
thank you

why do *killed* threads stay on processlist ?
32 manager localhost test 608 Killed show TABLE STATUS

until they're rolled back?

hey people - i have the following IF statement in one of my SQL statements:
IF('field' = 'value', "OK", "NOT OK")

quotes

Use ` around identifiers (database/table/column/alias names) and ' around strings and dates. MySQL does allow " for strings, but ANSI standard uses " for identifiers (which you can enable with ANSI QUOTES option) and dont quote numbers

but i would like to say "OK (value)" instead of just "OK"

use concat("ok",field)

what is there to roll back on "show table status" ?

is it possible i can use SET like this..
SET (col1,col2) VALUES ('one','two')
because i already typed it all out like that for update
i mean for insert
then i realised i need SET instead
so would save trouble having to re organise it..

you know that you can use SET col=val,col=val,… style syntax for insert as well ?

i didn't

now you know

but can i use the above syntax for SET?

i think not, but check mysql.com/update+syntax

ok thanks

I'm not sure what that transaction did before show table status
maybe he just imported 10M rows and used show table status to confirm something
then changed his mind and killed it?

http://www.nopaste.com/p/anFHJf7Clb Can anyone help with optimising it/using better indexes please?

madriss, not a lot to do to that

hmm thats a shame, its using temporary and filesort. doesn't that mean its going to be really slow?

Run it and see if it's unacceptable.

it's fine but there is only a small amount of data at the moment. later on there will be thousands of entries
so would be nice to get it as optimal as possible before that happens

It's impossible to effectively optimize a query with non-realistic data.
Load up the table with a couple thousand rows, then run explain.

surely itll have the same thing but with the number 1000 instead of 8

Perhaps.

would it change the type or select type etc aswell then

It might. Depends on the distribution of the data and such.

ah right
so theres no better way to do the query/better indexes i can use? if thers no changes i should make now i cant see how im gona b able to change it later

How can I alter a column in a ready made table to make it auto_increment and primary key?

i dont know a lot but what i heard is that temporary and filesort = bad query

!m fifo__ alter table

fifo__ see http://dev.mysql.com/doc/refman/5.0/en/alter-table.html

Yes, it's typically something to avoid. But you may not have a choice.

hm ok, thanks

You might try forcing one of the other indexes, just to see what happens.

snoyes, it doens't show how to do auto_increment

just worrying that it will be really slow later lol. last time i made a database that ended up with 1000s of entries it was months before i realised how slow it was and then i was like ahh.. missing index lol. now im bein really careful :P
how would i force one of the indexes?

It's just part of the column_definition, exactly as on the CREATE TABLE syntax.
….FROM `won` FORCE INDEX `titleid_date`, for example

ah ok thanks

Usually it is better to let the optimizer decide which index is best to use

yeah

You could even play around with swapping the order of won_date and title_id in the wrestler_id index.

ok ill try swapping them around. i assume im correct in using those 3 columns in an index for this?

seems that way.

i everyone, i have a quick question

thansk for ur help

when you use "interval 1 day", does that refer to calendar day, or 24 hours ago (from the current time)?

ah
i changed the won_date and title_id around
now it uses temporary but not filesort
so i assume thats an improvement :P

It refers to the length of time equivalent to 1 day. You can add or subtract it.
Most likely.

sweet

This might hint at why that happens: http://dev.mysql.com/doc/refman/5.0/en/order-by-optimization.html

hahai changed it completely and it said 87 rows instead of 8 rows :P shows that the index was doing something then
thanks for the link

gracias, just what i was looking for, sorry to bother, it didn't even occur to me that I could just pop date_sub into the command window and test it myself

wich privillages need user of slave replica ?

REPLICATION SLAVE.

!man replication slave

see http://dev.mysql.com/doc/refman/5.0/en/slave-io-thread-states.html

!man grant syntax

see http://dev.mysql.com/doc/refman/5.0/en/grant.html

its about how to get priv but i need wich 1 i use for

It's the REPLICATION SLAVE privilege.

oh sorry 2nd url for me

hello, just wanna know what are the reports supported in mysql?

reports?

You're being just a little vague.

yes, that is because i dont know. i would like to know.
yes, reports to display the data stored in msyql
mysql sorry

!man select syntax

see http://dev.mysql.com/doc/refman/5.0/en/select.html

cyzie, you write sql, its infinite

infinite within the constraints of the packet size limit.

hehe
plus or minus a bit

mm ?
infinite?
i mean display the mysql data in the web.

You'll need to learn a programming language first.

you want to display results of a mysql table in a webpage?

cyzie, you write some code

You could also hire a programming linguist.

mmm ok

i learned how to do that last night in 15 minutes. if you want I can show you how.

linguist! thats a bit posh for the time of day mhillyer

ok, how ?

i'll post a pastebot link.

thank you davis

you need these reports exposed to internal staff or do you need them published on the web (globally)

TodoInTX, i would prefer a login , then user can select such as, date, from what date to what date.

exactly… pentaho is going to be a lot easier than writing that yourself.
http://www.pentaho.com/products/reporting/

yay! our dev server kicked the bucket

Huzzah!

ok, thakns TodoInTX
any other suggestions?
davids?
davis?

yes

has anyone in here used mytop and would suggest using it? is it decent?

it's ok

haha thanks archivist

you are welcome.
err, cyzie

better than typing "show processlist" all over

mytop was good (in 4.0/4.1 days) innotop is better imho

davis, the link ?

mytop hasn't had active dev for at least 4 years

hmm.i thought I posted it.
maybe to the wrong channel. lol

Because it achieved perfection.

http://pastebin.com/m1f47b92b
that is a rewrite of this page's example http://us.php.net/manual/en/ref.mysql.php

well, seems like it's complete

so

hardly ;-o
;-)

what's up with MySQL AB excluding the free software community?

la
How are they doing that windowsrefund?

thanks guy, i look into it

in what way?

they're only providing code to their paying customers as I understand it

incorrect…

ok

They are only providing their enterprise edition source code in an easy to use tarball format to their paying customers.
It is still available to the public via BK.

or via a customer

Or via dorsalsource.

and they're still providing Community source to everyone else in tarball format, just less frequently.. (same as they have done for the past year)

And so for 99.99% of users out there, nothing changes.

But still

still seems to not be in the spirit of the free software movement

Hush you.

just my opinion

For people like dorsalsource they need to compile from BK not tarball… no big diff for them.

I've always seen the company as being a bit of a whore

yeah well that's what you get when using free software developed by a profit-oriented company

How is that not in the spirit of the free software movement? Just download a BK client

I've learned that the need to feed one's spawn can often conflict with the spirit of the free software movement.

how else would you characterize any 'company'

TodoInTX, good point

Or at least be percieved as being such.

as long as there is the community edition it's ok for me, I'd even pay for mysql.

well, thanks for the info
I'm gonna go grab a coffee

Get me one too. Sugar and cream

yep

3 sugar and milk for me

the source distribution policy goes 100% along with the GPL. They are required to give source code to anyone receiving binaries.
no rules on binary distribution in the GPL

if you pass by the refridgerator, bring a beer for me

Well you know what "they" say…

!man replication slave

see http://dev.mysql.com/doc/refman/5.0/en/slave-io-thread-states.html

!repair
how can i do to repair tables ?

!man repair

see http://dev.mysql.com/doc/refman/5.0/en/repair.html

Carpenter's glue and wood clamps.

don't forget the screws ;-)

just finished a clock case

And use Titebond. That Elmer's brand woodglue is about as effective as well water.
uAnd use Titebond. That Elmer's brand woodglue is about as effective as well water./u
(but with fewer newts)
Because the optimizer thinks they are long and hard.

Time to upgrade from the old 386 desktop you had in the corner?

or they are self joins and the optimiser is still thinking

speaking of long and hard, I should continue working on my pr0n site!

would recursing a result set rather than storing the results and doing a query for each of the results be slower than storing the results, freeing the set and doing the queries?

how do I change the open_files_limit on my MySQL database?

you put it into your my.cnf

^Migs^: you have to set it in the my.cnf and restart mysqld

okey dokey, thanks
uh, where's my.cnf?
nm

/etc/my.cnf or ~/.my.cnf or $DATADIR/my.cnf

but why would the default openfiles be too small

^Migs^: depends… /etc/my.cnf or /etc/mysql/my,cnf
or…

if you have a lot of tables this could happen

too many tables methinks

or just a lot of tables in a Data Warehouse

Rince, we do see some excessive numbers in here from time to time
uRince, we do see some excessive numbers in here from time to time/u

how do i set the mysql user/pass ?

!man reset root

Sorry - I have no idea what function you're talking about! but try http://dev.mysql.com/reset root

!man securing

see http://dev.mysql.com/doc/refman/5.0/en/default-privileges.html

!man grant

see http://dev.mysql.com/doc/refman/5.0/en/grant.html

no, how do i reset the password for mysql?

reset root

See http://dev.mysql.com/doc/refman/5.0/en/resetting-permissions.html

there is an easier way of doing it

the "init-file=…" method is safer.
you could just restart with skip-grant-tables and jump in, flush privileges, then set password…

it's so annoying when I ask someone a simple question in IM then the first thing they ask for is my phone extension

IM ?

nobody cares, lol.

hello

how can i send inserts, updates and deletes to a master database, and select queries on slaves?

mysql proxy or you take care in your application

mysql-proxy stable?

it's still alpha
but it's 'pretty stable'

anyone tried sqlrelay?

using Java?

??epoch

hi. can anyone tell me what steps i need to do to enable remote access to mysql on a LAN? its mysql 5 on Ubuntu 7.0.4. I know about granting access from within mysql but i think there may be somehting at the linux level i need to change like access on port 3306.

http://dev.mysql.com/doc/refman/5.0/en/connector-j-reference-replication-connection.html

TodoInTX for my application i use java/php/python

anyone knows about epoch and date transalation? like the psql SELECT TIMESTAMP WITH TIME ZONE 'epoch' + 982384720 * INTERVAL '1 second';

thanks

codeCowboy change the bind-address to something other than 127.0.0.1 (comment it out if you want mysql enabled on all interfaces) in /etc/mysql/my.ini — then restart mysql with /etc/init.d/mysql restart

shadfc, its my.cnf on my system. #bind-address is commented out

external

remove bind-address= and skip-networking from my.cnf and grant permission to the external 'user'@'host' and remove any firewall rules blocking port 3306 and make sure no overrides on the mysqld commandline

codeCowboy yeah, sorry, my.cnf is correct. check netstat -antpl to see if mysql is listening on 0:0:0:0:3306
codeCowboy if so, check the grants as the_wench said

skip-networking is in there. does that stop any connections from the network?

codeCowboy yeah, it skips networking =/, comment it and restart mysql

do you where chaps at your desk?

i do!

leet
do you have the ass cheeks cut out?

sure. is there any other way to where chaps?

how do i change the size of the max_data_length of a table, its currently at its max and im not able to write any more records to it

no sir!

i dont get it though i thought this was a 32bit limitation, im running 64bit community on RHEL4

netstat -a|grep -i mysql shows mnysql listening on 16497

archangle25, there a a page in the docs for that

??

!m archangle25 full table

archangle25 see http://dev.mysql.com/doc/refman/5.0/en/full-table.html

ty, apparently google doesnt think that link is top 10 relevant to a search on mysql max table size

how do i find out what mysql pass i am using?

if you don't know it you can not see it since it is encrypted

reset then

eth01, we already gave you the link

Greetings, everyone. I'm trying to figure out if it's possible to select just certain columns out of the results of a "show something" command. Any pointers ?

Nope. You may be able to select the same information from the information_schema. Otherwise, you have to parse the output in the application.

show variables like..

fair enough, thanks for the answer snoyes
thanks, archivist ; I'm actually trying to get columns out of a "show table status"

I'm trying to find all unique values of a column, and how many times is each of those values listed..?

dupes

find them with select count(dupefield) as qty,otherfields from table group by dupefield having qty 1

why not just query what you want?

@bayroot - I don't understand the question? I don't know how to cut down to just the desired fields from a "show table status" command
And it's been suggested that you can't

how do I stop mysqld in debian?!

I can, of course, do it in app logic, I was just hoping to let mysql do some of the work for me

The same information is available in information_schema.table.

ciao all

@snoyes - yep, I'm starting to find it. Thanks!

You might find this on your own, but in case not: WHERE table_schema = DATABASE()

hm, okay, I'll make a note of that. Thanks
ah, I get it
as it turns out, I want to get usage for all databases, but that's still a handy trick to know

/etc/init somewhere there

Thanks for the help, everyone

shadfc, removing the skip-networking did the trick. thanks!

the_wench too
np tho

and the_wench - thanks!

anyone have a good way to find differences between tables? i've optimized some scripts but i need to make sure the results are the same

Hey folks. I have two tables with lists of names, and I want to, essentially, find all of them that are in one table that aren't in the other, but select table1.name from table1, table2 where not table1.name = table2.name; doesn't seem to work

!tell shadfc about toolkit

shadfc xaprb's MySQL Toolkit (http://sourceforge.net/projects/mysqltoolkit/) includes tools to compare databases across servers (such as master to slave) and bring them back into sync, profile queries, and other handy features.

and haptiK for taking the piss!

a not in b

SELECT a.* FROM a LEFT JOIN b ON a.id = b.id WHERE b.id IS NULL;

Listen to the_wench.

hello, i have a mysql 4.1 box and a mysql 5.0 box. I want to move my data over to the 5.0 box. I have read all the online documentation but i still cant decide if its better to run a dump/restore or to jsut copy all the files over directly and run the mysql_upgrade program

ok, I'll look

mysqldump -h 4.1server | mysql -h 5.0server is simplest, IMHO.

Ah, I see, thanks.

OK, i am actually trying that and i'm getting duplicate primary key errors on every table whos primary key uses auto_increment

how can i easily clean duplicates (of a certain column) in my db?

dupes

find them with select count(dupefield) as qty,otherfields from table group by dupefield having qty 1

delete dupes

If you have a unique ID and the name may contain duplicates then DELETE t1 FROM table1 t1 JOIN table1 t2 ON t1.idt2.id AND t1.name=t2.name if you have other fields that need to be taken into consideration extend the join as needed

http://pastebin.ca/657390 getting error: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'SELECT COUNT(tas1.id) FROM netoffice_tasks tas1 WHERE tas1.proj
anyone see anything that might help me out?

thanks

What is your version of MySQL?
Subqueries were not available until 4.1. I suspect you have 4.0 or 3.23.

ahh, ok… let me check

this is srtange, i'm getting duplicate primary key errors but grep shows that there is only one instance of this key

hi

What is the INSERT statement?

select fields from tablea where tablea.id=tableb.id order by tableb.foo
SELECT * FROM lexicologie.culm1 WHERE lexicologie.culm1.ref=lexicologie.culm2.culm1_ref ORDER BY lexicologie.culm2.culm1_ref

INSERT INTO accesslog (aid, sid, title, path, url, hostname, uid, timer, timestamp) VALUES (34262276,'b0cdaf346c3777ca8f292f52edff4fcb','Day','teachercal/mclaughlins/2027/01/29','http://www.xxxxxxxxxxxxxxxx.com/portal/teachercal/mclaughlins/2027/1','211.111.111.111',0,190,1187108489);
sry for the paste
thats the insert statement
future statements will go in pastebin :-)

And aid is the auto field?
!tell maxagaz about joins

http://hashmysql.org/index.php?title=Introduction_to_Joins - For more indepth info: http://dev.mysql.com/tech-resources/articles/mysql-db-design-ch5.pdf

Any chance you've already inserted these records into the database?

yes
nope, i'm starting with nothing
the dump is creating the DB

Does it drop the existing one, or just create it if not exists?

thanks

i drop the existying one before i begin the restore
i am starting this on a installation with no db's besides test and mysql and info_schema

whats the type of aid

int(10)

are you starting with an offset to the auto inc

aid int(10) NOT NULL auto_increment
no, i'm not

GREAT! It works perfect!!

Show the exact/complete error message. Do you have any triggers?

no
hold on, error message is on the way

Hello all
Im having an issue and I want to try to get it down MySQL wise so I can work the PHP end out of it.

howdy fsteves

I am doing an INSERT INTO / SELECT FROM
I have run into an issue that I need to inject some PHP variables into the MySQL statement, but can you use VALUES in the mysql syntax with SELECT FROM?

ERROR 1062 (23000) at line 1748762: Duplicate entry '1098628' for key 1
when i grep through the dump for that number i get only 1 result

You can use this form: INSERT … SELECT …;
Either provide the data via prepared statement or just dynamically build the SQL in php.

better yet
http://pastebin.ca/658480
a href="http://pastebin.ca/658480"http://pastebin.ca/658480/a
The thing is im working with two different tables
One is a slimmed down version of the other

Yes, you can use static values in INSERT…SELECT. SELECT 'constant', `field`, 'otherConstant', `otherField` FROM…

hello guys, can somebody help me
http://pastebin.ca/658488
i am trying to do something but I dont know if it is possible

gniretar_work, that key does not match the line you pasted earlier

yea, i just grabed one of the thousands of error messages. I'l grab that specific line and paste it in pastebin. hold on.

if I have a table with user information, one row per user, then a table relating to the user table that holds demographic data with multiple rows per user, one row per item of data, is there a "better" more common way to structure this?

What's the problem?

the first CONCAT is fine, however the second CONCAT need to use an other virtual_domain that depends on the virtual_user that used

are some examples somewhere of LEFT JOIN inside other LEFT JOIN (bu is it possible ?) ?

I bet some of your data contains nulls and the auto_increment feature is assigning a value yet to be inserted from your dump. When that existing id finally is inserted you see that error. Look for nulls or 0's in the import.

are there

http://pastebin.ca/658494

so how do I use two different virtuals_domains

No problem, you just need to add an alias for the table the second time you join it.

null and 0 would behave the same.

OK, let be do some searching

…LEFT JOIN virtual_domains AS someAlias

Just a guess.

ah ok

If you can post a testcase that produces the behavior, that would be best.

Depends on the nature of the data, but what you describe is acceptable in the event where the type of demographic data varies for each person.
If you generally collect the same pieces of information about each user, then they can be fields in a single row rather than separate rows for each piece of info.

http://pastebin.ca/658498
like that

right, the amount of data is dynamic, depending on what client group that user belongs to

LOAD DATA LOCAL INFILE 'D\Price List USD.csv' REPLACE INTO TABLE `products` FIELDS TERMINATED BY ',' ESCAPED BY '\\' LINES TERMINATED BY '\r\n' and a line from csv looks like SWA0-10-24,Air prize,A table Package,Von,10 - 24,$4.48 ,$3.36 , but all the data cames in a firast field

http://pastebin.ca/658499

you need to use the alias in the ON clause too.
no. $sql = "INSERT INTO x (blah) SELECT `LastName`, `FirstName`, `MiddleInitial`, '$username', '$location' FROM `evac`

just that performance is starting to suck at 1 million users ;(

Perhaps some of the data belongs in a different table?

perhaps, plus the queries need work, just wanted to check if there was another way we could structure it that might give a performance increase

sorry i do not see what you mean yet, can you give some more directions?

the problem lies in this: The table I am selecting from doesnt have the Username or Location fields

snoyes, thanks for the feedback

You did it all correct except you need to use ON virtual_aliases.domain_id=virtual_domains_aliases.id,
I see that. The query does not look for such fields. It includes them from the php variables, as constants for the query.

yes thanks i see it

Hence the different quotes used.

So it will just insert the values passed through PHP, not look for those fields in the table called for SELECT (essentially mixing and matching inside of the select statement)

what I am doing wrong ?

perfect i got it working
thanks for your help

correct.

can someone help me out with an Import SQL file?
it keeps failing

With what error?

#1136 - Column count doesn't match value count at row 1

That's pretty clear. It happens when you do something like INSERT INTO table (oneField) VALUES ('oneValue', 'twoValues');

Hello, I'm using an application that has MySQL as the backend. We can no longer add new records without getting the error: "#23000Duplicate entry '50463-0' for key 1" — 50432 is the last entry in the table. I can't find one for 50463-0. I've ran the extended repair on the tables, but no
luck. Where to look now?

exactly
see
whats the problem with this file
http://pastebin.ca/658501

moin

moin moin

We'd have to see the structure of the categories table.

its empty

Structure, not data.
SHOW CREATE TABLE categories;

Hi friends.

You've done SELECT * FROM table WHERE field = '50463-0' ?

I got a little problem with mysql, perl and utf8 support. one of my columns look like this:
firstname VARCHAR(255) CHARACTER SET utf8 NOT NULL

it gave me this, categories CREATE TABLE `categories` (\n `8` char(1) NOT NULL…

How do I populate BLOB columns in stream mode?

yes. nothing appears.

LastPerson, thats not complete

button to see the whole response.

better yet, use the Export button, export the structure only (uncheck the data) as SQL, and paste those results in a pastebin

categories CREATE TABLE `categories` (\n `8` char(1) NOT NULL default ''\n) ENGINE=MyISAM DEFAULT CHARSET=latin1

then I inserted 4 rows into the table, "Jörn", "JÖrn" and both with utf8 encoding. when I let mysql compare those, 'Jörn' and 'JÖrn' are the same, those with utf8-coding are different. why?!

So, that table has only one column, but your inserts try to put in 3.

is there a way the script can be fixed
I mean

by george it works
thanks snoyes!

snoyes I got round to playing with the designer in phpmyadmin yesterday, a few foibles but works

exit

MySQL doest support Blob Streaming does it.

in the BT Tracker files, I'm supposed to import that, and 3 of the same .sql files

DirtyD, someone has a blob streaming engine for mysql

Probably what you want is to fix the table structure. Add the two missing fields.

and obviously, I made the 'catagories' table with nothing in it soI could insert but it just doesn't work
how do I do that?

On the phpMyAdmin "structure" page, there's a bit for Add [] field(s) () At End of Table…

DirtyD, google MyBS blob streaming engine

That's the Structure page for the table, not for the database.

I'm trying to store email into a blob. The problem is some of these emails are very large. Is it true that MySQL can only store blobs that fit in mememory, and that they can't be chunked like with Oracle?

I don't know what values to insert though

I particularly like how simple it is.

I thought I'd just be able to import that file directly

You have to define the structure of the table. I would have thought the file you downloaded would have included that.

snoyes a bit to simple for some situations (eg a trigger for the FK)

Assuming there's more than just the data, whatever scripts use this thing would need to know the names of the fields and such.

DirtyD, you would need to set the maxpacket size to fit them, but just store them in the file system for ease
images

http://hashmysql.org/index.php?title=Storing_files_in_the_database

I have no idea what I'm doing… heh

Hm
So, that query about items that are in one list bot not in another is working, but it sits on 'sending data' for a while

big list

indeed, however even if I limit it to 1000 results it's 10 minutes plus
Can I pastebin it to see if there's something I can optimize?

yes add the show create table tablename for the tables

http://pastebin.com/m1ef77287

ST47, so you are doing it on views why not directly on the tables

hey, guys - I have the problem described here http://www.debuntu.org/port-forwarding-and-channel-3-open-failed-connect-failed-Connection-refused

mm.

however this sollution doesn't work…

I may not have access to the tables

I already have band-address = 127.0.0.1 on both the server and client
I can ssh into the machine fine - it's only when I tunnel the mysql client doesn't want to connect

soulfreshner, check mysql permissions eg..
external

remove bind-address= and skip-networking from my.cnf and grant permission to the external 'user'@'host' and remove any firewall rules blocking port 3306 and make sure no overrides on the mysqld commandline

127 is not the same as localhost

is there any trick that will somehow apply your layout to your 500 and 400 errors?
oh crap
wrong channel
sorry

5 doors to the left

ha

archivist, permissions on the remote host?

6 on me xchat

How are you creating the tunnel?

yes

ssh -vvv -L 10000:kbase.sun.ac.za:3306 derick@kbase.sun.ac.za
-vvv for debugging info

Are you ssh'ing into a router or the MySQL server?

into the mysql server

Use localhost instead of kbase…
kbase will connect to host's external IP, not 127.0.0.1
(which you bound to)

well, what do you know
as easy as that
ta seekwill

np

i have two ways of going about a query and im not sure which seems to be most effective. i havnt finished optimising either of them yet but can anyone give an indication of which way seems most efficient? i have my two explain queries here: http://www.nopaste.com/p/a750yeMNx

would I save disk space if I stored email messages as files or as blobs in a database?

not sure whether to start with the superstar table and then join it to the other two (first query) or start with the svr08test table and join the others (2nd query)

is \r carriage return?

yes \n being line feed

am i right in thinking the first of the two queries is better on that link? as it has 8 2 1 on the rows which is smaller than 13 1 1, and the first table is the one it is primarily ordered by?

well as the first line in the explain does not use an index.. keep working on it

yea im not finsihed with that yet
just does that method of gettin the results i want seem better than the 2nd query/
i wana establish which is best so i can go on to choose the right indexes from there

think about the overall problem not parts of it as you may well change it all again

i am :P i wana know which of the two is most efficient, cos then it gives me an idea of what angle i shud b tackling the problem from - ie. starting at the superstar table instead of the svr08test table or whichever
i think because i am ordering by superstar.name, svr08test.id, that its better to take the names from superstar first, and then link them with the stuff through svr08test. but may be wrong

madriss, allways select the smallest result set first to reduce the load

ah that makes sense. well superstar has a list of names, and svr08test links those names to the names stored in creator.name
so there will be much less rows in superstar than in svr08test, so i should start there
course there will be more stuff than that in svr08test, im simplifying :P

no it depends on the select which will produce the smallest set

oh ok

is it possible, using mysql regexs, to update a field and remove all links inside the field?

are there any examples of that? i dont get how a much more huge table can produce a smallest set

www.archivist.info/search/index.php/Sql this only selects from one large table but the selects are ordered

ah thanks

ok guys, just need a quick answer here
if you drop a db, it's pretty much impossible to recover, correct?

Yep

its what backups are for
hint binlog

Well, depends on certain things

see, I just took a call from a slightly desperate client

only slightly

well it's hard to tell exactly how bad it really is

Moscow - A Russian region of Ulyanovsk has found a novel way to fight the nation's birth-rate crisis: It has declared Sept. 12 the Day of Conception and for the third year running is giving couples time off from work to procreate.
bMoscow - A Russian region of Ulyanovsk has found a novel way to fight the nation's birth-rate crisis: It has declared Sept. 12 the Day of Conception and for the third year running is giving couples time off from work to procreate./b
http://www.denverpost.com/ci_6624865

^Migs^: Yeah, not really a #mysql topic

two similarly named DB's and you drop the wrong one? I dunno
anyway, is there anything you guys can think of, short of commercial data recovery?

uh, I just thought it was interesting, that's all, and wanted to share

Any kind of backups exist?

let's assume not
I know they've had issues with them lately, so I don't know

Look in the datadir to see if binary logs have been enabled.
*.bin files

presumeably those can then be replayed against a backup

I don't know what would happen if you created the DB while it was logging…

then the creates will be in the log
if it goes back to the start

You can restore your last backup, then provided you have the binary logs, replay the from then
There is a snag that you might not know what position in the logs your backup was taken
uThere is a snag that you might not know what position in the logs your backup was taken/u

ok, that's prolly enough :&)

how can icancel a mysql query.. i type soemthing and now it lagging my server
mysql work at 100% now.. i need a way to cancel my query please

connect in another session, then do show processlist, and kill the offending thread with the kill command

Vanpriest, 'SHOW FULL PROCESSLIST'
then use 'KILL' to kill the process.

tat in mysql console right?

Or follow what MarkR42 just said heh.

Yes, in mysql command line
Or in MySQL 5.1, just press ctrl-C (nice new feature)

wondered if this is normal behavior for mysql 4.1, i restored a table on a mysql slave (who is a master to some other mysql db) and it zeroed the position of its master in the relay log, is this normal?

wait, ctrl-c does what now?
you can kill the query?
I wish CTRL+C worked like it does in, well you know, A SHELL.
:

dan__t, open another shell, show process list; kill the query

er, yes, that's what I just said
I'm just bitching about my wish list.

they're gonna recreate the db :&)

and learnt a lesson

how do i free memory after i kill tthe process, the mysql seem to still lagging even after i kill the query

OK, this issue is VERY strange

Does it show anything else under SHOW FULL PROCESSLIST?

its erroring out on the first line of the data dump

If you killed the query, it's dead. It is no longer running.
I think you should worry about the query rather than memory.

how do i change the column seperator when piping mysql to stdout? by default it uses a tab, i want to use a | or something

Memory won't make your shit run any faster if you're running hardcore queries.
I'm not sure you can do that, shadfc.
How are you piping the data?

Memory will make almost anything faster, especially if you tune your mysql riht

file.out

ie. it's in batch mode

shazow, using SELECT …. INTO OUTFILE might work better for your purposes.

KILL command tells the thread to quit, it frees all memory it was using when it quits
it doesn't always quit immediately but usually fairly soon

mysqldump may have some other options that you would be interested in, too.

how do i deal with the column separator though? because some of my data has tabs in it, so importing into a spreadsheet breaks things

yeah.
Tell the spreadsheet to ignore tabs as a delimiter?

of course having a very big query can blow your cache away which will temporarily slow your box down because thigns which were previously cached won't be any more.

then how do i parse the columns, if they're tab-separated?

CSV?

there are commas in the data too
regardless, how do i make it comma separated?

INTO OUTFILE will do that.

The CSV specification details how to place properly embedded commas in the data.

hm alright

You can use FIELDS TERMINATED BY and LINES TERMINATED BY and stuff like that.
YOu can make your own delimiters for dumping data.
And, again, mysqldump might have some options

You'll have to check whether INTO OUTFILE conforms to the CSV specification in that regard.

You can make it do so, as far as I understand.

ok
thank you

I have question related to temp tables.Is it better to create seperate stored proc to : CreateTempTable and than InsertIntoTempTable than third proc to move all data from temp table to actual table and remove temp table?

It really depends what you want to do
What your motivation is for creating the procedures in the first place

is there a way to reset autoinc IDs?

Yess, you cna use ALTER TABLE

I have a table that contains data. Than on every new restart of my program I want to download new data from server and place it to temp table

temporary tables reside ON the server
just like permanent ones

Well server I mean external server. Nothing to do with mysql

Right, well, you will have to load it with some INSERTs, LOAD DATA etc

All I want to do is to download new data( be sure that I got it all with out any errors) before truncating data from main table replacing it by data from temp table

FIELDS TERMINATED BY + INTO OUTFILE did the trick, thanks all

There is generally no advantage in doing something in a stored procedure unless it reduces the number of queries or it's called from a trigger, event etc

Im trying to setup a schedule in a table with a stop and start date which are both datetime fields, How do I check to make sure there isnt another start and stop date that would conflict with one already in the table?

You could use transactions if you are using a transactional type
and roll back the changes if you encounter an error

I'm starting to draft-out a new database, and it's likely to become big (lots of tables). some tables have little to do, but not nothing, with the others. I'm thinking about dispatching the tables among many databases, what are the pros and cons of using more than one database ?
(don't quite know how to google that)

I do not have transactions on this table becouse there is no need for it.

You can use INSERT…SELECT syntax to bulk load data from one table to another, regardless of whether they're temp or permanent

crap on a cracker. i'm trying to adapt groupwise max to a sales records calculation. works fine on the assumption that i want the latest records, but i can't make it work relative to a particular date (if i'm generating a report on data 6 months old, i don't want a record amount to show if it's
only 3 months old). see http://pastebin.ca/658658 for queries/comments.

It really depends exactly what you're doing. If you think you will have too much data for a single server to hold, or you have too many inserts or other queries, yes, maybe do that
You can logically partition your data amongst several physical servers, but it makes querying signficantly more "interesting"

Anyone has an idea why I can execute the following query with phpmyadmin but not from php with mysq_query, then I get a script error…. Here is it: http://phpfi.com/256467

Roughly what sorts of scales are you planning on doing this on?
We have around 40 servers in our production system with our production data spread across them
there are many terabytes

it really depends on the tables. some table will be constantly hammered with inserts/updates/selects, while others will be almost static.

Is there a way to create temp from actual table? Well both of them are the same. Is there something like create temporary table `tempTable` from real table. This way if I change the main table I do not have to change the definition of temp table? do you know what I mean?

Probably your best bet is to put all of the rarely changing data on to one server, and the current live changing data on another,
That's certainly what we do
We have a single master configuration database which has (relatively) few queries
(i.e. only a couple of hundred per second, mostly selects)

may I ask how you manage to backup, or keep safe, all of this data spread over 40 servers ?

The master configuration database we do have backups of and also have readonly replicas

this happens to be a major concern here and our DBMS knowledge is a little over average

The dynamic data we have no backups of, of any kind
Our dynamic data are simply too large and too dynamic to be able to feasibly backup with cost effective technology
I suspect there are 40 Tb +

is the dynamic data vital in any way ? can you even afford to lose some of it ?

But the whole lot changes every 60 days
They are important to some extent, but we can't reasonably back it up
even if we could back it up, some would inevitably be lost upon failure of a single compnent
unless every single server had a replication slave, which is something we might consider in the future

I see. consistency problems I presume

Is it possible to make sure 2 date ranges dont overlap?

consistency is not a major issue, as these data are fairly flat
there are in fact, no joins of any real kind in these dynamic data

Comments

Im using apache 223 on Debian I have a perl fastcgi script that apache calls but I want that script to run as

Gallery only offers widths that are at most as wide as the original image

uh-oh. I looks like port 80 is blocked, or not forwarded properly
Guy-: interestin

me?

you are familiar with portforwarding and starting the apache2 server

however, the copyrighttext mystery remains, I'm still working on it

yes, you.

who is fajita referring to.

don't mind her for now.

oh ok.

her? I always thought a fajita was an 'it'

no, it's definitely a girl.

call it her out of 'respect' xD

s/it/she's/

I'll take your word for it, but I can't help wondering how you tell, with a bot

does 'it' talk too much?

she

she is a thousand miles away
how rude some people are:-(

Guy-: us here have a close relationship

haha

anyhow

Hi thumbs

that was funny

since you seem to be using port 80, and that most ISPs block it, consider using another port.

har har

oh man

thumbs ;p
yeah

what?

thumbs, more of a love-hate relationship, eh?
3

any port?

any port is 4good. as long as it dosen't clash with a port in use

Hey, test
(am I alive?)

gman`: apparently, yes

sweet!

like sugar, baby

hush fajita

shush

huh?

hush

I have a dumb, but hopefully easy question regarding mod_rewrite… and I'll bet you get tons of those every day :$

gman`: you should ask it.

I'm trying to get *all* url requests in a directory to be sent to a php hosting file as a query

that's easy.

www.mysite.com/somedir/index.php?src=blah.jpg

but transparent, so the end user just sees the first URL
yeah, I can't seem to get it to work though
RewriteRule ^(.*) index.php?src=$1
(thats my current rewrite rule)

garbage

try putting junk in your htaccess file. If it's being read, you will get an Internal Server Error when accessing that resource.

gman`: make sure the htaccess file is being read first

yeah, its being read
I mean, when I request that URL
what happens is my PHP file reports back to me that $_GET['src'] = index.php
which just boggles my mind

can you give us a sample url?
and did you put RewriteEngine On in your htaccess file?

yes
sample as in for you to view?

yes

ok, hold on

did you see my last message thumbs ?

no

i think i changed my port to 8080, but now i get a router login page when i try to access my dns site from the other system on the remote LAN

your router is most likely using 8080 for administration purposes
try 81 instead

okay

never mind which port, just pass it!

wow that's really annoying
is the port specified in httpd.conf also, or just vhosts.conf?

that depends on your distro

ah, makes sense
i'll check both

ok
got it
http://www.phpleaders.com/cms/web/mm_travel_photo.jpg

gman`: it seems to work here
gman`: I see php code

Debug mode enabled…
right?

?

gman`: yes

fajita debian is the best!

….but debian is "we complicate it for you so you don't have to" or see /usr/share/doc/apache*/README.Debian* or http://wiki.apache.org/httpd/DebianLikePlatform

:P

yeah, but if you scroll down, the $_GET is wrong

gman`: ok
rewritelog

rewritelog is http://httpd.apache.org/docs-2.0/mod/mod_rewrite.html#rewritelog http://httpd.apache.org/docs/mod/mod_rewrite.html#rewritelog. Use this logging to help design and track rewrite; see also rewriteloglevel; and cannot be used from .htaccess

rewriteloglevel

rewriteloglevel is http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html#rewriteloglevel. RewriteLogLevel 9 is log everything…

with that url the $_GET['src'] should be "mm_travel_photo.jpg"

ze php, she scares me ;p

same luck with port 81

lol

try http://localip:81

it tried to resolve it to http://localip.copm:81/ but still no luck

…. .com?

yeah sorry fat fingers

is your server even listening on port 81 now?

not sure, all i did was forward the port for apache

you need to change the Listen directive, and restart apache.

do i need to restart apache each time i change the port :-/ lol
didn't even think of it til now
oh man, gotcha
hm, from the system running apache, firefox gives 'Not Found The requested URL / was not found on this server Apache Server at dave.homeip.net Port 80'
even though i though i changed all my directives to 81

what does the error log say, exactly?

for every rewrite rule, do I need a rewrite cond?

(error log is located..) :-/

gman`: in some cases.
defaout layout

sorry…

/var/log/apache2/error_log

what about in this scenario where I just want to redirect everything?

nothing of notable interest in the error_log
there's no real errors in the error_log

Good evening / Bonsoir

ugh, still no luck.

greetings

greetings user

it changed from 'The requested URL / was not found on this server.' to 'Firefox can't establish a connection to the server at dave.homeip.net.'

that probably means apache is not started

i've done 'apache2 -k restart' and checked the error_log and says 'resuming normal operations'

I'm sorry, I have to run
ask any other helper, they will give you a habd

no worries, thanks for everything.

make sure it is running, with "netstat -pntl"

is that command included in the apache2 command?

no
it is a linux shell command

oh duh, yeah
1 0.0.0.0:* LISTEN

so apache listens on port 81
are you testing it on port 81 ?

http://yourserverip:81
is the way to access it

thanks for trying to help me out earlier…turned out to be neither apache nor firewall issues, but conflicting static IPs on my network…take care

can i access the page from the browser within my LAN?
i'm getting a timed out error on remote windows system.
but i can see the page perfectly if i access it from my linux machine.

well davo http://laniptoserver:81
like http://192.168.0.3:81

hrmm, I'm having no luck with mod_rewrite for something that ought to be pretty simple

gman`, rewrites are never too simple..

lol
well…
I want http://www.phpleaders.com/cms/web/mm_travel_photo.jpg to rewrite to http://www.phpleaders.com/cms/web/index.php?src=mm_travel_photo.jpg

correct. that does work from the browser on the linux box, but not any remote system

Currently using "RewriteRule (.*) index.php?src=$1"
but the php file receives $_GET['src'] = "index.php", not "mm_travel_photo.jpg"

gman`: phpinfo() will likely show you which env var to use for the rewriten url

gman`: btw, you really dont want to do that,

why?

because

yeah that's a bad idea

why so?

looping

looping is http://rewrite.drbacchus.com/rewritewiki/Looping

gman`: your machine can get pwnt

ok, so what if I put in the rewrite an exemption for php files?

does work. Does this make sense?

also in your php you gotta becareful how you use that src variable

yeah, to avoid src=../../whatever_file_in_home_dir

gman`: not really

something else, related to looping?

gman`: you can put in http://someexploitedserver.co.communist/ownedlololol.php

Hi, I was in here a few days ago and had someone link me to a nice 2.2 or higher only solution to having apache have only one file serve all content for a virtual host or directory that didn't use mod_rewrite… but I lost the link. does anyone know what it was again ?

well it doesn't process the file
it just outputs contents
so it won't run any php code

1' works on my local system, is something mixed

http://wiki.apache.org/httpd/RewriteVirtualHandler

…..(oh that was bad)
^^ should have been 'http://dave.homeip.net:81/' works on my system

Action system will pass path info, right ?

You could presumably use ErrorDocument for that, but it wouldn't work for POST data.

DrBacchus, exactly
DrBacchus, I'm trying to store the bulk of my code outside of my document_root for security reasons

is it possible/normal that "PerlSetVar Foo" works inside Files, but "PerlSetVar Bar" doesn't?

how can i do to replace with apt-get the config files?

am i doing anything right with this DNS stuff?

this is a mf stuff apache2 doesn start

so question
RewriteCond %{REQUEST_URI} !^index\.php(.*)
RewriteRule (.*) index.php?src=$1 [L]
that should NOT be activated if the .htaccess file is in mysite.com/somedir/ — and the url is mysite.com/somedir/index.php?blah

davo dunno, what did you do ?

hi. need help with a caching issue. i generate thubnail images with php, and it happens that there is a new image with the exact same filename. now the brwoser only get the new image on manual reload. can someone point me to the right point to tweak to fix that ? it's rather unhandy as it is now

you can set a no-chache header, but it's up to the browser to honour that

naturally. what i don't really understand right now why it happens at all. from the server's point those are just plain images stored on the filesystem that change once in a while .. shouldn't the browser check if cached images are still current and get the answer that it changed from apache ?

erm.. no, HTTP doesn't work that way

I have a little problem with the server-status. It doesn't work in local but : "Allow from localhost" is in… Anyone have the solution ?

okay then .. mind to explain where i'm wrong ?

Questions of the form "what's wrong with …" can't be answered unless we know what you're trying to do.

it depends on the browser actually doing this check, and the default is to set some kind of expiry (ergo caching) for all content that's not marked as dynamic, so as to reduce bandwidth
so to have the browser even get the message that it should check more often, you'd have to set a non-standard header value
and even then, it's all up to the browser what it does with that information

tough cookies

Julia does it work anywhere else ?

okay … how can i set that header for a image file ? i know how to do that for a dynamic php page but never treid for a semi-static file

why would it be any different ?

I want it work with a Cacti script and normally it 403 Forbidden when i'm not in localhost
sorry i'm french

Julia what does the location block look like ? put it in a pastebin, not here
also,

also, is it the same person possibly

step one

whatever the problem, step one is to look in the error log (and any other logs that may apply, such as suexec, mod_rewrite, or mod_security).

I'm sorry Cacti take the IP of my server and not "localhost"… (The next time I read the #apache topic :p )

:-D

you also need to switch it to terse output specifically, for cacti to make use of it
byou also need to switch it to terse output specifically, for cacti to make use of it/b

Just a last question "Allow from localhost" If I want allow 3 hosts, what is the syntax ?

graphical plotted apache http goodness

noodl, using the Location/Action method you suggested, which I really like the sound of, I get the following error: Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.

Julia just insert more lines

Oh nice Ty for your help

let's see your config (and any htaccess files you might have, in case they're hiding rewrite rules) http://dpaste.com/

Very very well OH YEAH Have a nice day (I think :p)

I'm sure I have no rewrite rules at all
http://dpaste.com/hold/16068/
for the offending virtualhost, I'll go paste my main config

you don't have 'virtual' set, though i'm not sure if that'll help
without 'virtual', action only works for requests that match existent files

1' does not connect and http://dave.homeip.net doesn't connect from another system on the same

http://dpaste.com/16069/
noodl, I set virtual and I tried not setting virtual

davo how have you ensured that you can resolve the hostname locally to your internal IP ?

1/' on the linux box gives 'Firefox can't establish a connection to the server at

which linux box ?

noodl, adding virtual back makes the exact same result happen

the one i am on right now and trying to host the dns page.

"dns page" ?

well, i dunno the exact terminology.

well, better get crackin'!

i only have one linux system, and then a windows system on the same home LAN.

networking is a rather exact science
use dyndns's port forward option to be able to use port 80 from the outside
unless that's not possible on free accounts

Hi lads and lasses… Is there a module or something I'm missing? I'm trying to run som CGI apps in my cgi-bin, and I'm just getting the binary app data instead of apache running the file
I set chmod to 755 and I still just get the data. :/

nothign to do with FS perms
cgi

cgi is http://httpd.apache.org/docs/2.0/howto/cgi.html or http://wiki.apache.org/httpd/ScratchPad/EnablingCGI

hm, i have no idea. i didn't know doing a simple webpage from a DNS was such an undertaking…

go read the second link

errr

the cgi?

the cgi is !python, but that shouldn't matter

This page does not exist yet. You can create a new empty page, or use one of the page templates. Before creating the page, please check if a similar page already exists.
Useful link! ¬_¬

davo a simple webpage is indeed pretty simple, but the way you think it comes "from DNS" already indicates that you don't really understand the technologies involved

before, only AddHandler in vhost context. it's not surprising that it's looping.. do you now regex lookahead assertions?

indeed, i admit 100% i have no clue what i am doing, but i didn't think it was a crime to try. :-|

1. outside DNS must resolve to your IP, 2. inside DNS must resolve to inside IP, and 3. you must have arranged the appropriate access to apache
by whatever means necessary
you seem to have covered 1., so you're stuck on 2.
which is odd, since most people would attempt to get hat working *first*

hm, i was able to do the first two until i switched apache from using port 80 to port 81, then all hell broke loose.

how did you switch apache, exactly ?

noodl, I don't know much if any about regexp

servertokens dave.homeip.net:81

Couldn't get a useful value for http://dave.homeip.net:81

in the 00_default_vhost.conf
changed all 80 values to 81

it looks like you have more problems than you thought, since 1. isn't working either

1 was working, until i changed 80 to 81

davo, try something in the 2800 range

so why did you do that, then ?

ok well the issue is perhaps that there's a loop happening because your handler matches your handler. i don't think Location (or LocationMatch) support negation, so you're left with using a *clears throat* negative zero-width lookahead assertion. see man perlre for the syntax, or shout and i'll look instead
ok well the issue is perhaps that there's a loop happening because your handler matches your handler. i don't think Location (or LocationMatch) support negation, so you're left with using a *clears throat* negative zero-width lookahead assertion. see man perlre for the syntax, or shout and i'll look instead

or, alternatively, get a decent ISP

someone here suggested changing 80 to 81 since perhaps my ISP wasn't allowing ports to forward on 80.

http://wiki.apache.org/httpd/RewriteVirtualHandler

my ISP isn't decent?

ok, i wrote that page, so if it's wrong then blame me

oh, okay

does anyone here live in the US and use Cox ISP (no jokes about the name, mind you)

davo if they don't allow you to run the services you want, then no, it's not a decent ISP

noodl, I think the rewrite one may work since index.php should be the only file in the document root, except of course for an occasional temp file…

but how can i be sure it's them that is not allowing me to run the services that i want, and not just me being a total n00b and not having a clue that i am doing it wrong.

try Action foo-bleh /script.php virtual // SetHandler foo-bleh outside of Location context (just in your vhost)

easy - switch it back to port 80, verify that your internet connection is forwarding the port to your server, and ask somebody to check

ok cool, i'll try that again

still gives error

okay cool, i can see my page on my local host
http://dave.homeip.net:81 works on my linux box

well, yes - but what does that prove
servertokens dave.homeip.net:81

Couldn't get a useful value for http://dave.homeip.net:81

but it doesn't work on the windows system
no it's http://dave.homeip.net:80 now

why would you expect it to ? I suggest you stop guessing and start applying the scientific method
test, verify, change, repeat

noodl, I think the re-write rules are best

they often are

noodl, without the rewrite_condition, they still work, too

what else do i need to verify?

i'm just off to bed but i'll try and verify that Action stuff tomorrow

noodl, okie, thanks
noodl, before you go
is it possible to use .. in a rewrite rule ?

uh, .. in a regex means two of anything

oh
aah, absolute paths work just fine

'cept LF

(.)(.) — with memory

norks have memory?

so the file name . means "match 0 or more characters except LF" ?

servertokens http://wootgnu.org/ondve/

Apache/2.2.4 (FreeBSD) PHP/5.2.3 with Suhosin-Patch mod_ssl/2.2.4 OpenSSL/0.9.8e

ehh
servertokens http://wootgnu.org/ondve/

phear

there

norks++

Apache in disguise

sporks++

mod_security for winxp

there are no norks! there is only.. SPORK

lol

duh

A child of five could understand this! Fetch me a child of five

I'll spork-feed your eyeballs to a child of five!
we need weirder factoids

spoon

Because it hurts more, idiot!

that's rather straightforward, 'spaz

child of five … interesting family life there

Hehe.

Hehe. is that the sort of thing mod_wombat/mod_lua will do too? hopefully with a less terse syntax?

you try digging out someone's heart with a spork. then tell me how straightforward it is…

it wasn't me - it was the bot ! (mimicks Will Smiths unendurable fakeness)

s/spork/spoon/

servertokens dave.homeip.net:80

Couldn't get a useful value for http://dave.homeip.net:80

servertokens aarcane.strangled.net

Apache

servertokens ichigo.aarcane.strangled.net

Couldn't get a useful value for http://ichigo.aarcane.strangled.net

hrrm
fajita must not have IPv6

excuse me?

ah so it's not just me

afais, fajita got your servertokens

servertokens aarcane.strangled.net

Apache

it just looks like you're borked.

megaspaz, but not for ichigo.aarcane.strangled.net

ya think ;P

ah missed the ichigo one…

ichigo is only accessible via ipv6

davo why not start by trying the steps you have been offered up til now ? do the port forward thing on dyndns, get your internal DNS figured out, and (optionally) set up iptables to pull things back to normal
aarcane so it's a different apache instance, then ?

not necessarily

adaptr, yeah, it's my internal testing server for working on stuff

the bind isn't done on vhost level, it can't be - it's done on the Listen

yeah
well mebbe not
namevirtualhost ipv6:80

i am trying as best i can to apply every step that i have been offered. i know i am not anywhere up to par with any of this, but i thought i am trying to learn from my mistakes.

namevirtualhost ipv4:80

and mebbe yes, trust an old TCP nerd on this

with different listen directives. i don't see why you'd need 2 apache instances running

you could set that, fine - but TCP doesn't care, it will bind to either or - and always to either or

i have the apache port fowarded in my router, but not sure how to do the portfoward thing on dyndns.

apache has no 'fluence on that
davo look around the settings for it

you should probably start trolling around the dyndns panel

"trolling" ? heh

okay fair enough, this troll can take a hint. thanks again everyone.

trolling == exploring

erm…

well in my context

not from my experience. but that's fine, i get the jist.

heh

anywho, thanks again.
btw, there is no dyndns channel

I call it "incontextinence"
he didn't say channel, he said panel - the web thingy you use

of course.

Hia ll, I think that my SSL configurations are wrong (phpinfo tell that the port used is 80 and the DocumentRoot is not the one that I set…) My site is hoste on my Personnal PC on an address located at dyndns.org. Anyone have an idea ?

not really, no - except that SSL usually uses port 443, not 80
step one

whatever the problem, step one is to look in the error log (and any other logs that may apply, such as suexec, mod_rewrite, or mod_security).

it said "You configured HTTPS(443) on the standard HTTP(80) port!" but In the config file I used the 443 port…

there are several places where you must configure the port

I put it only in the file /etc/apache2/vhosts.d/00_default_ssl_vhost.conf

ssl

ssl is *Secure Sockets Layer. Ask me about mod_ssl or ssl vhosts see also http://httpd.apache.org/docs/2.2/ssl/

finally someone doing exactly what i am hoping to do

hardly, unless you mean misconfiguring apache

you know what i mean ;p

well, no - your issue was DNS-cluelessness, and port problems - not configuring SSL

okay fine, anyways.
i was directing that towards metres, perhaps he might understand my situation.

and we don't ?

oh i am sure you do, all too well.

well, to be honest, I *dont'* exactly know what your situation is, because you haven't exactly made it easy to figure out

what way do you guys recommend to identify a 'leaking' apache process? it just eats up all system memory and all the swap, taking down the whole server remarkably.

tibyke most likely PHP, not apache
tibyke but you could strace apache or mod_php, or whatever you have running

adaptr, yep, sure, it must be php, but just cant identify it. apachetop and/or server-status doesnt help too much
its mod_php4 shared apache module
strace the initial apache process you mean?

if you have to, yes - although I don't know how much that'll tell you

im afraid not too much

you could log it and grep it for memory calls, see if something doesn't free()

i can try starting to disable each vhost one after another, and see what changes (for e.g. a couple of minutes)

actually, it's also very unlikely that mod_php causes leaks - it will be a script you are running

of course its a script, but thru mod php, it must be a user error of a php coder

eliminating vhosts may be the first step towards isolating it, of course

I'm using apache 2.2.3 on Debian. I have a perl fastcgi script that apache calls, but I want that script to run as a different user from what apache runs as. I've tried created a wrapper shell script that just has "sudo -H -u myOtherUser /path/to/fcgi_Script.pl", but that doesn't seem to be working. Can anyone suggest a better way?

okay, okay, i'll stick to that, thanks

is it related that I configured ServerName metres.homelinux.com:80 ?

do not put the port in the hostname.

thanks thumbs

however, that will not prevent apache from functioning properly
it's just a bad habit

now phpinfo told me that I used port443

that's an improvement.

Do the DocumentRoot define in the SSL section is useless ? when I type my address with https, does it supposed to use this directory ?

it will use the documentroot of your SSL vhost.

So i'm still having an error somewhere…

how so?

Hmm… strictly functionality-wise, is there any difference between Alias / /path/to/root and DocumentRoot /path/to/root?

no
however, Documentroot is required in a vhost.

it show me the http directory when using https…

faq1

exactly. For example, NameVirtualHost *:80 must be used with VirtualHost *:80

Really? I'm pretty sure that I've seen a bunch of vhosts without documentroots (that didn't give an error).

well for good measure.
it might work now without one.
using an alias is awkward either way

Yeah- I just switched them all, just making sure that I don't change anything

Hi all

All is not in today, pibefision

hey, is there some way to check for some sort of "flag" in a URL, and use a rewrite condition only if that flag is not present? - but strip it before say, a PHP script sees it?
(well, in a request_uri)

Apache using 280M+, is that normal?

it could be

Can someone help me? I'm having problems setting up an Apache2. I've created a new user, and wrote a directive on http.conf to a new dir, on that user domain /home/newuser/site/htdocs. All the files are owned by the new user, and my apache runs as apache user. I'm getting a permissions problem when i try to connect. (403). What must i do? make the user from the apache group???? how

what does the error log say, exactly?

403. Forbidden. Cannot read from that directory.

what does the error log say, exactly?

I've chmodded all the files and dirs to 755 also.

what does the error log say, exactly?
are you gonna ignore me one more time?

OK thumbs, let me see.
2 2007] [crit] [client 200.114.197.233] (13)Permission denied: /home/dezeos/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is

(13)

(13) indicates a file permissions problem. Make sure that Apache can read the file(s) and directories being accessed. See also http://wiki.apache.org/httpd//13PermissionDenied

^^

you rule, gonna check this. Thanks.

see, less guessing, more troubleshooting.

Tks. Finnaly solved. Whas a permission problem on the dir. Thanks THUMB!!!

no problemo

you around?

yep

would you be willing to give me some advice on how you got dyndns working on your personal pc?

no problem

if not, i understand
woudl you send me a msg pls?

have you got it ?

yes, have you got it too?

nope

i got your msg and replied 2 times
please try again

/join #MetresAndDavo

okay will do. thanks

how can i parce all html like php
?
all whatever.html like php document
with .htaccess

with .htaccess is it possible of limiting put, post, and delete in webdav?

hello

hola, roger_padactor.

i just started using ubuntu. i've used slackware before, and installed apache and all i want to be able to do is add and edit files in my www dir so i can start doing my web stuff. but it wont let me any ideas?

you need to set yourself a specifc goal.
php

Comments

using amd64-etch i was after a basic install to then put fluxbox on should i have only optioned standard install

!lart geaaru

ugh. / with nodev might work as long as you're running udev, but if it fails…
uugh. / with nodev might work as long as you're running udev, but if it fails…/u

Yeah, but I still often have to scroll up several pages

!lart

woot - 4.0 running in VirtualBox on XP in 128 MB Ram…Hot

having the window bigger than 80×20 helps too :P

no, it's w00t

wot?

right

1280×1024

no, in that case, it's probably more wtf

not big enough ;p

characters?! wow.

:P

heh, indeed

jelly-home: pixels

j/k, i've got a 128×45 window on irssi here, on 1024×768 screen

thk for your help

whatcher done with the 3 lines missing?

Using Konversation, here

actually, lemme check
128×35

ah
128×48 is the size of the console with standard font size

!hug KDE
!smite GNOME

you must have a big hand
and no aesthetic values

jelly-home: mm, i don't like it too tall, but plenty wide

buy a widescreen monitor!

send me one ;p

The only two alternatives to KDE when it comes to beauty are Enlightenment and fvwm-crystal

lots of american girls fit that description too

E is unfinished and fwvm-crystal is too minimal for my taste

heh heh

jelly-home: what widescreen monitor?

hey MangosDebian are you around?

man, people with $$ to burn

Can't afford that big monitors

dunno, one that is plenty wide but not too tall.

jelly-home: no, I was meaning the description of american girls == widescreen… but maybe that was a bit too obtuse.

oh

s/obtuse/unfunny

/

well my remark wasn't that funee either. But as the late F. Mercury would say, fat bottomed girls make the rocking world go ’round

s/girls/boys

suit yourself :-)

er, no, freddie mercury /should/ have said that

yeh, freddie was two spirited
er, gay, as you'd say

G4 in a beige box is teh roxor. my OF promt is 10x faster. lol kthx

hehehe
forgot the 'byez'

now you make me envious, my OP prompt on an Ultra 5 is sluggish
bai

even better

now to rid myself of this ugly powermac shell

icanhasframebuffer?

ooh an ultra 5. i had an ultra 5 and 10 back in the day at nortel - excellent machines

do they even exist still? :P
(nortel

they sure do

dunno, i left in 2002 , unfortunately handed notice in a day before redundancies were announced
bdunno, i left in 2002 , unfortunately handed notice in a day before redundancies were announced/b

if by "excellent" you mean, crappy IDE and PCI - PC knockoff, then yes

sbus whore

yeah, but built like a volvo!
you could chuck one out the window and still boot solaris
ide is crap, admittedly, mine had scsi disks and everything was on the network

burnt my scsi controller on one… apparently scsi is not hotpluggable O:-)

some isn't no
the bus and drive have to support it

jelly-home: you yanked a regular 68pin or something?

ya!

hehe

sigh

i've done it on non-hotplug scsi, but i took the device off the bus first, then spun it down, then unplugged it, carefully but quickly
same moron from before

you could have left the ban, debhelper
or did it…
oh it did

it's the same ban
did it on the same line

never seen debhelper ban anyone before

it's rare, but nice to see

adding an extra pin to the Pentium M to stop normal socket 478 use is just mean.
they're so cheap and sexy

wire cutters

or silly adapters

it's a bit sad to think about how much time and effort has gone into writing a bot that can kickban based on a join flood… how many more useful things could that time have been spent on *sigh*

with moronicity comes having to do that shit :/
some people can't control themselves…
or don't want to

The snapshots failed to compile

hmmph.

plenty of less useful things too

the mill

I can think of much bigger wastes of time/effort
e.g. war

for sure

there is that

!start a war

from memory, start a war is GWB says you have WMD!!!! Mwhahaha

pastebin.ca/66510
pastebin.ca/665410 *

people is apt-move right way to create debian mirror?

erm, you could use that, but there's better ways

pastebin.ca/665410 third time lucky
ugh http://pastebin.ca/655410

whatever has Iraq done to you?

simonrvn, yes I know rsync is better, but it's give error.

i wasn't thinking of rsync actually

debmirror?

for instance

hmm… lots of dodginess in the new realtek code?

"Lost terminal" == "shit, i didn't mean to close the $^*%#$@ close box!!!!"
er, click the … bah

"Lost terminal"… hey, who moved the VT420 off my desk?

the new realtek code looks like it might be based against a different kernel.

jelly-home: hehe

jelly, oil
jelly, and terrorism, also made some companies very rich
jelly-home, only at the cost of a view lives!

So what do I do? I need sound

bah .. the etch bacula-director-postgres package is messed up … found two bugs in it already, nothing serious though

has anyone got DSPAM working on a debian box?

noone has oiled me. sadly.

jelly-home: heh heh heh
no. i tried and tried, and finally gave up on it and gave it the old -P

i know a few people using it

simonrvn, yeah i had some trouble with it too

i must be stupid then

im thinking of building a *shudders* ubuntu box just for it

how are you trying to use it?

petemc, anyone on this channel?

dont think so, exim peeps

the lure of the dark side strong is, yes

etc.

just tunneling the emails to dspam i guess ?

i'm still using exim4 heavy + ldap + spamassassin, heh
oh and clamav

dont they stuff on their wiki about postfix integration?

they do

petemc, i gotta do more homework on it
hmmmm they do now?
hrm, ill look into it

has postfix, exim integration

what about couirer
because i use maildrop etc…

don't remember seeing it

as I said before… there's nothing more that I can suggest.

rather than throwing all the emails into one big file (slow)

check though

i use maildrop - courier etc

Know anyone who knows a bit about ALSA, themill?

#alsa

tried their any of their mailing lists yet?

jelly-home: Nope
Been in there since last night

can I start creattion be apt-move then continue update with debmirror?

hi guys
i keep getting segmentation fault with my apache….what is the first step to solve this?

check your hardware, memory and disk

try running apache without any extra modules loaded and see if you can narrow it down to one particular module or directive.

k
i will minimize modules, thanks

k

argh

y

this is a debian package of apache?

hello!

hi

no it is xampp

k

latest xampp

I must go to take my olaunch
I must go to take my launch

one more try ambra

that's not going to help… and it makes it pretty much impossible for us to help you.

going into space?

….

!xampp
!google xampp

themill….alright, i am running xampp
8 2007] [notice] child pid 3507 exit signal Segmentation fault
9 2007] [error] server reached MaxClients setting, consider raising the MaxClients
2 2007] [notice] caught SIGTERM, shutting
3 2007] [notice] Apache/2.2.4 (Unix) DAV/2 PHP/5.2.3 mod_apreq2-20051231/2.5.7 mod_perl/2.0.2 Perl/v5.8.7 configured — resuming normal

hi, is there any way to have "sort" return only the first 8 resulting lines? (if needed with other command line tools)

what a plum

man head

I couldn't find anything about it in the man page…
ah yes ;-)

head -n8

waves even

I got four modules that all use eachother and thus can't rmmod them
What do I do?

thats sane, going over max-clients segfaults apache…

the command line is so powerful, with sed perl and all other tools, I love it ;-)

not necessarily related

they can't use "each other", not really possible to have circular kernel module dependencies

actually… how is an apache child segfaulting only a "notice" in apache's error reporting?

jelly-home: Well, maybe there's one way out of it, but I just did rmmod -r

and it worked?

Yes
But after re-modprobing it, I still lack sound

can anybody help me out with screen resolution problem in Gnome?

my rmmod manpage doesn't say anything about -r :-|

please describe your problem

norbert_, i get maximum 800×600 resolution availabe in screen resolution selector, while videocard and monitor both support 1024×768 resolution too
norbert_, so, i want higher resolution, but don't know how to get it

you could try running: # dpkg-reconfigure xserver-org
xserver-xorg

I wanna to install iptables on a red hat and I get notice: Checking for new apt-get details: Password: and after entering
password, Host key not found. Any ideas why I can't install iptables on
a linux server host ?

try #redhat

sorry this channel is for debian

Any .usa citizen with a tv card?

lots!

I believe the top level domain is .us, Davidos

u?

!tell Davidos about u

!U

Damnit Jim! It's YOU. Y-O-U. Not *U*. U is a letter. YOU is a word. See ne1, or wud. Dutch for 'you' (formal singular). See http://ars.userfriendly.org/cartoons/?id=20041201

no

But ask your question

the redhat's apt use rpm technology and has a different philosofy than the origianal apt

Someone who has, PM me, got some offer\

what kind of offer?

do you have a question about debian?

No

then wtf?

goodbye, then

Davidos, has big tits, blonde, tight ass? then im your guy!
……………..

all the above, but a penis as well
erm, to clarify, i wasnt talking about me

there was a radio phone-in this morning about emigration from .uk, /many/ coming to .au

that's because this summer has been so shit

!wasnt

s/summer/last ten years

:%s/summer/last/

yeah, well. I can't comment on anything prior to last summer

this country is fucking going way down the pan

*pom pom* ;-) me like command prompt, me go hack

we always have quit a large number of english emigrations

can't wait for spring

which country, so i can avoid it?

since about 1788

yeah, but you watch. going through the roof. .au is in my top three destinations, i'm leaving the sinking, rotten ship fairly soon

yes, and they keep getting worse as time goes on

all i need to know is, does .au have ethernet for me to connect my laptop? ;D

no. we don't know what germs are either

no, we still use carrier pigeons, but they're really fast

yeah you lot are good at sport

just how many Australians do we have on channel at the moment?

5

+me

lots of idle ones

i included you already

aussie aussie aussie!

you mean Australians….

australian internet is apparently pricey due to limited connectivity to the rest of the world?

oi oi oi

yes, cable bandwidth to the states is the cause

well, we are on a big island

theres a new cable going in apparently

then you can retire the pigeons

its pricey due to a limited market that can exploit people quite well too ( yes thats you telstra )

thats the excuse they give for high prices anyway

it's certainly a lot more expensive that .uk. My mum has a 256k/256MB adsl in .au for the same price as my 8M/4G adsl in .uk

for a general consensus on .au braodband amongst geeks/leechers.. http://forums.whirlpool.net.au/forum-threads.cfm?f=100

you have 4Gbps upload? :O
or is that the quota?

no, I'm just a lazy bastard and making up new ways of writing things… quota

wtf debian, spamd[12061]: pyzor: check failed: internal error

can i install debian with just the first and the second cdroms?

You can install debian with just the fifty-megabyte netinst CD.

but idon't have internet connexion

then the first two should be enough, yes
generally the first is enough for most

even with gnome wm??

yes

thanks liable
i'll try
i have debian sarge installed without Xorg
just the shell
how can i upgrade to etch without losing data ?

interesting with just cd's
apt-cdrom should be able to add the cd's, then follow the release notes

!tell omind about sarge-etch

!topicsmite omind

And the wrath of /TOPIC descended with terrible fury upon omind. And all the people marveled, saying, Behold, we too should read the /TOPIC, lest we be stricken. And all the people read the /TOPIC, and went away edified.

stupid question. can you have an underscore in a register your domain name name?

apt-cdrom should manage loading the CDs so it has the new package list then you should be fine.

no, read the relevant RFC

i dont know what the relevant rfc is..

can i use apt-cdrom with just two cds ?

do you know what google is?

should be ok

using amd64-etch, i was after a basic install, to then put fluxbox on, should i have only optioned standard install and not desktop environment?

though there is _domain.x.x.x for dk /dkim so its probably a conviention more that a rule

umm.. no? -_-

ok
thanks

who would have thought that typing domain name rfc into google would provide a clue
yep. desktop installs gnome and lots of stuff, maybe kde as well, i don't remember

some registrars will have more strict rules about what you can register compared to what the actual system will cope with. For example, .au didn't allow dictionary words within .com.au for many years

ah k, reload then

or purge packages you don't want in aptitude

whislt i normally would aggree with that. to search for the rfc, and then to try and translate the rfc into something understandable to work out if you can or not have a _ in it is a long road to follow. I mean lets be honest, if you have the knowledge and its a simple yes/no answer i dont see why people make such a bit deal out of going to google things

k, so i can totally remove gnome from a runing debian?

butanwho, thank you for the answer

running*

Comments

One of my users have a strange problem When he logs in my FreeBSD server via SSH from his Linux pc and starts

thats because in my local database the person with priveleges on the database is "root"
and the user in the website is b14_718346
so how do i solve this issue??
basically the question is how to take care of user permissions with mysqldump

/join #mutt

hello people
"Incorrect file format 'proc'"

How do you get this error?

when trying to execute a stored procedure
salle

the cookie monster!

repair table mysql.proc use_frm;
and the problem disappears for an hour
and then it comes back again

Is the site dev.mysql.com down now?
I am unable to access that.
The rest of the internet is fine.
Can anyone confirm this?

fine for me

hmmm

for me too

Do not know what the hell is wrong with my network!!!!

just tested the dns and its ok

Ok.. Any other place from where I can get the MySQL 5 manual?
oh I have it..
along with the installation..
I just added a new user account using the CREATE USER command,
The host of that user is set to as %
what does that mean?

any host. % is a wildcard, like * in Unix

oh.. okay
Thats fine.. exactly what i wanted..

hello

hi, all

is there a way to select a random item in query like SELECT n1, SUM(n2) FROM table GROUP BY n1, where SUM should be replaced by a commend electing random item ?
i tried with RAND(), but it seems to be imposiible
*selecting

i having a problem in a sting that have insert into xyz (f1) values('R-Vision 32' Condor (Unit 5504)')

Why doesn't the following work?: UPDATE `phpbb_users` SET `username_clean` = LOWER(`username`);

What does it do?

how to insert with ' qout

escaped it

\'

whats wrong?

how i applied addslashes($str);
but id not working
its*

It gives an error: mysql said: #1062 -

near where?
lower?

how do i escaped the simpe qout

it doesn't say, I'm guessing so yep

just add a \ before the '

I start my mysql with –log-slow-queries. I was use this sintax "./mysql-server.sh start –log-slow-queries=/usr/local/www/apache22/data/log/mysql.log" This is correct?

but its a dynamic values from csv file i applied addslashes to it
but its not working

or is there any way to select a raandom item for each distinctive field ?

hello, i'm looking for an article to get some informations about how big a mysql table can get (on a standard server, without much optimisation). can anybody give me a hint?

how big you need?
and what storage engine

am i right that a table used almost only for read can get with no problem to 100'000 rows?)

I'm using phpMyAdmin and it doesn't tell me where the error is

for now it's innodb… but i can change to myisam.

index is the key no matter how big the table is
even millions rows is ppossible
you sure? provide the complete error you get

it's about an exchange rate table and it will be searched by two currency ids and the date

yep, http://rafb.net/p/w7SqBz42.html

would you suggest to create an index on that 3 columns?

possible, depends what you search

Hey . Thanks for the reference to 'prepare'! This way it works just as I need it !!

the documentation says error 1064 is: Error: 1064 SQLSTATE: 42000 (ER_PARSE_ERROR) - I have no idea what that means really

a_l_e, make indexes to match the queries

works if you spell 'UPDATE' correctly.

i will search for the exchage rate for one date and two currency ids!

"UDPDATE phpbb_users" must be UPDATE

what is your primary key?

oops, doesn't work with "UPDATE" either - sorry for confusing you
http://rafb.net/p/JgQerb56.html

there is an extra field for the primary key. but i could change to a composed key if needed (but i don't know if a date can be used as part of a primary key)

strange it's the same error though

1064 1= 1062

update and insert may cause index reorganization

oh,

1062 is duplicate key error
you must have a unique key defined on username_clean

hi everyone!

1062 - Duplicate entry

i should never have updates, only delete and insert and those will happen six times a day

eep - thanks guys that solved it

Hopefully there is some sql guru here :-) I've got a table with: name, date_start, date_end. Now I want to get the "names" for a given date.

the goal would be, to have the insert happening in max 2 seconds each and the read being faster than a second.

then you have to benchmark it
maybe you want to take a look at myisam concurrent insert, and merge table for faster delete, keep more records and drop 1 whole table

SELECT names FROM table WHERE $theDate BETWEEN date_start AND date_end;

insert and delete will never be concurrent.
i don't understand which table drop i should look for
… and yes, i think that i'd better just benchmark it… it doesn't have to be that difficult!

thanks, but I incorrectly formulated my question.. sorry… I've got two dates as 'input'.

roxlu_, and the table has two dates as well?

yes

ok. And you're looking for what? Where they overlap the range in the table? Completely enclosed by it?

I'll make a paste with an example
yes

yes to which?

to you
http://paste-it.net/2856

ppl, what is method for db backuping that store unicode characrters ?

2007.01.04 and 2007-08-31 .. Than I want to return "super" and "duper" as names

$start

Thanks

hi,

would it also be possible to get a list with the days and the name into which the given dates belong?

Meaning you want a list of each day across that 8 month period?

each thread made by threads-create("sub"); reads only the subroutine given?
or the whole .pl script?

zOrK, wrong channel?

SELECT * FROM (SELECT n1, n2 FROM table ORDER BY rand()) AS dt GROUP BY n1;

ohhhhhhh
thanks
sorry

oh, thanks
and it's the straghtest way ?
anyway, i'll use it

It's not very efficient, so if the table is big, you might not like the results, but I can't think of a better approach right at the moment.

thanks
my table won't have more than 3000 element, i think
*s

Probably won't make any difference then.

spammed again?

yes

why can't wiki updates be moderated

#2006 - MySQL server has gone away
where did it goto ?

Or at least stick a captcha on there or something

is it possible to create triggers after selects? suppose i want to update a "last_accessed" timestamp on a row when its selected?

captcha is losing effectivness on a daily basis

snoyes latest versions can have a captcha

i think captcha will be the inspiration for true machine literacy
one approch i've heard about is presenting the image on another site for a human to read and then supply that answer

half the $#@*$! captchas i run into *i* can't even read, and last i checked, i'm human.

make sure you have a belly button

has anyone seen a problem before that when you do a select (select * from table where field ='1234') and you can see the data is there, but the query comes up blank?

it's either a belly button or a reset switch. . . .
nope. it's a belly button.

Perhaps some whitespace in the field?

I've even copied the data and used it in the select

Our captcha doesn't have to be one of those 'read the text off the image' things. We could just have fill in the blank SQL questions: SELECT * ____ tableName;
Is your WHERE clause really more complicated than you show? Can we see the real query, and the rows you say should be selected?

hi all

forumtab.sql

probably

can the 'screen' cause any problem
I tried this command and it doesn't produce the forumtab.sql file correctly
the file size created is 0

why use screen? so you don't have to wait? i.e. does it work w/o screen?

are you trying to call the persistent shell session 'screen'?

I using screen because afraid the connection between my pc and server host droped

can you give screen commands to run like that? usually, you would use screen interactively…

so it cannot be done?

hm, yes, it seems you can… but i'm not sure what that will do.

so launch screen first, then your mysqldump

output redirect is redirecting the screen output instead of the mysqldump

hm? sure. type "screen" and enter. on the new (Screen) shell, run your command
or use nohup.

oic

'' AND programnumber = '1000024' AND tdate = '2007-01-01' AND tdate = '2007-07-31' ORDER BY studentname ASC

pilot error

And a row that you have which satisfies all those conditions?

oh man.. sorry had a phone call…

you can the detach from the screen, and later re-attach to it. if the connection breaks while you are attached, you can also re-attach (using some force option, i don't recall the details)

yeap
that trick worked

snoyes are you there?

no wonder I am seeing like matrix

aye

it should. but even when i select just that programnumber is selects nothing
*it

Show the row. Copy and paste into a pastebin or something.

I had backup those tables, and how can I restore it to other existing database?

or use mysqldump and include just the relevant rows.

if I have a datetime type field, how do I select e.g. just the day month and year in a different order
I've troubles finding an example for that

!man date_format

see http://dev.mysql.com/doc/refman/5.0/en/server-system-variables.html

!man format_date

Sorry - I have no idea what function you're talking about! but try http://dev.mysql.com/format\_date

sigh
!man date and time functions

see http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html

http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html#function_date-format
there

ok thanks

how can I extract the date only from a timestamp ?

DATE()

I think the url you juse got when joining would have enough information

how do i create a user with all privs on a database?

!man grant syntax

see http://dev.mysql.com/doc/refman/5.0/en/grant.html

snoyes, using that table I pasted I need to get the price for a product in a certain time period.. can you maybe help me with that?

How does that differ from your original query?

I'll show you, i'm making a paste

anyone use freetds and ssl?

i just found the white space (blush)

mysqldump -h localhost -u v2user -p v2 forumtab.sql

what happens?

here is the paste: http://paste-it.net/2857

it tried dumping data to the last table

do you have a couple of minutes?

it should create new tables and put in the data

mynullvoid, mysql to import not mysqldump

archivist?
I had created the sql file uing mysqldump

So you want the price of a house, and depending on the date, it should be tierh 10,- or 20,- ?

now to append my database

Yes, and you use mysql to import it. php mysql web hosting file.sql

indeed, but.. you can rent a house for a given period

ok

ok, and that price is per what? per day?

now, I want to calculate the price for a given 'rent-period' which can overlap
yes per day

Interesting.

so I can rent a house (1) from 2007-01-03 untill 2007-08-01 ..
interesting indeed
I wanted to generate a list with the price as the first step… but I'm not sure it that is the correct way

You could create a table that holds just every date possible from now until the end of the decade or so.
Then join against that.

yes, or maybe use an inner join to create a list with days and use that?
an inner join on the SEASONS table

yes

can you help me with that?

SELECT * FROM dateList JOIN seasons ON dateList.date BETWEEN seasons.date_start AND seasons.date_end

but I mean w/o the extra table

The only way to really do that is to build the table with a ginormous UNION statement, which is excessively tedious.

ah okay.. and can I create a temporary table with the dates?

You could, but I'd just keep a normal table around with them.

okay, so than I need to add new entries whenever a new season is added?

yes, or just keep the table long enough that it doesn't matter.
http://paste-it.net/2857#bottom

and seasons will contain all the days?

Unless you need the daily break down, see that paste

i c, but I don't really understand how the seasons table will look like?

of course, that assumes you can make the price field a normal numeric type (int or decimal), rather than the string shown.
Seasons will be just like you show, except change the price from 10,- to just 10

yes okay
so I don' t need a list with all the dates?

Not unless you need MySQL to return a daily breakdown.
If you just want the final price, there's no need.

whats a daily breakdown?
ah okay
I indeed need the total price

2007-01-01, $10. 2007-01-02, $10. 2007-01-03, $10….

ah okay
but when I use you example, what will happend when a reservation overlaps multiple seasons?

That's what the LEAST() and GREATEST() functions are doing.

so LEAST() returns the 'start' day in the period?

end day, but yes.
We want either the date_start or the $start value, whichever is later
and the date_end or $end value, whichever is earlier

okay, I've to think this over :P

jan knesche (sp?) has a blog post about this issue somewhere

But thanks a lot. I'm gonna read up on these functions
really?
do you know the address?

I'm looking

#2006 - MySQL server has gone away
please assist?

!man gone away

see http://dev.mysql.com/doc/refman/5.0/en/gone-away.html

danke
If you need big queries (for example, if you are working with big BLOB columns), you can increase the query limit by setting the server's max_allowed_packet variable, which has a default value of 1MB that was it ;( preciate it wench

I think it vanished when I switched the blogs
http://web.archive.org/web/20060221171213/jan.kneschke.de/blog/38 ?

yep, that one
^

who simplified the query dramaticly:

"

Thanks a lot!

That's why I remember it.
a few days later I realized I could have replaced the IF() statements with GREATEST() and LEAST().

it was really an eye-opener after working on the query on paper for several ours
I'll republish the article in the new blog

so what is/was the merlin project?
Must still be secret.

hello guys, I am trying to create a slightly unsimple query and I was wondering if someone here could help. It's INSERT with ON DUPLICATE KEY UPDATE. Only the UPDATE part should happen only WHERE DATE(created) = CURDATE() and HOUR(created) = $hour : ). Meaning that if duplicate found outside of
these conditions - the new row has to be inserted instead.

http://mysql.com/products/enterprise/advisors.html

in your example, can't I use the "end_date" all the time, instead of using GREATEST?

No, because if they don't stay to the end of the range, you'll be charging them too much.
and GREATEST goes with the start_date anyway.

ahh of course

Store those fields together as a separate field, with a unique constraint on them.

Where's the Coke?

You can use a BEFORE INSERT trigger to populate that field from the created field, instead of having to do it in your application, if you wish.

hmm..we might be fresh out
didnt you bring any with you ?

so this would be correcct: http://paste-it.net/2859

*sigh*

the number of days per period

I'm testing replication, and when I run SHOW SLAVE STATUS\G, I see that slave_io_running is NO. Anything I should be looking for?

snoyes, i added "unique" to all fields which - in combination - have to be uinque.. and I was trying to do INSERT INTO table1 (r1,r2) SELECT (r1, r2) FROM table2 ON DUPLICATE KEY UPDATE r1=r1+VALUES(r1), r2=r2+VALUES(r2) WHERE DATE(created) = CURDATE() AND HOUR(created) = $hour… Am I totally
off course with this? (Doesn't seem like anything that you said)..

looks correct

Thanks; calculations with dates are always hard
do you know a good book where stuff like this is explained?

Since indexes in MySQL don't support functions, you'll need to add a field to table1 for createdDateHour, with a UNIQUE index on that.
Populate this field with the date and hour from created, like CONCAT(DATE(created), HOUR(created))
Not these sorts of calculations in particular. It's all just careful application of the various operators and functions available, which are describe in the manual.

snoyes, i see… This makes sense… This would narrow the scope of uniqueness check only to entries belonging to this hour.

and a general book on sql?

book

http://www.kitebird.com/mysql-book

what?

Suppose to be THE book.

ahh
book

http://www.kitebird.com/mysql-book

ahh hahah a bot :-)

bot

I'm *not* a bot! I'm a real buxom wench

hi how do i kill a particular process?
from the output in show process list

kill pid;
pid being the process number
!man kill

see http://dev.mysql.com/doc/refman/5.0/en/kill.html

okay thanks

I hadn't seen that [CONNECTION | QUERY] syntax added to kill in 5.0. Sweet.

would this be possible? http://paste-it.net/2861 (selecting into a variable and using that)

Is there a way to (actually, I'm sure there's a way…maybe "how do I") pull data based on a conditional? Something like: SELECT if(There are parens in `stlye`){strip parens}else{`style`} as style FROM…

CONCAT(DATE(created), HOUR(created)) — i should do it right on the insert. so if insert the "created" field gets generated on insert (current timestamp) then CONCAT(DATE(created), HOUR(created)) would still work within the same insert?

SELECT REPLACE(style, '(', '') FROM table;
if you replace created with NOW(), then yes.

it needs to be a bit more involved. I need to replace "\(.*\)" but replace doesn't allow for regex

snoyes, my created gets generated with default set to CURRENT_TIMESTAMP, is that sufficient?

For the created field, yes. But for the other two, probably not.

AH , wait, you said to replace created with NOW() within CONCAT?

So strip parens, and everything between them? What if they are unmatched? What if there are multiple? Nested?

snoyes, (that was at you)

correct

that's my point. I got it to do what I want using this: TRIM(CONCAT_WS(' ', TRIM(SUBSTRING_INDEX(`style`, '(', 1)), TRIM(SUBSTRING_INDEX(`style`, ')', -1)))) as style

So I had this dream where MySQL charged licensing fees based on throughput…

But if there are no parens, then it duplicates the contents of style

Yeah, I think you'll end up with something like that, unless you install the regexp udf.

sounds more like a nightmare

Seems like the real nightmare would be billing for that.

snoyes, thanks a lot. you get overloaded here i see. : ) I appreciate your help.

seekwill they would be richer than m$ then

There's a regexp udf? Where I can do something like: SELECT regexp(…) ?

Can't open file: 'entity.MYI' (errno: 144) but what does that actually stand for

hehe

Yep. you'll find it on google.
!perror 144

Table is crashed and last repair failed

I think I switched to PG though!

should i do repair table?

yes

I'm testing replication, and when I run SHOW SLAVE STATUS\G, I see that slave_io_running is NO. Anything I should be looking for?

But there is no way to do a conditional? "SELECT (condition)?opt1:opt2 as Name" type of thing?

issue START SLAVE; see what happens.
Sure, SELECT IF(condition, trueValue, falseValue)
!man flow control functions

Sorry - I have no idea what function you're talking about! but try http://dev.mysql.com/flow control functions

Thanks. While the regexp might be cleaner, this would support more servers…

oh
!man control flow functions

see http://dev.mysql.com/doc/refman/5.0/en/control-flow-functions.html
see a href="http://dev.mysql.com/doc/refman/5.0/en/control-flow-functions.html"http://dev.mysql.com/doc/refman/5.0/en/control-flow-functions.html/a
see a href="a href="http://dev.mysql.com/doc/refman/5.0/en/control-flow-functions.html"http://dev.mysql.com/doc/refman/5.0/en/control-flow-functions.html/a"http://dev.mysql.com/doc/refman/5.0/en/control-flow-functions.html"http://dev.mysql.com/doc/refman/5.0/en/control-flow-functions.html/a/a

when you get to be my age you'll be more concerned with Flowmax functions.

0 am on the local cable channel? Something to add to your garden hose so that it could also chop
0 am on the local cable channel? Something to add to your garden hose so that it could also chop

hello guys
is there any function available for find a text in a row, and return 1 if found, 0 if doesn't exist
?

threnody, you that old as well?

!man string functions

see http://dev.mysql.com/doc/refman/5.0/en/string-functions.html

lemme check

0

snoyes, thank you

what do i have to change that my slave gets access to the master? for the moment i get: Slave I/O thread: error connecting to master 'repl@domain.tld:3306': Error: 'Host 'xxx.xxx.xxx.xxx' is not allowed to connect to this mysql hosting server' errno:
1130 retry-time: 60 retries: 86400

you need to use the GRANT statement to allow that repl@domain.tld user replication privileges.
!man grant syntax

see http://dev.mysql.com/doc/refman/5.0/en/grant.html

older.

threnody, but have caught up with me yet

How many times a day do you use the term "whipper snapper"?

kidz these days

i get this error: ERROR 1221 (HY000): Incorrect usage of DB GRANT and GLOBAL PRIVILEGES

what statement did you attempt?

GRANT FILE ON database.* TO repl@IP_of_Slave IDENTIFIED BY 'password';

Why are you granting file?
grant replication slave.

11H14ello

ok, now just to get the picture, i have to grant replication slave on the masterserver for user repl@ipaddress_of_slave identified by password, correct?

correct

I'm new to this company and inherited a server that has mysql installed, but the config wasn't documented by my predecessor. How do I recover the root username and password for mysql? thanks.

reset root

See http://dev.mysql.com/doc/refman/5.0/en/resetting-permissions.html

but what is on the slave? do i just create the user repl with the same pw? or do i have to grant something?

I'm keeping my wording terse to avoid spillover. MySQL 5.0.41, Debian Etch. Colocated box, host says port 3306 is open. my.cnf bind_address is ip of nic. user host connection priv is '%'. nmap and netstat show 3306 closed. I need remote login, what am I missing/doing wrong?

What's for lunch?

open firewall

marc-andre: You'd specify the given user/password in the MASTER_USER and MASTER_PASSWORD fields of the CHANGE MASTER command.

no idea how I got that nic.. anyway, it is open.

try to telnet to the port

good question

make sure the server is started.

by masterhost, can i give there the ip address of the master?

yes

You said that California Tortilla place was good?

Heh - seen Pablo Francisco's impersonation of the governor of CA as a tortilla vendor?

yeah, it's not bad… beats chipotle/qudoba/tijuana-flats

snoyes, could you tell me why this generates an "Operand should contain 1 column(s)" error? INSERT INTO table1 (r1, r2, r3) SELECT (r1, r2, r3) FROM table2 ON DUPLICATE KEY UPDATE r1=r1+VALUES(r1), r2=r2+VALUES(r2); …

drop the () in the select list.
….SELECT r1, r2, r3 FROM

snoyes, ah, ima try now

telnet to 3306 timed out, no connection, telnet to 80 let me in.

probably the firewall isn't allowing inbound connections on that port.

if I do 'nmap localhost -p3306' from the server, it should give me the status of the port as open, regardless fo firewall settings, yes?
Yeah, just did it on my laptop, and it shows 3306 as open.
rather, 'nmap -p3306 localhost'
And a netstat -a shows no listener on 3306.

external

remove bind-address= and skip-networking from my.cnf and grant permission to the external 'user'@'host' and remove any firewall rules blocking port 3306

so literally comment out hte line bind_address= line in my.cnf?
doing now.

and the skip-networking

freight__ unless you know how to bind it properly
how come i see so many people with these same issues in here, does the installer bind automatically now?

No. People do weird things

distros fsck the standard install

Distros can't bind to the external nic
ip
Well..

some probably see it as a security issue… having a database hosting that is wide open to connections from anywhere by default is not the best of practices

how do i limit the databases to be replicated on the slave? i followed the howto on mysql.com but the slave tries to replicate the whole server

MySQL ships root with no password…

marc-andre: You can either configure the master to only write the relevant db to the binlog, or configure the slave to only read the relevant db from the binlog.

Plus, when a Linux distro binds itself to the external nic…. (instead of lo)

marc-andre: http://dev.mysql.com/doc/refman/5.0/en/replication-options.html#option_mysqld_replicate-do-db

is there some nice way to tell mysql not to die on error? I'm wanting to update all updatable data in a (unique) column, and just ignore when mysql can't update it

UPDATE IGNORE

oh cool, thanks!

-p -h ipaddy. Before I call my colo host and start complaining, is there any settings other than the firewall rulesets that could be preventing me from connecting?

s/is/are/

What distro?

Debian

GOOD LUCK

Etch to be specific.

#1046 - (duplicate)

Heh, thanks. grin

is the goal to get it to allow a remote connection, or to not allow a remote connection?

To get it to allow remote connections.

Personally, I'd juse ssh tunnels…
Especially for administration

Rigth now I jsut need to get the bloody thing to work, but you are correct.

ssh tunnels would work.
Pretty easy

if its at a colo they may not let 3306 in the building

Ok, I'll bite.. where do I start reading?

ssh -L 3306:localhost:3306 host.server.com

how can I know where are my MYD, MYI files stored? (redhat)

/var/lib/mysql
find / -name '*.frm'

thanks seekwill

When's lunch?

is there a way to find that out by doing some query in the mysql cli?

show variables like 'datadir'?

soon?

Whenever you're ready. Do you go with Wez and Luke these days?
Of course, Wez has enough sugar at his desk to last him a.. uh… another hour.

you has drive?

Mike has the keys

can i use more then one ip by bind-address?

no

Hah, do you ever eat with Mike?

hmm… probably you, mike, and luke should go… then i can convert you all to the proper side of the force

hah

"proper side of the force" - holding your pinkies up when electro-shocking some rebel scum.

PINKIEEEEEEEEEEEEEEEEEEEEEEE!!!!!!!!!!!!!!!!!!!

how can i permit the slave to connect without blocking the connections on localhost?

remove bind address completely.
external

remove bind-address= and skip-networking from my.cnf and grant permission to the external 'user'@'host' and remove any firewall rules blocking port 3306

Greetings Y'all

thx

Mike and I are ready
well, give me a sec

heh
howdy

Did we decide on something?

yes

you have that response on a macro, don't you. grin

bot

I'm *not* a bot! I'm a real buxom wench

Ahh good.
snoyes is a robot.

but enough about my personality…

I met him and recall a distinct whirring sound.

the wench has no macros

Where did I read that most people fail the turing test?

the wench passes

Based on some of the captchas I have seen I would believe it.

turing

Yay I passed the test. I am human after all

i cant post comments in wez's blog because always get defeated by his capatcha system

heh

I figured the laser canon and metallic skin would have been a better giveaway, but perhaps you were distracted that day.

are you related to samus aran ?

Well it was California.
You kinda blended in.

I'm up to try that California Tortilla place
:P

Heh, debian.org's round robin upgrade system keeps sending me to a server hosting in France.

You have a problem with the French?

The bounty hunter? We don't need their kind of scum.

Not in the slightest, acutally.

What's wrong with a free trip to France?

you have to go to france to use it

Aah, good point.

I actually appreciate the Fench attitude, because there are no pretenses, if they dislike you, you know it. It's refreshing.

The airport can't be that bad, just fly in, collect the miles and fly back.
The French don't dislike, they hate.

and their food.. *tasty*
So, seekwill, I've run the line you posted, and am in the server. How do I get mysql-admin, for example, to run remotely and display here?

You connect to localhost

is there a way to use server status variables in a select statement? ie: select 100 - ( ( Key_reads / Key_read_requests ) * 100 );

One of the more recent French shows of affection by Zidane.

Luke coming?

when I issue START SLAVE, it says Query OK, but nothing happens

Now what do you see when issue isse SHOW SLAVE STATUS\G

the same
lemme verify something

Is there an error shown?
Either in show slave status, or in the error log?

nothing in either

but it still shows slave io is not running?

correct
and I don't see any connections via netstat
on master, that is

i have a table of products, and i'd like to record specific details that change depending on the type; what's the best way to capture this?

What does the slave status say in slave_io_state?

Slave_IO_State:

luke gave me some mumbling about lunch with laura

I thought she left. Oh well. Let's go!

but there are some other folks who might join in… more out of townies

ah

for examples, some records in "products" would be of type "car", "boat", "airplane" (made-up example)
and i want to have different details for each
so my first instinct would be to have tables "products", "car_details", "boat_details", "airplane_details"

and nothing in Last_Error?

0
Last_Error:

and the Master_Host, _User, and _Port are all correct?

yes

Depending on the nature of the date, you can do it that way, or you can just create a key/value table of details, that is, product_id, detail_type, detail_value.

yeah, those were the two ways i was considering
any big pros/cons of each?
obviously i'd have to have an established set of types to do the multiple-table way
but i'd have to have an established set of detail_types for your way

or you establish them as you add them

are you still arond?
around

and it's less work to add a product that way

Correct. The later is more flexible in that you can add more information without changing table structure. However, if the details require different field types, that's a problem.

You are supposed to do mysqld –debug to produce a trace file , no?

Example, price is best stored in a decimal field, but color should be a string.

mm, good point
yeah, i def. have multiple datatypes for my details

4 [ERROR] mysqld: unknown option

some booleans, some decs

Hey there

I've got a table with a field "product_type" , when this value is "house" I want to use the field "house_groupid" to join on a table… else I want to use "general_groupid" to join…. is that possible?

could someone explain why my primary key doesn't help this query, and how i could index this to make it faster? — http://www.pastebin.ca/622049 (query, explain, and key posted)

In windows, when i run mysqldump –all-databases -u etc
Where does the dump get saved? I can't find it

JOIN otherTable ON IF(product_Type = house, house_groupid, general_groupid) = someOtherField

grant usage on database.* to 'user'@'localhost' identified by 'password'; still result in this error: warning: connect to mysql server 127.0.0.1: Access denied for user 'user'@'localhost' to database 'database'?

If you don't direct the output somewhere, it just goes to the screen.

Doh

path/to/file

Thanks snoyes
snoyes++

Okay, thanks snoyes
The output looked matrix-like
lol

marc-andre: are you connecting with mysql -h 127.0.0.1 or mysql -h localhost?

Hmm

pizza_biz, ord_type not like '%C%' cant use an index

C:/MySQLdump/

Didn't work
Do i need to create the dir?

Put an index with ord_date listed first (and drop the USE INDEX statement so MySQL can pick that one)
Your WHERE statement doesn't reference the store_num, but store_num is first in your primary key, so the primary key is useless in that query.

i only added the use index to see if it would help, and it didn't. same either way.

Right.. err

You need to give it a file name.

Hmm

so just add an index on ord_date, any other fields?

Ahh
Just out of interest

Probably not for that query.

Why is the syntax -uroot
rather than -u=root

My server keeps crashing on restart

Cause with -u=root, it says "No username, =root"
lol

You can choose -u root, -uroot, or –user=root

-u root doesn't work
-uroot does

I look in the .err log and I see a trace , it give me a link about using a program to read the trace

Okay, so to restore a DB dump..

I've not experienced that with -u. With -p, yes.
mysql /path/to/file.sql

but I don't see an example for how to use the program

Thanks snoyes
Okay, rebooting :-)

in a long import is there any way to tell how far it is through the process? i disabled logging to speed it up

ah yeah, adding indices to this table sucks. over 6 million rows. this is gonna be a while. (poor old slow server.)

the size of the data file?

pizza_biz, best to get rid of the like as well

hmm yeah could use that although that will only tell me that it is still working away

i need that to filter out non-applicable rows though.

hi! how may i add UNIQUE index on two columns simultaneously?

pizza_biz, find a better way or at least get rid of the leading %

UNIQUE(column1, column2)

hi!
i don't want to let similar combinations of some column values…

ok

how are you today btw?

hungry.

time for a dunkin donut
almost worth flying to the usa for

say you have a list of transaction that have a date and a month and you are grouping by month to sum the transactions and display the total.. Is there an easy way to get the query to display 0 for months that don't exist in the result set?

Hey
How do i un-dump my dump
xD

mysql /path/to/file.sql

i did that
But, it says this–
ERROR 1064

You'd need a table with the list of months; join against that.

See, the version i dumped from was 5.0.41-community-nt

snoyes, thanks

"MySQL dump 10.11"

and the version you're importing to?

Err.. the newest one, freshly downloaded
5.0.45-community-nt

There ought to be a — at the beginning of that line in the dump file.

yeah, there is
– MySQL dump 10.11
Aha, i fixed it.. i think
Sorry, i'm migrating from PostgreSQL
Okay, it's populated..
Thanks a lot snoyes
Hey, is it alright if i ask a question or two?
:-)

Hey guys, how do I get "IF NOT EXISTS" for CREATE DATABASE in mysqldump files?
I mean, it's in the file, but it's commented out and is shown as "/*!32312 IF NOT EXISTS*/"
Apparently the numbers are the same all the time for everyone, too…

hi all

If you look it's this
CREATE DATABASE /*!32312 IF NOT EXISTS*/ 'database_name'
:-)

creating a schema is same as creating a table in mysql 5.x ?
or schema is a database?

what is the capacity of a mysql table? how many rows can it handle efficiantly?

/IGNORE #mplayer ALL -PUBLIC -ACTIONS

if i need to search around 90,000 records, like 10000 times per hour

So you're saying I should do a search replace?

Yeah, might as well
:-/

That's a conditional comment.
It means that for version 3.23.12 and later, IF NOT EXISTS should be parsed. For earlier versions, it will be ignored.

That's not a trivial question and requires details about your hardware, OS and application(s), as well as your concept of efficient.

schema and database are essentially the same.

ohh!

The answer is also impacted by your DB design.
What do you mean by "search". Show specific SQL.
In general, 90,000 records is considered very small.

is this possible: http://paste-it.net/2866 ?

probably, but the manual says not to assign and then refrence a variable in the same statement (because the evaluation order is not guranteed.

okay

So just replace @end with r_date_last in your SUM statement.

You might consider reading through some of these: http://www.mysqlperformanceblog.com/

hi, can i do a mysql search with a wildcard
like any record with http:// in it ?

WHERE field LIKE '%http://%'

so % is the wildcard
thx

% and _ for LIKE. There's also some support for regular expressions with RLIKE and other operators.

k thanks

thnx

Hi
One of my users have a strange problem. When he logs in my FreeBSD server via SSH from his Linux pc, and starts mysql client (v4.1.22), after entering the password the client eits with SIG11. If I login to the same server from my Linux box with his user ID, I can start the very same mysql
client. Does anyone have idea what can be the root of the problem?

Any recommendations for crash-proofing a MyISAM-heavy system? Every time the server crashes (it happens frequently), I lose lots of records when the automatic recovery kicks in
like [Note] Found 7657 of 7694 rows when repairing './site/table'

Isn't that a segfauly
segfauly
t
lol

) It is
I have a core file too
but mysql was not compiled with debug sybols

Hmm, the only thing i can think of then is that it's the person's SSH client and/or some kinda network problem

symbol
s

I'm new to MySQL (Postgres convert.. :-D ) but i'm looking at src now
And google )

He even tried to log in from a different pc too. The problem is the same.

kumi, don't use MyISAM if you expect lots of crashes (why does it crash a lot?)

I think the PSU is going bad

heh, sounds like you have bigger issues then

xD
err
What do you use for the backups

just a periodic mysqlhotcopy cron script

Hm

hello all

does binary logging improve recoverability? I have it turned off

can anyone tell me if I can use wildcards to delete multiple tables?

since I don't replicate

dex

Not as such, but you can use information_schema to build a drop table query
It can help, since you can use it to replay updates made since your last full backup.

oh,

hi all
Can I change path /var/lib/mysql without recompiling?

drop all tables

There is no wildcard support for the DROP TABLE syntax. You can use MySQL to generate the list of tables to drop; see http://thenoyes.com/littlenoise/?p=44

all I need is set datadir?

bit of a modification to that ^

or I need to recompile?

ok, thanks

What are "good" uses of MySQL temp tables?

I am a newbie. How do I import a database file into MySQL?

Handling aggregate records that would benefit from an index (hence no derived tables/subqueries), but that are too dynamic to maintain normally.
mysql path/to/file.sql

Ah :-O
So, such as?

I am using mysql query browser, a graphical gui.

Okee

Open Script

Then click "Execute" on the right-hand side
:3

Say you have a table that stores all the hits on your web site, and you want to find out how many of them result in someone actually buying some of your products. With millions of records, querying against that hits table can be unwieldy.

Oh :-D

However, you can create a temp table at run time that loads summary data from that table for just the products you're interested in.

Mhm, and then once you're done.. pow, right in the kisser?
xD
Bang, zoom — straight to the DELETE TABLE ? :-)

One of these days…

:-D

I think there is an error in the query we created (or… i probably made the mistake :-) )

"I'm going to stimulare the economy by buying an American car" ? :-)

, )

still there?

Impossible. All queries created in this channel are automatically verified by an independent consultant, and are guaranteed error free.

:P
I didn't verify it in here

0 and

Cool, snoyes :-D

I continued after you helped me on th eway

Just reading about it on the dev center

the problem with that pasted query, is that it forgets some days when a season overlaps

Can you turn that dbf into a CSV or something like that?

thanks the_wench

can you help me with that?

snoyes-senpai: What's the 6.0/Pidgeon all about? :-D

yes I can load it into excel
which then could make csv

That's the ranking algorithm borrowed from Google.
ok, from there you can use LOAD DATA INFILE.

OH! Really?

!man load data infile

see http://dev.mysql.com/doc/refman/5.0/en/load-data.html

I'm going to look at that for sure

Yeah. http://www.google.com/technology/pigeonrank.html

;D
Nah, i mean the 6.0/Falcon

0 because original format is

A new transactional storage engine. Some see it as an attempt to build a replacement for InnoDB, which Oracle bought.

:-D
You're like a IRC Wikipedia bot
With added sass

MySQL can probably handle that if you define it as a TIME field.

?

Can you show the rows that get skipped that shouldn't?

sweet ok I will look into that… thanks very much!

they don't skip, but when a interval overlaps multiple seasons it forgets one day.. I'll paste what I mean

ah, perhaps that expression in the select list should be TO_DAYS() - TO_DAYS() + 1

http://paste-it.net/2868 this is a result
yes, but than it adds 1 to much (for the last overlapping season)

file.sql; how do i load file.sql into new database on new server? thanks

In the example you show, it should be + 1 in both cases. Can you show an example where it should not be + 1?

mysql file.sql

yes
ahh the problem is that I want to count the nights, not days
like this; http://paste-it.net/2869

So, if the s_date_end is 2007-07-31, did they stay the night of the 31 or not?

yes

ok, do TO_DAYS() - TO_DAYS() + (s_date_end = r_date_last)
I think.

okay gonna check

I dunno. I still think it's going to be + 1 in all cases, but map out all the possiblities and check.

that works :-)

need advise concerning union. i have a table with some kind of linked list (means some items have parent by parent_id). to filter for childs or parents, a union would be the key, right?

I think it must be: + (r_date_last = s_date_end) don't you think?
the r_date_last is the reservation end date

I dunno. Try it and see which one gives the right answer.

s_date_end is the season end.

ARK
I've got another problem
I can't RENAME my temp tables
:-(

Maybe. What do you mean by "filter for childs or parents"?

do i use ALTER?

!man alter

see http://dev.mysql.com/doc/refman/5.0/en/alter-table.html

thanks, what if i dumped only one databases, just add a "create databases whatever; use whatever;" to the beginning of my sql dump? or is there a fancier way? thanks again

Why do you need to rename a temporary table anyway?

Is there a way to force a case sensitive GROUP BY for an alias, since BINARY doesn't seem to work for them?

there is a mysqldump option for that, but you could also just do: mysqladmin crate dbname ; mysql dbname file.sql
s/crate/create/

cool thanks, IRC is fun

xgc, you there?

is mysql more widely used in industry compared to postgre? I'm trying to decide which to use

#mysql has a mandatory sense of humor in the channel topic. That should be enough to make your decision.

snoyes, for example all childs (which don't belong to a specific parent) and the parents themselves.

ever heard of LAMP? linux apache mysql perl?

trees

http://www.dbazine.com/oracle/or-articles/tropashko4 and http://www.sitepoint.com/article/hierarchical-data-database, http://jan.kneschke.de/projects/mysql/sp/ http://jan.kneschke.de/projects/mysql/sp/sp_tree.sql http://www.vbmysql.com/articles/database-design/managing-hierarchical-data-in-mysql/ http://dev.mysql.com/tech-resources/articles/hierarchical-data.html

^

in a deadlock situation, is mysql returning immediately, or is it waiting some timeout period for the locks to be released?

heh ok snoyes convinced me first :P

That used to be a joke. I'm not so sure anymore.

would;nt lamp in that fasion be an argument against him, since he is using RoR ?

ruby on rails isn't really used much in industry, though
yeah, i was just noticing that contradiction,

I was jus' experimenting, is all
:-)

but coding skills and sql skills are transferrable between languages and db servers somewhat

I'm lost…. I study computational complexity theory for a living but want to learn web app programming…. everything is so fragmented though it seems in the webapp community and everyone has their oppinion

I'm reading the docs here and it says to retry transactions that return the 'deadlock' situation as the error. This however seems quite wasteful to me, if the deadlock exists because of a transaction that may take a few seconds to complete, then I could be reissuing the transaction thousands
of times in that period

http://rafb.net/p/8oIWu055.html

Just pick one at random. You can do most anything you need in either one. After you're comfortable, learn the other one. When you have an important project, you can decide which one is best suited.
A significant portion of "which one is better" is really "which one do you know well enough to make it do what you want"

ok, fair enough

this query is correct right: http://paste-it.net/2870

There's no need to use the IF construct; MySQL doesn't differentiate between the boolean 'true' value and the number 1.

okay, but it would be a correct query?

seems to. The parser and results will tell you better than I can.

yes,but the strange thing is, that it returns 0 for the second season when it overlaps 2 seasons
o days in the second season I mean

Did you run the testcase I gave you?
You can place a SELECT inside the NOT IN (…) clause.

yeah.. i couldn't get it to work. the wrong results kept coming back.

s_date_end)

That's the purpose of the LEFT JOIN I showed.
Not possible.
The testcase I gave you produced correct results.

so i can stick a SELECT in the IN () and it would build the string for me?

Did you change it?
Yes.

awesome!

It doesn't produce a string. It generates a list / set.

how did you build that one test? what app were you using?

Just run it through mysql command line client. I created it wish an editor by hand.
s/wish/with

can you show the result set for that?

mysql test myscript.sql

i need to learn how to do that so i can paste those in here if i ever need help again

;$ ahh is c the problem indeed. its when the last reservation day is on the start day of a new seasons

thanks a bunch for your help!

You're welcome.
Your SQL is not correct.
It has the same problem you were trying to solve yesterday.

it works perfectly

That is, if there are assignments for some photo to another article, this will return that photo, even though it's already assigned to the story in question.

I have a table with parts for a computer I want to xulid. When I do SELECT (unitprice*quantity), it gives me the cost of each row. Now how do i tell it to do that and then add all the rows?

You really need to work on your listening skills and be open to mistakes you may have made.
You can't do what you're attempting without some form of aggregation.

SELECT SUM(unitprice * quantity)

i'm open to mistakes. God knows I am not perfect! But the query i pasted accounts for any assigned items to the parent story in the NOT IN(), so they will not appear in the results.

Thanks.

That's not the issue.

there is a preceding query that's not pasted which populates the NOT IN()

what's the easiest/best way to convert a table from myisam to innodb
?

Show that other query. Maybe that'll help.

ok

alter table
http://dev.mysql.com/doc/refman/5.0/en/alter-table.html

Are these the photos (in the NOT IN clause) that are already assigned to this story?

yep

That's fine.

nice. it took over an hour to add the store_num index to the table, but the query now runs in 10 seconds instead of over 1000.

I assume you mean the date index.

yeah. that.

ALTER TABLE table_name ENGINE = InnoDB;

http://rafb.net/p/y5GmH155.html

Question. Don't you want to show all photos that have not been assigned to this story?

yep, i want to show all photos that have not been assigned to this story and that's what the results are coming up as now that i added the NOT IN() to the query

also vastly sped up another regular query on that table. bonus.

I've read that innodb is the only engine for mysql that is safe to backup using lvm snapshots? Is this true?

!man lvm

Sorry - I have no idea what function you're talking about! but try http://dev.mysql.com/lvm

heh, sorry

define "safe"

not likely to cause corruption of a backup is made during an lvm snapshot via tar or similar unix commands and then later restored

That's fine. Note that you will potentially show photos more than once with this query, unless you use DISTINCT or something equivalent.

Make sure you flush tables with read lock first; then it should be ok for MyISAM too.

but innodb doesn't require tables to be flushed?

Assign the same photo to two other stories, but not the target story. See what happens.

ok thanks for the tip. i didn't think of that.

correct, unless you want to know the binary log position, so you can restore from the binary log for all changes made after the snapshot

and DISTINCT won't help you in this case, not with the SELECT list you have.

Hi all. I'm pretty much a noob to web programming in general. In the past week I've been looking through some php & mySQL stuff. One thing that continues to confuse me is how to associate one element of a table with multiple elements of another. For instance, an element of the members
table having a list of friends from the members table, or maybe an element of the members table having a list of watched posts from the forum tabl

n?

shite

If you remove the [a] columns from the select list: SELECT DISTINCT s.ID, s.photo_headline FROM …; will work fine.

You have a members table, and a posts table, and a membersWatchedPosts table, and connect them all with a JOIn
joins

http://hashmysql.org/index.php?title=Introduction_to_Joins - For more indepth info: http://dev.mysql.com/tech-resources/articles/mysql-db-design-ch5.pdf

Anyone know what a "PMA Database Not OK" error under phpmyadmin means?

ok

I think I've got the correct query, interested?

sure

snoyes and the_wench, thanks much

You're welcome.
I bet the_wench won't say "You're welcome." She's rude like that.

is there a way to request the mysql to use SO_KEEPALIVE on inet sockets at all?
s/the//

http://paste-it.net/2883

should I see any problem changing the engine type on the "mysql" database tables?

please correct me if i'm wrong

I wouldn't do that.

why is that?

I do it from memory to myisam every day
going to/from innodb may be trickier

I'd like everything to be innodb
due to my lvm snapshots for backup

How are you going to alter the db, host, and user tables?

as root?
this is why I am asking the question

Try it and tell us the reesult.

heh
I don't know if I like that answer

Error on rename of './mysql/#sql-6a4_8' to './mysql/db' (errno: -1)

is there a way during install to specify that the mysql database uses innodb?

The rest of the tables (minus the log tables, which have to be CSV) worked fine.

I've already restored a copy of the database that was made using tar and lvm snapshots successfully due to a disasterous situation, but I've heard that it's not a great idea. Could I be hosed since the mysql database is myisam?

There's a huge reason why MySQL couldn't use InnoDB for the mysql DB…. If only I remembered…

looks good to me.

thanks

Probably because you can disable the innodb engine.

Possibly!

the mysql database contains plugin information to load innodb now!

CREATE TABLE chicken ENGINE=egg;

would it be possible to put that query in a stored funct/procedure, so I can get the price for a given reservation?

yep

i'd tried that yesterday, with just a simple function but i couldn't get it to work, though I think it seems quite simple

Can you show what you tried, and what didn't work about it?

i think i removed it
i was just trying
http://paste-it.net/2885
a href="http://paste-it.net/2885"http://paste-it.net/2885/a
yeah.. I know.. didn't had time to read the manual :$

Not the point. The point is the stupid tab autocompletion.

ah

:-

oh, yes, that helps immensly.
lol

haah
I'll read up on procedures… will you be here after 30min?

probably

okay great!
would it be better to use a functions or procedure?

I'd go for a function, unless you want this thing to return a full result set all by itself.

only the price will do
when I create this function that returns the price for a product, and I use it for all the products in my product table, woudl that be hard on performance? i mean harder than just joining everything?

probably. How much difference it makes depends on how big the table is and such.

okay, lets say around 100.000 products
but not all at once..
using LIMIT

No telling. The only sure-fire approach is to try it both ways and see.

ok
hmm but when I use the function(), the query that calculates the price is executing another query for each product, else it will be just one query
or handles mysql this more clerverly?

It's as you describe. Whether that's better or worse is very difficult to say.

i love mysql databases

whew, i think it's finally done, Xgc!
you were right, i did have to use DISTINCT, Xgc.

*nod* You could have better names for the story_assign table. I believe I misread your description. I still don't think, based on the results, you ahve the right answer yet. You seem to return a superset of the photos I think are correct.
s/names/column names/

when I want to return the result of lets say: select id from products where id = 10; how would I put that in a stored functions?

CREATE FUNCTION yourFunction() RETURNS int RETURN SELECT id FROM products WHERE id = 10;

ah okay

You seem to return a list of IDs that contain 21759, for the sample case.

Xgc, if i could get good at running those tests i would be able to past exactly what i'm working with.

I may still have bad data, given that I misunderstood the table descriptions you gave.

if you're still around later i might be able to run the test and paste the whole thing with data

I corrected my SQL and the only difference between your SQL and mine is yours returns 21759 in the result and mine doesn't.

I'm fairly new to MySQL and have a little question. Is it possible to somehow make references in a table to another table?

very odd

Yes, using a VIEW.
or a foreign key, if that's what you mean.

Xgc, are they the same thing?

No.

Okey, i'll look both up. Thanks a lot.

One allows you to create a fake table that refers to 1 or more tables internally, returning data from them all.

And the other?

The other (foreign key) allows one table to have columns that refer to a unique key in a second table.
It's like a pointer.

That's what i want
Cheers, thanks for it.

The term is "foreign key constraint".
I think that's just the standard that requires unique.

standards. bah.

hi guys
i wanna create a search engine with mysql you guy can tell me what do you think about it

Good idea. Grab the new http storage engine, and just point it at Google.

i want to make a scalable architecture , not extremly fast, but scalable
this is not for web search engine, only object (blob) indexing,
I want to index around 10 millions of object and even more
and i know that full text search isn't scalable at all i know how bad it is on big amount of text
so here is my though:

why not use an existing search engine?

because i don't know any scalable search engine

lucene, for example

can we clusterise it ?
i would create 2 deamon, one index one DATA servring
2 tables
1 index table contain (hash of key word (md5), hash of data)
data table would be (hash of data, gzipped blob of my object)
index table has 1 line per keywork contained in the object
data table has 1 line per object
so if i index 10 object that have 10 words in each, i will have 100 rows in index

I'm trying to create this procedure: http://paste-it.net/2887 but I get an error about the return

during a search, i broadcast the keyword query on my cluster of INDEXs daemon
and the INDEXs daemon return's the HASH's of the data matching

?!? wtf is that, google makes jokes ?
woops, bad timing

You refer to the pigeon thing?

yes

Every April 1

SELECT data_hash where kw_hash = md5('games')

do you know why?

what do you guys think, this is actualy the way google worksm but with MySQL it's obvious
Xgc, ?

wrap () around the whole select

For your enjoyment, when you have a moment: http://rafb.net/p/jGB78X22.html

ahh

RETURNS INT RETURN (SELECT…GROUP BYr_id)
or else declare an int variable, use SELECT INTO to populate it, then return it.

This function has none of DETERMINISTIC, NO SQL, or READS SQL DATA in its declaration and binary logging is enabled

In your case, I think it's READS SQL DATA

but those values aren't used I read in the docs?

so RETURNS INT READS SQL DATA RETURN (…

sweet, Xgc! and you did this in mysql comman?

http://dev.mysql.com/doc/refman/5.0/en/create-procedure.html

Comments

hi guys when I add userpriv to the FEATURES var in makeconf portage should emerge the packages as user portage

Last time this happened to me I left a SATA driver out, and then sda became sdb for some unknown reason on top of that. But I make sure to get all the drivers built in this time.
I ran into to that on my HP notebook

i'm having troubles with my mirror in make.conf
what's a good one to use

Is there a way to find out from within grub what it is labeling drives? (i.e. /dev/hd* rather than (hd*,*) )

Mr_Grieves_, no, but the kernel will print that information out as it probes them.

Where are you from ?

michigan, usa
i'm using the michigan tech ftp mirror

hows that goin?

And ? Maybe dns problems ?
Try using MIT ? dunno

michigan tech is waaay up in the UP, that'll be slow

it doesn't have a bunch of the files/application i want

I'm quite sure there're so many mirrors in the US that all you gotta do is pick randomanlly

can you tell me a good one? idk where the list is

I'm not from the US sorry

? mirrors

http://www.gentoo.org/main/en/mirrors.xml

^^^^

oh hey thanks

er, where is the clearlooks gtk engine ?

are you in Michigan?

thrice`, gtk-engines

I'm from Michigan also

not too bad, I have to quit chrooting to get xorg config correct though

now after i change that, is there a certain command i should run

which file must mplayer open for the DVD to play? the main IFO or one of the IFOs?

it is really nice to do a lot of setup through chrooting

very true

yes i am

why cant you chroot to config xorg?

you were using wmich.edu ?

well, starting it through chroot wouldn't be good, and when I ran xorg -configure in chroot it crashed my system

ah, mtu.edu

no, mich tech

barque, none, mplayer dvd:// -dvd-device /path/to/blah

might try http://prometheus.cs.wmich.edu/gentoo

well, at least it locked up my screen and left it flashing wierd colors.

could someone tell me if my system will auto detect any modules at all? for the record my kernel is generated with genkernel.

might be a good idea, wmu is 10 minutes away

jamesb:

-dvd-device /dev/hdc?

I have the University of Florida (engineering uni) Gentoo mirror just down the road
the connection is like 500 times faster than using the default ibiblio/osuosl ones

barque, sure, if /dev/hdc is your dvd drive. If you have a /dev/dvd symlink, you can just do mplayer dvd://

ok, I had to log back in to get the web page for configuring xorg, links is nice, but don't like surfing with it

oh crud, I heard the sounds from the DVD but not video output
emerge -pv mplayer?

that was the res test, you would have ended it with ctrl+alt+backspace

it has 'dvd'

you need several flags for dvd video

ok I've got 'dvd' … what else?

there's a nice gentoo-wiki.com page about it

no another one

I did the ctrl+alt+backspace it didn't like it, had to hold the power key.

weird…. haha

sure …. I'll read it

I thought I had messed up my Kubuntu and left me with nothing.
ok, I'm logging out to boot into my Gentoo and config X Thanks.

i believe you need dvdnav and dvdread turned on as well

hello

possibly others too

umm
how did you just 'switch' some new flags on?
I forgot

"emerge world" is stopping becouse it cant emerge beryl-core-9999
and i dont want beryl anymore

man portage and pay attention to package.use

oh yeah I know how to through package.use

might want dts, a52 and aac if not turned on already

x11-wm/beryl-core-9999 failed.

just 1 thing, if I add multimedia/mplayer gtk*, it will just 'add' gtk to the USE flag list… not override the entire list with just gtk

package.use is only for that package

emerge -C x11-vw/beryl-core didn't work

and don't put * next to it
LZZ isn't it x11-wm/beryl-core?

will it simply add 'gtk' or , override the default USE flags for that package?

yes
i writed wrong sorry

cause emerge mplayer already had some flags on

package.use

look, i tryed to uninstall beryl, now emerge world try to install it and fail…

I wouldn't be bothered if mplayer had all modules installed :P
LZZ, it won't go away?

Does anybody know any good open source CRM solution, other than vtiger or sugarCRM ?

add -pvt to the world arguments to see what's pulling beryl-core

ok I had a little bit of a problem myself too with Compiz-fusion

anyone that know a website with info on module names and what the represent?

I had made it my default WINDOW_MANAGER by making 99lcaol including WINDOW_MANAGER="compiz"
I had to remove 99local and do WINDOW_MANAGER="metacity" and env-update
99local*

ok
can i paste 4 lines?

rafb.net/paste

how do i figure out which of the 10 modules on the livecd for sata drivers is actually being used by compy?

http://rafb.net/p/LqXX1Q87.html

it's usually not hard to tell since it depends on the controller chip. that can be found with lspci

lsmod ?

eh. give me a minute. let me boot into the cd again…

hi, i'm using gentoo 2.5.20, do i have to gensync with anything?
err 2.6.20

is that a kernel or a very old version?

also note grknight 's advice… lspci to figure out what the chip is

grknight, thats the kernel

never heard of gensync before

grknight, ok. when i was using vlos i had to gensync with them
grknight, like a portage overlay

the only sync you do in Gentoo is `emerge –sync` for the main portage body

How can I filter out irrelevant VIDEO_CARDS?

grknight, ok, thats what ive been doing. just wanted to be sure i wasnt missing anything. thanks!

add VIDEO_CARDS="(yours)" to make.conf

When I prefix the undesired options with the minu sign, I get:
Invalid '-' operator in non-incremental variable 'VIDEO_CARDS': '-neomagic'

so, gnome-base/gnome, gnome-extra/gnome-media and gnome-extra/nautilus-cd-burner are pulling beryl-core?

just put yours and it will remove others

i cant unmerge it

thanks.

the default is to pull them all

I noticed.
Usually, I like the kitchen sink approach; however all those years of having to wait hours for a single X compile has left me with the urge to purge as many modules as possible.
how about the "threads" flag?
good idea or bad idea?

usually bad for many packages unless you know what you want it for
it usually does not mean multi-threaded

I wish they had that note for that flag, much like 'pic' and ' bashlogger'

threads can be good or bad.. it really depends on the package. perl, for example, can get real touchy with threads (or is it ithreads) on

I noticed In fact, I don't think it's ever worked with PHP.

php 5.2 has made that much better.. but as they say "PHP is glue. It was never designed to be threaded at any point."

Hear, here!

I'm sorry for asking yet another ati driver question - I'm getting slow fps on glxgears and fgl_fglrxgears with the closed source ati drivers. I was wondering if there are some guides for helping me get some better numbers out of it

Finally, what's your take on paludis?

does glxinfo show "Direct Rendering: yes"?
great uninstaller.. but that's all i'll say here

yes

what kind of fps are you talking about?

about 250 in root for glxgears

which card? i was avg 850 or so for my X800 on a amd64 platform

wow, really — the guide showed the same card as me in the thousands — 9600SE 256meg
well minus the SE
oops

Is there anyway to blacklist a bad dhcp server? Someone on my LAN is running their private dhcp server on the LAN, sending NAKs to every dhcp transaction on the LAN.

you might do better with open-source radeon.. and you could run AIGLX + beryl if you wanted with that

not too interested in beryl — but is the opensource that much better?

for you're card it won't make much difference.. but you might see a speed boost with radeon

ok this is sad
neither vnc nor nx read the fontpath in the xorg.conf

alright — Thanks

would settign up a font server hosting be a good alternative?

to my knowledge there is no way to blacklist a dhcp server

BindlessTux, thanks.

only with a firewall really
i bet iptables can do it with a linux box.. but i'm no expert in that

are your switches 'smart' (ie: managed)… do you have access to them?

grknight, I think iptables is no good since dhcp is run lower than the ip layer. I would need a box inbetween with established ip to block that (which I don't have).

hrm did not think about that, could do some packet blocking based on MAC addresses possibly in iptables

sonicGB, I believe they're all (or at least partly) hubs, but either way I have no access.

is this for YOUR computer that is getting invalid dhcp's or for your network?

can iptables do mac adresses?

you can figure out the MAC addr of the rogue dhcpd with snort or ethereal, then log into the switch and find out which port that mac is on… and then go and beat the offending user with your LART :-)
do you need to solve the problem for yourself, or for the whole network?

Your idea is by far the best

pozican, both… the network runs a dhcpcd server, it's just that this person has a private jvm hosting dhcp server running for a backend lan, but its listening on the open network and its complaining about every dhcp transaction that it didn't send.

are you referring to the diagnosis, or the physical beating? :-)

Of course the beating

I have the mac adress, I just don't know if I can use that with iptables.
It's a problem for the whole lan but I assume the admin's gone home for the evening.

you know who it is? what box it is? if so, just go and reconfigure the dhcpd to stop listening on the interfaces it's not supposed to serve and/or not to answer queries from certain directions

sonicGB, wish I could. It's a university network, so even with the MAC, I don't have access to the bad dhcp server.

this might sound a bit wierd, but even putting a slow old 10Mbit/s hub in line with the offending box might be enough to give the 'real' dhcp server enough time to respond to clients first… it might work as a short term (overnight) fix…
ahhhh, a university network, why didn't you say so! … I know exactly where you're coming from (and I feel for you!)
uahhhh, a university network, why didn't you say so! … I know exactly where you're coming from (and I feel for you!)/u
at the university where I work, the correct approach would be to not bother attempting to resolve the problem and concentrate on getting to management with your side of the story first! :-) (he who speaks first wins!)

Funny, I work for the gov — My response would be to disable the port on the switch
customer service ftw

I don't think it's a problem of getting them on my side, since backend lan's are prohibited for this reason (I have one regardless ) but it's just a matter of the wait time before they get back to me.

if ksool 's org is anything like mine, the switches are controlled (and guarded) by someone completely unrelated in another building who (1) has already gone home and (2) wouldn't help you anyway

lol, I guess I'm glad I'm in a small enough group that we all have access to everything

it's a nice way to work, if you can get it

I guess I'd argue our drama outweighs — got threatened with my job today for taking comp time authorized from my superior

believe it or not.. DHCP uses UDP ports 67 and 68.. so there must be a way to filter it

0 -j

Wow, good information — I was not aware of that

presumably that required mac suppose compiled in to iptables
support

sonicGB, thanks I'll gill that a try. I had seen a bunch posted that iptables couldn't help with dhcp since dhcp listened directly to the interface.

no ksool, dhcp is pretty much just another app… nothing special… it sends and listens for broadcasts when it's getting a new address, then reverts to directed communications once it knows where the dhcp server is…
like grknight said… you can just block the ports… and allow only from the 'real' dhcpd's IP.

sonicGB, yea, I think you're right. I had tried to block just the dedicated ip in iptables with no luck. I did read something though that dhcpcd can't utilize iptables rules until after you're setup on the network since until that point everything is done by mac address.
BTW, if I drop something with iptables, will those packets still show up in ethereal?

Hey does anyone know .. i though secondlife was in portage
did it get taken out?

I'm not sure… I'm guessing that iptables will probably get to it before ethereal does

sonicGB, sounds about right. So now I have no way of knowing if the iptables mac filtering worked or if the guy just took his router off line.
Thanks guys, major help.

hi
anybody got an iPhone?

if you still have trouble, you may need to look into ebtables stuff. designed for bridging, but may do what you need if iptables can't do it itself.

What do you need?

jus axing

no, just finished reading the Anandtech review though

^^ jus axing

how did it do in the review?

which review? about iphone?

w00t anadtech review, listen if h4×0rz are able to put linux host on it, that shit got a lotta potential and amma get one

oh no

will there be a Gentoo branch for iPhone?

language.

Skunky, will do if iptables fails. Seems like it would entail a lot more work. Esentially putting a bridge between my comp and the network to do the filtering.
bSkunky, will do if iptables fails. Seems like it would entail a lot more work. Esentially putting a bridge between my comp and the network to do the filtering./b

also, try to speak english in addition to not cursing.

iGentoo ROFLMAO

….

ok

broken, I don't know if it was ever in portage, there is an alpha client. See http://forums.gentoo.org/viewtopic-t-429739.html

I get an error, *** Skipping everything below this failed directory *** when "emerge sync"ing

it isn't the features, it's just the interface that makes lots of tasks easier (compared to Blackberries etc) — their conclusion

Thanks for the summary

is there a Gentoo arm channel?

battery life is still rather shocking at ~6 hours

iPhone trounces Blackberry, period

/topic

k

linux on the ipod never took off, so it's doubtful you'll see anything really productive Linux-wise put on the iPhone
ulinux on the ipod never took off, so it's doubtful you'll see anything really productive Linux-wise put on the iPhone/u

playstation, aye? scary.

on the other hand, I think a geek would probably be very proud to announce they got linux working on the iphone… See about Linux on iPod.

oc'able to 800Mhz
I've notice Java has been broken up into a thousand packages
hallmark of Gentoo

hello, i was hoping someone could help me. i got to the part in the installation where you restart. when grub loaded and i selected "gentoo linux" on the menu, grub flashed a screen with a an error saying kernel /boot/kernel-2.6.21-gentoo-r3 root=dev/hda()/ init=/bin/bb couldn't load ()being the drive number
partition number*

hi

i rebooted into a live cd
how can i get the proper kernel path?
and how can i now put it into the /boot/grub/grub.conf file?

qxzy, did you copy your kernel to /boot?

i'm not sure.

you need to specify the drive: root=dev/hda()/

when u finish kernel compilation, you must copy bzImage to a proper place

qxzy, it is bzImage

ah yes, i did copy that to a directory

or use make install inside /usr/src/linux/ better way than doing it manually

lbracher you could actually point grub to it in the kernel source directory

so the link should be /boot/bzimage?

qxzy, is boot mounted?

i don't think so, i believe i'll have to chroot back into the environment right?

tdr, what if you make clean?

timmy_boy that would just be silly

Yeah, chroot, qxzy.

I am about to do an install

if I have over 4gigs of ram and use gentoo 32bit how do I make it so all the ram is recognized and used?

qxzy, can u show us the lines that begin with 'root' and 'kernel' in your grub.conf?

in what scenerio would /var need 2G? I have been using 2G in var but it isn't nearly as much filled up

here is how I am doing it: 1. mount -rw /boot 2. cd /usr/src/linux 3. make oldconfig 4. make menuconfig 5. make && make modules_install && make install 6. set grub to the proper location (if using make install, then this only needs to be done once)

could /var get by with 1G?

is there pae that I need to enable somewhere?

how does your grub line look?

hi, if the livecd can detect all the hardware, if i use genkernel will it also detect all teh hardware on boot?

the error message tells very clearly, that you don't have a number of the partition specified.
you see the empty brackets?

i put the empty brackets in there
it's 4
/dev/hda4
that was what it showed

and this is where your root resides?

i have no clue how to get back to the /boot/grub/grub.conf file
i've tried chrooting, but when i "chroot /mnt/gentoo/ /bin/bash" it says that /bin/bash doesn't exist

boot from the livecd

ok I will use /var on a 512MB partition

that's where i'm at right now

hmmm… hold on

i rebooted into a live cd so i could edit the grub.conf file but i don't know how to get there

mount your / partion mount your /boot aftwards, then u can access it then
thats if ur not using raid.

you don't need to chroot to be able to edit grub.conf, you can do it directly from live cd.

no raid
great, how?

mount your boot partition to /mnt

mount /dev/hd* /mnt/gentoo
mount /dev/hd* /mnt/gentoo/boot

mount it first

i.e.

nano /mnt/boot/grub/grub.conf

vi …
pico …
emacs …
just to point out a few

=D

nano /mnt/gentoo/boot/grub/grub.conf

whops yeah timmy_boy is right i forgot the gentoo

I'd recommend vi over nano

Some genius thinks vi shouldn't be in stage3.

how i can reinstall or repair whole kde + xorg etc ..

what?

That was sarcasm.
Vim is clearly the best, but someone can't see that.

kernel /boot/kernel-2.6.21-gentoo-r3 root=/dev/hda4 init=/bin/bb

ah, then don't forget the nex time

Hey does anyone know .. i though secondlife was in portage
did it get taken out?

you never have to deal with grub again, if you set it up for `make install` as I recommended above.

there isn't a line that begins with root

I agree, that's retarded
ROFL@some genius

I think lynx should be in stage3, but I am just some random user.

I think it's a bug
it is
the bad thing about lynx is that it cannot create an AOL email account :-(

are there any good instructions for stage 1 installs

I'm trying to "emerge -auDv world" but its trying to emerge a package that has fetch restrictions, how do I tell emerge NOT to update such package?

i dont want to go with stage 3 because the whole point of gentoo is for it to be optimized to your computer

Stage 3 will be just as optimized as Stage 1.

please do not lie to me, i am not an idiot

its not a lie

I have no reason to lie to you. You end up in exactly the same place.

i think i fixed the problem *fingers crossed*
thanks guys

i want my core system utilities to be optimized with instructions supported by my processor and with sse math instead of coprocessor math

when you do an emerge -e system, that's exactly what that will do

bigbuford, emerge -e system

bigbuford, it will be once you emerge -e system
which is part of the install process

what the hell is the point of that
why not just do a stage 1

howt i can reinstall kde ?
-t

i used to do it and it worked just as well

emerge -e system thrice for your pleasure
didn't you say you weren't an idiot?

otth, me? I don't think so

sorry that was meant at bigbuford

stage 3… be my guest. It won't make your system any faster.

my bad

hey guys, what options would I use when attempting to mount an ext3 volume that i'd like members of the users group to have full read/write access to
?

hmmm, it's lunchtime here in .au… I think I'll have something with….. rice…

I think emptytree is for compiler upgrades, right?

chown the group for the directory (after mounting) to 'users'?

dude sonic

It's general purpose.

rice is for brown people

user in fstab and then chown -R user /dev/hdX

I'm white as snow, and I love rice.

i do too

chown won't stay with udev

but it is important to keep cultural barriers, so we must resist the temptation of foods eaten by brown people

I have a system with it's root partition encrypted via luks. I currently use a passphrase to access the drive. Is it possible to add a key on a usb stick in addition to the passphrase? Such that I can enter a passphrase if the usb key is not present but not require a password it the key is present.

yes after fstabbing it

Besides being potentially offensive, you're drifting off-topic.

hehe, well it booted, but i think the kernel isn't configured correctly because i received a message, something like "/bin/bb: can't access ttyl, job control turned off"

hi

mm… italian Rissoto

does this mean i have to chroot into the environment and reconfigure the kernel?

what is a Nocturnal Monster Puppy?

hey boghog

you quite ignorant right?

beats me

Please do not feed the trolls.

im a backwards ass redneck from down south pissed off because i have to live in the northern parts for the time being

do you have Root Plug support enabled in the kernel?

root plug? never heard of it

CONFIG_SECURITY_ROOTPLUG

love the topic…
the last part of it.

lol

finding a problem with vnc and freenx - 2 hours, researching alternatives - 1 hours, setting up xfs java server hosting - 10 minutes, changing 3 lines in 3 config files - 5 minutes….. knowing that after an upgrade I won't have to retype many lines of fonts…..PRICELESS

I never have gotten more than marginal sucess with freenx

how do i stop macroblocking with an hdtv tuner

success, even

anyone know why bbkeys won't work within opengl games, and what I can do to change that?

really? it has worked liek a charm from me for couple of years

anybody tried quadcore? Besbuy or Compusa is selling a Desktop QuadCore for $999 o.O

is it easy to compile a package for basic 486, when your settings aren't like that?

what seems to be the problem

hmm, doesn't seem like what I'm looking for. I know Luks has the ability to use a keyfile from a usb stick but I'm not sure how to use one for an encrypted root (whole disk)

In essence, my problem seems to be that possibly due to the session resume feature, it takes me 2-3 tries to successfully establish a connection.

strange

..

oh..
doh. wrong window.

I have a question
with the obscene and dirt cheap ammounts of RAM available today, why isn't compiling in RAM lighting fast?
in the Gentoo wiki the results aren't significant

can someone tell me how to "make my system ready for dbus"?
according to banshee, it is not

I like using tmpfs in /var/tmp/portage.

USE="dbus", I belive.

ah….

is that for compiling?

yeah

and then i would have to recompile….. world farrioth?

I think the entire process where emerge uses for compiling should be mounted in RAM, if there a part touching the hard drive then it won't have any impact

just tell emerge that you changed use flags and it will recompile whats needed

is it okay, to have swap first, then / then /home?

emerge -N world
Sure.

trying to install gentoo live cd but get the packages from stage or whatnot

ahh, ok
thanks

I don't need.. /boot swap / and /home do I

No problem.
No, but it's recommended.

oh okay

I found it really helps for glibc and other compiles that are hdd intensive.

I'll delete all the partitions.. gee I wish you were here when I was trying get help earlier
others have been being real rude on the net.. suse was totally being rude
at least a few users were

How annoying. It's been pretty quiet here the last few days…

well, I wish I knew someone I could work with, on trying to learn gentoo.. I was using debian for quite a long time, and some others.. but I"m just tired of debian, I also work with a windows xp pro vlk.. because of software i use, and mix etgc
but you see, I'm just trying to make some friends, whatnot. and then in return also help others..
so for entering the size.. do Ihave to put 100MB for boot.. or does having MB even matter

do you mind sharing fstab line to mount /var/tmp/portage in RAM?

and alot of reason also why I want to use gentoo farrioth , is because I want to get good with source compiling.. I spent over 8 hours compiling compiz-fusion from git in debian etch, and dealing with dep hell

100MB is huge. Mine is 19MB and I've used 3.2 of it.

I don't mind, are you looking at the tmpfs article on the wiki?

well, 100mb is oki with me.. emr
erm

That's why I like gentoo. Portage is the best package managent system I've seen.

:-)
I got da feelin I goin start likin u :-)
lol.. your a nice help

I did long time ago, but didn't manage to get it working. Unless it has been updated

It means you have 100MB less space for everything else.

been havin the worst day ever..

Heh, thanks.

I have though for real, and actually the past couple of days..

tmpfs /var/tmp/portage tmpfs size=2g,nr_inodes=1m 0 0

all I"m trying to do, is install gentoo, and then get use to it, before I do a minimal cd install

do I have to reboot the server to put the new hostname into effect?

You're not using the installer, are you?

well the site says 100 mb

that's with 1Gig ram and 1Gig of swap.

yep, the text mode installer

The site is being careful.

plz plz.. just let me go with that for now

Oh no…
I'll keep quiet about the installer, then.

excellent just like me

is it actually worth putting portage into RAM?

the only time I ever start swapping is while compiling gcc or firefox and it's still not enough for openoffice.

I like to use swap in RAM though

i got a problem tonight
-.- i resolved

so do I have to set.. 100MB or just 100 is okay

there's a bug in qt-3.3.8-r2 compilation
which fails
-.-

I don't think I will use openoffice though

this is in fdisk?

nope

trying to learn vim and latex

the text mode option installer.. on the livecd

anyone that can help me debug my newly installed gentoo systems internet conection?

vim and latex is the way to go

cool learning vim and latex is something ive been doing recently

I don't know, then. In fdisk it's be 100M, so probably that.

okay, I gave it 100

in fact I just finished this pdf file about latex I was reading

vim ftw!

its a dhcp connection…

ext2 for boot or ext3, which I like

Don't ask to ask, just ask.

ok, sorry farrioth

Ext2 is the safe option, which I use. Ext3 probaly works, though, unless you're using an old bootloader.
What's the problem you're having?

okay, I"m going to do swap next
I have 1500 approx ram
1 gb stick and 512 both ddr2, but the 1 gb is corsair , better quality then what acer had in , just the 512

I have downloaded dhcpcd, set dhcp up in the net config file and now when I start up my new system it says eth0 timeout

plus I use vmware as wel, etc
1500 okay to state for ram?
or should I just go with 1024
for the swap, sorry

Is eth0 the right device, is the cable plugged in and is your dhcp server working?

to get support for tty through manual kernel configuration, i'd have to enable framebuffer devices, right?

With 1500 ram you don't really need much swap at all. I'd say 512 or 1042 swap.

gotcha :-)

No, but you probably want to.

moving on to /

do you know what i would have to enable?

I use tmpfs for emerging almost exclusively

For tty?

yes

yes on all 3 and my / etc/conf.d/net says "config_eth0=("dhcp")"

you get noticeable speed improvements

Can you assign a static IP and ping your server?
I don't think it can be disabled.

okay, when I go to do the other part, it exits out.. because.. it shows 5 in there
I have an ntfs partition on this drive as well, as primary

Do which other part?

the big speedup isn't so much during the compilation itself, but with the virtual removal of tar extraction and then removal of the extracted tarball

well i had a problem when logging into my new system /bin/bb couldn't access tty because job control was turned off
i guess i need to turn job control on but i don't know how

I want to use it for /home

no, I can`t ( for the record I'm chatting here on a different computer)

so far though, showing.. 1 1 0- primary ntfs etc.. 25 gb
2 2 0 primary ext3 I have that for 100 mb for boot

create a shell script like the wiki hosting states, make it executable with chmod, throw it in /usr/bin eg. tmerge

Okay.. You're sure the device is the right one?

3 pri for swap, 4 pri ext for / and trying to set 5 for /home

for what?
Vmware?

its only allowing max of 4 pri eh
nope.. /home

make it a secondary partition, then.

because thats where vmware gets installed to anyways, where I put it

But your getty works?

hello guys how do i set my profile?

so, extended?

yeah

im kinda new to gentoo

getty?

99%, I have a wireless card to but its turned of and not a single linux distro i have tryed have found it

eselect?

my live cd works

thats a gag on other.. something else we probably don't support.

see the gentoo docs - Upgrading section

good morning

what chipset?

On your install. You get a login prompt?

http://www.gentoo.org/doc/en/gentoo-upgrading.xml

hey farrioth , make it it says.. for choose file system.. extended?

You have the right module loaded for the card?

friendly12345:8139too

dam, then it exits out..

yes

maybe I should just go with my.. / then swap then /home

nope

thats what I guess I"ll do then..

i need to reinstall kde and xorg .. is it possible ?

i did a search for this problem but all the sites are dutch :/

You're trying to use agetty as usual?

darkclown, I use 8139too. I compile it as a module.

Strange.

i don't know know what that is. i was expecting a plain console, but received an error.

tmpfs /var/tmp/portage tmpfs size=2g,nr_inodes=1m 0 0

farrioth, , I"m just going to test, / swap and /
i mean / swap and /home

Okay.
Do you have VT_CONSOLE enabled in your kernel?

i don't know.

Can you check? It needs to be enabled.

I don`t know if its a whole lot of difference from archlinux ( my old training wheels) but I just loaded it as a module ( if it makes any difference I used genkernel for kernel compilation)

okay, I set the partition layout scheme now.. erm..

I think the help text for 8139too says to compile it as a module. I think you can type genkernel –menuconfig all

Erm..? Next would be filesystems.

i would like to check, but i don't know where to look.

In your kernel config. /usr/src/linux/.config

oh I can mount windows?

anyone got a "rtprio" utility on his/her system, and if so, which pkg does it belong to, please?

I did a.. for 4.. /dev/hda1 /mnt/windows

oki, thanks I guess its time for my second install of everything then :/

Yeah, but ntfs is read-only.

its okay.. I can grab some software from Xandros, or my mandriva powerpack or corporate desktop, and make it right
write

darkclown, maybe you could just recompile the kernel?

and actually, with that nfts g or whatever its called, you can write
and with that paragon etc.. soft I was working with and what i have, I can get things to write
I actually wrote to ntfs, when I was testing Xandros professional 4.1

You can, but it's not really supported. It'll work as well in gentoo as anything else, though.

so no sense in mounting it?

CONFIG_UNIX98_PTYS=y
CONFIG_LEGACY_PTYS=y
CONFIG_LEGACY_PTY_COUNT=256
that's what grep gave me with simple search for pty

i just left.. 1 that has.. /dev/hda3 swap, 2 /dev/hda2 / and 3 /dev/hda4 /home
i just left.. 1 that has.. /dev/hda3 swap, 2 /dev/hda2 / and 3 /dev/hda4 /home

hi. I just tried to emerge kde, but it seems that I need to compile =x11-libs/qt-3* with opengl. How to compile that with opengl?

Im gonna take an hour and think of witch of the 2 ill do after all I whana learn the system im working on so the compleat instalation could be good for me to go through everything agin but on the other hand its nice to just get it done even though its just my old crap computer that i practice on before doing major stuff

It doesn't hurt to have it in.

k

USE="opengl" emerge qt-3

yeah, because I want to mess with my codeweavers pro on some things ;-)

CONFIG_VT_CONSOLE?

eselect profile set default-linux/x86/2007.0/desktop gives me an error

use the #

doesnt appear to be valid

just type it exactly like you wrote, p4r0l3?

kcmack:
samething

Put opengl in your USE and do emerge -N world.

How do you run mplayer with the GTK look… without opening a file to play

=yes

like just fire it up

yes

installation started.. well I"m gettin somewhere

target number 4 doesnt seem to be valid

gmplayer

okay, thanks

actually USE="opengl" emerge =x11-libs/qt-3

which stage do you want to start at, 3 Stage3 is a basic system that has been built for you no compiling or something

Can you do a grep CONSOLE .config and pastebin the output?

thanks timmy_boy

okay. I'm new, i really don't know all commands.

the other 1, is 3+GRP a Stage3 install but using binaries from the live cd when able

USE on the commandline is not recommended.

man Gentoo (or should I say GNU/Linux Gentoo) kicks raw buttocks

o_O

my Desktop is soooo looking sick

Stage 3.

I agree, barque.

link it by hand

will do just as soon as vim is through being emerged.

Okay.

how would you get opengl into the USEFlag?

oh cool.. do you want to generate a stage3 on the fly using the filse on the livecd fastest.. or internet

my eselect doesnt have default-linux/x86/2007.0/desktop

specify the URL

timmy, I have like a Metacity theme with black color, a b/w background and gmplayer with Ater skin

where do i get it?

thats the 1 I want.. url
not cd ;-)

and also green text with transparent black bg for xterm

http://www.gentoo.org/doc/en/gentoo-upgrading.xml section 3

nano /etc/make.conf and add it

It's like w00t!

ah nice, it has the mirrors right in there..

semprix_, emerge –sync && emerge eselect

meh, only problem would be later packages may not be compiled with the flag…but its a quick fix i would have made

g'morn

I wonder who has a nice stable, fast mirror

a new glibc got released and one of my boxes cant compile host because of thread stuff.
because of this "i dont want to compile the glibc" behaviour i cant emerge anything because gc and gcpp give errors that they cant compile executeables anymore

ok, thanks. and after that, just emerge x11-libs/qt-3 ?

yeah

http://nopaste.org/p/ajaTFe7ch

ok

it would be useful in testing to see if compiling with the flag would result in a successful compile..if so the flag could be added to one's make.conf

My last system got broken because of that.

screenshot?

i seen that ibiblio.org before though as well, guess there good eh?
but I live in IL, so shouldn't I choose indiana farrioth ?

ibiblio is good, but I'd go for the one cosest to you.

I like the text mode installer, better than I do the gtk 1

reisio, give me a minute

ibiblio and osuosl are like the default, _SLOW_ but reliable ones
grep MIRRORS /etc/make.conf.example
? mirrors

http://www.gentoo.org/main/en/mirrors.xml

I'm just going to go with indiana. been there before.. and through other states.. quite liked it

I don't even specify mirrors. It's optional.

okay.. select your desired stage tarball

rofl

I'm not going to forget what I did and the help I got from you guys
plus, so I can help others..
I"m not sure which number I should do :P
it just shows a 1 there

You will first need to update binutils and gcc, then glibc.

go for 1 then, I guess :p

It says that right there in the output you pasted: "* Please update your binutils/gcc and try again."

crap , I did someting. screwed something up

but neither binutils nor gcc want any updates - so why recompile. even binutils and gcc dont have thread flags

That's what the installer's for…

You will *first* need to update binutils, then gcc, then glibc.

no, I don't specify the number of inodes

Trust me.

i will trust you any special compiler flags needed?

None.

crap, its having problems mounting my swap.. going to redo

then i will try, thanks

Make sure you use the right compiler too.

I don't use a fstab entry eithe
either

Do `gcc-config -l` to find out which one you are using now.

crap, now the whole dang thing exiting

What does it say about the swap?

checking whether the C compiler (gcc -O2 -march=pentium4 -pipe ) works… no
error: installation or configuration problem: C compiler cannot create executables

i had accidently hit a key when I was choosing the stage tarball
trying to redo things

only having one gcc installed - but it says C compiler cannot create executeables

Which version of gcc?

okay I got it back

"mounting /dev/mapper/hpt45x_fifcdhcbi3 on /newroot failed: invalid argument" Can someone please help?

[1] i686-pc-linux-gnu-4.1.2 *

okay, and the thing is.. it puts swap automatically as the first 1, it mounts I guess

still working on getting it pasted, i'm emerging links now so i can paste the output. i don't know how to copy and paste between consoles.

What package is that configure check line from?

The order isn't too important.

I can change the mount options can't I?

binutils

oh okay

especially while chrooted into another environment

Which version of binutils?

http://img152.imageshack.us/my.php?image=screenshotqt2.png

Okay sure. gpm. But you want to use wgetpaste.

dang it

reisio, like it ?
I know I do

http://nopaste.org/p/a2q7220Js

where?

i cannot get suspend2 to work

the link ^^
http://img152.imageshack.us/my.php?image=screenshotqt2.png

there ws an exception recieved during the install that is outside of the normal install errors. This is a bad thing. The error was: Mount Error:FATA: mount_local_partitions: Could not mount a partition etc

gpm?

when i do hibernate it appears to work, shuts off
but when it comes back up it acts as tho it is just turning on
nothing is restored

are you saying i want to emerge wgetpaste?

For copy and paste.

and then it goes on to saying i have several ways of handling this, submit a bug report etc.. and so on

Yes.

and yes my suspend2=swap:/dev/hda5 is working

While we are at it, could you post `emerge –info` too, please?

…. :P

should I just reboot the live cd then?

Install manually.

zoo the livecd simply doesnt work yet

anyone know why the lexmark-x35 third party ebuild is masked?

Hmmm maybe I should selected black for my Window background

http://nopaste.org/p/aVvurnlYz

can't..

if a manual install appears too daunting, id suggest going to arch or fedora

scarrred :P

reisio, hate it? love it? what do you think?

i'm going to get the mugg to work

x35=z35

because I almost had it.. I exited out of something on accident in the choosing stage.. of the mirrors

installing manually isnt even hard compared to getting simple things such as power managment, wifi, and even gnome/kde working

I'll be back

zoo
dont bother, im serious

wasn't expecting GNOME :p
green on black is always fun for terms

what were you expecting? xfce?
I am no zomgl336+1hax0r

increase the verbosity level in /etc/hibernate/common.conf

Could you try emerging binutils without the -march=pentium4 in CFLAGS please?

deleting them from make.conf and then emerging or are there any useflags i dont know?

Nothing to do with USE flags. Just try `CFLAGS="-O2 -pipe" emerge binutils` and see if it gets past that failing configure test.

http://nopaste.org/p/aqrQp9nPpb

i recovered quickly on that, now I"m at which method do you want to use to sync the portage tree for the installation?

Could you try and see what `emerge -vuaDN world` wants to update?

Sync, Webrsync, Snapshot, None

sync

Oh, and update your profile to 2007.0 while you are at it.

g'day

they say.. Sync which its on.. Normal. Use emerge sync Recommended etc
I figured you would say that .. thanks.

emerge -avuDN world — better

recovered from that issue, just got to be careful with the finga's ;-)

does anyone know of a guide for setting up sofware mode glx?

http://nopaste.org/p/aJX2T8cIR …. how to update profile and whats that profile for?

Profiles are intended to set defaults for specific kinds of platforms.

dam, it errored out
I can drop to a console and then retry on return it says

At every Gentoo Release (new stage tarballs, new CDs and stuff) a new profile is created to reflect some of the improvements in the defaults used to compile the stage tarballs and CDs.

dang it..

ok will look for a tutorial about that

it tells me.. You must do a ClientConfiguration for the install to work.
uit tells me.. You must do a ClientConfiguration for the install to work./u

http://www.gentoo.org/doc/en/gentoo-upgrading.xml

See friendly12345's link.

alright thanks friendly12345

for swap.. its swap right?

I wonder how long it takes for wine to compile :P

"swap"
I'm trying the gtk installer now
farrioth,
i have for / /dev/hda2 ext3 / for the mount point and mount options.. default
for swap.. the mount point.. is swap right?

Yeah.

k

An average of 25minutes on an amd64 3.5GHz

I don't have to worry about mount options right? they can be left at default eh?

Actually, I have 'none'. I don't think it matters/

25 minutes?

splat says 14 minutes for me

Hmm

gotcha, now I"m trying to think if I want to mount my windows partition

mount options sw for swap.

hey farrioth , I really appreciate your help man

yes

when I get started back on this job, I would like to maybe send ya something to pay pal :-)
oh crap :P

is that a single core processor?

for error messages swap is better than none - "none is busy" is not a pleasant error message

oh for mount options? what about the mount point:

because your Mhz is much more than mine

yes

oh and.. for the / for mount options.. do I have to put.. b ? or B ?

It's a good baby, but it's getting old

more than double in fact

Good point. I've never has a swap error, though.

no more ideas?

I learned that a while back on SuSE

That explains the errors.

Is it valid to use caps in XML files?

noatime

ah, for / ?
or for linux-swap options for mount point.

AFAIK, you can use caps on xml. I don't recall if an xml file is supposed to be caps sensitive or not

I am trying to figure out whether kernel 2.6.19 is (already) too old. Shouldn't be the case, but something is definitely odd about your system.

For /

oh wait, I think I seen that noatime for the /
ah yep

Thanks.

for linux-swap should I put anything?

crazy2k: I imagine it depends on what the actual xml file is for…

Posting the config.log would certainly help: that hopefully explains more precisely why this configure check is failing.

updated the /

stupid computer froze

any mount options for /home?

where can i find that file?

I have some WAVE files. How can I combine them? I did it before using just flac and bash, but I can't remember how :|

noatime This should all be in the handbook, by the way.

yea
for the linux-swap do I worry about anything for the mount point?

does anyone know if it is possilbe to run glx in software mode (as in not accelerated on a graphics card; sort of like what the mesa library should do)?

Somewhere in /var/tmp/portage/sys-devel/binutils-2.17/work/binutils-2.17.

farrioth, , I"m going to take care of you through pay pal .. :-)
I just need a good partner. ;-)

how can I see if any packages depend on a particular package?

equery depends package

Thanks

According to http://www.w3.org/TR/REC-xml/#charsets - both small caps and caps are valid

w00t

What andy_t_roo suggested would only work for installed packages.

lol
yeah, KDE sucks ;-)
gnome, xfce, and flux all da way

instead.

I like KDE, but I don't like it when the tree breaks.

http://nopaste.org/p/aW3FC2WN1

year ya, I left KDE for so many reasons.. ;-)
do you know what to put for mount point, in the gtk installer?

I don't like the most frequently asked circular dependency questions that go with KDE use

i'm working on it :/
reboot

for / I have noatime for mount options.. thanks to farrioth , and sw for swap, and /home i just got defaults.

Thanks — in this case his solution was what I was looking for, but that is interesting, I'm going to bookmark it

now. does linux-swap need like a mount point specification, like swap?

No circular dependency here…I have a stinking dep+block on mDNSResponder.

If you get circular deps with kde, you probably are not using the correct syntax for package unmasking in portage.keywords

theres really no directory to mount it to eh

Okay. What's linux-swap?

well for mount options I have.. sw
btw, I'm keeping notes of all of this farrioth

mDNSResponder is an important package

no, I'm talking about questions on this channel

That's what you want for swap.

ok

Oh no.

If people get stuck here with kde, just send them to #gentoo-kde

Avahi now blocks mDNSResponder.
because it's library-compatible with it.

yea, in mount options?

What happens when you run `as`?

I wish every kde-version would version bump at the same time to avoid these kind of issues, but alas…

oh.. noatime for mount point?

*kde program

and the current stable ksysguard has a hard-dep on mDNSResponder.

or mount point options. and sw in mount point

Or `as -version` might be better?
-?

Is the binutils problem with amd64?

as: command not found

No.

ok

Why?

I'll upload it and show you what I'm dealing with here

Because I had some issues a while back with binutils-config not updating the links - it was probably caused by an old version of emwrap.sh

Nice one.

sorry, but i've searched for a while now, how do i blend my xterm/aterm ( ? ) with my background? i've seen some screenshots, searched the manual pages, home pages, but can't find anything…

From the above, I would check the symlinks

Could you run `binutils-config $(binutils-config -c)` please.

Do you mean making it transparent?

farrioth, , http://s115.photobucket.com/albums/n312/clintsnet/?action=view&current=Zoo-needing-help-lol.png

no, i know about all that, i mean about something like this.. http://gentoo-wiki.com/images/0/0a/09Oct2006-13-03-23.png

http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=1&chap=8#doc_chap1

That looks like transparent with no borders to me
It also seems a light de - *box, xfce?

hmm, i've seen both with out borders and with.. like: http://gentoo-wiki.com/images/c/c8/GabiDain.jpg

oh okay, I just got overwhelmed.. but will take a look at it tom

FireMail's http://nopaste.org/p/aW3FC2WN1 says "gcc: error trying to exec 'as': execvp: No such file or directory" so you could be right.

Looks like fvwm to me.
Could be a *box, though.

k, think I figured that out

it would be interesting to find out if binutils-config failed to execute after an update to binutils

* binutils-config: Could not locate 'i686-pc-linux-gnu-2.16.1' in '/etc/env.d/binutils/'!
@ rej

How did you fix that at the time?

I changed the symlinks by hand

Re-emerge sys-devel/binutils-config?

erm.gentoo too hard for me
I goin to sleep.. maybe I work on it some other time
I"m going to fix my drive.. with acronis disk director Suite

could someone please help me? I am getting an error: "mounting /dev/mapper/hpt45x_fifcdhcbi3 on /newroot failed: Invalid argument".

hmm, how would i be able to blend one so with the desktop, and others be with borders

reemerging binutils-config might do the trick

Try remerging sys-devel/binutils-config, please.
(Just in case you weren't reading jmbsvicetto's responses.)

Can you explain that?

"VT_HW_CONSOLE_BINDING is not set" that's the only option that wasn't marked as yes.
i didn't know how to use wgetpaste and the emerging of links failed.
and my stupid computer froze when i was telling you this earlier.

I ended up having to update all symlinks in /usr/x86_64-pc-linux-gnu/bin by hand

After that, run `binutils-config -l` please, and pick the latest (only?) option from the list.

Okay. What's made you use a strange kernel config anyway?

got emerged - last line was Processed 101 info files; 1 errors.

i'm not trying to make it oddballish, i just want a working system :P

alright did that

i'm custom configuring my kernel because i've never done it before.

i just installed gentoo from livecd as a guest in virtualbox bot now it says it can not startx. can anyone help me with this please

What does `binutils-config -c` now say?

Did you emerge X?

i686-pc-linux-gnu-2.17
@ rej

sorry completely new here
can you give me the exact command please

OK, now try `emerge -vuaDN world` again (and say Yes).

how is it done? blended to the desktop. is it merely transparent with out borders? or are there special programs/options for aterm/xterm to be able to do that?

run the following emerge -pv xorg-x11
Does it want to emerge "a few" packages?

it seems like its working again :o

now it says "calculating dependencies

wait a bit

can someone please tell me what it means when you get invalid argument when using mount?

1 package

what is the mount command line that you're using?

hmm

x11-base/xorg-x11-7.1

emerge -pv xinit

mount /dev/mapper/hpt45x_fifcdhcbi3 /newroot

FireMail:

that was hard 70 customers are runnin on that box

2 packages. 1 new and 1 reinstall

okay, so that amd64 gentoo install under vmware i mentioned earlier
i got it installed and stuff, but when i try to boot into it

I'm a bit lost on the /dev/mapper/hpt…. part - what sort of device is that?

kernel panic - not syncing VFS unable to mount root fs on unknown-block(0.0)

I got my wireless working finally!!!!!

raid
it is a raid partition

is xinit the new?

hello, could some one suggest a command to unload all modules

Congratulations!

have you set a partion type and mkfs with an appropriate filesystem?

Nice to know you don't use a test / production model for rolling out updates. :o

thanks for your help!

yw
FireMail:

Soichiro, that means a kernel prob

and not as a module m

/dev/mapper…. /newroot

new is x11-misc/util-macros

yw

thanks. The sad thing is, I don't know exactly what I did. I re-emerged madwifi-ng and ran etc-update, so one of those two things did it.

I will try it

ok…

emerge -uDav1 xinit and press 'Y'

modprobe -l | modprobe -r is no good
please, help

why is the WINE on portage so damn old? 0.9.29?
wine is up to 0.9.40

its relatively easy to fix Soichiro

Well, I didn't think I would need the SCSI driver since I set VMware to emulate an IDE hard drive

i do, but merely i have some boxes that don't really work as they should. like this one. another one uses i386 and so cant get updated with new glib or new spamassassin and so on

But I have every other storage driver that could possibly be related

that was the last version of wine that met Gentoo's 'stable' criteria
if you like, use a testing version

Oh noooo…. I was scared of something like that …
Ok ok… the testing version works right?

ok, then you're missing the ide controller driver

I've emerged pidgin (the new gaim), but typing 'pidgin' doesn't actually execute it. Does anyone know what the command to launch it is?

http://www.gentoo.org/doc/en/change-chost.xml

Quite possibly a new version of madwifi-ng?

yes, but check bugzilla for reported bugs

It's not that difficult, just a matter of caution.

sure sure …

it requires root access and gives me no packages

heard that changing chost is more a pain in the ass then it helps

same

I probably can compile everything and get everything working correctly, without major concerns?

but when i try with su it says permission denied

unless you're trying to use a initrd file and forgot to compile support for initramfs in the kernel

Latest version of app-emulation/wine is 0.9.40, you just need to unmask it.

like make install etc. ?

most asked question - make sure the gtk USE flag is set for pidgin or ncurses - if you prefer a console interface (finch)

check from the emerge output what is installed in /usr/bin/

thank you!!!

yes, emerge needs to be run as root or with sudo

package.keywords?

Or with –pretend.

I'm pretty sure I'm not using that' so… I'll look at my kernel config file and see if I missed something
I'm pretty sure I got everything, but… apparently I didn't

possibly. But I only installed the first time about 7 days ago…

have you set up a filesystem on that /dev/…. device already? is the name of the device correct (ie: are you specifying a partition and not a whole 'disk')…

Yes, put =app-emulation/wine-0.9.40 in it. And report any bugs you find along with nice patches to fix them.

I type apps-emulation/wine-0.9.40 in package.keywords?

when i try with sudo it says snake is not in the sudoers file

Yes, but with the equal sign.

ahh ok
rej, I probably can submit patches… coding C/C++ for some time now
Win32

You haven't configured sudo
Are you on the wheel group? look at the output of "groups"

output of groups says : users snake

How do I pass a password to the ssh command?

Just run sux for now to run commands as root
or su - if you have neither, login as root on a term and run emerge -av sux

Yes to the second question but I dont understand what exactly you mean about setting up a filesystem on /dev/

however uses gmplayer (mplayer with gtk) try Ater skin… looks good on b/w oriented desktops
whoever*

do you mean fdisk
?

Okay, re-emerging pidgin with USE="gtk" why is that needed though?

sux is not found and when i try su it says permission denied

did you sync in between?

yes, you're not in the wheel group, so you can't

you don't, it'll prompt for it, but you can set it up to use public key authentication in which case you won't need to enter a password at all

I'm not 100% sure what is appropriate for the type of raid device that you're talking about, so my suggestions are a little inspecific… I'm suggesting first that you confirm that the /dev/mapper/xxxx device that you're referring to is in fact the correct device (ie: its at partition level, not whole disk level) and then that you've used fdisk to set partition type, and mkfs to make a filesystem on the device before trying t

login as root on a vt

what do you mean with vt

press ALT+F2
then press ALT+F1 to get to your current vt (virtual terminal)

ok

I have done all of that but fdisk was done from the install livecd. I think everything should be the same after booting from the hard drive.

Okay, after compiling in a generic IDE driver and several SCSI drivers
It works

logged in as root

hi - when i emerge world i get this error: http://rafb.net/p/xGQOty29.html any suggestions?

in vt

Why it requires SCSI drivers on a machine with no SCSI devices I have no clue
VMware must just be stupid like that

So are you saying that gentoo thinks that the partitions are set up incorrectly?

I'm getting a bit out of my depth here, so I'm not 100% sure that I can help. I do know that raid devices can be tricky and that sometimes what happens at install time will not persist in 'real life'….

Hei, why there are made some lost+found folders on my gentoo?

now run usermod -G wheel snake

pidgin now allows multiple frontends

Yes, I'm suggesting that this might be a reason for the error you're getting… although the error message is a bit ambiguous

Are you sure you built an IDE disk and not a SCSI disk?

done

That's a common source of errors with vmware

finch is a console frontend (USE flag ncurses)

right

ok, now return to your previous vt and run su
ok
Then you have a different error.

Ok thanks for your help.

any one?

ok
i am as root now

any one?

what sort of raide hardware/software are you using?

the lost+found dirs are used at the root of a partition

highpoint rocketraid 154x/1640

Well either way it works now
Thanks for the help jmbsvicetto

jmbsvicetto - so do I need tho's dirs?

yw

yes you need those directories

can anyone else help IceGuest_7 with his raid here? I'm a bit out of my depth….

fsck will use that dir to put any file that gets lost

there goes any file that do not fit into another place

ouh, ok, thos dirs maded when I created SW raid1, I mount the md0 as /files and at the files dir is a new lost+found dir,

i am logged as root now. what do i have to do

hi guys, when I add userpriv to the FEATURES var in make.conf portage should emerge the packages as user portage and compile it as user portage but it should install the package normaly?

emerge -uDav xorg-server
grep user /etc/make.conf.example
# 'userpriv' allows portage to drop root privileges while it is compiling,

ok done
i had two packages

jmbsvicetto I don't wanna example, I wanna know if userpriv just compile the thinks as user portage but when portage install the compiled package it is installed normaly

yes

alrigth, thanks for trying. It is past my bed time now. I must sleep.

tnks

The src_install phase requires root privs or it wouldn't be possible to merge the package into the system

jmbsvicetto so userpriv just compile as portage user? because the man make.conf talk about a sanbox but I don't know what is it

If I'm not mistaken, userpriv will fetch the file as user and compile it as user in the chroot

i did emerge -uDav xorg-server and i get to packages

You might want to use userpriv and usersandbox

one to renew and one to install

2 packages? Then press 'y' and let it emerge them

How can I register a channel?

I couldn't understand, do I need to enable or disable the needed flags for SAMBA - http://gentoo-wiki.com/HOWTO_Setup_Samba

done it

jmbsvicetto why I should use usersandbox?

now try emerge -av1 xinit

incoming

LILO IS DEAD. I TOOK A SHIT ON HIS GRAVE, AND RETARDED SON AND WIFE. LONG LIVE THE GNAA. DCC SEND GAY_NIGGER_ASSOCIATION_OF_AMERICA

LILO IS DEAD. I TOOK A SHIT ON HIS GRAVE, AND RETARDED SON AND WIFE. LONG LIVE THE GNAA. DCC SEND GAY_NIGGER_ASSOCIATION_OF_AMERICA

LILO IS DEAD. I TOOK A SHIT ON HIS GRAVE, AND RETARDED SON AND WIFE. LONG LIVE THE GNAA. DCC SEND GAY_NIGGER_ASSOCIATION_OF_AMERICA

LILO IS DEAD. I TOOK A SHIT ON HIS GRAVE, AND RETARDED SON AND WIFE. LONG LIVE THE GNAA. DCC SEND GAY_NIGGER_ASSOCIATION_OF_AMERICA

LILO IS DEAD. I TOOK A SHIT ON HIS GRAVE, AND RETARDED SON AND WIFE. LONG LIVE THE GNAA. DCC SEND GAY_NIGGER_ASSOCIATION_OF_AMERICA

LILO IS DEAD. I TOOK A SHIT ON HIS GRAVE, AND RETARDED SON AND WIFE. LONG LIVE THE GNAA. DCC SEND GAY_NIGGER_ASSOCIATION_OF_AMERICA

Comments

I have a page that is useing javascript to poll a backend script every 2 seconds then append the new data to the

http://pastebin.com/m2ac0deab
thats the script Byron

2 secs?

sorry lol it was on my laptop :p
oh sorry there should be a if (field == "") { } inside notblank
there ammended it
any ideas

hi

is there a javascript eviv to die() in php?

try {} catch () {}

option value='1'Here The city Name /select

can I get somehow the "Here The City Name" with getelementbyId()
or something ?
I am able to get the value (1) but not the Here The city name

getelementbyId().value

that gives me the '1'

it will as thats the value

that's not my goal?

oh

I want to get the "Here The City Name"

put that as the value=""

I can't, I need the value code for mysql query after :p
but need the content as javascript host test before hehe

I can't do obj.style.float ?

hey, i have one textfield and one button, i wrote down to textfield and press button but id like to just press enter, how i could do it?

I think I resolved the problem
var selectList = document.getElementById("city");
alert(selectList[document.getElementById("city").value - 1].text);
seems to work

oh wicked, learn something everyday
i didnt know you could do that

anyway thanks for the "help"

Is there a way I can clear the page and use document.write() as if it was never used?

$("body").html("");

thanks

oh lol wrong channel

er
Not for me?

that;ll only work if u use jquery :P

So, is there a way I can do it

document.getElementsByTagName('body').innerHTML = "";

I'm trying to write a calender window for selecting dates
ok
Will that work on other tags like table?

this, not me

Why do many sites reference their .css and .js files with "?number"? Like core.js?52. Is this to force caches to reload when they make a change?
Sounds like a really dirty hack.

yes
actually, it doesn't force caches to reload, it makes them load for the first time, repeatedly

Not if the number is the same.
Until the Web master changes it.
…. right?

oh, if the number is fixed, then it's just a version number

"Just"?
Isn't this why we have HTTP and headers and shit?
To determine the right time to reload?

I thought you were referring to the technique of generating a number clientside
in which the client wants to be sure of getting the latest version, so each request it makes has a different number
which, if the content hasn't changed, means that caches end up with copies of the same content differing only in URL
bwhich, if the content hasn't changed, means that caches end up with copies of the same content differing only in URL/b
but if it's a server-assigned number that identifies a particular version, then they're all different, and the same URL always refers to the same content, allowing it to be marked fresh for years
you could call the files core.52.js or whatever, it wouldn't matter to caches

I have problems with a menu. When I click on a menu-item the text somewhere else in the menu gets selects. Any way around this?

cancel the click event

is there a different way?

use browser-specific selection-prevention properties

what if I have different eventhandlers on different layers for the same event?

are there ECMAscript implementations that file I/O?

JS with file I/O?
That would be stupid

Opera doesn't support className?

yes, all the ones that TiddlyWiki will work on

hi I'm creating some DHTML, and one of the bits creates img nodes… displays fine on firefox, but on IE it doesn't show the image. Instead I have to right click and go to 'show picture'. How do I force IE to show it?

I'm sure it does

anyone any ideas?

it's not stupid. It's stupid if you want to have a browser supporting that. ECMAscript can be used for other stuff too (actionscript)

so how do I get IE to render images properly that I've set/created with javascript?

yeah, it does thanks, though

hmph

hi guys
where i mistake?
echo "img src=\"$dir_smiles$smile\" alt=\"$smile\" OnClick=\"Smiles(\"$smile\");\"\n";

"img src=\"$dir_smiles$smile\" alt=\"$smile\" OnClick=\"Smiles(\"$smile\"

:O
echo "a"

"a"

lol
error javascript on Smiles( -
:/

ffs IE is retarded

couldnt agree more

I'm creating some images via javascript, in a table…
some of them get rendered, some don't
the ones that don't, I have to right click on and 'show picture'

blame MS for that

wtf!!?

IRCFrEAK, are you using "new Image()" ?

IE has stubbornly tried to avoid following the W3C standard
if they did it would solve much hassel for all of us

no using createElement("img");
then setAttribute("src", preloadedimg.src);

how do css menus prevent text from beeing selected when you press a menuitem?

IRCFrEAK, try using new Image instead

is an image host the same as what createElement("img") produces though?
I mean can you append an Image into the DOM as is?

yep

hmm really… ok, I'll give it a try
as usual the existing code works fine in ff

how can i unset an array?
arrayname = "";
?

hmm nope, on the appendChild call IE says invalid arg… works in ff

XB23, delete arrayName
or arrayName = []
or arrayName = null
or arrayName = undefined

and whats newline in an alert?

\n

ta

..as in every other language, except possibly brainfuck
IRCFrEAK, you should try setting the width and height on the images

anyone in here used prototype library ??

hmm ok will give it a go,
nah still won't display more than 1 or 2 of them
perhaps I'm appending it into the DOM before IE has finished something

IRCFrEAK, let's see some code

ah
that works…
If instead of creating an img, setting the source, and inserting into the DOM, I set a function on the onload() of it to insert into the dom, they display
pah
it's a wonder anything works on IE

IE works. It just prefers to work in its own special way.

now I just need to work out how to stop IE ignoring my image caching
I tried switching to relative paths as some forum said, but still no go. It still gets the image every time I set an image's src to it

You want IE to cache an image?

http://www.pastebin.ca/654526 — What am I doing wrong? I am trying to insert target="_blank" to all anchors with rel="new" with JavaScript. Important to note is that "new" could be anywhere inside the rel attribute.

The paste 654526 has been copied to http://erxz.com/pb/4004

hi all, i need a help with YUI Libs, can somebody help me??

They better not, since they ignored me…

hehe
you Catnip96 ??

I don't use stupid libraries.
Codebloat = bad.

its bad way

What?

why loosing time when you can use something what is created

Catnip96, http://www.pastebin.ca/654533

The paste 654533 has been copied to http://erxz.com/pb/4005

http://developer.yahoo.com/yui/examples/dragdrop/dd-reorder.html

yahoo = bleh

there are two lists where you can reorder levels in avery one bloks and you can transmit levels between blocks

Really? You can do "var anchors = document.links;"?

yep
document.images too

i whant to lock transmitting levels between blocks
transmit==move

Is this some fancy stuff with bad support?

nope
works in all major browsers

Thank you, VistaBear. Worked.
I hope this is good practice too.

works in IE 7, opera 9, firefox 2 , I just tested, Catnip96
and also, safari 3 supports it
tested that too

Yeah… me also tested.
Safari is such a nice browser with its AA.

nah, the windwos version hangs

Have you got the latest version?
It has been updated like 3 times.

yep, downloaded safari 3 some five minutes ago

Latest doesn't crash for me.
Only sometimes.
But the earlier versions were horrible.

hang != crash

how do I append the items from one array to another?

Hang == crash!

ryanhanks, you wanna merge to arrays?
or just append list2 values to list1?

what might be the difference?

array.concat() ?

ryanhanks, list1=['foo', 'baz']; list2=['3', 'spam']; you want a list ['foo', 'baz', '3', 'spam'] ?

Is there a way to make a custom dialogue box in JavaScript? Basically, a confirm() but with custom Yes/No labels?

eval foo

foo

I am making a menu using javascript to handle events for showing and hiding submenus. How do I prevent text from beeing selected?

#join ubuntu-es

eval list1=['foo', 'baz']; list2=['3', 'spam']; write(list1.append(list2))

yes. that would be via the concat function?

''ERROR: Can't modify constant item in scalar assignment at (eval 212) line 1, at EOFsyntax error at (eval 212) line 2, at EOF

eval list1=['foo', 'baz']; list2=['3', 'spam']; write(list1.push(list2))

''ERROR: Can't modify constant item in scalar assignment at (eval 212) line 1, at EOFsyntax error at (eval 212) line 2, at EOF

hmz
concat, yes
eval var list1=['foo', 'baz'];var list2=['3', 'spam']; write(list1.push(list2))

''ERROR: syntax error at (eval 212) line 2, at EOF

thanks VistaBear, _Fallen

hi I wanted to hide my address bar after loading the a page, is there any way to do it?

I have never seen this problem on any webpage. There has to be a resonable solution. How do I prevent text selection in my js menu?

Don't try to modify the UI, Lastent.

Catnip96 why?

Because it's annoying.

ryanhanks, it seems you could use either .push or .concat. .push modifies the array, .concat returns a new array

Catnip96 do you know if theres anyway to do it?

Are you the bear in the sample video clip with a bear in Vista, VistaBear?

nope

There is a way, but you shouldn't do it.

ehh, I mean..
YES, I am!

:O
Is there a way to make a custom dialogue box in JavaScript? Basically, a confirm() but with custom Yes/No labels? Because the OK/Cancel makes little sense for a question that should be answered yes or no.

I am making a menu using javascript to handle events for showing and hiding submenus. How do I prevent text from beeing selected?

Catnip96, yes there is

standard js-popup with no window menu

however, it would require some clever css and position:fixed

Nah… that wouldn't be a native GUI box.
I don't like fake stuff.

then you would have to use alert()
or confirm()
etc

anyone, who can I hide the address bar?

use window.open
but in the end, it's not your decision

VistaBear but I want to do it after I load the window, see this is my problem, I dont have control over the link that pops up my window
VistaBear so I wanted to know if theres a way do do it before the window is poped

Lastent, that would not be possible

VistaBear is it impossible or you don't know how to do it?

you could use adressbar=no when using window.open

ppl
i am starting AJAX developing now, after i have some control over PHP
but i have a doubt

you cannot alter other pages other than the current one with javascript, and you cannot hide the adressbar unless you do it when opening the windows with window.open
Lastent,

i have a script that takes the $_POST array and, foreach $_POST, enters its value to the database
now, i would like to send data to that script

and still, there's no guarantee that the users browser allows you to hide the addressbar at all

"echosmile" at 71.6.194.243 pasted "open one, close the others" (30 lines) at http://erxz.com/pb/4006

if i was not using AJAX, i would make a simple form
with the action pointed to that script

VistaBear I got you

but with xmlhttprequest object, how can i send the data to the script?

who can help me with last past ?

i have seen the .send() method, but i dont understand how it works

how do I make a link out of a div so that text selection does not occur when selecting it?
vdc, google "xmlhttprequest tutorial"

i googled it
i've read it
but no tutorial i have read explains the send() method
at least well

I have a page that is useing javascript to poll a backend script every 2 seconds then append the new data to the page ( log file ). Is there any way to make javascript host scroll all the way down to the bottom of the page after every
update?

you could add data to top of page maby?

http://erxz.com/pb/4006 — no ideas for this?

wtz_ ?

have html form with some checkboxes that work great. when i user .innerHTML to replace the table that contains the checkboxes. and try this command document.memberdetail.monthly_assignment.length… i get document.memberdetail.content_package has no properties… not sure why this
is

oh no i don't want to try and read log files in reverse

You should fetch only changes ( use id of last entry as parameter ) anyway

when using .innerHTML its almost like it can see the form

clickable (instead of just the text link to the page name within)

how do I make a link fill a div so that the underline spans the whole div?
good question. mabe I am looking for the same answere

hehe, I believe so

wtz_ i only fetch changes, but the window doesn't scroll with the changes

you could catch mouseclick or mouseup events, but text selection will probably kick in and act strange
I am so fucking tired of having to write my way around this shitridden bullshit that is the w3c standard.

Alternatively you can ignore it and code by your own standards.

Browsers are struggeling with problems that were solved twenty years ago in standard gui's.
how do I build a solid house on a pile of shit?
Am I the only one thinking that html/css/js is less than impressive?

Do you have an alternative?

No, but I starting to get a considerable list of problems, bugs and design f*ckups, after using js/xhtml/xml/css/xslt for six month.
And it is all trivial, fixable stuff.

Looks like there's a lot of work cut out for you then.

Why would I want to spend my time solving problems that are allready solved in hundreds of computing systems allready? You do not have to be a brainiack to see that element layout in htlm is simply done wrong. Yes, I would do it differently. I would let text flow in boxes, not boxes in text.
That is just stupid!

have html host form with some checkboxes that work great. when i user .innerHTML to replace the table that contains the checkboxes. and try this command document.memberdetail.monthly_assignment.length… i get document.memberdetail.content_package has no
properties… not sure why this is
i can see that the page change with innerHTML but when i try to grab the value is get undef, makes no sense

Anyone seen the scene in Monty Python's Quest for the Holy Grail where the pesants are "working" with dirt and talking about social structure? That is me right now:-( What can you do? Nothing! Oh, right!

any idea why using innerhtml to replace checkboxes would make the value undef
uany idea why using innerhtml to replace checkboxes would make the value undef/u
whats that

How can I create/edit a table with JS?

Khisanth, why would i get document.memberdetail.content_package has no properties.

various things not working, stuff not being submitted, not being accessible with DOM methods, …

when it does
when i load the page it works fine only when i do innerhtml
i using onlick:javascript:function() — in there i try to access the values
maybe the onclick=javascript:function will not work when using innerhtml

hello
how would i get the row index and cell index within a function called by an onclick within a table td

Is it impossible to reliably disable submit buttons once pressed? Is this bad?

If Javascript is enabled, it is generally doable.
If it's important, use sessions or some other state, along with a page UUID, to prevent multiple submissions.

Naturally, this is not the only safety measure.
It is just to prevent idiots from clicking a lot on the submit button, causing extra load on the server.

You mean you're not handling credit card transactions?

I'm not.

How is that causing load on your server?

Like if they do a database search.
Two or more requests would be disasterous.
Because they just clickety-click unless they get a page back in 1 second.
So I would like a JavaScript to disable any submit button once it has been submitted.
Is this doable? Is it recommended?
I see that ImageShack.us is doing this.
They change the "upload" button so it says "uploading…" or similar and disable it.

disasterous????

Ok I found window.scrollTo(xPosition, yPosition), but i'm curious is there a way to get the y position for the bottom of the page?

is your server by chance running on a 486?

Probably a 4006 with a 110 baud modem :P

cute

So you don't know?

who me?

or input type="button"

I say you reassembled Colossus and wired it up some internet

Eh?

then use an onClick event to trigger a javascript function to change the value of the button to "uploading…", disable it, and then submit the form in the background using an Ajax or something

var Table = document.getElementsByTagName('table'); table.innerHTML = "trthMon/ththTue/ththWed/ththThu/ththFri/ththSat/ththSun/th/tr\n";
What's wrong with that code?
wait
ok, it's not the case
Am I doing somthing wrong?

yes solemnwarning .. you are expecting your code to return a single element the way you are using it
but it doesn't, it returns an array of all elements matching that tag name

document.memberdetail.content_package has no properties — i only get that error in firefix works on IE strange

Table[0].innerHTML doesn't work either

its a read-only array buddy

So how can I update the HTML inside a table?

so do myTable = Table[0] … then act on myTable

oh, thanks

then it should work

Still nothing

wonder why when using innerHTML for checkboxes, when trying to grab the value its undef in firefox but works in IE, strange

i think firefox is a more correct implementation of javascript… a checkbox would have no value… there is another way to check its state

document.memberdetail.content_package has no properties
[Break on this error] for (var i=0; i document.memberdetail.content_package.length; i++)
strange because if i hit the submit button for the innerhtml, then the innerhtml works fine, its almost like it doesnt get register int he DOM unless i act on it before theinnerhtml

you sure you aren't messing up the syntax or case-sensative variable names? I notice you used "Table" and "table" in your example which do not refer to the same variable

Yeah, that was a mistake
I fixed it
Still didn't work though
http://rafb.net/p/cvqti313.html
What am I doing wrong?

this example works fine: http://pastebin.ca/654630

The paste 654630 has been copied to http://erxz.com/pb/4007

what kind of errors are you getting on your JS console, if any?

None
The debugger doesn't show anything either

cause at first glance the code looks ok

install firebug

though because its a read only array I would assign the element to a new varaible instead of trying to overwrite Table

firebug? some firefox thing?

yup
firebug.com
and then install Yslow

erm

but other than that

That's an ad site

www.getfirebug.com

XD

actually, even though my docs say its a read only array you can still change the value of the returned elements without assigning them to a new variable. i just tested and that works, so i'm totally lost why yours isn't working

w00
It wasn't that code

oh, ok

The function that was supposed to call it had an error _
Still doesn't work in konqueror

which version of FF are you using ?

iceweasel 2.0.0.4 for the firebug thing
I normally use konqueror though

i would never be able to debug some of my JS problems without the FANTASTIC firefox JS console
just the default one helps a ton

if you think the default console is good, then firebug will just blow your mind with its features…

i'm going to look at it now

hihi all

for some reason

you are right thecoolone19 … very cool. this should definitely make CSS editing MUCH easier
and i'm sure it will help with JS too (though i wasn't having many problems there)
uand i'm sure it will help with JS too (though i wasn't having many problems there)/u
jscript.net? please don't tell me thats .NET with javascript syntax

Um. I guess so. Why?

if you want to make CSS editing easier then you need to get the "web developer" add-on for FF
bif you want to make CSS editing easier then you need to get the "web developer" add-on for FF/b

in my code get its own tr?

that just sounds ugly… javascript (a scripting language) being used to make full fledged apps

Is it somthing to do with innerHTML?

hi all
i want free maskedit control for my php project

I put it to you that it is a lot less ugly than using VB to make full fledged apps.
Plus it's fairly well extended. Strong(er) typing, proper classes, etc.

inside a tbody

wth is a tbody? somthing to do with js?

All tables have TBODYs
they're just usually created implicitly
If you're making a table using javascript and DOM methods, you must explicitly create it, append it to the table, and put your TRs inside the TBODY.
Yes, this is strange and confusing

Jan`: you're right… suppose it couldn't be any worse than using VB

It's not really javascript, it's the way HTML rendering works.
well, I think it's a good thing, because it means people with jscript experience from the web are a lot of the way towards being able to write proper apps.
So, I'm in favour.

Adding them all at once worked, thanks

try storing all the changes you want to make to the table in a variable and then dump them all into the element through innerHTML at the end

I think the reason it exists is so ASP people can write web services.

that way you don't get caught by the browser who is trying to build the table for you as you go

Unfortunately, I'm having to learn what "assemblies" and "interfaces" are.

Any suggestions why this code works in FF but not konqueror?
Am I doing somthing obscure? is innerHTML non-standard?

i don't mind seeing higher level scripting languages used for application building… that can be a great idea… I just never really liked the .net stack and cringe a little when i see a language i like (javascript) implemented for it

I cringe when I see javascript :|

lol

Yeah, well, you're just one of those people who can't stand to see nobodies like me creating .exe files

javascript itself is a fantastic little language… unfortunately its implementation in web browsers is sometimes horribly inconsistnet
*inconsistent

i want free maskedit control for my php web hosting project any one can help me.

Well yeah, but that doesn't mean much here.
I'm not running it in a browser.

hello

Jan`: no, thats not it. i'm really just a scripter, but i make full fledged executables using python and have even played with making GUI interfaces using PHP

I'm having all kinds of trouble making it run UI applications.

hey, how can I "capture" the paste event in an editable HTML?

Theoretically you have access to all the usual windows forms and controls.

Anyone?

i just don't like .net… whether implemented through javascript or C# or VB

What's wrong with it?

sorry man… not familiar enough with konqueror's javascript implementation

bah
damned javascript and it's varying implementations

like i said, you may want to build you table in a string first before pushing it into the HTML element

… I believe paste has different keys in different browsers, like in windows, it's ctrl+v to paste, or shift+insert

Is innerHTML "standard"?

yes

I have done

ew, don't tell people to use innerHTML

It's working fine in FF now
Jan`: Is there any alternative?

well… he just asked if its standard

I believe the colloquialism here is "innerHTML ftl"

but is there a way to hook a function to the paste event?

I've never had a problem just building tables in DOM code.

i didn't tell him to use it… though i've used it many times, as unfortunate as that might be

DOM?

document object model

Would that be a better thing to use?
Or is it even less portable?
Jan`: At least perl is perl

Perl was quite clearly designed to even out keyboard wear on the non-alphanumeric keys.

There isn't a perl for differant platorms/whatever
_

i'm pretty sure Jan` is suggesting you use the Table.deleteRow(), Table.insertRow(0), row.insertCell(0) and such
which are some of the DOM methods for building a table
and should be equally or more portable than building strings and pushing them into innerHTML
which is very error prone

It's verbose, but it doesn't have unpleasant side-effects with event handling and form submission.

for now though i'll continue using innerHTML to accomplish things the quick and dirty way
because if myspace has taught us anything, it has taught us that people are accepting of quick and dirty interfaces

That don't work in all browsers
Since KHTML can't even render the table….

i'm going to install konquerer i guess… i use it a lot so it would be nice to know if its working

Aaar!

i don't innerHTML tables much though

*hop* *wail*

Safari uses the KHTML engine too

you can download safari for windows now

aaaa! oooo! Eeee!

elements

I use innerHTML when I need to clear the contents of a tag
no need for fancy removeChild()s

so, is there a way I can tell when something has been pasted in an editable html ?

while(foo.firstChild){foo.removeChild(foo.firstChild)};
I tend to have empty() proto'd onto Object for things like that

Jan`: foo.innerHTML = ""

foo.empty()

Maybe I should clear the page and redraw the whole damn thing with document.write()

lol

Would that mess up the forms?

Jan`: is that even going to work on most browsers
?

don't think so… not if you redraw those too

ok

in an editable HTML, how can I get and set the cursor position and selection?

Is there a way I can clear all the text printed with document.write()?

Wooo!

hey all — can anyone help me out with a probably simple prototype/JS question?
hey all — can anyone help me out with a probably simple prototype/JS question?

Back, you!

what is "an editable HTML"?

a document with designMode = 'on' or contentEditable = true (IE)
that's what I mean by editable HTML

read up on document.selection and document.createRange

JLearn, is that applicable to all browsers?

No, selection object is IE only

that's what I meant… I need it in FF too and Opera, safari, etc…

But what are you trying to achieve? Create an online editor of some sort

yep
exactly

the other zillion solutions aren't good enough?

I have it almost done… just paste detection is missing for some things
well, I just want a lighter version

Use an existing WYSIWYG editor if you need something like this, much better.

I tried, but they're huge even the "Tiny" ones
plus I don't need that much funcitonality
(just simple BB WYSIWYG edition)

OK then lookup some free ones and see how they do it

what about the phpBB editor?

I'm not sure which one it is anymore, I've seen tons

anyone still kicking?

I based my editor in OpenWYSIWYG

hey
trouble with changing radio label style/className..
here's the function

(initially, but now I've rewritten and changed everything)

http://www.pastey.net/72135
it works, if i alert the element's color after it's set it shows set, but in browser window the color doesn't change

hey, what's the name of the utilities to "compress" javascript?

you can't compress js

is there an easy way with javascript to select a select option by value and not by index?

yes there is.
not easy tho

GOogle for Javascript obfuscators

well it's easy but loops

so i must go through the options and find the index that has the right value right?

http://javascriptcompressor.com/
if you really care to save 1k ..

I now just need a way to get/set the selection of the HTML editor

Is there a way I can clear all the text printed with document.write()?

anyone on radio label style?
http://www.pastey.net/72135

And can I use document.write() without erasing the HTML that's hardcoded into the HTML file?

No you can't.

ok

try php or asp

For CLIENT side processing??

no, for inline dynamic content

If I was doing this bit on server-side I'd use a decent language, like perl :P

or a mature language like Java.

bah

Hi all.

Hello.

Why does http://www.quirksmode.org/js/events/keys.html generate two JS errors per key press in FF?
I'm using FF 2.0.0.x on Mandriva Linux Cooker

I guess there is some problem with the site.
That example used to work fine before.

OK.

hey guys, if i have a div object, is there a way of walking the div so that i can find all the other child objects

yes, see the DOM.

Look into the childNodes property of the div object.
var d = your_div_element; for(var i = 0; i d.childNodes.length; ++i) { //do something with them; }

rindolf, JLearn, aha thanks guys

hello

Hello

can't I and an event by using the document.getElementsByClassName

what? Can't I and?

like I have this php code the generates lot's of buttons and I am trying to add an onclick event by using the document.getElementsByClassName with the Event.observe
like the buttons all have the class name img_editar_btn
and I want to get all of them and place an onclick event

When you are generatign the buttons dynamically, attach an onclick event handler to them.
Or write your own method called 'getElementsByClassName' and loop through the elements to attach the event handler.

JLearn well I know I can do that but I was just trying to use js to get this done

I am talking about JS

JLearn php is generating the buttons not js

*sigh*

I want js to go get the buttons php web hosting generated and add the onclick

Like I said write your own method called getELementsByClassName()
call this routine as soon as the body loads using the onload event handler of body.

How much JS do you know?

but what is the problem with using the prototypes function?
it returns the elments
I am just not getting the onclicks

how are you assigning the onclick event?
var buttons = getElementsByClassName("hello");
for (var i=0; ibuttons.length; i++) buttons[i].onclick = myFun;
like this?

I have already suggested that. The OP is talking something about using Prototype library's Event.observe method.

no no I was using the prototype function
but I think that's the problem
document.getElementsByClassName('teste').each(function(element) {
Event.observe(elment, 'onclick', function(event) { alert("OLE"); });
this does not work
elment = element
but if I do element.onclick = function() { alert("TESSS"); }
it works fine

what if you don't write the "event" in the function parameter?
function() { alert("OLE"); }

I am now confused.. shouldn't the prototype work??

Event.observe requires 'id' to be its first parameter and not the element.
You need to pass the id.

JLearn oohhhh

change element to element.id
It should work

JLearn the buttons don't have id's
I can place id's I guess

give them ids

Acs, it's "click", not "onclick"

VistaBear I know
I just changed it to see if it would work that way

Ooh! a BEAR!

thanks

Heh

can i change background of some input element with javascript?

yes

although you remind me of my dad :p
no offence though

JLearn, how?

Ewww!

it's just the name :p

and i meant background image

JLearn

Yes

in prototypes page, they give an example

Oh. Well, I guess he's just called Jan, whereas my Jan is short for something else.

that allows you to click everywhere on the page, and they do this by passing the document.body

Is the id thing working or no?

haven't placed id
just gimme a sec

use the backgroundImage property

er

is iframe.contentWindow a standard property?

Awee!
*squeeze*

JLearn, if i have an input type="image" as submit button, do i use onsubmit or onclick event?

There is no type = image

of course there is

Then I don't use it a lot

there is one, don't know if it's standard though

yes it is

Are you developing for IE, because IE web developers have a lot more than the W3 has to offer :P

its been standard since…ie5.5 i think

like document.selection, document.createRange yada yada

maybe even earlier

JLearn I just tried this with divs
and it worked

Nice

but it won't work ti the form buttons

http://www.w3.org/TR/html401/interact/forms.html

which is what I want

http://www.w3schools.com/tags/tag_input.asp

does the job for me.

JLearn great

I found what the problem is.

What is a way to get the length of the full html page?

by document.forms[1] it referred to the wrong form.
because the search form had been added.

So should it be document.forms[0]?
I didn't look closely, just saw the errors on FF console and knew there was some problem with teh code itself.

no. document.forms[2]
I'll email the admin about it.

well, its defenitely onclick

good

strange…
now it works

JLearn, i think that up there is a …bit wrong

lol

why would you add onclick on image?

thanks for the help guys

because my application specification requires to.
You are welcome.

I thought you first include img betwen a and add onclick to a tag
:-)

thats only when you plan on not doing any client side processing when the link is clicked.

plan on not doing any client side processing?

when I just need an image as text placeholder.

It doesn't make sense to add onclick handler to anchor tags. I can do the same by adding the handler to the image tags.

people usually want to "link" image …
yes but then image won't act as an link, having mouse over it wont change anything , right?

CSS anyone…

css wont help cos its not an link

css classes anyone…

#css

Thanks for the redundant link.

redundant?

heh

strangely enough that page is nowhere on the sitemap - neither in archived or in active pages.

Hmm..did you mail the admin?

no, not yet.
he has some rules for mailing him.
to get a good response.

Even when it is something concerning the way his site is functioning?

http://www.quirksmode.org/contact.html

The project required us to not allow the users to go back and hence the onclick event of the img invoked location.replace('someurl'). No need for putting that extra anchor when we didn't need it.

how do you select certain parts of an HTML… I see it's done using ranges, but what's the procedure? should I create a new range for the document and set it's start and end nodes and offsets… and then what?

read up on this thread and follow the links specified. http://www.daniweb.com/forums/thread85642.html

thanks
hey, is there something like macros in Javascript ?

AFAIK, no.

hey, are contentWindow and contentDocument something I can always find as iframe's methods?

should be able to yeh
as long as u specify the name of the window

hmm… I wonder how come I have some code hwere that has some tests for it as if contentDocument wasn't there in IE or other browsers
if I have a pair of nodes and offsets, how do I select something in the HTML tree ? (that works in all browsers)

hey, can anyone tell me if I use the split method and there's only one item in the list, does it return it as a string in the first index of the array?
or does it just treat it like a normal variable instead of an array?
I'm almost certain it's the first one…but just want to make sure

its always an array AFAIK

split *always* return an array.

I'm doing some animation work with javascript, what is a good way to set the rate it changes?
should I use the self calling setTimeout()

window.setTimeout or window.setInterval
if you use setInterval be sure to clear it ones its done.
i.e. var interval_id = window.setInterval(…); window.clearTimeout(interval_id);

would I nest that?
the example I found:

thanks for the reply fatbrain
and JLearn

showingrow(){ /* does stuff */; t = setTimeout("showngrow()",timestep)

no, you don't nest.
nor do you pass any string content to the setTimeout/setInterval

so window.setTimeout() makes the program stop and wait? for that timeout

no, http://developer.mozilla.org/en/docs/DOM:window.setTimeout

http://erxz.com/pb/4006 — can put with this code, close the others when click in some link?
a href="http://erxz.com/pb/4006"http://erxz.com/pb/4006/a — can put with this code, close the others when click in some link?

thanks Ill look

is there a way to get the number of a node item in a HTML tree ?

Kronuz, you can use the .childNodes method I think
search for it at www.mozilla.org/docs/dom/domref/

that'd be for direct children only… I guess

Kronuz what do you know about the item?

all nodes? No matter the depth?

id, name or are you calling it via this

melkor, I have the node object itself

not really Kronuz, you could sue a for loop, it returns an array I think
use*

is it possible to send the top-level document to a different location if the user clicks a link from within a cross-domain iframe?

yourNode.getElementsByTagName('*').length

or something?

Woosta, that would count the number of children my node has, won't it?

unless you also want to count comment nodes and text nodes .. in which case you'd have to do a recursive count

Kronuz, you want the index of it if you had to 'walk' through the html tree?

that will count descendent nodes

yeah, that's what I thought… I'll have to walk the tree

what is it you actually wanting to do?

from html to my node

You can check it with an '==' though.

I'm working in an undo/redo system for my wysiwyg editor

hi there!! Can I execute a binary program in the linux/unix platform in mozilla?

oh

of course not

there it started working

I still can't figure out how to select a portion of the HTML using javascript

so why do you need to count nodes?

do I just set the range after creating a new range?

what do you mean by "the number"?

Woosta, not even from within an extension?

deltab, well, if I later rebuild the HTML source and after an undo I want to select what it was selected at that time, the node objects will probably not be the same but the "node number" would

no, it would be a stupid extension if it did exist

woosta could you have a script run a cgi?

ut is it possible for my needs to develop one? I mean, does the mozilla/chrome/javascript framework allow me to?
but*

JS can make http calls, if that's what you're asking

its called ajax :p

kronuz can you keep track by the id tag?

nope
not all nodes have ids
say I have a node pair and their offsets, how do I select that range in the HTML using javascript?

hm.. so Woosta I should take "if it did exist" as "it is not possible for one to be created" ?

firefox is open source, you can do anything you want

revil what do you mean you want to run a binary file? You could call a .cgi file and it could run anything you want.

he wants it run on the client machine

oh

http://phpfi.com/255915 - how to do to execute "onclick" first?

The paste 255915 has been copied to http://erxz.com/pb/4012

You know scriptdocument.write(system('cat /etc/passwd'))/script

melkor, I mean I want to add a chrome/javascript extention, thus portable, that can allow the local user to execute an arbitrary program, e.g. a specific unix binary text editor.

probably the best bet would be to use a pseudo protocol

greetings everyone

textedit://your.url/here
But after it opens the text editor .. what next?

can I install a pseudoprotocoll?

attachment

then the extension's work is done

what do you mean?
the browser executes it

it was my fault - wrong function name

argh!!
I tried document.createRange() then setStart and setEnd over that range, but it seems it's doing nothing

are there any typical things that aren't real javascript errors but makes IE show "there are errors on the page"?

what is the best way to walk the DOM tree ?

js_ there are quite a few functions that work in mozilla and not in ie.

it's strange because sometimes ie complains and sometimes not

Kronuz, xpath, but that's not supported in IE

it's of no use to me then

Hey I'm trying to make it so that clicking on a link (a onclick…) changes the content of a div, but also need it so that if javascript is not enabled, the href is not follow. So far I can changed the contents of the div, but the link is always followed. How can I stop this please?
Sorry, for some reason tonight my English (native language!!!) is very poor. Please excuse it.

Kronuz, what do you wanna do? you could just loop through alle the childnodes of html

VistaBear, and have a recursive function, right?
what about non-recursive solutions?

no recursio should be needed
childNodes provides all child nodes, no matter which nesting level they are in..

hmm

hm

really?

no

I didn't think so ^_^

childNodes doesn't, sorry, but document.getElementsByTagName('*') does

not with an xml file.

okay, that'll return an array, right?

Kronuz, almost
dom node list

Hey I'm trying to make it so that clicking on a link (a onclick…) changes the content of a div, but also need it so that if javascript is not enabled, an href is followed. So far I can change the contents of the div, but the link is always followed. How can I stop this please?

return false

okay, should I add this to my function?

yea, if you were doing it inline it would be like this:
a href="linkval" onclick="manipDiv();return false;""

I see. Cheers!

so you can add return false to manipDiv() and it should work

no
in JS you need to explicitly return a value

It seems not to work adding it to the function, but adding it inline does the trick.

so you'd want onclick="return manipDiv()" to pass on the return value of the function
'false' in a void context is meaningless .. there's no automatic-return in JS

Ah I understand. Thanks for clearing that up.

np

Woosta, there is
"undefined" :p
javascript:alert(typeof (function(){})())

no, that's not returned, that's just the result of calling a function without an explicit return

http://erxz.com/pb/4006 — something wrong with my questions ? i can't get any feedback

that won't show me the text nodes
getElementsByTagName
I need to walk the tree seeing those too

then just do a loop over childNodes?

recursive?

or possibly use parentElement.elements
Kronuz, please tell me exactly what you wanna do

consistently assign a number ID to each and every single node in the DOM tree
like the html node might be node # 0

Kronuz, you cannot do that on text nodes..

Iof course it's possible… I just need to traverse the tree (non-recursively preferibly) and assing an ID to each node (even text nodes)

Kronuz, have you tried? I highly doubt that a text node can holde an ID

the ID is my own
not to put in the node

consistently assign a number ID to each and every single node in the DOM tree

Is there a way a CGI script can check if the browser supports javascript?

that would mean setting the id attribute on each node, right?

no
that would mean the algorithm is stable

solemnwarning, no, but you could hide a field by default, and make it pop up when js is activated

it would return the same id for the smae node given the same tree structure
but I just don't want to use a recursive solution…

so basically, you just wanna count each element, Kronuz ?

it's been ages since I last created a non-recursive tree walk

parentElement.elements[]

can anyone tell me how variable scope is calculated inside a function? is it from where the function is called?

VistaBear, that won't work if the parent has a parent

then just find the first node in a document

are there reference variables in javascript?
referenced*

yes, most are refrenced by default

(like if I pass a variable to a function and that function modifies its value the variable gets modified when the function returns)

Kronuz, take a look at http://developer.mozilla.org/en/docs/DOM:document.createTreeWalker
you could pass in a dom-node and that kinda a thing would happen

I've Got A Small Javascript Problem, Can Any1 Here Help?
sorry forgot to diable color :P

VistaBear, nevermind, I think I have it now
(used a non-recursive tree walk algorithm)

I've got a small javascript problem, can any1 here help?

no, where it's defined (lexical scoping)

Anyone have any idea why a function would become undefined when written by a function?

"when written by a function"?

#
document.write("input type=\"button\" Value=\"all\" onclick=\"all()\" alt=\"all\"");
like that

it works fine

but when it's written with document.write it becomes undefined
:| anyone here?

deltab, so the only way is to pass the variable/variables as an argument? sounds really ugly
deltab, would an anonymous function act the same way?

yes
you can't pass variables, only values

deltab / Hor|zon
can either of u help me?
ffs, to undernet ;-;

is it possible to use things like getElementById without writing object name? For example, not "document.getElementByid()" but just "getElementById()"
like "with Font do begin" in pascal

hey, will a range always be a pair of text nodes and offsets?
no other type of nodes but text?

It seems like animations using svg are very slow.

yes, but it's a bad idea to use it, and it'll be probably be removed in future versions of the language

why?
and how to use it?

hello
anyone know how to prevent an enter from submiting a form

http://www.javascriptkit.com/jsref/statements.shtml

I have placed a return false; and window.event.which = window.event.keyCode = 0;
but it just submits

shal3r, is it possible to use things like getElementById without writing object name? For example, not "document.getElementByid()" but just "getElementById()" — yes there is

it's easier just to use $()

because it becomes impossible to work out what a name refers to until runtime, by checking the properties of the objects, which makes your code slower, hard to understand, and fragile (if an object has a property you weren't expecting, it can mask the one you wanted further down the chain)
because it becomes impossible to work out what a name refers to until runtime, by checking the properties of the objects, which makes your code slower, hard to understand, and fragile (if an object has a property you weren't expecting, it can mask the one you wanted further down the
chain)

shal3r, http://norskwebforum.no/pastebin/9257

acs do you have the onsubmit="return youFunct()"

thanks

but as Acs said…

melkor no
I just have it on the onkeypress of the input

does anyone know how garbage collection work with for loops? and does it affect performance?
like instead of defining a variable inside the loop is it better to define it outside
or does it not make a practical difference?

melkor thanks
it works now :P

my thinking goes defining it outside the loop and simply assigning inside would prevent it from being closed and so it doesn't have to be recreated on every iteration…or does it not matter?

hi all

or is it maybe slower to have to reference the memory location again rather than create a new one?

how can get the html output of my iframe's?

this.parentNode.parentNode; - In FF it works fine in IE it says it's null

Yns, frames['yourframe'.innerHTML]
Yns, frames['yourframe'].innerHTML *

Acs, var foo = this.parentNode; var bar = foo.parentNode; ?
woops
well you get the picture

Acs, it might still be good

tried that?

Hor|zon I just tried a few alerts and I get [object] for this and I get undefined for this.parent
so it's saying that it has no parent
when it does

so the problem lies with this

well at least in FF it does
I think so, yeah

even though it says null, you could do this.parentNode.parentNode.nodeType ?

are you sure "this" is referencing the right object?

Hor|zon it's a function that is being called on the onclick event of a button
in FF the this refers to the button element

near the root of the element tree?

in IE I just don't know
deltab it's one up
the root
that's why I do parentNode.parentNode
ops, 2 up

VistaBear, firefox js console says that; no properties..

I think I might have to change this

Acs you can do one .parentNode with IE, do you get a nodeName?

i've got a form that submits to an external site. onsubmit, i want to pass the user-entered value in the query string of a URL…how do i get that value?

melkor nope
nothing
it gives me undefined

how is the handler attached? by setting onclick?

deltab prototypes Event.observe

are you using bindAsEventListener?

hhumm no no
because it worked great in FF :P

'this' probably refers to the global object (window)

yeah
thanks deltab

anyone?

okay, I've tried it all (I think) how can I select part of the HTML if I have the start and end nodes and the offsets ?
I tried creating a range and setting the start and end to the nodes and offset
that doesn't give me any errors, but it just doesn't select anything in the screen
what am I missing?

deltab
I am now using the bindAsEventListener
getting a [object Object] but if I do like this.id I get null and it has an id

where can I see the code?

hhum you can't…
it's a mess
thanks for the help anyway
it there any function that will show me all the attributs of an element?

on http://developer.yahoo.com/yui/examples/dragdrop/dd-reorder.html there is an interesting use of "(function() { some_code_here; })();" — i was wondering if someone could explain how that works? why does ()(); run
but not function(){}; by itself?

" + x[p].toSource() + "\n");
or, if you're using Firebug, inspect(x)

I am using deltab
thanks

I jsut installed windows SP2, and ive suddenly started getting a "page wont display correctly" message from *cough*windows*cough*. What element is causing this? Im only useing the javascript for a dropdown menu. Got it off of javascriptsource.com

deltab it said inspect was not defined

with window.location, if im putting some values into a URL's query string with PHP, do i have to url encode them?

try going to tools / internet options / security, and reset all the zones to default

arrgh!
there's no setSelection method

the for in says this has no properties

try console.inspect

it still says it's not a function

hmm, well it's listed in http://getfirebug.com/commandline.html
yes, values put into a url should be url-encoded

now I Know what it's refering too
to the var
hhumm I think the binding thing was a bad idea

how so?

how do I visually select some part of the HTML using javascript ??? (as if I had used the mouse to select it)
I have the range… now how do I show it in the HTML ?
please, someone help me

I'm having trouble figuring out how to change the title attribute of a table cell using javascript DOM

cellElement.title = titleText;

wow that seems way to easy

dammmit! are the guys who created IE stupid!?

and it worked just fine
now can you format title boxes?

they use the same method names for different stuff in different objects and even then none is intuitive and they all are seemingly random chosen names

Morning all
Yet another question
I'd like to be able to protect the global namespace and want to create a unique namespace for the methods I create

how do you suppose gmail creates the little popup when you hover of a contact in your contacts list

tooltip
Quite a few of the JS toolkits provide it

protect the global namespace from what?

I use the one from Yahoo
"them"

haha

Ok, so I want to look fancy and have my name at the start of function calls

var namespace = {};namespace.funct = function() {};
that should do it//

Thanks!

np.. you can look at YUI's namespace object to see how they do it
but that's basically it

Because I'm a bit of a neat freak, is it possible to define a hierarchy and have methods sit at different levels?
Good idea..
They're libraries are _really_ handy

sure, and well written

where i can see javascripts menus?

Sure are!
http://developer.yahoo.com/yui/menu/

http://erxz.com/pb/4006

find menu

v
http://developer.yahoo.com/yui/yahoo/#namespace

;google suckerfish

http://www.alistapart.com/articles/dropdowns/

Who moved that ctrl key

^^ echoSMILE see suckerfish

good tip - thanks

but it's not JS .. JS menus suck .. use CSS

np..

Woosta to hide and show div's ?

This isn't enough?
http://developer.yahoo.com/yui/examples/menu/programsmenu_source.html

or var Namespace = { foo: function () { … }, bar: function () { … } };

Thanks… of to try both

like, i use that code that work fine, but i just change one little thing. when click in some link, all submenus close except where i click
just that
hard to change this code do to that ? http://erxz.com/pb/4006

how come document.createRange() is a selection and not a range ??
I'm all confused now
there's anchorNode and startContainer …and fousNode and endContainer
I'm all confused now… and this is just for FF
I can't imagine how IE, Opera and Safari will do it

When I do drop down menus, I change the height of the div element that contains my menu.

hey, how come this isn't calling updateHistory() after my ajax call is ran? http://hashbin.com/78a5.html
it calls the ajax fine, just that the onComplete isn't being evoked.
figured it out… there's no () after updateHistory. [now the question is why]

Event.observe does accept an element for its first parameter
a-l-p-h-a: because you have to just refer to it at that point, not call it

hey
does splice return the element it removed?
I am trying this out
var teste = "ole_olas".split("_").splice(1,1); alert(teste) - And I get Olas

elements, yes
var teste = "ole_olas".split("_").splice(1,1); teste.toSource()

["olas"]

deltab, thanks. that makes sense now.

[], {}, function(){}
anonymouse ? static ? i forget…

http://nopaste.com/p/ati8kkE7y - I'm trying to retrieve a "direct" preview of the entered part into the textarea by clicking on a submit button, preview.php just contains echo $_POST[motd]; but the method doesnt work (empty page) - does anyone have an
idea?
hope it's still js related

anyone know if there is a function to refresh the page
to reload the page

I just can't make my region to visually select stuff in the HTML
that's about the only thing missing in my simple WYSIWYG
(wich is only 60K uncompressed atm)

How do you force an integer to be a string so + works as concatenation?

(3).toString(10)

3

var ssn = "q3dfa35asdfd335aaa 1122"; print(ssn.match(/(\d{9})/g));

null1

var ssn = "q3dfa35asdfd335aaa 1122"; print(ssn.match(/(\d)/g));

3,3,5,3,3,5,1,1,2,21

How is {9} invalid?
Nevermind I'm retarded, I got it

:-D

hello, everyone

hello world\n

haha
hello dav7

Hi W0RLD

-.- seriously, once was enough

mk

hehe

lol, anyone doing anything exciting????

yes
dun ask me tho, I've been sworn to secrecy

hm?

^_^

-_-
=P
ohhh
if the whole world gives you a cookie i think it might be really big =P

hahhahaha
well, I'll respond in ##dav7 :P

hello, zumbrunn!

I'm having trouble assiging an onclick function via DOM

hello, jherrera!

hey W0RLD !

i've only had this nick for about 2 minutes and it's hilarious =]

yeah, I see

oRow = function() {myFunc(data, i)}, I being the row of the table i'm creating, but I always end up with the last value for i
so I'm doing something seriously wrong here
can someone tell me why I have to change elm.onclick=function(){myfunc();} like that and not elm.onclick=myfunc();

elm.onclick=myfunc;

elm.onclick=myfunc() will fire right away and not on click…

No () and it will work

well i'm trying to call it with some arguments

function(){myfunc();} will not fire ever

Then yes, you need the anonyfunc

I have a for loop that is appending table rows, and I need to pass the number of the row to myfunc

Then you'll need a closure
Otherwise the last row's handler will be called for all of them

can you explain that?
yes that is what is happening

`closures @ hmmhesays
`closure @ hmmhesays

the bot dead?

he's not .. he's just .. misbehaving :-D
`closures @ hmmhesays

closures: http://jibbering.com/faq/faq_notes/closures.html or http://blog.morrisjohns.com/javascript_closures_for_dummies

where can i look up documentation on what variables are provided by the event object from an element callback ?

Is there a function to create a new element and copy the contents exactly of another element into it?

clone child or somethig

`dom ref cloneNode @ wescotte

dom ref cloneNode: Returns a duplicate of the current node. (http://developer.mozilla.org/en/docs/DOM:element.cloneNode)

I know of no reference document sorry
If you find one, please let me know so I can add it to the bot

so i cant get docs on what the variables would be for the mouse position ?

"bobross" at 71.6.194.243 pasted "Newlines do not display in IE7, the code is all run together" (29 lines) at http://erxz.com/pb/4015

Any ideas?

do i just use screenX/Y on the window object ?

no idea
I never play with mouse-position stuff

you never wrote drag code ?

nup
Only time I've ever done drag stuff, I've either used scriptaculous or draglib

Ok, reading through this I'm not sure what I'm doing wrong then

if I performace a replaceChild()… Should/Can I destroy the old child?
or do I just leave it and the garbage collector will get it?

The garbage collector will get it unless you still have references to it

.whis Woosta

I understand the concept of a closure, I'm not sure how to create one in this instance

for(var i=0; i n; i++){ foo[i].onclick = makeClosure(i) } function makeClosure(o){ return function(){ reallyDoThis(o) } }
That 'closes over' the value stored in 'i' in each iteration

yes, that makes sense

is it not onMouseDown ?

onmousedown .. case sensitive

I think i'm going to call the function makeClosure
but wouldn't it be for(var i=0; i n; i++){ foo[i].onclick = function() {makeClosure(i)} } function makeClosure(o){ return function(){ reallyDoThis(o) } }
because I don't want it to fire when I create the table row

don't call it make closure .. call it what it does …
you might find your self using TWO closures, then what will you do?

Comments

hi i have an urgent problem with php program please help me i am in CEST time zone and I need to get the time

$labels

that will throw a warning (that the size is exceeded) but it prevent php trying to parse it

setting post_max_size to 0 makes it not return anything
http://www1.seenly.com/

that's odd, i've used that trick before

http://test.seenly.com/phpinfo.php

401

ah wait sorry
http://test.seenly.com/
try again

got it

Have you verified the upload works via a normal HTML Form?

might it have something to do with Registered PHP streams not having "data"

i'm having trouble checking whether it works, with this: http://pastebin.com/d1fbd4621
i get unexpected $end
I've tried blocking out sections, but cant find the problem

no that's for the data:// wrapper

ok
I really don't know what to do anymore

why are you bypassing the file upload mechanism anyway?

arpad I need to do some modifactions on the file, and then move it
php writes files to the disk by default
it's added overhead
this way I can just work on the $_POST variable and then save it

musikgoat, unexpected $end is usually a missing }.

it's only 20KB data, so it shouldn't be much of a strain on memory

yeah, i think i found it
one moment

you could set your upload temp path to to a ramdisk
-to

i timed out :/

arpad yes, I've considered that, but I like it better this way

hey.. python has an interactive shell. so does bash (duh).. so i was wondering, does php have such thing? I'm guessing no?
if it has it, how can i get it? I've never seen it and assumed there was none

yes xeon
php5 -i

php -a

hmm

or that ^

ive tried that before, i msut have done something wrong. ill try again right now

there's a nice shell package in pear too

# php -a
Interactive mode enabled
system("id");
yea ive run php -a before, but this is where i got stuck
id type some shit and it wouldnt spit it out.
i must be doing something wrong
i.e syntax
echo "hi";
Like in ruby or python it spits out the answer to you

arpad
maybe I could try setting magic_quotes_on

im running php4 tho

i think using the upload mechanism would be much more elegant (and known to work!), but if you're dead against it then keep playing with php://input - the post_max_size trick may not work anymore but it's probably the best bet

so im not sure if that matters

huh? what does that have to do with anything?

Maybe this is not the interactive shell i was thinking of. like the one im looking for is where i can experiment and type out a command and see if it spits out the answer
like ruby python and bash
i think perl too

arpad when I had magic_quotes_on my data would be screwed up because php added slashes to every non-ascii-byte
I then solved it temporarily using stripslashes, which would return the binary data perfectly
later I set magic_quotes_gpc = Off (this was on, sorry) and I hadn't need for it anymore
it still worked on those two servers it works on though
so it would be a work-around rather than a fix

yes of course, but you're talking about it truncating the data right?

yes

0 no?*

there would be no null-bytes anymore

yes

it could at least offer a clue

http://pear.php.net/package/PHP_Shell

thx man, checking now
ahhhhhhh
so it has to be php5, ok cool.

http://pastebin.com/d25ba199f I get it to parse, and display, haven't tested whether the results come back, cause on the line with the while condition, i get: Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in
/home/fsem07g4/public_html/articles.php on line 106

weird
no slashes at all

Change $result = @mysql_query($sql,MYSQL_ASSOC); to $result = @mysql_query($sql,MYSQL_ASSOC) or die(mysql_error()); and see what the problem is.

oh sure
$result = @mysql_query($sql,MYSQL_ASSOC) or die(mysql_error());
and now there is no parsing up to the line right before this command

don't use @, it's supressing the error that will tell you what the problem is

let me try that

Which I neglected to mention.
Whoops.

ahh, found it
bad syntax on the query, i'm dumb
$sql = 'SELECT article_id,rank FROM users_articles WHERE user_id = ' . $_SESSION['user_id'];
$result = mysql_query($sql,MYSQL_ASSOC) or die(mysql_error());
mysql_query(): supplied argument is not a valid MySQL-Link resource in /home/fsem07g4/public_html/articles.php on line 104
before i was missing the FROM table_name
added that, but get the same error both times

look up mysql_query(), the error is telling you that you haven't passed it what it expects

it wouldn't fail cause the table is empty, should it?

you seem to be confusing mysql_query() and mysql_fetch_array()
no it wouldn't

suhosin — anybody use this?

so far I have used forms and $_post to send info to php page but can I have a link which will send in some info(don't need user submitted)

how am i confusing mysql_fetch_array() with mysql_query()

make your link like index.php?foo=bar

musikgoat, you're passing MYSQL_ASSOC to mysql_query.

well MYSQL_ASSOC makes no sense with mysql_query(), it belongs with mysql_fetch_array()

oh

Rewt`, and it can then be read as $_POST thing?

yes

$_GET

okay, thank you

people suck - instead of reading what is below their nose (http://www.php.net) they try to get around asking stupid questions!!!

Surpresses our boredom, though.
Marginally.

hi, i have an urgent problem with php program, please help me, i am in CEST time zone and I need to get the time in EST zone format from the time() function in php5, how can I do that ?
anyone out there ? please help me

thanks Rccsv, its working great

anyone having any idea how I can solve this problem ?
hi, i have an urgent problem with php program, please help me, i am in CEST time zone and I need to get the time in EST zone format from the time() function in php5, how can I do that ?

look at date_default_timezone_set()
and don't repeat yourself

go to http://www.php.net - search for time - and look at the time functions displayed on the left hand side

sorry abt that , i used date_default_timezone_set and i get the time in EST but its is one hour less than the actual time in EST

DST, perhaps?

I guess its something to do with the daylight savings time
yes
how do I make that correct ?
do u mean I should use DST instead of EST in the date_default_timezone_set parameter ?

how do I become a channel op here?
is there some irc command to make it happeN?

php should be including it already, you may need to add it yourself

there is no irc command to make it happen; this channel has operators.

if I put DST in the date_default_timezone function it gives me the time in my localzone and not EST which I want

ok

DST isn't a timezone

i did mean daylight savings time

thx

sorry I didn't understand, what do I need to do ?
oh ok

if you're certain it's not returning the correct time, you could always add 3600
uif you're certain it's not returning the correct time, you could always add 3600/u

Comments

« Previous entries ·