Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
Using Ubuntu 10.04.4 LTS. We run a php script that pulls info using XML from another server. We are not very familiar with XML. For example when we run:
php5 xmlrequest.php
We are supposed to get data from the other server and we see the output right on the terminal. We column names without the data. I have run:
sudo dpkg-reconfigure php5
And it worked. Not sure why. For the past week we have been trying the same solution, but it does not work anymore. We migrated from a shared server running CentOS to a VPS running Ubuntu. This is when issues started. Any suggestions? Help is very appreciated. Let me know if i am missing information. Thanks.
The first part is the output of a print_r statement in php. That might be debugging info that the programmer has put in.
The second part is HTML code and makes me think that you're supposed to access the page using a web browser.
Your output seems to be incomplete; any chance that you can redirect the output to a file and post it here (either as attachment or between [code] and [/code] (instead of between [quote] and [/quote]). You might have missed error messages that scrolled over the screen.
From the fact that you get output I conclude that php is working and that this is not a php issue directly; maybe compatibility between different versions of php. Without knowing what your xmlrequest.php is exactly doing, it's difficult to say what is going on.
I guess it's time to call the programmer(s) in who wrote the application. Or start posting the code of xmlrequest.php here before anything meaningful can be said.
Last edited by Wim Sturkenboom; 08-02-2012 at 12:33 AM.
I indicated earlier that your text dump was not complete. I like to see what echo $res; displays on your screen and I expect echo "<br>total ".$products->length; to tell you that the total is zero.
Trying to help is a pleasure. Unfortunately I can't really help further because I don't know anything about curl.
I suspect the problem to be in the curl part (curl_init() up to curl_close()) because $res seems to be empty.
Why this happens, I don't know. Connectivity is the prime suspect for me, but I might be totally wrong. Can you access the url using a web browser, can you ping the server?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.