Hey Brijesh, thanks so much for replying!
In the documentation I read this:
sdb_import($parameter1) - This function is used to execute the database queries.
1st Parameter (required) = String $parameter1 is the Absolute path of the file which contains the database queries to be executed.
From what you've said, does this mean the documentation is wrong, and it's actually the relative path from /var/softaculous/softname?
If so, and presuming I want to dump a database first, how would I do this? I have tried doing something like this:
PHP Code sdb_export('localhost', 'some_db', 'password', 'someuser', $software['soft name'] . '.sql');
sdb_import($software['softname'] . '.sql');
But that doesn't work. I presume this is because of permissions? But I did a touch mysoftname.sql and chown myuser:myuser mysoftname.sql and re-ran installing the package but that didn't work.
As noted in my first post, it works if I try write to /tmp.
So, if I want to dump a database and place it in the package directory then import it, what's the correct way to go about it please?
Kind regards for your help!
|