You are not logged in.

#1 2010-09-20 21:37:24

brisbin33
Member
From: boston, ma
Registered: 2008-07-24
Posts: 1,796
Website

[SOLVED]file_exists, require_once works here not there

I've written some PHP for a friend.  It uses an Amazon web service to search for some coverart.  It requires some support files, some authentication files, and some configuration files.  As a simple test case, we've got everything in one directory and are running it with the following:

cd /path/to/coverfetch
php ./coverfetch.php

As you can see from my page(link removed), everything works great here.

He's using the exact same coverfetch standalone directory on his end and it doesn't work.

What's more weird is the way it doesn't work.  I use file_exists() to verify that everything that's needed is there and it's always returning false for him.  He's tried both relative and absolute paths in the config, we've also triple checked ownership/permissions and everything seems correct, he's even done mod 777 and running as root. Nothing.

It's got to be php configuration right?

Well, he sent me his php.ini and php.d/* files, I copied php.ini to my system and copied php.d/* to /etc/php/conf.d/ as that's where they go on Arch (he's on CentOS).  And guess what, the page still loads fine here... wtf?

His output of php -i: (removed)
And mine: (removed)

Nothing stands out to me.

The first call to file_exists('./aws.ini') returns false for him.  If we comment that, then the first call to require_once('./AWSSoapClient.php') fails for him.

All of this works fine for me.

I'm running PHP 5.3 on Arch, he's running PHP 5.1 on CentOS

Does anyone have any ideas?

EDIT: so dumb...

PHPs Changlog wrote:

5.3.0 ... Single quotes can now be used around variable assignments

I've asked him to change the quoting in our config.ini and we'll see if that does the trick...

EDIT2: Yup, solved.

Last edited by brisbin33 (2010-09-21 17:48:04)

Offline

Board footer

Powered by FluxBB