how to install pear cache_lite sytem on php

Mobile
feeds
Welcome Login | Register

how to install pear cache_lite sytem on php
Reply Your Comments:
Click this button if you are interested in replying to this topic and leave your comments
Sent To Friend
CLick this button if you want to send this page to a friend.
Subsribe To Rss Feeds
Subscribe to RSS
CLick this button if you want to subscribe to this RSS Feed. You can use your browsers feeds burners if you have mozilla or internet explorer 7 or higher and keep up with updates.
  Forums Index
      » PHP Forums
        » » how to install pear cache_lite sytem on php
how to install pear cache_lite sytem on php
Post Description: how to install pear cache lite sytem on php PHP
Post Tags:
This Post Has Been Viewed 55 Times Since Tue Dec 23, 2008 7:47 pm Author wallpaperama with 0 replies
Next Post »» warning: require_once(cache/lite.php) [function.require-once]
how to install pear cache_lite sytem on php
Advertise On This Page




if you are reading my post here its probably because you want to cache your pages.

i too wanted to cache my pages using pear cache_lite, but when i ran my script is said:

Warning: require_once(Cache/Lite.php) [function.require-once]: failed to open stream: No such file or directory in /home/web/index.php on line 54


Fatal error: require_once() [function.require]: Failed opening required 'Cache/Lite.php' (include_path='.:/usr/share/pear:/usr/share/php') in /home/web/index.php on line 54

so, what can you do to not get this error. well, the answer is simple, install Cache_Lite on the server. as you can see from my error its looking for Cache/Lite.php in my includes directory at /usr/share/pear. so when i log into my server using ssh, i run this command:

ls /usr/share/pear


i dont see the Cache files there. so to install it i run this command:
yum install php-pear-Cache


after i ran it, its starts to install the Cache system from pear:

[root@ns1 pear]# yum install php-pear-Cache
Loading "installonlyn" plugin
Setting up Install Process
Parsing package install arguments
Resolving Dependencies
--> Running transaction check
---> Package php-pear-Cache.noarch 0:1.5.5-0.1.RC4.fc7 set to be updated
--> Processing Dependency: php-pear(HTTP_Request) for package: php-pear-Cach
--> Restarting Dependency Resolution with new changes.
--> Running transaction check
---> Package php-pear-HTTP-Request.noarch 0:1.4.2-1.fc7 set to be updated
--> Processing Dependency: php-pear(Net_URL) >= 1.0.12 for package: php-pearP-Request
--> Processing Dependency: php-pear(Net_Socket) >= 1.0.2 for package: php-peTTP-Request
--> Restarting Dependency Resolution with new changes.
--> Running transaction check
---> Package php-pear-Net-URL.noarch 0:1.0.15-1.fc7 set to be updated
---> Package php-pear-Net-Socket.noarch 0:1.0.8-1.fc7 set to be updated

Dependencies Resolved

============================================================================
Package Arch Version Repository Size
============================================================================
Installing:
php-pear-Cache noarch 1.5.5-0.1.RC4.fc7 fedora 38
Installing for dependencies:
php-pear-HTTP-Request noarch 1.4.2-1.fc7 updates 21 k
php-pear-Net-Socket noarch 1.0.8-1.fc7 fedora 12 k
php-pear-Net-URL noarch 1.0.15-1.fc7 updates 9.5 k

Transaction Summary
============================================================================
Install 4 Package(s)
Update 0 Package(s)
Remove 0 Package(s)

Total download size: 80 k
Is this ok [y/N]: y


i say yes to continue with the installation:

