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

Strange error when using phalcon scaffold

Hello,

After I have created an app structure using : phalcon create-project test I would like to scaffold a bunch of models using the Phalcon developer tools.

I tried this: https://screencloud.net/v/rDQw

and I have no idea why I get this error, the config.php in /app/config/ is configured with the correct db credentials, I triple-checked.

Could it be that 1.3.3. needs config.ini in that directory? I tried with that as well, but then got a different error, saying that the builder could not find the views folder.

Thanks for any help or hints! Alex



43.9k

Hi

try, in scripts/Phalcon/Builder/Component.php line 75:

//if (preg_match('/config\.php$/i', $f->getPathName())) {
if (preg_match('/\/config\.php$/i', $f->getPathName())) {
....


5.7k

Thanks, unfortunately same result :-( Code is now: https://screencloud.net/v/y3Di

I thought perhaps it's because I put the project in /home/www/ instead of /var/www/, but that can't be it. I have added /home/www/ as a Virtualhost, so that can't be it either.

Could it be something else I'm overlooking? Thanks in advance.



5.7k
Accepted
answer

To whom it may concern, I found the solution, I changed: 'host' => 'localhost', to 'host' => '127.0.0.1',

et voila...