Jump to content
Sigh Parx

New Help With LSL to PHP Script

Recommended Posts

I have this script which connects to a PHP script which then connects to a data base. the script looks as such

toWebPage(string params)
{
    params += "&FromSL=true";
    string tst = "";
    if(DEBUG)
    {
        tst = "/tst";
    }
    llDebugSay("HTTP REQUEST: " + URL + PRODUCTNAME + tst+"/"+controller+".php");
    llDebugSay("HTTP REQUEST: " + params);
    myRequest = llHTTPRequest(URL + PRODUCTNAME + tst + "/"+controller+".php",
      [HTTP_METHOD, "POST",
       HTTP_MIMETYPE, "application/x-www-form-urlencoded"],
       params);
}

The method runs perfect as I have been using it for weeks, however, in the last couple of days it has just stopped working. The code is the same on both LSL and PHP. If I run the PHP script from a browser passing in the same params it works perfectly. If I get SL to send the info to the PHP script I get this returned

<HTML><HEAD>
<TITLE>Internal Server Error</TITLE>
</HEAD><BODY>
<H1>Internal Server Error - Read</H1>
The server encountered an internal error or misconfiguration and was unable to
complete your request.<P>
Reference&#32;&#35;3&#46;9d55ee3f&#46;1515566038&#46;54729c
</BODY></HTML>

I don't even know where to begin with debugging this because it works server side, just not SL side and they are using the exact same params and url????

Share this post


Link to post
Share on other sites

Probably unrelated, but for the past few days the search function in the SL wiki has been consistently yielding an error:

10a3bf025d0493b6954949675f5f7595.png

Share this post


Link to post
Share on other sites
26 minutes ago, Rolig Loon said:

Probably unrelated, but for the past few days the search function in the SL wiki has been consistently yielding an error:

10a3bf025d0493b6954949675f5f7595.png

Cool, the cloud is keeping your stuff safe from you!

  • Haha 1

Share this post


Link to post
Share on other sites
15 hours ago, Sigh Parx said:

Internal Server Error...

Reference&#32;&#35;3&#46;9d55ee3f&#46;1515566038&#46;54729c

The error means the server, probably Apache, found a program to execute for that URL, and that program crashed.

Note that if you're going to pass info around in encoded URL format, you're supposed to encode it first. See http://wiki.secondlife.com/wiki/LlEscapeURL for how. This matters if there are spaces or special characters in the content. LL says they recently changed handling of spaces in URLs, so check that.

The PHP side working from a browser indicates this is likely the problem. Browsers will do that encoding for you. If you type in or paste in a URL with a space, it will be converted to "%20". But in LSL, you have to make function call to do that.

Share this post


Link to post
Share on other sites

Thanks for the reply guys, I will look into that.

EDIT:

Upon writing a reply on the other forum post, I had to get some examples from the script and it ran find today. It hasn't ran fine for about a month and today, with no changes, it decides to start working again.

¬¬

Edited by Sigh Parx

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...