Operating System - HP-UX
1843342 Members
3467 Online
110214 Solutions
New Discussion

PHP error for file functions ?

 
Lucien Wolfs
Valued Contributor

PHP error for file functions ?

Hi,

On a HP box (11i 64bits) I installed Apache&PHP from June CD's

Versions:
PHP 4.2.3
Apache 2
There's also a MySQL installation

I'm trying to install a PostNuke portal on that box. (Really nice).
Problem:
During install there's a PHP function called
file_exists (and furtheron is_writable)
which ALWAYS returns false. This is highly annoying, because install keeps looping.

Anybody know if there's a problem with PHP or is there maybe a setting within PHP.INI or HTTPD.CONF to overcome this ?

Thanks in advance !!
6 REPLIES 6
Steven E. Protter
Exalted Contributor

Re: PHP error for file functions ?

Define install keeps looping. With messages and install logs if possible.

Perhaps you should do the install with the httpd server down(unless otherwise indicated).

Is this swinstall or a custom install script?

More information=more help.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Lucien Wolfs
Valued Contributor

Re: PHP error for file functions ?

Define looping:

When installing, the install procedure checks whether a file (config.php) has the corrects rights (666). If not a screen appears to change those files and press the recheck button. Because the funtion "is_writable" always returns FALSE we have a loop.

The coding:

if (is_writable($file)) {
echo "

" . _CHMOD_CHECK_3 . "
";
$chmod = 0;
} else {
echo "

align='absmiddle'>" . _CHMOD_CHECK_4 . "
";
$chmod = 1;
}


I inserted a print statement to check where the if statement is.


This cannot be done without webserver and is done with a custom installation procedure.
All webdriven.

So what I'm after is if anybody did experience the same failing file functions using PHP 4.2.3
and/or if anybody knows how to correct this.

benoit Bruckert
Honored Contributor

Re: PHP error for file functions ?

HI,
I didn't check if the is_writable return always false or not, if it's the case, may be a submit of this bug on php.net could be helpfull (check also if it's a known pb on HPUX).
Did you check that your http user can write to this file ? If it's not the case, then this could be a solution
Anyway, if is_writable is really a bug and you want to install your product, you can change the script with the is_writable and palce in the test the TRUE keyword to by-pass the test.
Sure it's not "clean" but should work.
But I think that there's an authorization failure somewhere !

hope that help
Benoit
Une application mal pansée aboutit à une usine à gaze (GHG)
Lucien Wolfs
Valued Contributor

Re: PHP error for file functions ?

On the PHP.NET website there's also a mention about these problems

http://nl2.php.net/function.file-exists

I guess, HP has to compile a more newer version and include that one with the new OS CD's.

Havenot been able to find a newer version on the HP website.
benoit Bruckert
Honored Contributor

Re: PHP error for file functions ?

Then you can compile your own. with your favorites features..(this is what I do)
you can search in the forum on the way to compile php+apache...

hth
Benoit
Une application mal pansée aboutit à une usine à gaze (GHG)
Matti Yrjölä
Occasional Advisor

Re: PHP error for file functions ?

I have also confirmed this issue (with the current/latest HP Web Server Suite using PHP 4.2.3) trough HP support and the bug has been acknowledged but they got information that a new version of HP Web Serve Suite is only coming early next year!

This is a serious problem so if you have installed HP Web Server Suite and are using PHP scripts better watch out.
Would be nice if HP would post a warning at their download site.

Still having a problem trying to get Apache 2, PHP and MySQL running together due to problems with missing shared libraries, see:

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=145650