Welcome Guest, Not a member yet? Register   Sign In
Blank Page After Installing On Mac
#1

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/
Reply
#2

(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
# Static table lookup for hostnames.
# See hosts(5) for details.
127.0.0.1  localhost
::1
127.0.1.1  darkstar.localdomain darkstar

127.0.0.3  joesoapdev
[andrew@darkstar Desktop]$

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
CMS CI4 A CMS system, runs out of the box written on top of CI4
Arch Book  CodeIgniter4 on Apache(pages 92-114) 
Reply
#3

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/
Reply
#4

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
CMS CI4 A CMS system, runs out of the box written on top of CI4
Arch Book  CodeIgniter4 on Apache(pages 92-114) 
Reply
#5

(This post was last modified: 11-02-2023, 08:58 PM by kenjis.)

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/
$ chmod -R g+w writable/

Error
Class "Locale" not found search →
Reply
#6

I use XAMPP with PHP 8.2.4 but I use VHOSTS and it all works just fine,

But @kenjis, is right even I have to un-remark the intl extension.
What did you Try? What did you Get? What did you Expect?

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

(This post was last modified: 11-02-2023, 11:55 PM by demyr.)

(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.
We need to get or compile "intl.so" for PHP 8.2.4.

Code:
$ sudo chgrp -R daemon writable/
$ chmod -R g+w writable/

Error
Class "Locale" not found search →

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?
Reply
#8

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.
Reply
#9

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?
Reply
#10

@demyr Use base_url() like base_url('images/icons/edit.png').
See https://codeigniter4.github.io/CodeIgnit...l#base_url
Reply




Theme © iAndrew 2016 - Forum software by © MyBB