[phplib] Weird *major* phplib installation problems .... From: Emre Bastuz (info <email protected>)
Date: 01/14/01

Hi,

I have been using the phplib functions on a Linux machine with
an Apache and mod_php (4.0.3) which worked quite good.

Now I have been trying to move my program to another server
running FreeBSD, Apache and PHP as CGI.

I have a lot of problems running the stuff, the most obvious
annoyances are as follows (detailed version/config explanation
on bottom of the email):

- when I put a line like "require ("table.inc")" for example in my
  local.inc, my script complains that the "Table" class cannot
  be redeclared ...

- ... when I remove the line "require ("table.inc")" in my local.inc
  my script complains that it cannot extend non-existing class
  "Table"

- I have several versions of PHP compiled, one I have called "php404"
  (php 4.0.4 :) and moved into the cgi-bin directory. When I adjust
  an .htaccess file to use this binary for parsing scripts, I get the
  following error "Parse error: parse error in
  /usr/local/apache/cgi-bin/php404 on line 2471"

  Looks like the binary is interpreted as a scipt ?

  Whenever I call php404 on the command line and do a <? phpinfo() ?>
  everything seems to work fine though

- for sake of simplicity I tried to test the phplib distribution´s
  example pages. Clicking "Show your phpinfo() page." results in a
  "document contained no data"

- to collect the version information for this mail I just called up
  my php3 binary on the command line (to do an phpinfo()):
  "Cannot extend non existant class tpl_form in local.inc...."
  PHP is complaining about the local.inc of my project file,
  not phplib´s prepend.php3 ?!?! Why the hell is this one used ?!

- calling the php binary with full cgi-bin path gives an internal server
  error, instead of the expected security remark

I´m afraid I did something wrong *bigtime*.

I´m not sure if these problems have got something to do with phplib
itself (they probably don´t) - they just come up most obvious when
using the lib.

I´m desperate :)

Any help/hint/whatever will be appreciated.

Regards,

Emre

Apache: 1.3.14

php3: /cgi-bin/php3, phpinfo () says
 Version 3.0.17,
 Configure command: ./configure '--with-mysql' '--enable-track-vars' '--enable-force-cgi-redirect'

php4: /cgi-bin/php4, phpinfo () says
 Version 4.0.3pl1,
 './configure' '--with-mysql' '--enable-track-vars' '--enable-bcmath' '--enable-force-cgi-redirect'

php404: /cgi-bin/php404, phpinfo () says
 Version 4.0.4,
 './configure' '--enable-discard-path' '--with-mysql' '--enable-track-vars' '--enable-bcmath' '--enable-force-cgi-redirect'

.htaccess in the folder of my script to adjust the usage of the
wanted binary :

DirectoryIndex index.php3 index.wphp index.html index.php
Action php3-script /cgi-bin/php404
Action php-script /cgi-bin/php404
AddHandler php3-script .php3
AddHandler php-script .php

Directory structure for phplib:
/path/to/serverroot/htdocs
/path/to/serverroot/php

-- 
Emre Bastuz
info <email protected>              http://www.emre.de        
UIN: 561260           PGP Key ID: 0xAFAC77FD

--------------------------------------------------------------------- To unsubscribe, e-mail: phplib-unsubscribe <email protected> For additional commands, e-mail: phplib-help <email protected>