473,689 Members | 2,920 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

curl problems

hi

i've got problems getting php4 scripts which use curl to work on RHEL4
(Nahant Update 4) and CentOS 4.4. when the script is accessed the
browser "hangs", after a couple of minutes i'm prompted to save the
php-file, obviously nothing is executed.

what i've checked:
..) curl in php works with a selfcompiled php5 binary executed via cgi on
the same server
..) curl script (actually the example from
http://www.php.net/manual/de/ref.curl.php) works on other servers (not
rhel/centos)
..) selinux is disabled
..) disabling iptables rules makes no difference
..) apache errorlog doesn't give any hint, regardless of apache and php
log levels
..) php rpms are up2date
..) php core config see below

thanks for help
matthias

Configuration
PHP Core
Directive Local Value Master Value
allow_call_time _pass_reference Off Off
allow_url_fopen On On
always_populate _raw_post_data Off Off
arg_separator.i nput & &
arg_separator.o utput & &
asp_tags Off Off
auto_append_fil e no value no value
auto_prepend_fi le no value no value
browscap no value no value
default_charset no value no value
default_mimetyp e text/html text/html
define_syslog_v ariables Off Off
disable_classes no value no value
disable_functio ns no value no value
display_errors Off Off
display_startup _errors Off Off
doc_root no value no value
docref_ext no value no value
docref_root no value no value
enable_dl On On
error_append_st ring no value no value
error_log no value no value
error_prepend_s tring no value no value
error_reporting 2039 2039
expose_php On On
extension_dir /usr/lib/php4 /usr/lib/php4
file_uploads On On
gpc_order GPC GPC
highlight.bg #FFFFFF #FFFFFF
highlight.comme nt #FF8000 #FF8000
highlight.defau lt #0000BB #0000BB
highlight.html #000000 #000000
highlight.keywo rd #007700 #007700
highlight.strin g #DD0000 #DD0000
html_errors On On
ignore_repeated _errors Off Off
ignore_repeated _source Off Off
ignore_user_abo rt Off Off
implicit_flush Off Off
include_path .:/usr/share/pear .:/usr/share/pear
log_errors On On
log_errors_max_ len 1024 1024
magic_quotes_gp c Off Off
magic_quotes_ru ntime Off Off
magic_quotes_sy base Off Off
max_execution_t ime 30 30
max_input_time 60 60
memory_limit 30M 30M
open_basedir
/home/ldapcustomers/24102-24102/www/htdocs:/usr/local/lib/php:/tmp no value
output_bufferin g no value no value
output_handler no value no value
post_max_size 8M 8M
precision 14 14
register_argc_a rgv On On
register_global s On On
report_memleaks On On
safe_mode Off Off
safe_mode_exec_ dir no value no value
safe_mode_gid Off Off
safe_mode_inclu de_dir no value no value
sendmail_from no value no value
sendmail_path /usr/sbin/sendmail -t -i -f xxx@xxx /usr/sbin/sendmail -t
-i -f xxx@xxx
serialize_preci sion 100 100
short_open_tag On On
SMTP localhost localhost
smtp_port 25 25
sql.safe_mode Off Off
track_errors Off Off
unserialize_cal lback_func no value no value
upload_max_file size 2M 2M
upload_tmp_dir no value no value
user_dir no value no value
variables_order EGPCS EGPCS
xmlrpc_error_nu mber 0 0
xmlrpc_errors Off Off
y2k_compliance On On
Mar 12 '07 #1
3 3539
Hello,

on 03/12/2007 12:42 PM Matthias Leopold said the following:
hi

i've got problems getting php4 scripts which use curl to work on RHEL4
(Nahant Update 4) and CentOS 4.4. when the script is accessed the
browser "hangs", after a couple of minutes i'm prompted to save the
php-file, obviously nothing is executed.

what i've checked:
.) curl in php works with a selfcompiled php5 binary executed via cgi on
the same server
.) curl script (actually the example from
http://www.php.net/manual/de/ref.curl.php) works on other servers (not
rhel/centos)
.) selinux is disabled
.) disabling iptables rules makes no difference
.) apache errorlog doesn't give any hint, regardless of apache and php
log levels
.) php rpms are up2date
.) php core config see below
It is hard to tell as curl does not seem any debug output when it
executes a connection request.

