Page 1 of 2

Save As Copy Not Working (child records)

Posted: 2022-07-22 22:28
by rpierce
I am using version 22.14. I have tested my app on the local machine and save as copy works fine. But, when I FTP it to my server Save as Copy (copy child records) does not work. Very frustrating to do all the work and have to revert to to the old version. Does anyone have an idea on why this happens. I'm at my wits end.

It was working fine with my 5.97 app generation on both local machine and on the server. Yes, in Parent/Children settings the "Copy child records when copying parent" is checked

Ray
Capture.JPG
Capture.JPG (55.86 KiB) Viewed 3411 times

Re: Save As Copy Not Working (child records)

Posted: 2022-07-24 17:06
by rpierce
For those who may experience this issue, I do believe I've figured out the problem. As is most often the case, the problem was due to something I did. Or rather didn't do. I was perplexed because everything works fine on my local machine but not once I FTP the files to my server. Upon examining the config.php file I noticed that I had failed to change the $host variable to my domain name. Everything works great except the copying of child records when using the "Save as Copy" function if the $host variable is left as "localhost". Once I changed it to mydomain.com, the child records are copied as expected.

A bit embarrassing for me, but alas, I'm still learning all of this stuff. I share so others who might experience this can resolve it and still have some hair on their heads!! :)

Ray

Re: Save As Copy Not Working (child records)

Posted: 2022-07-25 11:39
by jsetzer
if the $host variable is left as "localhost"
This totally makes sense from technical point of view, as the internal function TABLENAME_copy_children() (in TABLENAME_dml.php) uses cURL-commands, asynchronously executing multiple copy calls, which obviously need a valid and matching, correct URL.

Thanks for you research and your hint to the $host variable in config.php file!

cURL
https://www.php.net/manual/de/book.curl.php

Re: Save As Copy Not Working (child records)

Posted: 2022-07-25 15:06
by rpierce
Thank you Jan! Your comment makes me feel a lot better :)

Re: Save As Copy Not Working (child records)

Posted: 2022-07-27 23:48
by zibrahim
Hi there,
I am still facing this issue (child record not created). I have checked the config file and $host variable is set to my domain name.
Contacted my hosting admin and they confirmed that curl is enabled and working fine.
I don’t know why it is working on my XAMPP but not in the hosting server.
Any idea how to check further on this?
Thanks.

Re: Save As Copy Not Working (child records)

Posted: 2022-07-28 00:04
by AhmedBR
PHP localhost and server are the same?

Re: Save As Copy Not Working (child records)

Posted: 2022-07-28 08:39
by zibrahim
Yes, according to the hosting guy...
any idea how to test it?

Re: Save As Copy Not Working (child records)

Posted: 2022-07-28 09:22
by AhmedBR
Create a php file and add this code:

Code: Select all

<?php
echo 'PHP version: ' . phpversion();
?>
Upload to server and run it.

Or if you have access to cPanel go to MultiPHP Manager or MultiPHP INI Editor and check the version

Re: Save As Copy Not Working (child records)

Posted: 2022-07-28 22:55
by rpierce
Hi Zibrahim,

Has the save as copy (child records) ever worked for you??

Ray

Re: Save As Copy Not Working (child records)

Posted: 2022-07-29 23:52
by zibrahim
AhmedBR wrote:
2022-07-28 09:22
Create a php file and add this code:

Code: Select all

<?php
echo 'PHP version: ' . phpversion();
?>
Upload to server and run it.

Or if you have access to cPanel go to MultiPHP Manager or MultiPHP INI Editor and check the version
My hosting server is running
PHP version: 7.4.28

Re: Save As Copy Not Working (child records)

Posted: 2022-07-29 23:54
by zibrahim
rpierce wrote:
2022-07-28 22:55
Hi Zibrahim,

Has the save as copy (child records) ever worked for you??

Ray
Hi Ray,
It is working in my local XAMPP but not in the hosting provider server and since I am not good with php and server things, they keep asking me to check my codes as they found no issue with their server.

Re: Save As Copy Not Working (child records)

Posted: 2022-07-30 00:17
by AhmedBR
and what is your xampp PHP?
test on xampp with same php as your host.

Re: Save As Copy Not Working (child records)

Posted: 2022-07-31 04:45
by zibrahim
I have solved the issue in a weird way....
1. Change the server PHP version to 8.0 and tested OK (child records created as expected)
2. Revert back to PHP 7.4 and surprisingly it is working fine now ....

I wonder why... :?

Thanks anyway guys for the help and concern.

Re: Save As Copy Not Working (child records)

Posted: 2022-08-01 14:07
by rpierce
Never tell a computer that you're in a hurry!! :lol:

Re: Save As Copy Not Working (child records)

Posted: 2023-01-07 05:14
by rpierce
Hello AppGini Friends,

My app the save as copy function has again stopped working on the server. I'm using version 22.14. PHP version 7.4 on the server and on the local machine.

I have tried all the tricks included in this string with no luck. It seems to be a server issue since the app works as expected on my local machine.

If any of you have suggestions, I'd be forever grateful.

Ray

Re: Save As Copy Not Working (child records)

Posted: 2023-01-07 08:50
by pbottcher
Hi Ray,

first question: Did you change anything? Re-loaded the app, or anything else?

Re: Save As Copy Not Working (child records)

Posted: 2023-01-07 16:39
by rpierce
Well, I have been working on modifications to little things in the app but the save as copy functionality has been working fine up until yesterday. When I say save as copy, I'm referring to "Copy Children Records". Parent is copying ok but not the children.

I have several instances of AppGini apps in different directories on the same server and this problem is affecting all of the apps so it leads me to believe the issue is with the server rather than the app. I don't know what to ask the technicians to look at that might be an issue.

thanks for the reply Pascal.

Re: Save As Copy Not Working (child records)

Posted: 2023-01-07 18:01
by pbottcher
Hi Ray,

can you dump you PHP version to verify that this is still the same than the one you have localy.

Re: Save As Copy Not Working (child records)

Posted: 2023-01-07 18:16
by rpierce
Pascal,
I don't understand what you mean by dump PHP version?

Re: Save As Copy Not Working (child records)

Posted: 2023-01-07 18:22
by rpierce
when I do a call for phpinfo.php on the remote server it says 7.4.33 on the xampp server it is 7.4.27.

But it has been working fine on the remote server up until a couple of days ago.

I just noticed that it says Build Date: Jan 4 2023 02:33:57. That is close to the time things stopped working???

Re: Save As Copy Not Working (child records)

Posted: 2023-01-07 18:54
by pbottcher
That sounds like the causing issue. Can you revert on the server to an older version?

Re: Save As Copy Not Working (child records)

Posted: 2023-01-07 18:58
by rpierce
I tried doing that last night. I switched to an older version and also a newer version and the problem persisted.

Re: Save As Copy Not Working (child records)

Posted: 2023-01-07 19:14
by rpierce
Is this PHP setting a possible cause?

[curl]
; A default value for the CURLOPT_CAINFO option. This is required to be an
; absolute path.
;curl.cainfo =

Re: Save As Copy Not Working (child records)

Posted: 2023-01-07 19:29
by pbottcher
is the CURLOPT_SSL_VERIFYPEER set to 1 or 0 ?
if 0 then it will probably not be the issue.

Re: Save As Copy Not Working (child records)

Posted: 2023-01-07 19:47
by pbottcher
Maybe you can check the server logs (webserver) to identify if there is an error