Jump to content

No session files and no error logs


Recommended Posts

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]

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.