Puffenstuff Posted November 12, 2007 Share Posted November 12, 2007 So I compiled and installed php 5.4.2 on mac os 10.4 server. I am trying to install a mediawiki. When I configure the wiki it told me that php’s session directory was not set. When I finished the configuration the main index would not load/was blank. So I edited php.ini (I had to move it from /etc to /Library/PHP5/lib to get it to load) and set the session save directory to /Library/PHP5/session (I created this directory myself php.ini said it would not auto create). Now mediawiki says the the directory is invalid or not writeable and fails. The really galling part is php is not generating error logs(or I cant find them). I have enabled error logging, set the log file as /Library/Apache2/logs/php_errors and even created a blank file with pico and still no logs. Any help would be greatly appreciated as I'm totally at a loss. My php.ini is attached (renamed to php.ini.txt) Here are the compile flags I used for php CFLAGS="-arch ppc -isysroot /Developer/SDKs/MacOSX10.4u.sdk" \ ./configure --prefix=/Library/PHP5 \ --mandir=/usr/share/man \ --infodir=/usr/share/info \ --sysconfdir=/etc \ --with-zlib \ --with-xml \ --with-zlib-dir=/usr \ --with-openssl \ --enable-exif \ --enable-ftp \ --enable-mbstring \ --enable-mbregex \ --enable-sockets \ --with-mysql=/usr/local/mysql \ --with-mysqli=/usr/local/mysql/bin/mysql_config \ --with-apxs2=/Library/Apache2/bin/apxs [attachment deleted by admin] Quote Link to comment https://forums.phpfreaks.com/topic/77010-no-session-files-and-no-error-logs/ Share on other sites More sharing options...
rajivgonsalves Posted November 12, 2007 Share Posted November 12, 2007 well check if your session directory is writable to all, for the error logs check the apache error logs /Library/Apache2/logs/error_log Quote Link to comment https://forums.phpfreaks.com/topic/77010-no-session-files-and-no-error-logs/#findComment-389965 Share on other sites More sharing options...
nuxy Posted November 12, 2007 Share Posted November 12, 2007 I suppose the mediawiki is an application written in php to work on a web server? If so, try setting the session save path by using the session_save_path function. You can just trough it in anywhere in the script. Also, I don't know the correct configuration command to set the session path, but it can be a bug with php, as it's default is /tmp, which I don't think a mac has such a directory. Source: http://php.net/manual/en/ref.session.php#ini.session.save-path Quote Link to comment https://forums.phpfreaks.com/topic/77010-no-session-files-and-no-error-logs/#findComment-389971 Share on other sites More sharing options...
Puffenstuff Posted November 12, 2007 Author Share Posted November 12, 2007 My php.ini file has the line session.save_path = "/Library/PHP5/session/" ls returns drwxr-xr-x 2 root admin 68 Nov 11 21:04 session/ So read/write/execute by root. Read/execute by admin group. Execute by others if I read this right. Apache is running as root so it should be able to write here. I checked the apache logs and found [sun Nov 11 20:57:55 2007] [warn] Init: Session Cache is not configured [hint: SSLSessionCache] as well as dyld: lazy symbol binding failed: Symbol not found: _deflateInit2_ Referenced from: /Library/Apache2/modules/libphp5.so Expected in: /usr/local/mysql/lib/mysql/libmysqlclient.15.dylib Edit: Should I still try to stick session_save_path in the script? Quote Link to comment https://forums.phpfreaks.com/topic/77010-no-session-files-and-no-error-logs/#findComment-389983 Share on other sites More sharing options...
Puffenstuff Posted November 12, 2007 Author Share Posted November 12, 2007 Ok so I found php was writing it's log files to the apache log by creating a scritpt with trigger_error. Changed the permissions on the /session directory and now mediawiki says it is valid. So I tried again to setup mediawiki and it did not work. The only errors generated were. dyld: lazy symbol binding failed: Symbol not found: _deflateInit2_ Referenced from: /Library/Apache2/modules/libphp5.so Expected in: /usr/local/mysql/lib/mysql/libmysqlclient.15.dylib dyld: Symbol not found: _deflateInit2_ Referenced from: /Library/Apache2/modules/libphp5.so Expected in: /usr/local/mysql/lib/mysql/libmysqlclient.15.dylib [Mon Nov 12 11:12:12 2007] [notice] child pid 306 exit signal Trace/BPT trap (5) I have also tried to setup phpMyadmin and mantis (php and mysql based bugtracker) and both of them give me php related errors. What do I try next? Quote Link to comment https://forums.phpfreaks.com/topic/77010-no-session-files-and-no-error-logs/#findComment-390073 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.