Generate source code bug

Hi,

My scriptcase is installed on Ubuntu 14.04 LTS/MySQL and I did a manual installation. The scriptcase version is 8.1.004.

I created a simple grid application then hit the generate source code button at the top. The screen indicated progress until it got to the following page:

Generating source-code
Start: 14:43:43
Elapsed time: 0:00:01
Average time per application: –
Total applications generated: 0 / 1
Compilers in use: 1 / 1

From here, it kept spinning and spinning…

I opened the browser console, I saw a status of 500 (Internal Server Error)
I checked the apache log, I saw an error:
PHP Fatal error: Call to a member function GetData() on null in /var/www/live/scriptcase/devel/class/interface/nmConnection.class.php on line 227

Anyone else having similar setup like mine and the same issue?

Thank you,
Beny

That error looks like the fact that the database connection can not be made. The scriptcase php script tries to connect with the database but it cant, then it gets a timeout and fails.
Please check if your database can be reached from your development server. This is possibly a rights issue.
nmConnection.class.php handles the database connection as far as I know it.

Thanks for the reply, rr.

I checked the connection, it is MSSQL and it said connection success when I clicked the test connection button.
another odd thing, if I click run button, it works. I figure run button will generate the source code and run it?

We get similar behaviour with our database. The point is that there are thousands of tables in that database. To speed things up we use the filters.
So it may help for you to put some filters on the database connection setting.

so you’re unable to use the generate source code button as well? maybe the next update will fix it. thanks for your inputs, rr

Nope we do get a result it takes some time to get a list. Hence the filters, that makes it way faster.
In a past version we had the same issue but using filters I have no problem anymore.
Generally php waits 60 seconds to query mysql before a timeout occurs (default).
You can edit your php ini file tho:
max_input_time = 300 (instead of the default 60)
max_execution_time = 300 (this is the max php execution time).
If you have a lot of tables changing this may help…

After going back and forth, I finally found the solution for this issue of mine.
in php.ini file, find “session.use_strict_mode” and make sure the value is 0.

hopefully that helps others