![]() |
Hey,
First time installing on Mac and when visit my project folder I see a blank page. If I start it with php spark serve I can see the Welcome page on http://localhost:8080/ but still no result for my project folder. When I check errors log file I see those lines: [authz_core:error] [pid 5443] [client 127.0.0.1:53603] AH01630: client denied by server configuration: /Applications/XAMPP/xamppfiles/htdocs/Demyr/my_project/app/ [authz_core:error] [pid 5443] [client 127.0.0.1:53603] AH01630: client denied by server configuration: /Applications/XAMPP/xamppfiles/htdocs/Demyr/my_project/writable/ [authz_core:error] [pid 5446] [client 127.0.0.1:54238] AH01630: client denied by server configuration: /Applications/XAMPP/xamppfiles/htdocs/Demyr/my_project/app/ [authz_core:error] [pid 5446] [client 127.0.0.1:54238] AH01630: client denied by server configuration: /Applications/XAMPP/xamppfiles/htdocs/Demyr/my_project/writable/ [authz_core:error] [pid 5446] [client 127.0.0.1:54238] AH01630: client denied by server configuration: /Applications/XAMPP/xamppfiles/htdocs/Demyr/my_project/system/
11-02-2023, 05:57 AM
(This post was last modified: 11-02-2023, 06:07 AM by captain-sensible. Edit Reason: spelling )
well what i would say in terms of serving php and html is that if you just installed CodeIgniter4 to your Desktop , change directory( using mac equivalent to linux terminal emulator) to inside of the directory and use :
Code: php spark serve then open a web browser and type in Code: http://localhost:8080 then you should see a welcome message unless writable is not "writable" . There is no need of xampp nor apache . if you use sqlite as a database you can do quite extensive web development that way. xampp is or was a revamp of apache by "apache friends" i.e it is a web server. In that case you would not( and have no need to ) be invoking spark The other things is ..lets have a look at etc hosts on my linux box : Code: [andrew@darkstar Desktop]$ cat /etc/hosts what the above implicitly suggests is that 127.0.0.1 is already taken . I have configured my web dev to use 127.0.0.3 and can get the landing page of my web dev by just putting 127.0.0.3 in web browser address bar. You might have conflict with xampp , so need to use set up appropriate none clashing localhost url
OK. Then how can I install CodeIgniter on Mac and make it work without spark as I am used to? Because I don't want to work on 8080. I prefer http ://localhost/Demyr/my_project/
well thats going to take some understanding of web dev. This looks quite good:
https://www.git-tower.com/blog/apache-on-macos/ Here you use apache on mac , rather than xampp which on linux goes to /opt if you look at my etc hosts above then http://joesoapdev will show my landing page
I checked XAMPP 8.2.4 on Mac, but CI4 did not work, because of no intl extension.
We need to get or compile "intl.so" for PHP 8.2.4. Code: $ sudo chgrp -R daemon writable/ Error Class "Locale" not found search → (11-02-2023, 03:11 PM)kenjis Wrote: I checked XAMPP 8.2.4 on Mac, but CI4 did not work, because of no intl extension. Yepp. Definitely it doesn't work. I even un-remarked the intl extension.in php.ini under Xampp but it didn't work. So I have mixed the suggestion of @captain-sensible : Using Xampp for mysql and php spark for the action. I didn't want to go on with sqllite. Anyway, what is your way of setup on mac @kenjis ? What would you suggest? @InsiteFX what virtual host are you using?
I use Homebrew for PHP, MySQL, and use `spark serve`.
I also installed MAMP for checking. CI4 works on MAMP, but MAMP is not updated recently. So PHP version is a bit old. I don't recommend it. If you can use Homebrew, I recommend it. If you like Apache, you can install it via Homebrew.
Thank you @kenjis ,
By the way I have another issue. I can't point my css files. Since I use php spark serve, it works on http://localhost:8080. And so my base url is http://localhost:8080. I can't use my folder name and I can't reach my css files which are under public. How to overcome this?
@demyr Use base_url() like base_url('images/icons/edit.png').
See https://codeigniter4.github.io/CodeIgnit...l#base_url |
Welcome Guest, Not a member yet? Register Sign In |