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--Cannot display the barcode

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



Joined: 21 Apr 2008
Posts: 5

PostPosted: Tue Apr 22, 2008 5:46 am    Post subject: Image_Barcode--Cannot display the barcode Reply with quote

I tried the example of "test-image-barcode.php" but it is not work like the following pic.



Would somebody please help me?Thanks a lot
Is it the problem of My GD Library? I am using hosting server I dont know how to modify its config .
Back to top
View user's profile Send private message
mark



Joined: 07 Jan 2007
Posts: 1235

PostPosted: Tue Apr 22, 2008 8:20 am    Post subject: Reply with quote

What happens if you open one of the image URLs directly in your browser? It's likely that it will show you some PHP error messages, maybe because of some include issues.
Back to top
View user's profile Send private message
bencwai



Joined: 21 Apr 2008
Posts: 5

PostPosted: Wed Apr 23, 2008 8:36 am    Post subject: Reply with quote

mark wrote:
What happens if you open one of the image URLs directly in your browser? It's likely that it will show you some PHP error messages, maybe because of some include issues.


Thanks for your reply.But I cant see anything when i opened one of the image URLs directly in your browser.
Back to top
View user's profile Send private message
mark



Joined: 07 Jan 2007
Posts: 1235

PostPosted: Wed Apr 23, 2008 2:56 pm    Post subject: Reply with quote

It might help to insert the following four lines at the beginning of the script that generates the images:

Code:

error_reporting(E_ALL);
ini_set('display_errors', 1);
require_once 'PEAR.php';
PEAR::setErrorHandling(PEAR_ERROR_DIE);
Back to top
View user's profile Send private message
bencwai



Joined: 21 Apr 2008
Posts: 5

PostPosted: Tue May 13, 2008 6:36 am    Post subject: Reply with quote

mark wrote:
It might help to insert the following four lines at the beginning of the script that generates the images:

Code:

error_reporting(E_ALL);
ini_set('display_errors', 1);
require_once 'PEAR.php';
PEAR::setErrorHandling(PEAR_ERROR_DIE);


Thanks for your suggestion, but it still not workable.It showed me the following error message:

Code:
Warning: require_once() [function.require-once]: URL file-access is disabled in the server configuration in /home/xplus/public_html/PEAR171/PEAR/docs/Image_Barcode/docs/examples/test-image-barcode.php on line 45

Warning: require_once(http://www.xplus.com.hk/PEAR171/PEAR/) [function.require-once]: failed to open stream: no suitable wrapper could be found in /home/xplus/public_html/PEAR171/PEAR/docs/Image_Barcode/docs/examples/test-image-barcode.php on line 45

Fatal error: require_once() [function.require]: Failed opening required 'http://www.xplus.com.hk/PEAR171/PEAR/' (include_path='.:') in /home/xplus/public_html/PEAR171/PEAR/docs/Image_Barcode/docs/examples/test-image-barcode.php on line 45
Back to top
View user's profile Send private message
mark



Joined: 07 Jan 2007
Posts: 1235

PostPosted: Tue May 13, 2008 9:23 am    Post subject: Reply with quote

Well, you seem to be using URLs (http://...) in your require_once calls. That isn't allowed on that server and it wouldn't work, anyway. Using the original calls is the right way. You maybe need to adjust your include_path.
Back to top
View user's profile Send private message
bencwai



Joined: 21 Apr 2008
Posts: 5

PostPosted: Mon Jun 02, 2008 8:15 am    Post subject: Reply with quote

mark wrote:
Well, you seem to be using URLs (http://...) in your require_once calls. That isn't allowed on that server and it wouldn't work, anyway. Using the original calls is the right way. You maybe need to adjust your include_path.


I have reinstall PEAR in the server(web hosting server) and I have added the
Code:
error_reporting(E_ALL);
ini_set('display_errors', 1);
require_once '/home/xplus/public_html/PEAR/PEAR.php';
PEAR::setErrorHandling(PEAR_ERROR_DIE);
before generating the barcode. At this time, it didnt say any error message but it still cant show the barcode just like the first picture of this post.


I am wondering that if there are any problem with my PEAR. It is because i didnt follow the instruction after the installation as follow.

Quote:

To use PEAR without any problems you need to add your
PEAR Installation path (/home/rk2trade/public_html/PEAR)
to your include_path.


I didnt follow the above message because i dont know how to include_path in a web hosting space. Laughing
Back to top
View user's profile Send private message
mark



Joined: 07 Jan 2007
Posts: 1235

PostPosted: Mon Jun 02, 2008 9:05 am    Post subject: Reply with quote

Yes, the include_path is indeed important. Possibilities are php.ini, httpd.conf, .htacess or your own scripts (PHP function set_include_path()).
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