We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

Model->save() is not working

I have multiple function which saves different data to db through one general function:

private function createQuery($query, $schema)
    {

        echo "start";
        $success = $query->create();
        echo "progress";

        if ($success) {
            echo "Great, a new $schema data: $query->id was saved successfully!", "\n";
            return $query->id;
        } else {
            $messages = '';
            foreach ($query->getMessages() as $message) {
                echo "Umh, We can't store $schema data right now. Reason: " . $message->getMessage();
            }
            return null;
        }

    }

The issue I have got is that I can log start but function stop working after $success = $query->create(); so it not log progress

I don't have any httpd error logs nor mysql. I hae got also set error logging in php:

error_reporting(E_ALL);
ini_set("display_errors", "1");
ini_set("log_errors", 1);
ini_set("error_log", "/tmp/php-error.log");

and still I don't have any logs.

It was worked previously but after cloud tea updated servers it doesn't work and I don't havev any clue what may be wrong.

but after cloud tea updated servers

What im guessing that maybe they updated your php or something and phalcon is not loaded ?