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

Trouble at the 2 tutorial

Hi, I start with phalcon, and I have an error that I do not understand during the tutorial 2 , I downloaded the zip (invo-master) but when I put it on my server:

(I use the last version of xampp, Windows 10x64)

Do you have any solutions?, thank you in advance

can you check the config file at app/config/config.php

'baseUri'        => preg_replace('/public([\/\\\\])index.php$/', '', $_SERVER["PHP_SELF"])
edited Mar '18

I'm guessing the URL prefix /invo-master is causing the problem.

Change it in your config.php to /

Or, your URI source is wrong:

// Use $_GET["_url"] (default)
$router->setUriSource(
    Router::URI_SOURCE_GET_URL
);

// Use $_SERVER["REQUEST_URI"]
$router->setUriSource(
    Router::URI_SOURCE_SERVER_REQUEST_URI
);

can you check the config file at app/config/config.php

'baseUri' => preg_replace('/public([\/\\])index.php$/', '', $_SERVER["PHP_SELF"])

I did what you told me, however in the example it's a config.ini file not config.php so I did this: https://www.image-heberg.fr/files/1522154898455791267.png

it works for the homepage but after not for this page: https://www.image-heberg.fr/files/15221549611912870556.png

https://www.image-heberg.fr/files/1522155064886438947.png

i try to modify that but i don't know very well the language so...



5.3k
Accepted
answer

can you check the config file at app/config/config.php

'baseUri' => preg_replace('/public([\/\\])index.php$/', '', $_SERVER["PHP_SELF"])

I did what you told me, however in the example it's a config.ini file not config.php so I did this: https://www.image-heberg.fr/files/1522154898455791267.png

it works for the homepage but after not for this page: https://www.image-heberg.fr/files/15221549611912870556.png

https://www.image-heberg.fr/files/1522155064886438947.png

i try to modify that but i don't know very well the language so...

try set (i personally don't like ini files)

baseUri = /invo-master/

can you check the config file at app/config/config.php

'baseUri' => preg_replace('/public([\/\\])index.php$/', '', $_SERVER["PHP_SELF"])

I did what you told me, however in the example it's a config.ini file not config.php so I did this: https://www.image-heberg.fr/files/1522154898455791267.png

it works for the homepage but after not for this page: https://www.image-heberg.fr/files/15221549611912870556.png

https://www.image-heberg.fr/files/1522155064886438947.png

i try to modify that but i don't know very well the language so...

try set (i personally don't like ini files)

baseUri = /invo-master/

It's working , thanks a lot ! It's weird I thought I tried but apparently no!