Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

134
Views
Why php file is not executed after upgrade to php 7?

I am reviewing a web page that uses javascript, php, ajax and that with php5 worked correctly, but having updated to php7 no longer works.

I comment the details below:

In the screen I am reviewing, MyWebPage/Folder1/protected/views/applications/file1.php is executed which assigns to the variable $load this value:

$load='protected/views/aplicaciones/cargas/file2.php';

At the end of this php there is a block of code where it call several javascript libraries and then assign value to various dynamic variables, using this code:

<script type="text/javascript">
    var startTime = "<?php echo $INIT; ?>";
    var endTime= "<?php echo $END; ?>";
    var period="<?php echo $PERIODUSED; ?>";
    var db="<?php echo $DATABASE; ?>";
    var loadpage="<?php echo $loadpage; ?>";
</script>

So this php calls the file3.js javascript using this code:

<script type="text/javascript" src="protected/views/aplicaciones/aplicacionesjs/file3.js"></script>

This javascript theoretically calls file2.php, using this code:

            function requestData()
            {
                waitingDialog({});
                $.ajax({
                    data: "startTime="+startTime+"&endTime="+endTime+"&period="+period+"&db="+db+"",
                    type: "POST",
                    url: loadpage,
                    datatype: "json",
                    success: function(data)
                    {

                        closeWaitingDialog();
                        var json= eval(data);

                        // Process and paint json
                        // ...
                    },

                    error: function()
                    {
                        closeWaitingDialog({});
                    },

                    cache: false
                });

With Firebug I see that loadpage = protectec/views/aplicciones/cargas/file2.php that looks to be right.

However, the problem is that after the line

    var json= eval(data);

the value of json is undefined and instead of this it should contain a series of data that should be displayed on the page.

From the tests I have done with Firebug it seems to me that the problem could be that protectec/views/applications/loads/file2.php is not being executed.

Any comment or suggestion is appreciated.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!