Jump to content


  • Posts

  • Joined

  • Last visited


Profile Information

  • Gender
    Not Telling
  • Location
    Philadelphia, PA

earmsby's Achievements


Newbie (1/5)



  1. Of course, the minute I wrote the above I found it!
  2. I must be blind, but I have searched the entire thread of a thread I started and would like to mark as solved but I can not find any button, link or otherwise that indicates the ability to mark the thread as solved. Do you have to be at a certain level of expertise? Or does it have to be a thread you started? I'm perplexed! :-\
  3. Doh! I just solved my own problem... since the replacement characters will be run against another table in the same database, the character encoding is not a problem. We are comparing apples to apples. The problem was when I was either using characters from the database compared against characters typed in or characters hard-coded in against words in the database.
  4. Latin1 but I also tried utf to no avail. I may end up just hard coding the substitutions if I can't make it work with the database but I'd still be interested in know how for other situations where I need to work with database encoding and php.
  5. It's been a little while since I posted this question and received the response from thorpe, so my apologies for resurrecting an old thread. The suggestion worked fine as long as I manually supplied the array of substitution characters into the PHP code. However, when I tried to pull the array from a MYSQL database the characters don't seem to be the same. The letters/character were added to the DB using php code by simply pasting the character into a form which runs an INSERT query into the table of letter substitutions. There must be some encoding issues between MYSQL and PHP that I'm not understanding. ???
  6. Thanks! That's much simpler than I was making it into. I'll play with that and hopefully it will do the trick.
  7. Hi, I'm a bit stumped on this one and it's possible this should really go in the REGEX forum but I'm not sure. Here's what I'm trying to do: I have a string/word that may have special characters within it (ex. Andrée). I want loop through the word and compare each letter with a list of special characters and a replacement letter that is a non-special character (ex. é would be replaced by e). In the process of trying to figure out how to do this, I made a little script that loops through the word and puts each letter in an array. To my surprise, there are more elements in the array than I expected. The accented e seems to take two spots in the array. When I print_r the array, I get: Array ( [0] => A [1] => n [2] => d [3] => r [4] => � [5] => � [6] => e ) So, I'm confused about how PHP is interpreting the special character. I tried to read in both the PHP online documentation as well as a PHP programming book I have about this but nothing I read really clarified for me what was going on with this. Can anyone help me understand how to approach this seemingly simple problem? Thanks!
  8. Hi all, I think this question may have been asked previously but I couldn't find any answers to it. So, I apologize if this has already been answered. Is there any way to create thumbnail images from pdf documents programmatically? Essentially what I need to do is present a preview for a file download. Ideally I'd like to be able to show a set portion (something like top left 300x300pixels) of page 1 of each pdf document with a watermark over it that says something like "Demo" or "Sample". If I can't find a way to do this on the fly then my second hope is to find a plug in for Acrobat that could create these images in batch but I haven't found anything like that yet either. Thanks for any light anyone can shed on this! Ellie
  9. Thanks for looking into this. On my local server both display_errors and display_startup_errors are set to OFF. I notice on the host's phpinfo() that they have display_errors set to ON and display_startup_errors set to OFF. I don't know if it makes a difference because the upload times out before it gets to that point.
  10. Hi, Thanks for answering my post. On my development server I am running version 5.2.5 and the setting display_errors is set to OFF. I am trying a similar script on my production server which is a shared hosting account on a remote server, however it times out before it can try to process the uploaded file (which is a whole other can of worms I'll need to solve!). Thanks for any insight!
  11. Hi, I'm new to the forum (just registered today, in fact) but I did try searching for the information I'm looking for before posting. Here's my question: Where does the PHP Warning originate that warns when the size of POST data exceeds the value set in php.ini? This error seems to be thrown before the page is loaded and therefore seems difficult (if not impossible) to trap or prevent from displaying. As an example of what I mean, I tried completely preventing errors from displaying by using "error_reporting(0);" That worked fine for other errors but when data was submitted on a form which exceeded the 8M set in the php.ini file, the error appears despite this function at the top of the page to which the form data is sent. I notice that the error itself references "Unknown" as the file name so I suspect this error is being generated prior to the script even running at all. Essentially, what I am trying to do is detect if the POST data exceeds the php.ini limit and display a more user friendly error than the PHP Warning. My users are likely to upload files approaching the limit so I need to be able to give them a message that the file they tried is too big. I discovered that adding the hidden form field MAX_FILE_SIZE and setting the value lower than the post_max_size value does nothing since this would only be evaluated if the POST data could be read. Instead the entire $_POST array seems to be discarded when it exceeds the post_max_size. I have done multiple searches on this topic in this forum and in other PHP forums and mostly what I found is advice to increase the setting in php.ini but this is not an option for me. Surely, others have run into this and found a solution. And suggestions?
  • 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.