Save As Copy Not Working (child records)

Please report bugs and any annoyances here. Kindly include all possible details: steps to reproduce, expected result, actual result, screenshots, ... etc.
rpierce
Veteran Member
Posts: 255
Joined: 2018-11-26 13:55
Location: Washington State

Save As Copy Not Working (child records)

Post by rpierce » 2022-07-22 22:28

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 3302 times

rpierce
Veteran Member
Posts: 255
Joined: 2018-11-26 13:55
Location: Washington State

Re: Save As Copy Not Working (child records)

Post by rpierce » 2022-07-24 17:06

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

User avatar
jsetzer
AppGini Super Hero
AppGini Super Hero
Posts: 1807
Joined: 2018-07-06 06:03
Location: Kiel, Germany
Contact:

Re: Save As Copy Not Working (child records)

Post by jsetzer » 2022-07-25 11:39

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
Kind regards,
<js />

My AppGini Blog:
https://appgini.bizzworxx.de/blog

You can help us helping you:
Please always put code fragments inside [code]...[/code] blocks for better readability

AppGini 24.10 Revision 1579 + all AppGini Helper tools

rpierce
Veteran Member
Posts: 255
Joined: 2018-11-26 13:55
Location: Washington State

Re: Save As Copy Not Working (child records)

Post by rpierce » 2022-07-25 15:06

Thank you Jan! Your comment makes me feel a lot better :)

User avatar
zibrahim
Veteran Member
Posts: 137
Joined: 2020-01-28 18:30
Location: Malaysia

Re: Save As Copy Not Working (child records)

Post by zibrahim » 2022-07-27 23:48

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.
Zala.
Appgini 24.10.1579, MacOS 14.3.1 Windows 11 on Parallels.

AhmedBR
AppGini Super Hero
AppGini Super Hero
Posts: 327
Joined: 2013-09-19 10:23

Re: Save As Copy Not Working (child records)

Post by AhmedBR » 2022-07-28 00:04

PHP localhost and server are the same?
AppGini 22.14 - xampp 3.3.0 - PHP 7.4.30 - Summary reports - Calendar - Mass update - Messages - AppGiniHelper

User avatar
zibrahim
Veteran Member
Posts: 137
Joined: 2020-01-28 18:30
Location: Malaysia

Re: Save As Copy Not Working (child records)

Post by zibrahim » 2022-07-28 08:39

Yes, according to the hosting guy...
any idea how to test it?
Zala.
Appgini 24.10.1579, MacOS 14.3.1 Windows 11 on Parallels.

AhmedBR
AppGini Super Hero
AppGini Super Hero
Posts: 327
Joined: 2013-09-19 10:23

Re: Save As Copy Not Working (child records)

Post by AhmedBR » 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
AppGini 22.14 - xampp 3.3.0 - PHP 7.4.30 - Summary reports - Calendar - Mass update - Messages - AppGiniHelper

rpierce
Veteran Member
Posts: 255
Joined: 2018-11-26 13:55
Location: Washington State

Re: Save As Copy Not Working (child records)

Post by rpierce » 2022-07-28 22:55

Hi Zibrahim,

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

Ray

User avatar
zibrahim
Veteran Member
Posts: 137
Joined: 2020-01-28 18:30
Location: Malaysia

Re: Save As Copy Not Working (child records)

Post by zibrahim » 2022-07-29 23:52

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
Zala.
Appgini 24.10.1579, MacOS 14.3.1 Windows 11 on Parallels.

User avatar
zibrahim
Veteran Member
Posts: 137
Joined: 2020-01-28 18:30
Location: Malaysia

Re: Save As Copy Not Working (child records)

Post by zibrahim » 2022-07-29 23:54

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.
Zala.
Appgini 24.10.1579, MacOS 14.3.1 Windows 11 on Parallels.

AhmedBR
AppGini Super Hero
AppGini Super Hero
Posts: 327
Joined: 2013-09-19 10:23

