Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About arbitrageur

  • Rank
  1. Hi, Im on ec2 and trying to install both mbstring and php-mysqli extenstion. I can seemingly can install either one, but not both. Works. But once I get mysqld installed, it conflicts with mbstring when installing that later. Any ideas?
  2. I'm on EC2, and for some reason my require to the Facebook PHP SDK is failing. require __DIR__ . '/autoload.php'; use Facebook\FacebookSession; use Facebook\FacebookRedirectLoginHelper; use Facebook\FacebookRequest; use Facebook\FacebookResponse; use Facebook\FacebookSDKException; use Facebook\FacebookRequestException; use Facebook\FacebookAuthorizationException; use Facebook\GraphObject; use Facebook\HttpClients\FacebookCurl; use Facebook\HttpClients\FacebookCurlHttpClient; My guess is somehow it's misconfiguration, with autoload having a fatal error and silently failing. It's working on localhost, however. Any ideas, and where can I view my EC2 PHP error logs? Thanks
  3. I need some guidance in regards to adding Login with Facebook. Is this something which is easily done? Currently, I'm using UserCake: http://usercake.com/ How much testing and QA is necessary for this type of work?
  4. So on a cloud computing platform such as AWS, how would one keep the /html folder in Apache identical? I can FTP into one "instance" and modify code easily enough, but how would I push reversions to multiple servers at once? It seems like such a simple question, but the answer eludes me.
  5. Just add: LIMIT 0,5 To the end of your sql query. You're going to need more logic to deal with multiple pages (handle that with php), and calculate the # of results you want per page.
  6. So, built a classifieds site. The link is something like this: mysite.com/category/subcategory/1234 The category & subcategory don't do anything, they are just for vanity. My question is about the '1234'. The number corresponds to an "id" which is a unique key in my database. When people make a post, I use LAST_INSERT_ID() to get the most recent post and generate the URL. So basically, my urls correspond 100% to database ID's, for better or worse. These go up by 1 with each post. I anticipate some potential numbering issues when I eventually delete posts. Would it be a better idea to generate these unique IDs some other way, or is this acceptable design? Thanks.
  7. Hello, Is it possible to allow '@' and '.' while maintaining the rest of this regex? $email= 'adsfsa@asdf.edu'; $email= preg_replace("/[^A-Za-z0-9]/", " ", $email); echo $email;
  8. Look at this: http://stackoverflow.com/questions/1475297/phps-white-screen-of-death
  9. if(get_images_for_delete($username, $newid, $mysqli) !== FALSE){ // WE are dealing with images $images = get_images_for_delete($username, $newid, $mysqli); $sourceBucket = "***********"; $targetBucket = "***********"; foreach($images as $image){ // copy our object $aws = new s3; $aws = $aws->copyObject($targetBucket, $image, $sourceBucket, $image); // delete our object $aws_delete = new s3; $aws_delete = $aws_delete->deleteObject($image); // copy our (thumbnail) object $aws2 = new s3; $aws2 = $aws2->copyObject($targetBucket, "thumb_".$image, $sourceBucket, "thumb_".$image); // delete our (thumbnail) object $aws_delete2 = new s3; $aws_delete2 = $aws_delete2->deleteObject("thumb_".$image); } Is my code. Do I need to declare so many new s3 classes? All the methods are within the same class. Not sure if this is the correct way to go about it.
  10. I have another thread, but it's on a different question. // remake image if(create_image($fileExt, $_FILES["myfile"]["tmp_name"], $_FILES["myfile"]["tmp_name"], 80) !== FALSE){ // generate thumbnail if(generatethumbs2('.'.$fileExt, $_FILES["myfile"]["tmp_name"], 120, $_FILES["myfile"]["tmp_name"], 85) == TRUE){ $aws = new s3; $aws = $aws->putObject($newFileName, $_FILES["myfile"]["tmp_name"]); image_string($username,$newFileName,$mysqli); } } Is my code. How do I access both the remade image AND the thumbnail? Currently, I can only access the thumbnail. I need to be able to access them concurrently for upload to Amazon s3.
  11. I'm dealing with multiple files fine, BUT: I'm making an thumbnail AND remaking the images. I can't save both the thumbnail & remade image to $_FILES["myfile"]["tmp_name"] Atleast not concurrently. Sequentially, yes.
  12. Any idea how to deal with multiple temp_names? For creation of image thumbnails: if(create_image($fileExt, $_FILES["myfile"]["tmp_name"], $_FILES["myfile"]["tmp_name"], 80) !== FALSE){ // the first function 'create_image' is working, but generate thumbs uses "tmp_name" twice if(generatethumbs($_FILES["myfile"]["tmp_name"], 120, $_FILES["myfile"]["tmp_name"], 85) == TRUE){ $filelocation = $_FILES["myfile"]["tmp_name"]; $aws = new s3; $aws = $aws->putObject($newFileName, $filelocation); image_string($username,$newFileName,$mysqli); } }
  13. HI, I'm using; https://github.com/onassar/PHP-Pagination It works on my local test server, but on EC2, short tags are apparently not enabled by default. The pagination is printing php: <div class="pagination"><ul class="<?php= implode(' ', $classes) ?>"> <li class="<?php= implode(' ', $classes) ?>"><a href="<?php= ($href) ?>"><?php= ($previous) ?></a></li> <li class="number active"><a data-pagenumber="<?php= ($current) ?>" href="#"><?php= ($current) ?></a></li> <li class="number"><a data-pagenumber="<?php= ($current + $x + 1) ?>" href="<?php= ($href) ?>"><?php= ($current + $x + 1) ?></a></li> <li class="number"><a data-pagenumber="<?php= ($current + $x + 1) ?>" href="<?php= ($href) ?>"><?php= ($current + $x + 1) ?></a></li> <li class="<?php= implode(' ', $classes) ?>"><a href="<?php= ($href) ?>"><?php= ($next) ?></a></li> I tried replacing <? with <?php to no avail. Not sure if the fact that one dependency is named "render.inc.php" instead of just ".php" which is causing the issue. Any ideas why apache is doing this? I'd rather not edit the .ini. Thanks..
  14. Thanks. Can I save to the temp directory so I don't have to deal with deleting temp files?
  15. How does one get the absolute filepath of this: On a web-server? Currently I'm feeding my image as a resource into imagejpg. http://php.net/manual/en/function.imagejpeg.php However, I need to get the file-path so I can send them to an S3 bucket. Thanks for any help!
  • Create New...

Important Information

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.