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

Cannot get tutorial to work

Second time trying to post this.

When reaching the end of the first section of the tutorial my browser shows a directory listing instead of the "Hello!" message using the following URL - "https://localhost/tutorial".

If I add the public folder to it, i.e. "https://localhost/tutorial/public", it works correctly.

I created and placed both .htaccess files in their respective folders.

I followed the same folder convention as shown on the page, "tutorial" as the 'root' folder with "app" and "public" contained therein.

phpInfo shows Phalcon enabled as version 1.3.2.

I believe I have followed the instructions word for word and so I am disappointed that it isn't working.

Questions:

1) What does the "test" refer to in the URL "https://localhost/test" as shown in the graphic saying "Hello!"?

2) What is the root folder in Apache's httpd.conf set to in relation to the tutorial folder as shown in the suggested file structure?

Any other thoughts on what might be causing this behavior?



43.9k
Accepted
answer

Hi,

When reaching the end of the first section of the tutorial my browser shows a directory listing instead of the "Hello!" message using the following URL - "https://localhost/tutorial".

this looks like you haven't mod_rewrite enabled (and your .htacces file is ignored). Solution is to type command: a2enmod rewrite (as root)

1) What does the "test" refer to in the URL "https://localhost/test" as shown in the graphic saying "Hello!"?

it's an error, it should be (on the picture): "https://localhost/tutorial".

2) What is the root folder in Apache's httpd.conf set to in relation to the tutorial folder as shown in the suggested file structure?

looks like default apache config: usualy /var/www (under linux) => https://localhost /var/www/tutorial => https://localhost/tutorial

By going to github I saw that Apache's mod-rewrite module must be loaded and turned on. It would be helpful to show that on the "Installation on WAMP" page.

Thanks. The first time I wrote it I mentioned I was using WAMP but left it out on the rewrite (for some reason when I clicked submit it went to the discussions page and said I needed to log in again.

Yes, the mod-rewrite wasn't enabled however I had to edit the httpd.conf file to load the module and to turn it on.