Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

session_start() not working on mac [duplicate]

Tags:

php

macos

session

Possible Duplicate:
How can I fix the Permission error when I call session_start()?
PHP Warning Permission denied (13) on session_start()

I am trying to make an admin panel. Unfortunately session does not work on macbook. I have everything installed and working, also latest php at this time.

I just cannot manage to get it working on my mac. It does work on my paid hosting however I cannot work on that.

Please help me to resolve this issue. I believe it's something about permission writing or so.

Preview of ACP

like image 606
dvlden Avatar asked Jul 17 '26 03:07

dvlden


1 Answers

You need to change the permissions on:

/var/folders

I would suggest changing the ownership of the folder:

sudo chown -R nobody /var/lib/php/session
sudo chgrp -R nobody /var/lib/php/session

The 'nobody' option being the user that your webserver runs under and for the second command it's the group.

Note: The folder would need to be changed to wherever you have set your session.save_path to. In the question above the folder is /var/folders so the code would be chown -R nobody /var/folders

like image 194
ajtrichards Avatar answered Jul 18 '26 18:07

ajtrichards



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!