Jump to content

ShadowMage

Members
  • Content Count

    3,467
  • Joined

  • Last visited

Community Reputation

94 Excellent

About ShadowMage

  • Rank
    Faal Vokundovah
  • Birthday August 27

Previous Fields

  • Languages
    (X)HTML, CSS, JavaScript, PHP (though I still have much to learn)

Profile Information

  • Location
    America's dairyland

Recent Profile Visitors

57,883 profile views
  1. ah, ok. I'll give it a shot with iframes then. Thanks guys.
  2. Totally forgot I posted this until I was asked about it again this morning... I thought iframes were deprecated or not recommended?
  3. This is strange but recently my page stopped displaying PDFs using the object tag. Nothing has changed on the page (in fact, I haven't worked with it in a very long time and there's no one else besides my supervisor who can edit it; I'm 99.99999% sure he hasn't touched it either). I guess what I want to ask is if there's anything that looks out of place with my code: $x = 0; foreach ($arrPDF as $pdf) { echo "<object id='bulletin".$x."' data='../path/".$pdf."' type='application/pdf'>\n"; echo "<span class='error'>Error: Could not load PDF. Your browser does not support emb
  4. The problem is not data coming from an HTML form. As mentioned, memos that are entered from the intranet (the HTML forms) are functioning correctly. The problem appears when users copy/paste directly into the ERP system. To try to further clarify, memos can be entered in one of two ways. Through a form on the intranet or directly into the ERP system. Those memos that come from the intranet form are functioning fine and do not have any character encoding issues. Entering memos directly doesn't cause issues UNLESS the user copy/pastes data (from an Outlook email, for example) into the
  5. So, first a little background on the setup/system we're running. We have an ERP system where users enter memos and notes on quotes/orders. We also have an intranet that pulls this information back out to run reports and such. The problem I'm facing, is that users are copy/pasting data into the memo text which is creating a character encoding issue. The memo text is displaying in the web browser as the black diamond with a question mark for certain specific characters (like apostrophe's). Manually typed text doesn't seem to have this issue, nor does text that comes from the intranet and is
  6. Ok, so this is stemming from the fact that I can't get any output from PHP except errors when they occur (as described here) but since that doesn't seem to be an issue that's going to be resolved any time soon, I need to figure out how to work around it. So, I split this issue (which I also posted in the linked thread) off into it's own separate thread to see if I can resolve this particular issue. Anyway, I'm getting this error: PHP Warning: A non-numeric value encountered in ...filepath... on line 166 Line 166 looks like this: $numPieces = ($Dim['bays']*$Dim['purlins'])*$Di
  7. This is really beginning to be a problem... I've found all the division by 0 errors I had before, but I still have this guy: PHP Warning: A non-numeric value encountered in ...filepath... on line 166 Line 166 looks like this: $numPieces = ($Dim['bays']*$Dim['purlins'])*$Dim['qty']; The error doesn't even tell me which of the three variables is throwing the error. Normally, this wouldn't be an issue, because I'd just print out all the variables in the equation to see what they're being set to. However, because of the issue that started this thread, that's not possible.
  8. So, I'm bumping this back up because it's become an issue again. I had been working around it using die() to print out variables and such just before any offending lines, but I've encountered a situation now where that doesn't work. Consider the following: $x = 10; $y = 3; for ($z=0; $z<10; $z++) { echo "Attempt $x / $y: "; echo ($x/$y)."<br />"; $y--; } In PHP 5, I would get output as: Attempt 10 / 3: 3.33333333 Attempt 10 / 2: 5 Attempt 10 / 1: 10 Attempt 10 / 0: PHP Warning: Division by zero in C:\inetpub\major\test.php on line 37 Now, in PHP 7, I just get the e
  9. My code doesn't halt either. As mentioned, I can get multiple notices, but I get no other output besides the error notices. As an example: echo "Hello World"; echo $undefinedVar1; echo $undefinedVar2; The above code, in PHP 5, would print the "Hello World" line and then the undefined variable errors (both of them). In 7, I still get both error messages, but not the "Hello World" line. EDIT: Oh, and my error reporting level is the same in both: error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT
  10. I've recently upgraded to PHP 7 from PHP 5, but I've noticed now that warnings and notices are preventing other output from being displayed. In PHP 5, if I tried to echo an undefined variable, I would get the notice in the midst of all the other output. But now, in PHP 7 it seems to just output the notice and nothing else, although I do get several notices if I have the undefined variable in a loop. This is an issue for me, because I often place echo statements around the code when I'm debugging to trace the flow of the code, but that doesn't work in PHP 7 anymore because none of my debuggi
  11. Explicitly setting the length to 1000 seems to work as well. Looks like it's just the CAST that's doing the trick even though it's supposed to already be text. Also, good to know about the default. Although in my case that doesn't seem to apply. I've several values that are over 30 characters and they're not being truncated. Of course, that doesn't mean that the default isn't some other value that I'll discover later if/when we have longer values.
  12. So it looks like the "fix" is to CAST the fields that are causing problems. In this case, it looks like any of the 1000 character fields are causing problems. So a "fixed" query would look like this: SELECT OrderHed.OrderNum, OrderHed_UD.ShortChar06 AS 'SalesLeader', CAST(OrderHed_UD.Character01 AS varchar) AS 'JobName' FROM OrderHed INNER JOIN OrderHed_UD ON OrderHed.SysRowID = OrderHed_UD.ForeignSysRowID WHERE (OrderHed.OpenOrder = 0) Not really sure why this works, but it does. It's weird because one would think if there was a problem with the format of the field I wouldn't be abl
  13. Do you have any recommended validators you prefer?
  14. I'm just going to throw some more information I discovered on here. Maybe something will spark a possible solution. I discovered that this behavior happens as soon as I add OrderHed_UD.Character01 to a query. I can pull in anything but that field. Same for Character02 and 03. Those three fields cause my queries to throw odd errors in PHP. At one point it even threw an "ambiguous column" error on a clearly defined column (it was JobHead.JobNum and there weren't even any other JobNum fields being selected). Here's the weird thing (or another one anyway): I can run these queries with
  15. No worries. Honestly, being such a weird and inconsistent issue, I didn't expect to get an answer. A couple of quick Google searches hadn't turned anything up, so this was a shot in the dark hoping someone else may have had a similar issue. Leave it to Microsoft... 😅
×
×
  • Create New...