Jump to content

iwato

Members
  • Posts

    1,506
  • Joined

  • Last visited

  • Days Won

    4

Posts posted by iwato

  1. I just checked the error logs for .../select_color_pair.incl.php  and .../class.imageless_captcha.php, but could find nothing.  And, the error log that should include the errors  for .../vendor/autoload.php shows nothing.  As I did not build autoload.php, its errors do not appear in the same folder -- namely, /vendor. 

    I do see what you mean.  You wanna make me work....   Just a moment.

    Roddy

  2. I am not sure what you mean.  Each of the other pages has its own error code, just like the one that I showed above.  Therefore, if an error occurs on any one of those pages, it should appear in that pages error code that is copied into the same folder as the page.  Well, I do not not know how others do it, but it is my work flow style.

    Roddy

  3. Actually it created a white sheet.

    So, I introduced purposefully the error that Dsonesuk believed that I was making accidentally, and it produced a very nice error message.  So, yes, the errors are currently being reported.  Here is the resulting error message.  It may give a clue.

    [05-Jan-2020 22:06:05 UTC] PHP Warning:  require_once(.../../../../../../vendor/autoload.php): failed to open stream: No such file or directory in /home/.../captcha_reset.php on line 17
    [05-Jan-2020 22:06:05 UTC] PHP Fatal error:  require_once(): Failed opening required '.../../../../../../vendor/autoload.php' (include_path='.:/opt/cpanel/ea-php70/root/usr/share/pear') in /home/.../captcha_reset.php on line 17

    Roddy

  4. Addendum to Initial Entry

    The following is a note that I wrote to myself about the problem:

    •    The Imageless_Captcha functionality is failing again.

        •    Step One:  Open overview.html
        •    Step Two:  Click on Local Search/Newsletter, Local Search/Podcast, Local Search/Q&A on the overview.html page in either the production or development folder and the result is the same. The worded number phrase does not appear, rather the phrase "Enter something here!"
        •    Step Three:  Open the WebConsole in the Network panel and discover that the PHP file:
         /home/thege0/public_html/grammarcaptive.com/devcptv18rs/_utilities/php/captcha/captcha_reset.php
             
            has not been loaded.  And, the Error Code 500 appears.
            
        •    There is no trace of a PHP error anywhere.

    Roddy

     

  5. Hi, Funce!  Happy New Year!

    The logging system is everywhere the same.  It appears as follows:

    	error_reporting(E_ALL);
    	ini_set('log_errors', 1);
    	ini_set('error_log', dirname(__FILE__) . DIRECTORY_SEPARATOR . 'error.log');
    	ini_set('html_errors', 1);
    	ini_set('display_errors', 0);

    Roddy

  6. BACKGROUND:  I have an AJAX request that cannot find the PHP processing file for which it is looking. It is returning a 500 error in my web console.  I have checked the PHP error log for that file and can find no error.  I have also checked the error logs for the PHP files related to the requested PHP file, as well as the error log of the requesting page.  Nothing. Nothing. Nothing. And, Nothing.  I have even asked the help of my server provider.  Nothing.  Needless to say, I am at a loss.

    The functionality related to this AJAX call was created many months ago, and was working fine at the time of creation.   In fact, the same functionality used to work at three different locations.   I discovered the failure while performing a somewhat casual check in search for damage from suspected hackers.  Once hacked, you do not easily forget it.  it is kind of like being raped.

    QUESTION: What would be a proper strategy for troubleshooting this failure?

    AJAX CALL:

    		$.ajax({
    			type: "POST",
    			url: '.../captcha_reset.php',
    			data: {dataRequest: 'requestInstance'},
    			statusCode: {
    				404: function() {
    				alert( "Page not found" );
    			}},
    			success: function(jsonData) {			
    				jsonObj = JSON.parse(jsonData);
    				captcha_sa = jsonObj.captcha_ra;
    				$('.CaptchaLabel').css('background-color', jsonObj.captcha_rc);
    				$('.CaptchaAnswer').val('');
    				$('.CaptchaLabel').html(jsonObj.captcha_rq);
    				$('.CaptchaError').css('display', 'none');			
    			}
    		});

    CODE from REQUESTED PHP FILE:

    	if ($_SERVER['REQUEST_METHOD'] == 'POST') {
    		$captcha_reset = array();
    		if ($_POST['dataRequest']) {
    			$dataRequest = filter_var($_POST['dataRequest'], FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH);
    			if ($dataRequest == 'requestInstance') {
    				require_once '.../vendor/autoload.php';
    				require_once '.../select_color_pair.incl.php';
    				$color_pair = select_color_pair(true);
    				$ictext_color = $color_pair['text_color'];
    // 				$icbackground_color = $color_pair['bg_color'];				
    				require_once('.../class.imageless_captcha.php');
    				$captcha_r = new ImagelessCaptcha(3, false, false, $ictext_color);
    				$captcha_reset['captcha_rq'] = $captcha_r->formPhrase();
    				$captcha_reset['captcha_ra'] = $captcha_r->getInt();
    				$captcha_reset['captcha_rc'] = $color_pair['bg_color'];
    			}		
    		}
    		echo json_encode($captcha_reset);
    	}

    Please advise.

    Roddy

     

  7. GREETING:  Happy New Year, W3Schools!  I am looking forward to another year of online progress.  Hopefully many of the problems that I have been experiencing for the last year and a half will disappear with the addition of a brand new iMac that can handle the latest PHP and MySql software.  This said,  I remain the advanced novice that I am and very much hope that you will continue to stand by my side.

    BACKGROUND:  Please find below a set of code that permits one new set of functionality, but destroys another.  The related error messages are provided beneath the code.

    if (isset($_GET['refer_type']) && filter_var($_GET['refer_type'], FILTER_VALIDATE_INT)) {
    $refer_type = $_GET['refer_type'];
    } else {
        $refer_type = 0;
    }
    if (isset($_GET['panel_type']) && filter_var($_GET['panel_type'], FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH)) {
        $panel_type = $_GET['panel_type'];
        if (isset($_GET['lang_type']) && filter_var($_GET['lang_type'], FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH)) {
            $lang_type = $_GET['lang_type'];
        }
    } else {
        $panel_type = 0;
    }

    ERROR MESSAGES:

    [05-Jan-2020 04:10:40 UTC] PHP Notice:  Undefined variable: lang_type in /home/thege0/public_html/grammarcaptive.com/devcptv18rs/overview.html on line 99

    QUESTION:  Can you see anything in the code line

    if (isset($_GET['lang_type']) && filter_var($_GET['lang_type'], FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH)) {
        $lang_type = $_GET['lang_type'];
    }

    or elsewhere that could be triggering the error.  The code line just given is new and is clearly the initial, but maybe not the final source of the problem.

    By the way, when the code was first introduced, it did not appear to create a problem.  Only several days later did the problem appear.

    Roddy

     

  8. Please ignore the above request.  I have resolved the problem.

    There was an incompatibility between what was being sent and what was supposed to be received.  Thank goodness for prepared statements.  They make everything so easier once you understand how to interpre the hieroglyphs of error encoding.

    Roddy

  9. BACKGROUND:  This is follow-up to my newly created webpage at ali.publiustwo.com.  For a long time I was  able to successfully transmit and store the data of the first of two forms.  Unable to understand why the data of the second form was not appearing in my data base I discovered that two of the variables were missing in the PHP processing file.  After these were added, the transmission failed completely.  The following error message was discovered

    Connection close
    Content-Typetext/html;
    charset=UTF-8
    Date Tue,10 Dec 2019 18:58:01 GMT
    ServerApache
    Transfer-Encoding chunked
    
    Accept */*
    Accept-Encoding gzip, deflate, br
    Accept-Language en-US,en;q=0.5
    Connection keep-alive
    Content-Length 2085
    Content-Type multipart/form-data; boundary=---------------------------18838717971881884458692932590
    Host ali.publiustwo.com
    Referer https://ali.publiustwo.com/
    User-Agent Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:48.0) Gecko/20100101 Firefox/48.0
    X-Requested-With XMLHttpRequest

    ADDENDUM:  The HTTP Request is reporting the following:  HTTP/1.1 500 Internal Server Error 318ms]

    REQUEST:  Could you explain what might be going and propose a solution.

    Roddy

  10. Never mind.  I have resolved the problem.

    Input form controls of the checkbox type are very unusual creatures. I have learned during the last couple of days.  In any case, the checkbox fields do appear when they are checked.  You have made me one very happy trooper.

    Roddy

  11. I don't get it either, but you are absolutely correct.  Adding the two additional parameters to the $.ajax() function allowed the data to be transmitted.  Still, however, only the last fieldset of the #topic_info form element was processed.  You may see what is occurring your self.

    Do you have any idea why.

    Roddy

  12. Yes,  Funce.

    The formData variable captures the first instance of the jQuery object used to create the object.  I did not drop the [0] expression at the end of the object.  I will wait until I can form a proper data object before implementing the additionally suggested $.ajax() parameters.

    Roddy

  13. Hi, Funce.  I have decided to experiment with your suggestion first as it is closer to language that I can easily understand.  This said, the FormData object is new to me and I do not know how to readily correct the error associated with the following code block:

    for (var i = 0; i < poData.length; i++) {
        formData.append(poData[i].name, poData[i].value);
    }

    The associated error is the following;

    Quote

    TypeError: 'append' called on an object that does not implement interface FormData.

    Please advise further..

    Roddy

     

×
×
  • Create New...