SomeSongs is broken

Ask questions and get answers about how to make music in any particular way. Hardware or songwriting or whatever.
Jefff
Attlee
Posts: 453
Joined: Sun Sep 26, 2004 1:23 pm
Submitting as: PPV
Pronouns: he/him
Location: Denver, CO, US
Contact:

Post by Jefff »

Hey guys. Sorry for my lameness. I'll try to remember to fix this stuff when I get home tonight.
User avatar
Lunkhead
Rosselli
Posts: 8474
Joined: Sat Sep 25, 2004 12:14 pm
Instruments: many
Recording Method: cubase/mac/tascam4x4
Submitting as: Berkeley Social Scene
Pronouns: he/him
Location: Central Oregon
Contact:

Post by Lunkhead »

I don't think there's any lameness to apologize for. Thanks for providing a cool free Web site for years. If you want to open source it, maybe some of the l33t PHP h4x0rs here could help out. I don't know PHP but maybe I could learn. Just out of curiosity, was it some kind of PHP or MySQL upgrade that caused the problems, like JB was saying?
User avatar
fluffy
Eisenhower
Posts: 11201
Joined: Sat Sep 25, 2004 10:56 am
Instruments: sometimes
Recording Method: Logic Pro X
Submitting as: Sockpuppet
Pronouns: she/they
Location: Seattle-ish
Contact:

Post by fluffy »

Jeff, were you relying on register_globals or something? That is a really bad idea from a security standpoint. I'm surprised nobody ever hacked the site, if so, because it opens up a huge pile of easy security exploits.

Dreamhost doesn't allow register_globals either (that's why the gallery and the art submission stuff on Song Fight were broken when the site first moved there... OR SO I AM TOLD).
Jefff
Attlee
Posts: 453
Joined: Sun Sep 26, 2004 1:23 pm
Submitting as: PPV
Pronouns: he/him
Location: Denver, CO, US
Contact:

Post by Jefff »

I've often thought about open-sourcing it, but honestly I'm not proud enough of the code to show it to other people. Also, I still harbor dreams of rewriting the whole thing as a much simpler affair. We'll see if that ever happens. (I would keep the current version around in some form.)

Yes fluffy, register_globals is exactly the problem. And I do understand the security risks. (Now, that is. I didn't when I built it.)
User avatar
fluffy
Eisenhower
Posts: 11201
Joined: Sat Sep 25, 2004 10:56 am
Instruments: sometimes
Recording Method: Logic Pro X
Submitting as: Sockpuppet
Pronouns: she/they
Location: Seattle-ish
Contact:

Post by fluffy »

Well in the meantime there's some silly workarounds you can do to basically emulate register_globals... something like this, as the first thing which happens on each page:

Code: Select all

foreach ($_POST as $key => $val) {
    $$key = $val;
}
A possibly better solution is to just do something like:

Code: Select all

error_reporting(E_ALL);
which will tell you when the app tries to use a variable which doesn't exist (which is, again, just plain good practice, though more for bug-reduction than security).
User avatar
Lunkhead
Rosselli
Posts: 8474
Joined: Sat Sep 25, 2004 12:14 pm
Instruments: many
Recording Method: cubase/mac/tascam4x4
Submitting as: Berkeley Social Scene
Pronouns: he/him
Location: Central Oregon
Contact:

Post by Lunkhead »

I can't seem to add an artist to my favorites:
Notice: Undefined variable: select in /home/somesong/public_html/artist_info.php on line 170

Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/somesong/public_html/artist_info.php on line 172



no such artist.

OKAY

Warning: fopen(logs/2008-01-20.log) [function.fopen]: failed to open stream: No such file or directory in /home/somesong/public_html/library.php on line 170

Warning: fwrite(): supplied argument is not a valid stream resource in /home/somesong/public_html/library.php on line 171

Warning: fclose(): supplied argument is not a valid stream resource in /home/somesong/public_html/library.php on line 172
Hoblit
Roosevelt
Posts: 3709
Joined: Sat Sep 25, 2004 12:48 pm
Pronouns: Dude or GURRRLLLL!
Location: Charlotte, NC ... A big city on its first day at the new job.
Contact:

Post by Hoblit »

What was it I couldn't do... I can't remember right now. Although I got database errors when I replied to a comment on one of my songs. It posted the comment just fine... just returned errors.

dayum, haven't seen Jeff since he was face down on JB's lawn gripping the grass so he wouldn't fall off of the planet.
obscurity
Goldman
Posts: 590
Joined: Sat Sep 25, 2004 10:50 am
Instruments: Keyboards (88-note and qwerty), guitar, bass & edrums.
Recording Method: Pod X3 Live & Yamaha 01X -> Cubase 5 & Komplete 5
Submitting as: soon as I see a title that inspires me.
Location: Nottingham.

Post by obscurity »

Hoblit wrote:dayum, haven't seen Jeff since he was face down on JB's lawn gripping the grass so he wouldn't fall off of the planet.
Perhaps he lost his grip!
obscurity.

"Only the great masters of style ever succeed in being obscure." - Oscar Wilde.
Post Reply