Re: Save As Copy Not Working (child records)

Post by AhmedBR » 2022-07-30 00:17

and what is your xampp PHP?
test on xampp with same php as your host.
AppGini 22.14 - xampp 3.3.0 - PHP 7.4.30 - Summary reports - Calendar - Mass update - Messages - AppGiniHelper

User avatar
zibrahim
Veteran Member
Posts: 137
Joined: 2020-01-28 18:30
Location: Malaysia

Re: Save As Copy Not Working (child records)

Post by zibrahim » 2022-07-31 04:45

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.
Zala.
Appgini 24.10.1579, MacOS 14.3.1 Windows 11 on Parallels.

rpierce
Veteran Member
Posts: 255
Joined: 2018-11-26 13:55
Location: Washington State

Re: Save As Copy Not Working (child records)

Post by rpierce » 2022-08-01 14:07

Never tell a computer that you're in a hurry!! :lol:

rpierce
Veteran Member
Posts: 255
Joined: 2018-11-26 13:55
Location: Washington State

Re: Save As Copy Not Working (child records)

Post by rpierce » 2023-01-07 05:14

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

pbottcher
AppGini Super Hero
AppGini Super Hero
Posts: 1635
Joined: 2018-04-01 10:12

Re: Save As Copy Not Working (child records)

Post by pbottcher » 2023-01-07 08:50

Hi Ray,

first question: Did you change anything? Re-loaded the app, or anything else?
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.

rpierce
Veteran Member
Posts: 255
Joined: 2018-11-26 13:55
Location: Washington State

Re: Save As Copy Not Working (child records)

Post by rpierce » 2023-01-07 16:39

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.

pbottcher
AppGini Super Hero
AppGini Super Hero
Posts: 1635
Joined: 2018-04-01 10:12

Re: Save As Copy Not Working (child records)

Post by pbottcher » 2023-01-07 18:01

Hi Ray,

can you dump you PHP version to verify that this is still the same than the one you have localy.
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.

rpierce
Veteran Member
Posts: 255
Joined: 2018-11-26 13:55
Location: Washington State

Re: Save As Copy Not Working (child records)

Post by rpierce » 2023-01-07 18:16

Pascal,
I don't understand what you mean by dump PHP version?

rpierce
Veteran Member
Posts: 255
Joined: 2018-11-26 13:55
Location: Washington State

Re: Save As Copy Not Working (child records)

Post by rpierce » 2023-01-07 18:22

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???

pbottcher
AppGini Super Hero
AppGini Super Hero
Posts: 1635
Joined: 2018-04-01 10:12

Re: Save As Copy Not Working (child records)

Post by pbottcher » 2023-01-07 18:54

That sounds like the causing issue. Can you revert on the server to an older version?
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.

rpierce
Veteran Member
Posts: 255
Joined: 2018-11-26 13:55
Location: Washington State

Re: Save As Copy Not Working (child records)

Post by rpierce » 2023-01-07 18:58

I tried doing that last night. I switched to an older version and also a newer version and the problem persisted.

rpierce
Veteran Member
Posts: 255
Joined: 2018-11-26 13:55
Location: Washington State

Re: Save As Copy Not Working (child records)

Post by rpierce » 2023-01-07 19:14

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 =

pbottcher
AppGini Super Hero
AppGini Super Hero
Posts: 1635
Joined: 2018-04-01 10:12

Re: Save As Copy Not Working (child records)

Post by pbottcher » 2023-01-07 19:29

is the CURLOPT_SSL_VERIFYPEER set to 1 or 0 ?
if 0 then it will probably not be the issue.
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.

pbottcher
AppGini Super Hero
AppGini Super Hero
Posts: 1635
Joined: 2018-04-01 10:12

Re: Save As Copy Not Working (child records)

Post by pbottcher » 2023-01-07 19:47

Maybe you can check the server logs (webserver) to identify if there is an error
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.

Post Reply