You may want to try this HTTP client class that provides plenty of debug
output so you can see what is going on during the connection.

http://www.phpclasses.org/httpclient
--

Regards,
Manuel Lemos

Metastorage - Data object relational mapping layer generator
http://www.metastorage.net/

PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/
Mar 13 '07 #2
On Mar 12, 4:42 pm, Matthias Leopold <matth...@aic.a twrote:
hi

i've got problems getting php4 scripts which use curl to work on RHEL4
(Nahant Update 4) and CentOS 4.4. when the script is accessed the
browser "hangs", after a couple of minutes i'm prompted to save the
php-file, obviously nothing is executed.

what i've checked:
.) curl in php works with a selfcompiled php5 binary executed via cgi on
the same server
.) curl script (actually the example fromhttp://www.php.net/manual/de/ref.curl.php) works on other servers (not
rhel/centos)
.) selinux is disabled
.) disabling iptables rules makes no difference
.) apache errorlog doesn't give any hint, regardless of apache and php
log levels
.) php rpms are up2date
.) php core config see below

thanks for help
matthias

Configuration
PHP Core
Directive Local Value Master Value
allow_call_time _pass_reference Off Off
allow_url_fopen On On
always_populate _raw_post_data Off Off
arg_separator.i nput & &
arg_separator.o utput & &
asp_tags Off Off
auto_append_fil e no value no value
auto_prepend_fi le no value no value
browscap no value no value
default_charset no value no value
default_mimetyp e text/html text/html
define_syslog_v ariables Off Off
disable_classes no value no value
disable_functio ns no value no value
display_errors Off Off
display_startup _errors Off Off
doc_root no value no value
docref_ext no value no value
docref_root no value no value
enable_dl On On
error_append_st ring no value no value
error_log no value no value
error_prepend_s tring no value no value
error_reporting 2039 2039
expose_php On On
extension_dir /usr/lib/php4 /usr/lib/php4
file_uploads On On
gpc_order GPC GPC
highlight.bg #FFFFFF #FFFFFF
highlight.comme nt #FF8000 #FF8000
highlight.defau lt #0000BB #0000BB
highlight.html #000000 #000000
highlight.keywo rd #007700 #007700
highlight.strin g #DD0000 #DD0000
html_errors On On
ignore_repeated _errors Off Off
ignore_repeated _source Off Off
ignore_user_abo rt Off Off
implicit_flush Off Off
include_path .:/usr/share/pear .:/usr/share/pear
log_errors On On
log_errors_max_ len 1024 1024
magic_quotes_gp c Off Off
magic_quotes_ru ntime Off Off
magic_quotes_sy base Off Off
max_execution_t ime 30 30
max_input_time 60 60
memory_limit 30M 30M
open_basedir
/home/ldapcustomers/24102-24102/www/htdocs:/usr/local/lib/php:/tmp no value
output_bufferin g no value no value
output_handler no value no value
post_max_size 8M 8M
precision 14 14
register_argc_a rgv On On
register_global s On On
report_memleaks On On
safe_mode Off Off
safe_mode_exec_ dir no value no value
safe_mode_gid Off Off
safe_mode_inclu de_dir no value no value
sendmail_from no value no value
sendmail_path /usr/sbin/sendmail -t -i -f xxx@xxx /usr/sbin/sendmail -t
-i -f xxx@xxx
serialize_preci sion 100 100
short_open_tag On On
SMTP localhost localhost
smtp_port 25 25
sql.safe_mode Off Off
track_errors Off Off
unserialize_cal lback_func no value no value
upload_max_file size 2M 2M
upload_tmp_dir no value no value
user_dir no value no value
variables_order EGPCS EGPCS
xmlrpc_error_nu mber 0 0
xmlrpc_errors Off Off
y2k_compliance On On
Dear Matthias,
when the browser prompts for saving, it's because the server says so
in the header information. It sounds more likely to be a server issue
than to be a problem of curl. Did you try to reduce the code, to e.g.
let curl just fetch the google homepage and display it? That way you
could see if it is really curl which creates the problems.

Good luck
Martin

------------------------------------------------
online accounting on bash bases
Online Einnahmen-Ausgaben-Rechnung
http://www.ea-geier.at
------------------------------------------------
m2m server software gmbh
http://www.m2m.at

