Welcome Guest, Not a member yet? Register   Sign In
Fresh install won't run
#21

(This post was last modified: 07-11-2024, 02:16 AM by kenjis.)

When you run `php spark serve`, it works perfectly. So there is no problem with CI4.
And you cannot run just a php file with phpinfo() on Apache, it shows there is something wrong with Apache and its PHP configuration.
First of all, you need to configure your Apache server correctly so that it can execute a PHP file.

Can you show the Apache configuration for the virtual domain?

> First I was worried that I didn't load the php module but it is compiled in today, isn't it?

Unfortunately I cannot see your screen or Apache config files. So I don't know.
Reply
#22

(This post was last modified: 07-11-2024, 03:23 AM by bogus.)

I guess you want to see the part of the configuration file where modules are loaded.
And yes of course it makes sense that C I isn't the issue...

This would be something like this:

Code:
# -- Dynamic Shared Object (DSO) Support ------------------------------------- #
# NOTE: Further modules can be found in '/etc/httpd/modules'.

# --- Authentication --- #
LoadModule access_compat_module modules/mod_access_compat.so

... snip

#--- PHP --- #
# https://wiki.archlinux.org/index.php/Apache_HTTP_Server#PHP
#LoadModule php_module modules/libphp.so

# --- URL, header and file control/manipulation/redirections --- #
LoadModule alias_module modules/mod_alias.so
LoadModule autoindex_module modules/mod_autoindex.so
LoadModule dir_module modules/mod_dir.so
#LoadModule userdir_module modules/mod_userdir.so

# Apache 1.3.6 up replaced mod_rewrite with
LoadModule vhost_alias_module modules/mod_vhost_alias.so

# But for codeigniter 4.5.3 or higher we still need it
LoadModule rewrite_module modules/mod_rewrite.so
The only absolute knowledge attainable by man is that life is meaningless. (Tolstoi)
Reply
#23

By the way...
I'd rather prefer not to bother you with my issue and all the questions but....
Have you ever tried a google search for (i.e.) 'codeigniter php settings' or other, very well thought through queries?
The results are rather 'thin' and in my opinion for such a great framework there should pop up all sorts of links but they don't.
I don't understand that.
Or did I overestimated CI's popularity?
The only absolute knowledge attainable by man is that life is meaningless. (Tolstoi)
Reply
#24

(This post was last modified: 07-11-2024, 12:24 PM by captain-sensible. Edit Reason: mistake )

(07-11-2024, 02:14 AM)kenjis Wrote: When you run `php spark serve`, it works perfectly. So there is no problem with CI4.
And you cannot run just a php file with phpinfo() on Apache, it shows there is something wrong with Apache and its PHP configuration.
First of all, you need to configure your Apache server correctly so that it can execute a PHP file.

Can you show the Apache configuration for the virtual domain?

> First I was worried that I didn't load the php module but it is compiled in today, isn't it?

Unfortunately I cannot see your screen or Apache config files. So I don't know.


well using lateral thinking , i am running apache web server on Arch Linux. My codeigniter apps run no problem, so i might be so bold as to validate that there is nothing wrong with CI4. I did have a look at the new vesion of composer.json i can hardly recognise it compared as to what I have . By the way I have a book out on Amazon which in a chapter gets a reader with setting up CI4 in apache on Arch Linux

there are more than one approach to configure Apache web server on Arch Linux but here are the main bits from my /etc/httpd/conf/httpd.conf file

Code:
<IfModule dir_module>
    DirectoryIndex index.html index.php
# i added index.php to above
</IfModule>

LoadModule rewrite_module modules/mod_rewrite.so

LoadModule php_module modules/libphp.so
AddHandler php-script .php


Include conf/extra/httpd-vhosts.conf
Include conf/extra/php_module.conf
CMS CI4 A CMS system, runs out of the box written on top of CI4
Arch Book  CodeIgniter4 on Apache(pages 92-114) 
Github  
Reply
#25

(This post was last modified: 07-11-2024, 11:45 PM by bogus.)

Guys....
Without any offense and without any negativity...
I'm way too far away from Codeigniter to be important to me.

It's' really bad that one needs to hack config files and bug other people with questions how
to install Codeigniter.

There should be a comprehensive, in itself closed, systematic description including all
problem scenarios etc. on how to install it.


I'll will give it up.
The times when I dealt with codes and configuration files are mostly past for me today and
I recognized a long time ago that computing/ IT is just a dead topic to me and doesn't
contribute to my life to make me happy.

Thanks for your contributions - I will choose another solution.
It simply sucks and I'm not going to put another bit of effort into it.

Have a great day.
The only absolute knowledge attainable by man is that life is meaningless. (Tolstoi)
Reply
#26

(07-09-2024, 12:25 AM)bogus Wrote: I strongly believe this needs improvement, otherwise my CI version would work right (since I'm not a totally dummy) now and I didn't need to bother you folks with my.

I'm sorry that you couldn't handle the server setup and are complaining about the framework. 

Which is an open source, where enthusiasts, the same people (with experience or beginners) help you. During installation, in 99% of cases there are no errors. Your case is not an indicator that the whole script is bad.

You may also get an error in laravel or symfony because the server is not configured.

Good luck!
Simple CI 4 project for beginners codeigniter-expenses ( topic )
Reply
#27

As @captain-sensible shows, the following lines are necessary in your Apache config (if you use PHP module with Apache).

Code:
LoadModule php_module modules/libphp.so
AddHandler php-script .php

If you don't configure Apache to run PHP, you cannot run CodeIgniter. It is no wonder.

> Have you ever tried a google search for (i.e.) 'codeigniter php settings' or other, very well thought through queries?
> The results are rather 'thin' and in my opinion for such a great framework there should pop up all sorts of links but they don't.
> I don't understand that.

No. I recommend you search by 'Apache php settings' or something without CodeIgniter.
It is general topic for PHP. No special things for CodeIgniter.

Have a good day!
Reply
#28

(This post was last modified: 07-12-2024, 02:13 AM by captain-sensible. Edit Reason: typo )

i believe there is a book on Amazon called "Arch Linux" 1st published 2023 and has several ipdates 2024 page 64 has web development, page 76 apache , page 82 composer, page 83 CodeIgniter4 , page 103 bootstrap . page 115 grunt task runner. Can i mention URl to Amazon please admin? and for a runs out of the box click on the Ci4 cms link below my post . 17 downloads from Tanzania today for some reason .

"Hujambo " to all in tanzania
CMS CI4 A CMS system, runs out of the box written on top of CI4
Arch Book  CodeIgniter4 on Apache(pages 92-114) 
Github  
Reply
#29

(This post was last modified: 07-12-2024, 02:23 AM by kenjis.)

(07-12-2024, 02:03 AM)captain-sensible Wrote: Can i mention  URl to Amazon  please admin?

No problem.
Generally speaking, URIs that are related to CodeIgniter are no problem.
Reply
#30

(07-12-2024, 02:23 AM)kenjis Wrote:
(07-12-2024, 02:03 AM)captain-sensible Wrote: Can i mention  URl to Amazon  please admin?

No problem.
Generally speaking, URIs that are related to CodeIgniter are no problem.

thanks put it in my sig; cns Ci4 is cms written on top of CI4  - free source , at source forge 
Arch book has chapter  of install & config for apache and getting started with CodeIgniter4
CMS CI4 A CMS system, runs out of the box written on top of CI4
Arch Book  CodeIgniter4 on Apache(pages 92-114) 
Github  
Reply




Theme © iAndrew 2016 - Forum software by © MyBB