|
epswing posted:Naw it was Charlie Rackoff, CS program at the University of Toronto. I guess it's a common phrase, because it does get the point across rather well. His wiki is both hilarious and awful. Also, greetings fellow Canadian goon
|
# ¿ Apr 6, 2010 05:17 |
|
|
# ¿ May 17, 2024 01:47 |
|
You can try moving the form processor to another file and change your script to link to it. eg. <form method="post" action="check.php"> Your problem right now is that you're checking the form even if nothing has been entered yet.
|
# ¿ Apr 15, 2010 21:55 |
|
How do you guys implement "friendly" error messages? I'm making a browser game and I don't want to put bring users to a new error page and possibly get them killed in the game. I can only think of two options: show the error on the current page or use sessions and output the error on a page where they can still run away from other people. I want to keep away from using sessions though. Acer Pilot fucked around with this message at 12:12 on Apr 20, 2010 |
# ¿ Apr 20, 2010 12:09 |
|
Anybody here have some sort of template system or maybe general alternative to Smarty?
|
# ¿ Apr 24, 2010 11:11 |
|
Lumpy posted:Are you looking for something "lighter" than smarty, or a better MVC framework? Something "lighter."
|
# ¿ Apr 24, 2010 22:51 |
|
MrMoo posted:But what are you looking for that is more than just PHP itself? True, how do you guys do it? I've never tried before.
|
# ¿ Apr 25, 2010 07:17 |
|
Has anyone come up with/found any way to implement a low footprint chat system with PHP? I'm running Apache 2 so probably no Comet. I was thinking of temporarily storing messages in xcache or memcache but not really sure if that's a good way to go.
|
# ¿ May 3, 2010 23:45 |
|
MrMoo posted:Very low footprint, Facebook Live Stream: That's kinda cool, don't know how comfortable people would be displaying their real names in a game though. Know of anything that you can run locally?
|
# ¿ May 4, 2010 04:30 |
|
I'm trying to make sure players only hit with their weapons a percentage of the time (70%, 34%, etc) but it doesn't seem that my functions are very accurate. Attempt 1: code:
code:
|
# ¿ May 6, 2010 04:15 |
|
Begby posted:I have no idea what your functions are supposed to be doing, they seem a bit convoluted with the arrays and all. Thanks, the way I had it was a bit much.
|
# ¿ May 6, 2010 04:58 |
|
Bob Morales posted:Let's pretend we have an imaginary message board. The messages are stored in a table with a thread_id and sub_forum_id. Threads and forums are stored in their own tables. Well, Invision Board has a table just for topics and it stores the total number of posts, threads, the last topic id, and last poster name. Take it as you will. Edit: It's probably best to do it this way since you don't want to scan through all your posts every time someone loads the index. If my Invision forum did that it'd probably eat up all the RAM going through 400,000 poo poo posts.
|
# ¿ May 12, 2010 21:28 |
|
As long as you're not storing credit card information in your database or working for a bank, you should be fine with just salting your hashes. Try and have a different salt for every person though.
|
# ¿ May 17, 2010 01:15 |
|
I don't see anything MySQL related in your code. Did you forget to paste something?
|
# ¿ May 18, 2010 03:18 |
|
Have any of you ever written a "custom application" for Invision Board? I'm trying my hand at it but the documentation isn't as full as I'd hoped.
|
# ¿ Aug 20, 2010 02:14 |
|
Fehler posted:Only for 2.3, and I guess you are using IP.Board 3? Usually their documentation is pretty good though, at least compared to some other stuff I worked with... Yep, IP.Board 3, it seems like quite a bit has changed from version 2 but at least it looks like you don't have to have people edit any files now.
|
# ¿ Aug 20, 2010 23:21 |
|
Would you guys store a bunch of hashed values that expire onto MySQL, onto ram (xcache), or something else? I'm generating a bunch of expiring links for a game every time a player moves and don't know where I should be storing them.
|
# ¿ Sep 1, 2010 01:29 |
|
michael30404 posted:I'm a noob from the geocities days and I'm having trouble getting a site with the codeigniter framework to work properly. The company who made the site for my friend kindof jerked him around. It took legal threats to get them to deliver on the site, so while they claim it's complete who knows. Did you put the actual site in /root or something like /home/username/public_html?
|
# ¿ Jul 29, 2011 01:51 |
|
michael30404 posted:I was sent a zip for the website. Upon opening the zip, there is a public folder and a log folder. I uploaded the contents of the public folder right to root. It contains assets and system folders, as well as index.php and htaccess file. The index file is just instructions for what I'm assuming is the CodeIgniter framework. The folder public>system>application>views> has php files that have actual content for the website. The index file in that directory (like in pretty much every directory) is a 403 message about forbidden access. When trying to access those files ie: domain.com/public/system/applications/views/contact.php I got the same 404 error. What's the directory structure look like for your host? Are you uploading these files through FTP, SFTP, or something else?
|
# ¿ Jul 29, 2011 02:53 |
|
Can you post a link to the website? Or maybe tell us what folders you see when you initially login to the site through FTP.
|
# ¿ Jul 29, 2011 04:12 |
|
You'd need to recompile PHP with the settings you want enabled.
|
# ¿ Aug 1, 2011 23:25 |
|
What's a safe way to detect if a file is an MP3?
|
# ¿ Sep 20, 2011 01:12 |
|
McGlockenshire posted:If you're on a Unix, you can shell out to the "file" command and parse the result. Calling "file -b foo.mp3" should result in something like "Audio file with ID3 version 23.0 tag, MP3 encoding". "file -bi foo.mp3" should result in the MIME type "audio/mpeg" Thanks, that sounds reasonable. This doesn't seem safe: php:<? $file_sanitized = escapeshellarg($file); echo exec("file -bi $file_sanitized"); ?> Biowarfare posted:http://de3.php.net/manual/en/function.finfo-file.php Thanks for this too, next time I recompile PHP I'll consider adding this module. Acer Pilot fucked around with this message at 23:20 on Sep 20, 2011 |
# ¿ Sep 20, 2011 23:11 |
|
McGlockenshire posted:It depends. If you control the filename, then it's totally safe. If the user controls the filename, as long as you've either filtered out non-alphanumerics or are also using escapeshellcmd, then you should be OK. Thanks, this is what I'm using right now. I control the filename but you never know. php:<? $file_sanitized = escapeshellarg($file); $file_type = exec(escapeshellcmd("file -bi $file_sanitized")); ?>
|
# ¿ Sep 22, 2011 01:13 |
|
How much RAM does he have and does he have a my.conf setup?
|
# ¿ Oct 30, 2011 23:22 |
|
You probably shouldn't be using globals...
|
# ¿ Dec 27, 2011 09:20 |
|
Scaramouche posted:Any exploit experts in the house? I'm helping someone else now who keeps getting their personal website 'hacked', but I'm pretty sure it's just some automated script someone is running somewhere. They're on: Did your friend actually clean out or re-image the server after getting hacked? There might still be something on there.
|
# ¿ Jan 23, 2012 01:54 |
|
Optimus Prime Ribs posted:Isn't IPB just as lovely? IPB is pretty great actually. I've been using it for a few years now and it hasn't failed me. The new spam monitoring stuff is pretty handy and the forums, overall, are very sleek.
|
# ¿ Feb 2, 2012 00:45 |
|
e: ignore this. Something else was broken. Acer Pilot fucked around with this message at 07:10 on Mar 23, 2012 |
# ¿ Mar 23, 2012 06:10 |
|
You could have also just used alluvion. http://www.alluvion.org/authdb.txt
|
# ¿ May 18, 2012 00:06 |
|
emoltra posted:I'm using json_decode on a json file that contains both empty values and null values, does anyone know why php would read both of them as null? It's because PHP. Try to see if isset() works for you.
|
# ¿ Jul 29, 2012 23:50 |
|
Never use the mysql_ or mysqli_ functions. They're very old and deprecated. Look into PDO as well: http://php.net/manual/en/book.pdo.php
|
# ¿ Oct 16, 2012 05:02 |
|
How do you guys like PhpStorm? It's on sale for $25 right now. http://www.jetbrains.com/specials/index.jsp Kind of thinking about it but using EditPlus and a VM seem to work fine.
|
# ¿ Dec 21, 2012 00:42 |
|
Flaggy posted:Any reason my website would be throwing these up all of the sudden? It makes no sense since none of the pages have been touched. Are you out of space?
|
# ¿ Feb 12, 2013 21:01 |
|
You should post your code first so we can tell you what's going wrong.
|
# ¿ Mar 7, 2013 09:02 |
|
Is there a go to framework for implementing a rest api? I'm guessing there's something in pear, if that still exists. Been awhile since I've written in php so any help would be appreciated. Thanks
|
# ¿ Aug 7, 2015 05:12 |
|
Not very big, basically an over glorified crud app that just grabs stuff from a MySQL db. Just want to switch the site to use more JavaScript and would be nice to keep php out of the presentation layer.
|
# ¿ Aug 7, 2015 05:28 |
|
|
# ¿ May 17, 2024 01:47 |
|
Don't do it! Use prepared statements/PDO/whatever they call it now.
|
# ¿ Nov 25, 2015 05:22 |