Jump to content
xisto Community

sonesay

Members
  • Content Count

    958
  • Joined

  • Last visited

  • Days Won

    5

Everything posted by sonesay

  1. Yeah I had a error code of 6. I looked at the php.net documentation and found out it was because I was missing a temp location setting in php.ini so I set that and it works. Changed the code a bit but its working now. I just need to find ways to secure and check files being uploaded.
  2. I'm also just trying out file uploads myself. Having some issues though. using the example from php website: http://nz2.php.net/features.file-upload but I'm getting this error with some missing values: Possible file upload attack!Here is some more debugging info:Array( [userfile] => Array ( [name] => 01aa.jpg [type] => [tmp_name] => [error] => 6 [size] => 0 )) any help appreciated ^^ <html> <head> <title></title> </head> <body> <!-- The data encoding type, enctype, MUST be specified as below --> <form enctype="multipart/form-data" action="uploader.php" method="POST"> <!-- MAX_FILE_SIZE must precede the file input field --> <input type="hidden" name="MAX_FILE_SIZE" value="30000" /> <!-- Name of input element determines name in $_FILES array --> Send this file: <input name="userfile" type="file" /> <input type="submit" value="Send File" /> </form> </body> </html> <?php// In PHP versions earlier than 4.1.0, $HTTP_POST_FILES should be used instead// of $_FILES.$uploaddir = $_SERVER['DOCUMENT_ROOT'] . '/uploads/';;$uploadfile = $uploaddir . basename($_FILES['userfile']['name']);echo '<pre>';if (move_uploaded_file($_FILES['userfile']['tmp_name'], $uploadfile)) { echo "File is valid, and was successfully uploaded.\n";} else { echo "Possible file upload attack!\n";}echo 'Here is some more debugging info:';print_r($_FILES);print "</pre>";?>
  3. sonesay

    Best Mvc

    I'm not sure if its the best but try https://akrabat.com/zend-framework-tutorial/. I just finished this tutorial and its not too hard to start. If you have knowledge of MVC architecture from anywhere else and PHP knowledge and OOP then it should be easy. Just download the zend framework and the pdf tutorial from the site and your away .
  4. Nice job for it being so quick to do. I'm not a big fan of peacocks or even that style of art but it does look good from far away. I cannot make any further comments though as its not my area of interest or expertise. Great Job though.Sone
  5. Hey and welcome, Its great you want to build a website for showing pictures of your family but I think its totally unnecessary unless you want it all custom and built by yourself. There iss many sites like facebook that offer you ways to share things with friends and family and make messaging simple.
  6. sonesay

    This Place

    I find it perfectly fine the way it is. Maybe your just not seeing it right like the rest of us. You say you cant post in certain areas. If you actually read the forum descriptions it actually tells you if you can or cannot post there. There is reason for that its to reduce spam so post either need to be approved before being displayed.Your comparing Xisto's free hosting to what other hosting? If you know a better one please share a link.
  7. I need to see the full TheOtherOtherPage.htm code. I understand you might not want to show your add client id or what ever but I need to see how it works fully to be able to try and help you out.
  8. I'm not sure why they would do such a thing. If you can watch it on your monitor why restrict it to being displayed somewhere else? I don't see the point of why you would do this unless I'm missing something here.
  9. Welcome back and congratulation on your new job! asp.net would not be my first choice but its still a job right and one in the web development side. Stick at it and maybe you can show us some projects your working on soon? It will be interesting to see. I worked with asp.net last semester but did not like it. It can be all that bad if you know how to use it properly i suppose. I assume Microsoft's website is made with that?Anyway welcome back and see you around.
  10. # Rewrite rules for Zend FrameworkRewriteEngine onRewriteCond %{REQUEST_FILENAME} !-fRewriteRule .* index.php# Security: Don't allow browsing of directoriesOptions -Indexes# PHP settingsphp_flag magic_quotes_gpc offphp_flag register_globals offphp_flag short_open_tag on I'm using this .htaccess in my 'public' folder as instructed but it hides my public folder for some reason. Does anyone know why? This is what has been instructed to be placed in the 'public' folder and when browsed there it should work but it hides my whole public folder. maybe its something to do with my own apache setting?
  11. Hes not doing it for Blizzard truefusion, Hes just another game freak who wants to setup a website with its own CMS for running their community. Thanks for the info I will see if I can look into some of it. Right now I'm trying to fix my MySQL problem.
  12. As far as I can remember OS X comes with apache but does not come with MySql so I had to download and install MySql from their website (dmg file). This worked fine but as I also installed xampp later which comes with MySQL as well I think it conflicts with the original one installed. Some symptoms of this are: 1. when I start xampp it starts the original mysql install instead of its own. 2. I cannot determine where should I go to configure the xampp mysql users + passwords 3. scripts wont work because i cannot connect to socket or either passwords are wrong or unset. I cant determine what one is being run atm when I start xampp. when I go to the phpMyAdmin it says: phpMyAdmin tried to connect to the MySQL server, and the server rejected the connection. You should check the host, username and password in your configuration and make sure that they correspond to the information given by the administrator of the MySQL server. I would like to remove the original mysql install and go with the xampp version. So far I have not found a method that works does anyone have any ideas?
  13. can you post the full div and JavaScript content so I can have a look at?
  14. I'm getting back into it myself since Uni is over for the summer. One thing I would like to share though is my experience when working with PHP on and off over the past few years and trying to develop my own website where I have my own custom CMS built for my own specific purposes. I was pretty much experimenting and learning as I went along with this project and my goal was pretty high. Probably too high for my own good since I never completed it.At the time I was working on PHP (early 2002-4ish ?) version 4 I believe and it had minimal support for objects back then so the book I had brought and was reading did not even include it in there. I did not really know was OOP was anyway so it didn't matter, I was happy to learn PHP just as it was a procedural language as it was designed as. At the same time I was learning HTML and javaScript as well since I barely knew what web standards/ document types was and what a DOM was. Ah and there was also CSS as well so I had to drop using tables for layouts and learn that as well. All in all it was a slow progress and I would say PHP was my first programming language that I really understand when trying to learn how to program. The syntax was loose enough to allow you to learn and make mistakes as you went along.The Problem:My little project is not so little anymore as I add in more and more features. I've only barely completed the applications/registration section and its taken me so long. Why? because I've tried to integrate Ajax so that I get flashy user controls that enable my users to do what they need. Its going to be a nightmare to modify and update things. I'm looking through the code because I had to update certain parts and it was a pain. Yes I did split up my code into many sections but I think the combination of logic and presentation code that you create in a procedural style PHP file. I'm not trying to say you can't do it that why its just when it comes to larger projects it can be hard to maintain and build. I also found out that my requirements change or I got some aspect of the requirements wrong initially so I will need to make changes there. You may say its my fault initially for not getting the requirements right in the first place but you can never do. Why? because requirements change and you don't have the foresight to see all possible requirements with lack of experience. If you spend all the time initially trying to track down all the requirements you may never get started developing. You have to try and get things right the first time and allow room for changes to be made if necessary or at least make it so its much easier to change.The Solution:Well my idea of the best way to do it so far is using a PHP Framework that supports an MVC architecture. There are a few out there but tutorials are either incomplete or too vague for you to learn much. Back about a year ago when I experimented with the Zend and its MVC I had little idea of what it was but after working with it in Java and using MVC to build our application this previous semester I can see why it helps. The only problem is there's so many broken tutorials out there and my current state of xampp server is dodgy so I dont know if the problem is on my end or not. Documentation is vague. Oh wait I did get a demo of the latest 1.70 that came with it working. Well it works out of the box anyway. Well that is what I will be doing trying to relearn PHP in an OOP and MVC context. I think that's the best way to go if your going to be making large PHP bases sites or applications. If anyone is interested in picking up zend and trying to learn as well we can share what we learn. The community is small atm so it would be nice to learn from others at your level. My friends whos a newbie to PHP is building a CMS for WOW lol. I don't know if he will be able to do it. I tried to warn him about the problems with trying to separate presentation and logic and how messy it can get to maintain but he thinks functions will handle that. I'm not sure how it will exactly since if you don't use MVC you still bundle all the code in one file.
  15. <html><head><script src="jquery-1.2.6.js" type="text/javascript"></script><script type="text/javascript">function loadAds(){ // generate random number (0-1). var iRandom = Math.floor(Math.random()*2); var x; if(iRandom == 0) { x = "Ads1.html div#someAds"; } else if(iRandom == 1) { x = "Ads2.html div#someAds"; } // original loading code. $("#loadData").text("...One Moment Please..."); $("#container").append('<div id="someAds"></div>') .children("#someAds").hide() .load(x, function() { $("#loadData").remove(); $("#someAds").slideDown("slow"); });}</script><title>Load Test</title></head><body onload='setInterval("loadAds()", 1000);'><div id="container"><a href="#" id="loadData">Click This Link To Load The Ads</a></div></body></html> That works but its just using a random number generator so you may end up seeing ad 1 being displayed and then ad 1 again . Also I set the timer to 1000 so you can quickly see it changing. One thing though you said you aren't allowed to use Ajax with Google ads? Well technically I think this would be classed as Ajax because its doing essentially the same thing but using jQuery objects. I can see why this would be considered cheating in some way allowing you to display more ads to visitors then usual. I'd be careful also since retrieving a new ad every 30 seconds may trigger some of their alerts if they have any . Archive.zip
  16. you can define x outside that function. All i did was remove it from there and put it before and it still works. I'm not sure how google add works but are you intending to have only one 'ads.html' file that contains all different divs of different adds and pull each one randomly from there or have them all separated in 1 file like ads1.html ads2.html etc. Either way will depend on how you code it. First off easiest way would be to put the block of code that does the loading into a function and have it called on onload. body onload='setInterval("myFunc()", 30000);' how you go about modifying the code to load what depends on what you want. I think that would work.
  17. I think this may just be a hoax. Come on guys who will live like this? Maybe if we saw some pictures of the actual person living there it would be plausible, Like if the guy was over weight and couldn't move and had to get food delivered to him then yeah maybe. He would just eat, drink and smoke where he laid then toss all the rubbish around him.
  18. No doubt he's the real deal. I been listening to his songs recently the hardest gangster rap ever. His lyrics just totally blow you away leaving you feeling like oh *BLEEP* did he just say that. Even when hes dead his songs live on. The only regret is I never listen to him when I was growing up only now.
  19. I don't why Ajax would not work for reloading content for you in a DIV over a set period of time allocated. Wouldn't it just be a DIV with an ID and some Javascript (Ajax) updating that DIV's content every minute or how ever long you choose or is there something I missed here?
  20. A nice little story but I don't think there is any relation with CSS and OOP except that they both have classes and even then CSS classes are only used in one way. The story you told is something we all face in building web pages that are cross browser compatible and its not in my opinion W3C's fault. They are the ones trying to solve this problem but its companies that build browsers that don't render elements or follow their guidelines like internet explorer. I'm sure we all know how much differently internet explorer chooses to render certain elements.
  21. Thankfully my screen is clearing up. There are minor bright spots and patches here and there but they seem to be disappearing slowly by the day. My power supply burned out though and I think the reason why is the power cord was twisted too much. I had to crack it open and rejoin it since it was so close to the unit. The circuit board on it looks kinda melted but it still works now lol. Saved me 150 nz dollars but its dodgy and I'm afraid it will cause a fire someday.
  22. I'm getting tired of people hating on mac when they don't understand fully why they are priced so high. They can charge what they like because they designed a good product. A regular PC equivalent of speed and capacity would be much cheaper but you don't get OS X. They are packaged in a much smaller Unit and are much more durable. Have you seen some laptops that are just so thick and flimsy compared to a mac? That's what I'm talking about they are cheaper but they are because they aren't built like macs. The idea that macs where purposely designed to be over priced and aimed at people who don't know jack is not true. Can you imagine how stupid a person would look to even try and propose such a marketing strategy? They are made for people who wish to own macs and use the great OS X that comes with it. I wanted a mac because it was different, I was sick of windows but to my surprise it was so stable and ran all my design and coding applications well. I don't get memory leaks like you do in windows I can have my laptop running for days and weeks and never noticed any slow down.If there wasn't Apple there would be another company doing what Apple does. Someones got to cater for people who want quality computers with a nice OS, Hardware and software packaged in a sexy way. You guys make it seem like we only use macs because we want to be different. Its true there may be a few people who think or care so much about the way they look but there's also people who use macs and love them for just that.
  23. No thats just going to be crazy. They don't speak Chinese they speak many other languages like Cantonese or what ever else they have. Plus do those people code in Cantonese? I'm sure they have keyboards in their language but I doubt a lot of applications are written or supported by them. What you guys are trying to suggest is a huge change and it affects a wide range of everyday life not just in communicating but also how we go about doing work. What about numbers do they have their own characters for numbers? They may even count up to 12 or something like the US lol.I'm not saying everyone go learn English. I'm saying if we were to make everyone communicate in one language it would be English for many reasons. But the whole idea of only moving to one language is stupid. What differences we have make us unique so why take that away. People who speak two languages are valuable for that.
  24. It would be really silly in my opinion to try and make another language other then English the main language. Sure there may be more people in other parts of the world speaking some other language but only English is and will always be considered the international language. We have keyboards that are designed for English. We write programs in English. If you try and make another language other then English a main language your taking a step backwards. It would be much easier for other speaking languages to learn English if they would like to do business internationally.
  25. sonesay

    Social Networks

    I've only used facebook for a short time (one month) but I think the problem your having has nothing to do with face book but the friends you initially added. How did you get a 40 year old as a friend you must of added him at some point lol. And the invites your getting for joining in them games I got them too initially from friends but I let them know that it was nice that they invited me to join but I let them know that I probably wouldn't have the time to join in them. They don''t send me those invites anymore so what I'm saying is maybe you should start removing those people you aren't really your friends instead of keeping them around for friend counts.
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.