Click to See Complete Forum and Search --> : I gotta be missing something


bpat1434
06-16-2008, 01:03 AM
So I have my own server, and I'd like to get the ZF put in a central location so that all domains have access to the same ZF library (eventually other frameworks will be put there as well). Anyway... I downloaded, extracted, and moved the Zend folder to: /usr/share/php/frameworks.

Now, in php.ini I added /usr/share/php/frameworks, and I have open_basedir enabled (using Plesk) so I added /usr/share/php/frameworks to the open_basedir directory. I've got the following permissions set:

4 drwxr-xr-x 3 root psacln 4096 Jun 14 10:45 frameworks
4 drwxr-xr-x 41 root psacln 4096 Jun 14 08:54 Zend
4 drwxr-xr-x 5 root psacln 4096 Jun 14 08:54 Acl
40 -rwxr-xr-x 1 root psacln 38930 Jun 14 08:54 Acl.php
4 drwxr-xr-x 4 root psacln 4096 Jun 14 08:54 Auth
4 -rwxr-xr-x 1 root psacln 3847 Jun 14 08:54 Auth.php
4 drwxr-xr-x 4 root psacln 4096 Jun 14 08:54 Cache
8 -rwxr-xr-x 1 root psacln 5955 Jun 14 08:54 Cache.php
4 drwxr-xr-x 2 root psacln 4096 Jun 14 08:54 Config
12 -rwxr-xr-x 1 root psacln 8911 Jun 14 08:54 Config.php
4 drwxr-xr-x 3 root psacln 4096 Jun 14 08:54 Console
4 drwxr-xr-x 8 root psacln 4096 Jun 14 08:54 Controller
4 drwxr-xr-x 2 root psacln 4096 Jun 14 08:54 Currency
20 -rwxr-xr-x 1 root psacln 18895 Jun 14 08:54 Currency.php
4 drwxr-xr-x 2 root psacln 4096 Jun 14 08:54 Date
192 -rwxr-xr-x 1 root psacln 189693 Jun 14 08:54 Date.php
4 drwxr-xr-x 7 root psacln 4096 Jun 14 08:54 Db
12 -rwxr-xr-x 1 root psacln 9075 Jun 14 08:54 Db.php
4 -rwxr-xr-x 1 root psacln 2885 Jun 14 08:54 Debug.php
4 -rwxr-xr-x 1 root psacln 930 Jun 14 08:54 Exception.php
4 drwxr-xr-x 4 root psacln 4096 Jun 14 08:54 Feed
16 -rwxr-xr-x 1 root psacln 13053 Jun 14 08:54 Feed.php
4 drwxr-xr-x 3 root psacln 4096 Jun 14 08:54 Filter
4 -rwxr-xr-x 1 root psacln 3881 Jun 14 08:54 Filter.php
4 drwxr-xr-x 4 root psacln 4096 Jun 14 08:54 Form
76 -rwxr-xr-x 1 root psacln 69972 Jun 14 08:54 Form.php
4 drwxr-xr-x 15 root psacln 4096 Jun 14 08:54 Gdata
8 -rwxr-xr-x 1 root psacln 4169 Jun 14 08:54 Gdata.php
4 drwxr-xr-x 3 root psacln 4096 Jun 14 08:54 Http
4 drwxr-xr-x 5 root psacln 4096 Jun 14 08:54 InfoCard
20 -rwxr-xr-x 1 root psacln 16971 Jun 14 08:54 InfoCard.php
4 drwxr-xr-x 2 root psacln 4096 Jun 14 08:54 Json
12 -rwxr-xr-x 1 root psacln 10885 Jun 14 08:54 Json.php
4 drwxr-xr-x 3 root psacln 4096 Jun 14 08:54 Layout
20 -rwxr-xr-x 1 root psacln 17006 Jun 14 08:54 Layout.php
4 drwxr-xr-x 2 root psacln 4096 Jun 14 08:54 Ldap
24 -rwxr-xr-x 1 root psacln 23846 Jun 14 08:54 Ldap.php
4 drwxr-xr-x 3 root psacln 4096 Jun 14 08:54 Loader
12 -rwxr-xr-x 1 root psacln 8516 Jun 14 08:54 Loader.php
4 drwxr-xr-x 4 root psacln 4096 Jun 14 08:54 Locale
32 -rwxr-xr-x 1 root psacln 30176 Jun 14 08:54 Locale.php
4 drwxr-xr-x 5 root psacln 4096 Jun 14 08:54 Log
8 -rwxr-xr-x 1 root psacln 6966 Jun 14 08:54 Log.php
4 drwxr-xr-x 5 root psacln 4096 Jun 14 08:54 Mail
20 -rwxr-xr-x 1 root psacln 18718 Jun 14 08:54 Mail.php
4 drwxr-xr-x 5 root psacln 4096 Jun 14 08:54 Measure
4 drwxr-xr-x 3 root psacln 4096 Jun 14 08:54 Memory
4 -rwxr-xr-x 1 root psacln 2324 Jun 14 08:54 Memory.php
4 drwxr-xr-x 2 root psacln 4096 Jun 14 08:54 Mime
12 -rwxr-xr-x 1 root psacln 9063 Jun 14 08:54 Mime.php
4 drwxr-xr-x 5 root psacln 4096 Jun 14 08:54 OpenId
28 -rwxr-xr-x 1 root psacln 25383 Jun 14 08:54 OpenId.php
4 drwxr-xr-x 12 root psacln 4096 Jun 14 08:54 Pdf
32 -rwxr-xr-x 1 root psacln 29465 Jun 14 08:54 Pdf.php
8 -rwxr-xr-x 1 root psacln 5682 Jun 14 08:54 Registry.php
4 drwxr-xr-x 2 root psacln 4096 Jun 14 08:54 Request
4 drwxr-xr-x 4 root psacln 4096 Jun 14 08:54 Rest
4 drwxr-xr-x 3 root psacln 4096 Jun 14 08:54 Search
4 drwxr-xr-x 3 root psacln 4096 Jun 14 08:54 Server
4 drwxr-xr-x 11 root psacln 4096 Jun 14 08:54 Service
4 drwxr-xr-x 4 root psacln 4096 Jun 14 08:54 Session
28 -rwxr-xr-x 1 root psacln 24873 Jun 14 08:54 Session.php
4 drwxr-xr-x 2 root psacln 4096 Jun 14 08:54 TimeSync
12 -rwxr-xr-x 1 root psacln 8884 Jun 14 08:54 TimeSync.php
4 drwxr-xr-x 3 root psacln 4096 Jun 14 08:54 Translate
8 -rwxr-xr-x 1 root psacln 4863 Jun 14 08:54 Translate.php
4 drwxr-xr-x 2 root psacln 4096 Jun 14 08:54 Uri
8 -rwxr-xr-x 1 root psacln 4636 Jun 14 08:54 Uri.php
4 drwxr-xr-x 4 root psacln 4096 Jun 14 08:54 Validate
8 -rwxr-xr-x 1 root psacln 5266 Jun 14 08:54 Validate.php
4 -rwxr-xr-x 1 root psacln 1715 Jun 14 08:54 Version.php
4 drwxr-xr-x 3 root psacln 4096 Jun 14 08:54 View
4 -rwxr-xr-x 1 root psacln 1306 Jun 14 08:54 View.php
4 drwxr-xr-x 7 root psacln 4096 Jun 14 08:54 XmlRpc
Now, all files & folders are 755, and all are owned by root|psacln. Yet when I go to include them via a require, I get the infamous error:

Fatal error: Bootstrap::require_once() [function.require]: Failed opening required 'Zend/Loader.php' (include_path='.:/usr/share/php/frameworks:/var/www/vhosts/<domain>/subdomains/<folder>/library:/var/www/vhosts/<domain>/subdomains/<folder>/application/models:/var/www/vhosts/<domain>/subdomains/<folder>/application/views/scripts') in /var/www/vhosts/<domain>/subdomains/<folder>/application/bootstrap.php on line 12

Now, the file is there, but for whatever reason, it's not finding it. I've tried wrapping my head around it for a while now, still can't figure it out.

I'm going to put files back to 644 perms right now, I was just testing to see if perms were the issue

HalfaBee
06-16-2008, 01:25 AM
Try removing 'frameworks' from the include path.

Zend and frameworks are at the same level

bpat1434
06-16-2008, 11:44 AM
No, Zend is under Frameworks:

/usr/share/php/frameworks/Zend

dalecosp
06-26-2008, 01:53 AM
Well, that's not the way it appears on the listing...assuming this is all one listing, the module you are failing to load in not in the "frameworks" directory.

Complete quote of your terminal session with ls, plx? Is what you quoted the output of `ls /usr/share/php`? What does `ls /usr/share/php/Zend` show?

bpat1434
06-26-2008, 08:28 AM
I got it working. Turns out Plesk had safe_mode on which I turned off, and that was all I needed to do.

And to answer your question:

# ls /usr/share/php/
frameworks
# ls /usr/share/php/frameworks/
Zend
# ls /usr/share/php/frameworks/Zend
....
....
....
Loader.php
....
....