PetitionMX

All updates to the site will be posted here.

Moderator: CricketMX Forum Moderators

Post Reply
User avatar
battye
Site Admin
Site Admin
Posts: 14391
Joined: Sun Jan 11, 2004 8:26 am
Location: Australia
Contact:

This is a neat little program I made last night, it is a "database-less" system which can be used to create online petitions.

If you have a website which uses PHP (nothing else required!) then all you need to do is upload one PHP file, and one TXT file (What the data is stored in) and create your petition topic, and you're away! :)

So, if you are aware of anyone wishing to make a petition online, or if you wish to make one yourself, look no further than: PetitionMX

http://www.cricketmx.com/petitionmx/

Note: This is not the big secret from Don't Miss Out!
CricketMX.com in 2022: Still the home of bat's, rat's and other farmyard animals!

"OK, life [as you chose to define it] repeats until there are no more lessons to be learned." - nrnoble (June 12, 2005)
"the new forum looks awesome, it's getting bigger & better" - p2p-sharing-rules (11 Jan, 2008)
"Looks like CMX is not only getting bigger...but, also getting better!!" - moongirl (14 Dec, 2007)
hockeyjock686
Music Man
Music Man
Posts: 2163
Joined: Sat Mar 13, 2004 8:55 am

haha great idea...now we can get whatever we want
User avatar
moongirl
Moderator
Moderator
Posts: 19016
Joined: Mon Jan 12, 2004 8:07 am

Battye, well done!!
So, what is to be the subject of our first petition? :wink:
Image
That's not the man in the moon...that's me ;)
hockeyjock686
Music Man
Music Man
Posts: 2163
Joined: Sat Mar 13, 2004 8:55 am

lets get...dream theatre to play in our houses
User avatar
moongirl
Moderator
Moderator
Posts: 19016
Joined: Mon Jan 12, 2004 8:07 am

Well, only if they will answer questions about Nicholas and Victoria :wink:
Image
That's not the man in the moon...that's me ;)
hockeyjock686
Music Man
Music Man
Posts: 2163
Joined: Sat Mar 13, 2004 8:55 am

seriously, if they don't i'll kill them
User avatar
nesman
Miracle Worker
Miracle Worker
Posts: 1453
Joined: Thu Jan 15, 2004 8:17 am
Contact:

I'm just posting here to help me find this again later when I'm searchnig for guestbook or guest book. I hope I remember that it's actually called PetitionMX, as that'll be a lot easier to dig for in the results. :)

Btw, thanks, Battye.
User avatar
nesman
Miracle Worker
Miracle Worker
Posts: 1453
Joined: Thu Jan 15, 2004 8:17 am
Contact:

I've been messing with PetitionMX ( http://nesman.afraid.org/pmx ), and I found some entries in my apache error logs. I don't know if it's something in the script, or if I've messed up my apache/php.

Code: Select all

[Wed Nov 16 04:30:35 2005] [error] PHP Notice:  Undefined index:  mode in /var/www/htdocs/pmx/petition.php on line 2
[Wed Nov 16 04:30:35 2005] [error] PHP Notice:  Undefined index:  mode in /var/www/htdocs/pmx/petition.php on line 38
[Wed Nov 16 04:30:35 2005] [error] PHP Notice:  Undefined index:  mode in /var/www/htdocs/pmx/petition.php on line 66
[Wed Nov 16 04:31:10 2005] [error] PHP Notice:  Undefined index:  action in /var/www/htdocs/pmx/petition.php on line 70
The first 3 are from launching the petition.php, and the last one comes when you add a sig.

Any ideas?

Most likely it's something on my side, as it took me a few days to figure out how to enable php in the first place. I could run php from a command prompt, but if I hit it from the web, apache treated it like text. internal.html was the output of running the script from the prompt.
User avatar
battye
Site Admin
Site Admin
Posts: 14391
Joined: Sun Jan 11, 2004 8:26 am
Location: Australia
Contact:

Firstly, is it even working (PetitionMX)?
What version of PHP do you run?
CricketMX.com in 2022: Still the home of bat's, rat's and other farmyard animals!

"OK, life [as you chose to define it] repeats until there are no more lessons to be learned." - nrnoble (June 12, 2005)
"the new forum looks awesome, it's getting bigger & better" - p2p-sharing-rules (11 Jan, 2008)
"Looks like CMX is not only getting bigger...but, also getting better!!" - moongirl (14 Dec, 2007)
User avatar
nesman
Miracle Worker
Miracle Worker
Posts: 1453
Joined: Thu Jan 15, 2004 8:17 am
Contact:

