PEAR Forum :: PHP Extension and Application Repository

PEAR Forum Forum Index
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
image_barcode

 
Post new topic   Reply to topic    PEAR Forum Forum Index -> Images
View previous topic :: View next topic  
Author Message
Sarn



Joined: 16 Jun 2008
Posts: 3

PostPosted: Mon Jun 16, 2008 10:36 pm    Post subject: image_barcode Reply with quote

Hi there

Could really use some help!

I've recently installed pear and image_barcode through cpanel. After looking high and low for a decent php barcode script I am hoping this is THE ONE. All the other ones i've found need to be c compiled which my hosting company wont allow.

so here is my test script, which is the test script in the documentation.

Code:

<?php
include_once 'Image/Barcode.php';
Image_Barcode::draw('1234', 'int25', 'png');
?>


but when I try to load this php file i get this error

Warning: require_once(Image/Barcode.php) [function.require-once]: failed to open stream: No such file or directory in /home/sarnxero/public_html/image_barcode/test1.php on line 2

Fatal error: require_once() [function.require]: Failed opening required 'Image/Barcode.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/sarnxero/public_html/image_barcode/test1.php on line 2


i've tried setting the include path too just to see if the script would work but get it still says that path doesn't exist.

set_include_path('/php');

the image_barcode files are in the /php/Image directory

any ideas?
Back to top
View user's profile Send private message
mark



Joined: 07 Jan 2007
Posts: 1235

PostPosted: Mon Jun 16, 2008 11:33 pm    Post subject: Re: image_barcode Reply with quote

Sarn wrote:
set_include_path('/php');

the image_barcode files are in the /php/Image directory


Is it really "/php"? Or maybe "./php"? (<= a subdirectory of /home/sarnxero/public_html/)
Back to top
View user's profile Send private message
Sarn



Joined: 16 Jun 2008
Posts: 3

PostPosted: Tue Jun 17, 2008 4:10 am    Post subject: Reply with quote

They are all in the directories the pear module installer put them in by fefault



the Image_barcode dir was made by me, named it that to test because i have about 5 other barcode scripts on my server that dont work for various reasons ;-(


image_barcode files are in /home/sarnxero/php/Image

webroot is /home/sarnxero/public_html

/home/sarnxero/public_html/image_barcode/test1.php is my code

Code:
<?php
include_once 'Image/Barcode.php';
Image_Barcode::draw('1234', 'int25', 'png');
?>


It was my understanding that pear would setup the include path so that including like that would work, right?
Back to top
View user's profile Send private message
Sarn



Joined: 16 Jun 2008
Posts: 3

PostPosted: Tue Jun 17, 2008 4:36 am    Post subject: Reply with quote

figured it out!!!


k so since i'm on shared hosting i can't directly mess with the php.ini

thought the pear module installer thingie would do it for me. guess not

sooooooo

i couldn't just do

<? ini_set("include_path", ".:../:./include:../include"); ?>

because that broke the include path for pear

instead doing this

<? ini_set('include_path',ini_get('include_path').':../includes:'); ?>

gets the current include path, which is setup properly for pear, and appends the new path to current one

obviously changing the directories to what i needed them to be and all, i think i posted enough of my directory structure tho ;-P

Hope this helps someone else!
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    PEAR Forum Forum Index -> Images All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



PEAR Forum topic RSS feed 
Powered by phpBB © 2001, 2005 phpBB Group

Provided by Ministry of Web developement