Our dev environment is php 4.4.9, with "gd version = bundled (2.0.28 compatible)". We're trying to upload the site to a server running php 5.2.6, "bundled (2.0.34 compatible) ".

Does anyone know what kind of trouble this is likely to cause?

Also, we keep getting the following error messages:
"Warning: mysql_result() [function.mysql-result]: Unable to jump to row -1 on MySQL result index 13 in /usr/www/ ... /sqlFetch3.php on line 53" - 6 times

"Warning: mysql_result() [function.mysql-result]: Unable to jump to row -1 on MySQL result index 18 in /usr/www/ ... /sqlFetch3.php on line 53" - 6 times

The mySql errors refer to a query of a small table with six rows and six columns. I know that's why the error's reported six times. But I don't understand "index 13", much less "index 18". I don't know how to begin looking this one up, so I"m asking.

And then,
"Warning: imagepng() [function.imagepng]: Unable to open 'png/es3161228958285_0.png' for writing: Permission denied in /usr/www/ ... /zzz.php5 on line 394"

Imagepng is a gd function, creating a png out of a colored rectangle, some text and another image. The function is blackbox code to me. in that I can't see it (I think gd is an extension of php, written in C). What would constitute 'permission' to use this function? How could it be denied, and how can I get it bestowed again?

All this works perfectly on the dev server, of course.

Any help or illumination would be deeply appreciated.

Thanks,
- Paul

    It is an issue with the directory, it is either missing or does not have the correct perrmissions.

      Directory. How do I begin dealing with The Directory?

        You need to make sure the png dir exists.
        You then need to make sure it has the correct permissions.

        If you have shell access use 'ls -la' to display permissions.
        Depending on how the server is setup, it needs to be 644 664 or 666(hopefully not this one)

          Ah. So that's the Provider's problem, right? Arrangements have to be made with the Client's Server's Keepers, as it were. I assume we need complete read/write/erase permission ...

          Cool. That's business, not development. Not my problem.

          Meanwhile, about those mySql references to 'result index 13' etc. If I squint hard enough I can imagine they sound like references to parking spaces near a government facility in the desert that doesn't exist. But seriously, folks, I'm ignorant enough to not understand the message. Could someone please explain it to me, or at least ask for enough clarification to allow them to comment on it?

          I'll include the entire query here:

          function getFont($id){
          	global $fRA;
          	$qr = 'SELECT * FROM pda_font';
          	$re = mysql_query($qr) or die(mysql_error());
          	$nrows = mysql_num_rows($re);
          	$fRA = array();
          	$fRA = array('ffile'=>mysql_result($re,$id,'fontfile'), 'fSize'=>mysql_result($re,$id,'fontsize'), 'fWrap'=>mysql_result($re,$id,'wordwrap'), 'fSplit'=>mysql_result($re,$id,'wordsplit'),'fname'=>mysql_result($re,$id,'fontname'),'fw'=>mysql_result($re,$id,'w'));
          }
          

          Frankly, I understand that this query can probably be stated better. Right now, though, I'm just interested in what 'index 13' (or '18') refers to. And I'd really like to understand that.

          Thanks,
          - Paul

            Am I to presume there's no sensible answer to the question, "What does 'index 13' mean?" in the error message, "Warning: mysql_result() [function.mysql-result]: Unable to jump to row -1 on MySQL result index 13 in /usr/www/ ... /sqlFetch3.php on line 53" ?

            I'm guessing I screwed up somewhere. When I've seen this kind of message before, pertaining to this function getFont($id), it usually means that $id is missing. But I've looked, and it's not.

              The message means you are passing $id as -1 which is invalid. Rows start at 0

                Correct, HalfaBee. $id is, in this case, the index of the selected member of a <select> list of fonts. The list is 1-based. To relate to the database, $id is converted to [index]-1. If [index] is undefined, I'd expect $id == NaN, but instead $id == [0]-1. Go figure.

                Meanwhile, that 'index' is not the index of the error message. And I still can't read the message if I don't know what "... MySQL result index 13 ..." means!

                Doesn't this sort of thing just drive you all crazy?? Or, is it just me...

                  Write a Reply...