PDA

View Full Version : PHPLIB


arahn
02-12-2000, 08:37 PM
What local changes do I need to make to get PhpLib working on my FutureQuest account? I made a local copy of prepend.php3 with my params on www/includes but when i tried to include("prepend.php3") from that dir I got the following:

Warning: SAFE MODE Restriction in effect. The script whose uid is 41545 is not allowed to access /big/dom/phplib/php/db_mysql.inc owned by uid 0 in /xhost/www/includes/prepend.php3 on line 12

Fatal error: Failed opening required 'db_mysql.inc' in /xhost/www/includes/prepend.php3 on line 12

It seems that I need to deactivate safe_mode for this to work. But when i make a .htaccess with:

php3_safe_mode off

on it, it crawls with a 500 error.

Any help?

TYA
------------------
Visita http://www.freefriends.com y envía postales digitales a todos tus amigos!

Terra
02-12-2000, 10:21 PM
What you are running into is legacy configuration, and I really do need to yank out the PHPlib from:
/big/dom/phplib

When safe_mode was invoked, it basically destroyed all hopes of sharing it from a central core - yet I left the PHPlib installed for further tinkering/testing by myself...[nbsp][nbsp]This was not so much a bad thing, as PHPlib is a moving target, and runs the risk of a core upgrade breaking existing scripts...

You will need to obtain the latest PHPlib and install it local into your domain for it to work properly...[nbsp][nbsp]You also have control over what version you want to use, and your freedom to choose when to upgrade...

Also, trying to override 'safe_mode' is futile as I have custom traps in place to stop that from happening resulting in 500 errors...

--
Terra
--Well, it looked good on paper, but the ink just wouldn't dry properly--
FutureQuest

heath
02-12-2000, 10:53 PM
PHPLIB will work flawlessly in a FQ virtually hosted enviorment:

Follow the docs carefully, and any references in the PHPLIB docs to the php.ini file need to be made locally, via .htaccess.

The more I use it, the more I appreciate its power - but its almost *TOO* powerful for my tastes - there's all sorts of stuff there most will never need.

The phplib mailing list is also a great source of help.[nbsp][nbsp]

JVC
02-14-2000, 02:04 PM
On the same note, is there a reason why we can't override the default include path with the .htaccess in the Secure_Server directory?

--- .htaccess ---
php3_track_vars on
php3_include_path /big/dom/xpro_am_electronics/php
php3_auto_prepend_file prepend.php3
------

The MerchantQuest.net server seems to be ignoring the .htaccess file.

TIA

Charles Capps
02-14-2000, 04:23 PM
Try using variations on that path (cut off /big/dom), you might be having problems encountering safe_mode's restrictions.
[This message has been edited by Charles Capps (edited 02-14-00@3:24 pm)]

JVC
02-14-2000, 05:15 PM
Ok, I tried leaving off the /big/dom and tried all manner of variations.[nbsp][nbsp]php_info() is still showing:

include_path[nbsp][nbsp].:/big/dom/phplib/php

Any idea what the '.:' in front of the path is supposed to mean?[nbsp][nbsp]None of the other directives that have path statements have the '.:' in front of them.

All of the other directives in my .htaccess file are being ignored also.

If this is because of the safe mode settings, surely there is a way of doing this with out making a seperate copy of my php library.[nbsp][nbsp]After all, that would kind of defeat the purpose of having a common library of functions.

[This message has been edited by JVC (edited 02-14-00@4:41 pm)]

Terra
02-14-2000, 05:18 PM
JVC:[nbsp][nbsp]I made some adjustments in the WildCard SSL server...[nbsp][nbsp]This should allow your php_ overrides...

Please continue any further communication regarding this to:
support@FutureQuest.net

Thanks...

--
Terra
--I had a nifty tagline until Deb started talking to me and it went *poof*--[nbsp][nbsp](I go run and hide now) ;)
FutureQuest

Terra
02-14-2000, 05:28 PM
include_path[nbsp][nbsp].:/big/dom/phplib/php

The include path is soon to deprecate (/big/dom/phplib/php) as it's no longer valid...[nbsp][nbsp]I have to pull all Apache daemons offline in order to make the change - something that I hesitate to do as it directly translates to perceived downtime... :(

IOW: The 'include_path' still works, but is not a clean implementation...

. == current directory
: == field seperator

basically:
.:/one:/two

means:
search current directory first
if not found
search /one
if not found
search /two
if not found
throw an error

--
Terra
--When you find something that works, stick with it - even if it means that forward progress must remain frozen--
FutureQuest

JVC
02-14-2000, 05:37 PM
Thanks for the help.[nbsp][nbsp]Sorry for being a pain.[nbsp][nbsp]Frustration was getting the better of me. :(

Ryuuguu
02-18-2000, 01:09 AM
I have gotten phplib 7.2 working here with this .htaccess file in my www direcory

php3_magic_quotes_gpc Off[nbsp][nbsp]
php3_magic_quotes_runtime Off
php3_magic_quotes_sybase Off
php3_track_vars On[nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp]
php3_include_path[nbsp][nbsp][nbsp][nbsp][nbsp][nbsp]./:/big/dom/xtabenihon/include
php3_auto_prepend_file prepend.php3