php-install Digest 21 Mar 2001 02:16:22 -0000 Issue 227 Topics (messages 2523 through 2531): Re: Configuring Sessions In PHP 2523 by: Grimes, Dean 2524 by: Phil Driscoll PHP includes not working. 2525 by: Dan McCullough PHP Compiled, but won't run. [Redhat 7.0, PHP4.0.4PL1] 2526 by: Jason Bell Help Configuring PHP with Graphics Support 2527 by: Coulee Web multiple definition of 'get_module' when installing 2528 by: Sarah Kerr Re: Mysql socket connect problems 2529 by: Paul Newby 2530 by: B. van Ouwerkerk 2531 by: Paul Newby Administrivia: To subscribe to the digest, e-mail: [EMAIL PROTECTED] To unsubscribe from the digest, e-mail: [EMAIL PROTECTED] To post to the list, e-mail: [EMAIL PROTECTED] ----------------------------------------------------------------------
I'm not a 100% sure but I think sessions only work with php compiled as an apache module... could be wrong on that though. However, I do remember reading something somewhere about that. Anyway, have you checked that PHP was compiled with sessions tracking and that cookies are enabled in your browser. You can do a phpinfo() to see if PHP has been compiled with session support. I had errors as well until I included --enable-trans-sid and --enable-track-vars. Also, check to make sure that the sessions_save_path is valid and exists. Check your php.ini file for the current setting. Another way is to use phplib. Dean -----Original Message----- From: Eric Pankoke [mailto:[EMAIL PROTECTED]] Sent: Monday, March 19, 2001 7:21 PM To: [EMAIL PROTECTED] Subject: [PHP-INST] Configuring Sessions In PHP I apologize if this already made it to the list, but as far as I can tell it did not. I am trying to use PHP 4.0.4pl1 with Windows 98 SE and Personal Web Server 4.x (not sure exactly which version). So far everything seems good, except when I try to add the line session_start() to a PHP page I get an error. Are there some settings I need to add to php.ini to get this to work? I am using php.exe. Any help that could be offered would be much appreciated. Thank you. Eric -- PHP Install Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
The windows binaries will do sessions for you. In php.ini you need to do a few things in the sessions bit. Here's the relevant part of my php.ini: session.save_handler = files ; handler used to store/retrieve data session.save_path = F:\php\sessiontmp ; argument passed to save_handler ; in the case of files, this is the ; path where data files are stored session.use_cookies = 0 ; whether to use cookies session.name = PHPSESSID ; name of the session ; is used as cookie name session.auto_start = 0 ; initialize session on request startup session.cookie_lifetime = 0 ; lifetime in seconds of cookie ; or if 0, until browser is restarted session.cookie_path = / ; the path the cookie is valid for session.cookie_domain = ; the domain the cookie is valid for session.serialize_handler = php ; handler used to serialize data ; php is the standard serializer of PHP session.gc_probability = 1 ; percentual probability that the ; 'garbage collection' process is started ; on every session initialization session.gc_maxlifetime = 1440 ; after this number of seconds, stored ; data will be seen as 'garbage' and ; cleaned up by the gc process session.referer_check = ; check HTTP Referer to invalidate ; externally stored URLs containing ids session.entropy_length = 0 ; how many bytes to read from the file session.entropy_file = ; specified here to create the session id ; session.entropy_length = 16 ; session.entropy_file = /dev/urandom session.cache_limiter = nocache ; set to {nocache,private,public} to ; determine HTTP caching aspects session.cache_expire = 180 ; document expires after n minutes -- Phil Driscoll Dial Solutions +44 (0)113 294 5112 http://www.dialsolutions.com http://www.dtonline.org
Example: You can create a php file a include a file as long as that file resides in the same directory as the include file. Test it Create a /test directory under your sitename/web dir and make a file with <? phpinfo(); ?> in it. name it info.php and save it in the test dir. then in your web folder create a file with <? include ("test/info.php"); ?> and name it test.php save it in web. Now you get an error like unable to include info.php at inclusion: './' I've look for days how to fix this.. I found it once somewhere and cant find it again. I have tried to add the paths to the php.ini and restarted apache no change. I found something on script alias or include directives in an htaccess file dan mccullough ________________________________ There is no such thing as a problem, unless the servers are on fire
when I try and restart apache, it won't load PHP. There were no errors during compile. When I run apachectl configtest, I get the following error: Cannot load /usr/local/apache/libexec/libphp4.so into server: /usr/local/apache/libexec/libphp4.so: undefined symbol: uncompress Is there a library or something that I'm missing? Thank you! Jason Bell
I need some help here. I need to configure PHP 4 with support for all of the following: Apache MySQL Database GD (Graphics Support) JPEG PNG True Type Fonts Can anyone help me with a configuration line? I have tried: ./configure --with-apxs --with-mysql --with-gd=/usr/lib --with-freetype And I get the following error: checking whether to include GD support... configure: error: Unable to find libgd .(a|so) anywhere under /usr/lib although BOTH libgd.so AND libgd.a are found under /usr/lib. Can anyone help me? I am using a Cobalt RaQ 4 which uses a port of Redhat Linux. -- ----------------------------------------------------------- Shane Lambert, Owner Coulee Web http://www.couleeweb.net/
Hello, I'm getting the following error when installing php with mysql & xml support. I had previously installed without xml support and it was all good. ext/xml/.libs/libxml.al(xml.lo): In function `get_module': /usr/src/php-4.0.4pl1/ext/xml/xml.c:60: multiple definition of `get_module' ext/mysql/.libs/libmysql.al(php_mysql.lo):/usr/src/php-4.0.4pl1/ext/mysql/php_mysql.c:159: first defined here collect2: ld returned 1 exit status make[1]: *** [libphp4.la] Error 1 make[1]: Leaving directory `/usr/src/php-4.0.4pl1' make: *** [all-recursive] Error 1 On line 60 of xml.c is the following: ZEND_GET_MODULE(xml) On line 159 of php_mysql is the following: ZEND_GET_MODULE(mysql) Has anyone encountered a similar problem or has any idea how to fix this? Thanks in advance! Sarah __________ Sarah Kerr BlueNexus Software Corporation [EMAIL PROTECTED]
I also have the problem described by Jason, or a somewhat similar one. The MySQL command line monitor works fine, but when php mysql functions are called from a script I get Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' which is kind of odd because in the process of getting PHP4 installed, I removed and reinstalled MySQL, and changed the layout in the process: the mysql directory was moved from /var/lib to /usr/local/mysql/var and PHP4 was configured with '--with-mysql=/usr/local/mysql' ... so I don't know why php appears to be referring to /var/lib/mysql at all. Any ideas? Thanks, Paul N. > Hi > > I would be really grateful if someone can help me out. > I have installed Apache 1.3.17 with php4pl1 and Mysql 3.23.33. I can connect > to Mysql through the console but when I try to connect to it on my web > broswer then I get this error message: > > Warning: MySQL Connection Failed: Can't connect to local MySQL server > through socket '/var/lib/mysql/mysql.sock' (111) in > /home/JasonC/Dev/registration.php on line 19 > > I am using the mysql.sock file in the /tmp/ directory but I have also placed > the mysql,sock file in the '/var/lib/mysql/ directory but to no avail! > > Please help > > Thankyou > > Jason
>which is kind of odd because in the process of getting >PHP4 installed, I removed and reinstalled MySQL, and changed >the layout in the process: the mysql directory >was moved from /var/lib to /usr/local/mysql/var >and PHP4 was configured with '--with-mysql=/usr/local/mysql' >... so I don't know why php appears to be referring >to /var/lib/mysql at all. > >Any ideas? Most installscripts will leave things like configfiles untouched. If you build from source you should copy the distributed INI file to a useful place. You probably didn't take this last step. Take a look a www.devshed.com for an instruction on how to setup MySQL, PHP and Apache. Your old config file has the old location you could alter this manually. Change the location of mysql.sock and restart apache. Use Pico or your favorite text editor to edit your php.ini Although I didn't try it myself (no need to do so since my favorite distro doesn't install anything I don't want it to) I think you should be fine after changing the php.ini file. Bye, B.
> >which is kind of odd because in the process of getting > >PHP4 installed, I removed and MySQL, and changed > >the layout in the process: the mysql directory > >was moved from /var/lib to /usr/local/mysql/var > >and PHP4 was configured with '--with-mysql=/usr/local/mysql' > >... so I don't know why php appears to be referring > >to /var/lib/mysql at all. > > Most installscripts will leave things like configfiles untouched. If you > build from source you should copy the distributed INI file to a useful > place. You probably didn't take this last step. ... > Your old config file has the old location you could alter this manually. > Change the location of mysql.sock and restart apache. Use Pico or your > favorite text editor to edit your php.ini > ... > I think you should be fine > after changing the php.ini file. Yes, I wouldn't be surprised if the problem is an existing configfile, but I don't know which one. The location of mysql.sock isn't specified or implied in php.ini, so far as I can see. Configuring mysql with --with-unix-socket-path=/usr/local/mysql/var/mysql.sock doesn't seem to make any difference either. Paul N.