Mar 13 '07 #3
Matthias Leopold schrieb:
hi

i've got problems getting php4 scripts which use curl to work on RHEL4
(Nahant Update 4) and CentOS 4.4. when the script is accessed the
browser "hangs", after a couple of minutes i'm prompted to save the
php-file, obviously nothing is executed.

what i've checked:
.) curl in php works with a selfcompiled php5 binary executed via cgi on
the same server
.) curl script (actually the example from
http://www.php.net/manual/de/ref.curl.php) works on other servers (not
rhel/centos)
.) selinux is disabled
.) disabling iptables rules makes no difference
.) apache errorlog doesn't give any hint, regardless of apache and php
log levels
.) php rpms are up2date
.) php core config see below

thanks for help
matthias

Configuration
PHP Core
Directive Local Value Master Value
[snip]
open_basedir
/home/ldapcustomers/24102-24102/www/htdocs:/usr/local/lib/php:/tmp no
value
[/snip]

thanks for answers, the problem was the open_basedir restriction
see http://at.php.net/manual/de/function...topt.php#71313

matthias
Mar 15 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2927
by: Haluk Durmus | last post by:
Hello I checked out openssl,mm,apr,apr-util,apache 2,curl,libxml and php from cvs. php couse an ERROR I did the following steps:
3
6327
by: Chris Fortune | last post by:
# uname -a Linux stargate.mxc-online.net 2.4.20-021stab022.2.777-smp #1 SMP Wed Jul 28 17:12:37 MSD 2004 i686 i686 i386 GNU/Linux I recompiled PHP with mcrypt, openssl, and curl phpinfo(): http://www.canadiandropshipping.com/hello.php3 Does anyone know why this ssl curl test fails? http://www.canadiandropshipping.com...t/diag_curl.php
3
2228
by: mahbubur045 | last post by:
I am little new in php environment. For one of my project I tried to do http communication(e.g XML message exchange) in php using cURL. is ther any limitaion/problem/overhead using php/curl for that purpose? Your comments are highly appreciable. Best Regards, Sumon
2
12650
by: Vish | last post by:
hi all, I need to POST values from PHP ie through code to a page on the net. AFAIK there seems to be two methods of doing so, first you can use CURL and secondly open a socket . So guys, in terms of performance what method would be best to use? Or what are the pros n cons of using these methods. TIA
9
12590
by: Conrad F | last post by:
Hi, If any Microsoft people are listening.... Are there any plans for the new web language called "Curl" to be supported in .NET (ASP.NET)? I ask as Curl represents the first step to true OO programming of web pages and not just running "scripts" which have in-roads into service DLLs of other languages such as C#. Surely MS will put Curl into .NET at some time since it is designed to work with DirectX and OpenGL?
0
2903
by: rgparkins | last post by:
HI I have 2 problems, 1 of which is tied to PHP and 1 loosely tied, so I'll put this out there. Got a problem that I have been working on for a while now which involves implementing the Paypal IPN. I am using PHP 4 to automatically post back to Paypal and I am using curl package. I am doing a Custom request and would like to know if anyone has
1
6588
by: Rory | last post by:
I'm just starting to use cURL and having trouble accessing https pages. All I want to do at this stage is get an https page and display it, just to test the https get is working. However, I always get either a CURLE_OPERATION_TIMEOUTED (28) or CURLE_COULDNT_CONNECT (7) error. I can see from phpinfo() that cURL and SSL are installed, as follows: CURL support enabled CURL Information libcurl/7.12.0 OpenSSL/0.9.6b zlib/1.1.4 but my code...
7
3604
by: lawrence k | last post by:
I'm reading over this page: http://www.php.net/manual/en/ref.curl.php What I'm missing is why? What problem does curl solve? What does it make easier? When would I use its functions, instead of simpler functions like file() or fsocketopen()?
17
8066
by: Paul van Brouwershaven | last post by:
I have some problems with the curl. On the console I get the right response message but in PHP I see no difference between a valid and an invalid SSL Certificate. Curl command in PHP: $url = ' https://verisign.com'; $ch = curl_init(); curl_setopt($ch, CURLOPT_TIMEOUT, 10);
0
8594
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8947
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8786
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6454
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5810
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4321
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2965
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2219
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
1952
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.