It is running nicely (see link from above). That's the funny part. From the updater's perspective, everything is perfect.

As far as I can tell, I'm running PHP version 4.3.10 (it came with Slackware)

I've moved a copy of phpinfo.php into the pmx directory. I also put a copy of petition.php as source.txt to make it easier for me to look it over.

I don't know enough php yet to know if 'mode' and 'action' are being used as variables or if they are functions/commands in php.

And, like I said, I'm so new with apache that I really don't know if I've got anything set up right. You wouldn't believe the troubles I ran into trying to get a cgi upload working in my /upload dir. You can check it out by telling it yesIdo and letmein when it prompts. Putting that together taught me about .htaccess files and why ftp ascii mode is important when moving text-cgi files. :)


Edit: There's now a log.php in the pmx folder. I got tired of typing the command to display the error log, so I found a php script that'll display it for me. I tried to make one up, but I wasn't quite doing it correctly.
User avatar
battye
Site Admin
Site Admin
Posts: 14391
Joined: Sun Jan 11, 2004 8:26 am
Location: Australia
Contact:

Looks like it doesn't like $HTTP_GET_VARS

Both mode and action are part of the $HTTP_GET_VARS array.

I'll explain it a bit. Look in your browser, and you will see: /viewtopic.php?p=53374#53374 (if you click the last post link that is :wink: Otherwise it will be t=xxxx).

$HTTP_GET_VARS['p'] = 53374#53374 :)

So PHP is having problems handing both $HTTP_GET_VARS['mode'] and $HTTP_GET_VARS['action'] it would seem.

The reason, I don't quite know :lol:

As far is I can see, your installation works perfectly though, which makes it even stranger.
CricketMX.com in 2022: Still the home of bat's, rat's and other farmyard animals!

"OK, life [as you chose to define it] repeats until there are no more lessons to be learned." - nrnoble (June 12, 2005)
"the new forum looks awesome, it's getting bigger & better" - p2p-sharing-rules (11 Jan, 2008)
"Looks like CMX is not only getting bigger...but, also getting better!!" - moongirl (14 Dec, 2007)
User avatar
nesman
Miracle Worker
Miracle Worker
Posts: 1453
Joined: Thu Jan 15, 2004 8:17 am
Contact:

I'll try it on another server and see what happens. Then I'll try to compare settings and see what happens.
User avatar
nesman
Miracle Worker
Miracle Worker
Posts: 1453
Joined: Thu Jan 15, 2004 8:17 am
Contact:

I've been messing with it on a server at work, and I didn't get the errors at all. Then I remembered helping a customer adjust their error logging and display for some php, and found some code to put in a .htaccess file. When I turn the error logging all the way up, it shows them. I guess I should find where my error logging is configured at home and tweak the level a bit.

Maybe you can add full logging or even notice (1024) to yours for a bit to see if you get the same? At first, when the script worked, and only I got the error, I figured this problem rated about a 0.4 out of 10. Now that it just looks like a 'notice' and not an 'error' I think It's moved to a 0.04 out of 10. :)

This is where I found the info. http://webhelp.ucs.ed.ac.uk/services/php/
User avatar
battye
Site Admin
Site Admin
Posts: 14391
Joined: Sun Jan 11, 2004 8:26 am
Location: Australia
Contact:

I doubt it makes a difference, but you said you used 4.3.10. The latest is 4.3.11 (which is what I use).
CricketMX.com in 2022: Still the home of bat's, rat's and other farmyard animals!

"OK, life [as you chose to define it] repeats until there are no more lessons to be learned." - nrnoble (June 12, 2005)
"the new forum looks awesome, it's getting bigger & better" - p2p-sharing-rules (11 Jan, 2008)
"Looks like CMX is not only getting bigger...but, also getting better!!" - moongirl (14 Dec, 2007)
User avatar
nesman
Miracle Worker
Miracle Worker
Posts: 1453
Joined: Thu Jan 15, 2004 8:17 am
Contact:

Yeah. I don't think it matters either. I was using 4.3.11 at work. I think it only depends on the level of logging. I'm going to mess with it some more later to make sure, but I'm starting to think that it's about as dangerous as not being wc3 compliant. :)
Post Reply