Downloading Packages:
(1/4): php-pear-Net-Socke 100% |=========================| 12 kB 00:00
(2/4): php-pear-Cache-1.5 100% |=========================| 38 kB 00:00
(3/4): php-pear-HTTP-Requ 100% |=========================| 21 kB 00:00
(4/4): php-pear-Net-URL-1 100% |=========================| 9.5 kB 00:00
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing: php-pear-Net-Socket ######################### [1/4]
Failed loading ../../xcache.so: ../../xcache.so: cannot open shared object file: No such file or directory
Failed loading /usr/local/lib/php/extensions/non-debug-non-zts-xxx/xcache.so: /usr/local/lib/php/extensions/non-debug-non-zts-xxx/xcache.so: cannot open shared object file: No such file or directory
PHP Warning: Zend Optimizer does not support this version of PHP - please upgrade to the latest version of Zend Optimizer in Unknown on line 0
Installing: php-pear-Net-URL ######################### [2/4]
Failed loading ../../xcache.so: ../../xcache.so: cannot open shared object file: No such file or directory
Failed loading /usr/local/lib/php/extensions/non-debug-non-zts-xxx/xcache.so: /usr/local/lib/php/extensions/non-debug-non-zts-xxx/xcache.so: cannot open shared object file: No such file or directory
PHP Warning: Zend Optimizer does not support this version of PHP - please upgrade to the latest version of Zend Optimizer in Unknown on line 0
Installing: php-pear-HTTP-Request ######################### [3/4]
Failed loading ../../xcache.so: ../../xcache.so: cannot open shared object file: No such file or directory
Failed loading /usr/local/lib/php/extensions/non-debug-non-zts-xxx/xcache.so: /usr/local/lib/php/extensions/non-debug-non-zts-xxx/xcache.so: cannot open shared object file: No such file or directory
PHP Warning: Zend Optimizer does not support this version of PHP - please upgrade to the latest version of Zend Optimizer in Unknown on line 0
Installing: php-pear-Cache ######################### [4/4]
Failed loading ../../xcache.so: ../../xcache.so: cannot open shared object file: No such file or directory
Failed loading /usr/local/lib/php/extensions/non-debug-non-zts-xxx/xcache.so: /usr/local/lib/php/extensions/non-debug-non-zts-xxx/xcache.so: cannot open shared object file: No such file or directory
PHP Warning: Zend Optimizer does not support this version of PHP - please upgrade to the latest version of Zend Optimizer in Unknown on line 0

Installed: php-pear-Cache.noarch 0:1.5.5-0.1.RC4.fc7
Dependency Installed: php-pear-HTTP-Request.noarch 0:1.4.2-1.fc7 php-pear-Net-Socket.noarch 0:1.0.8-1.fc7 php-pear-Net-URL.noarch 0:1.0.15-1.fc7
Complete!


i do see a an error on zend optimizor but its ok, now, confirm that Cache was installed by sending this command:

ls /usr/share/pear/


now you will see the Cache directory

but there is a problem, Lite is not there. so this is the way i installed it in the Cache Directory.

download the latest Cache_Lite from the PEAR site at:
http://pear.php.net/package/Cache_Lite/ and put the files in the /usr/share/pear/Cache Directory

this is how i did it from the linux shell command.. login as root:

cd /usr/share/pear/Cache/


wget http://download.pear.php.net/package/Cache_Lite-1.7.4.tgz


after the Cache_Lite-1.7.4.tgz has been download it, untar the file
tar xvfz Cache_Lite-1.7.4.tgz


now go into the Cache_Lite-1.7.4 directory:
cd /usr/share/pear/Cache/Cache_Lite-1.7.4


now we are going to copy the necessary files for our Cache_Lite to work:

copy the Lite Directory into the Cache/ Directory
cp -rf /usr/share/pear/Cache/Cache_Lite-1.7.4/Lite/ /usr/share/pear/Cache/


copy Lite.php in the Cache/ directory:
cp /usr/share/pear/Cache/Cache_Lite-1.7.4/Lite.php /usr/share/pear/Cache/


Now that you have the necessary files for your Cache to work, run your script again and you should not see that error anymore

now, if you dont have shell access to your server, its ok, i will teach you how you can do it by clicking on the following link:


http://www.wallpaperama.com/forums/warning-require-oncecache-lite-php-function-require-once-t6911.html




Leave Your Comments

Your Name
Your Email Address (Will Not Be Published)
Notify Me When Someone Replies to this Page
(An email will be sent to you when someone replies to your comments)
Your Comments
Include A Picture with your comments
Share
| More
Share this page by putting this URL in your comments to other websites like myspace, Facebook, Twitter friendster, Hi5, Groups, Boards, Forum or others. Just Copy and Paste this Code
URL:
To embed this topic, just copy the code from the "Embed" box. Once you've copied the code, just paste it into your website or blog to embed it.
Embed:
BBCODE is use on forums. You can put this code on all your BBCODE enabled forums like PhpBB, vBulletin® and others. Just Copy and Paste this code on your Posts and Replies on your forums
BBCODE:
Subscribe Feeds
Webmasters - Exchange Links With Us. Add related websites to this topic
Add Link:
Links Related to : how to install pear cache_lite sytem on php

Comments and replies About how to install pear cache_lite sytem on php
(0) Comments