Welcome Guest, Not a member yet? Register   Sign In
Page displays 'index.php'
#11

(04-05-2024, 07:08 AM)microchip Wrote: www.[mywebsite]/public/index.php - shows index.php as text string
www.[mywebsite]/public/ - shows index.php as string

I don't understand why you see index.php as text string.
It seems you have something incorrect settings in Apache's configuration.

If you navigate to http://localhost:8080/public/, you should see:
404
Can't find a route for 'get: public/'.
Reply
#12

I have not managed to get CI4 working, ever!
I had a look when it first came out. CI3 great, no problems, CI4 failure every time.
I do remember having to make change to .htaccess in CI3 to get it working. Does CI4 need the same?
Reply
#13

CI4 is well-documented. If you follow the document, it should work.
https://codeigniter4.github.io/CodeIgnit...ith-apache

CI4 has more secure directory structure than CI3.
https://codeigniter4.github.io/CodeIgnit...ure-public
Reply
#14

Sounds like there is no associated setting for .php files.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply
#15

php files work fine.
Test.php with phpinfo() works
Base index.php works.
Follow tutorial instructions I just get the text 'index.php' on the screen. The page contains nothing in the way of php or html code.
Reply
#16

Came across this this morning may help you sort this out.

Why are my PHP files showing as plain text?
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply
#17

The appearance of 'index.php' appears to represent a 404 error.
Using F12 development tools, a 404 error is indicated but what injects the text I don't know
I will repeat the set up process to see if I've missed something (I don't think I have).
Reply
#18

OK, this may be a stupid reply, but the initial change in config/app does not have the comment separator.
public string $indexPage = 'index.php'; remove index.php
perhaps change to 
public string $indexPage = 'index.php';    //  remove index.php
Reply




Theme © iAndrew 2016 - Forum software by © MyBB