469,599 Members | 2,617 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,599 developers. It's quick & easy.

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.input & &
arg_separator.output & &
asp_tags Off Off
auto_append_file no value no value
auto_prepend_file no value no value
browscap no value no value
default_charset no value no value
default_mimetype text/html text/html
define_syslog_variables Off Off
disable_classes no value no value
disable_functions 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_string no value no value
error_log no value no value
error_prepend_string 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.comment #FF8000 #FF8000
highlight.default #0000BB #0000BB
highlight.html #000000 #000000
highlight.keyword #007700 #007700
highlight.string #DD0000 #DD0000
html_errors On On
ignore_repeated_errors Off Off
ignore_repeated_source Off Off
ignore_user_abort 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_gpc Off Off
magic_quotes_runtime Off Off
magic_quotes_sybase Off Off
max_execution_time 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_buffering no value no value
output_handler no value no value
post_max_size 8M 8M
precision 14 14
register_argc_argv On On
register_globals 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_include_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_precision 100 100
short_open_tag On On
SMTP localhost localhost
smtp_port 25 25
sql.safe_mode Off Off
track_errors Off Off
unserialize_callback_func no value no value
upload_max_filesize 2M 2M
upload_tmp_dir no value no value
user_dir no value no value
variables_order EGPCS EGPCS
xmlrpc_error_number 0 0
xmlrpc_errors Off Off
y2k_compliance On On
Mar 12 '07 #1
3 3285
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.atwrote:
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.input & &
arg_separator.output & &
asp_tags Off Off
auto_append_file no value no value
auto_prepend_file no value no value
browscap no value no value
default_charset no value no value
default_mimetype text/html text/html
define_syslog_variables Off Off
disable_classes no value no value
disable_functions 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_string no value no value
error_log no value no value
error_prepend_string 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.comment #FF8000 #FF8000
highlight.default #0000BB #0000BB
highlight.html #000000 #000000
highlight.keyword #007700 #007700
highlight.string #DD0000 #DD0000
html_errors On On
ignore_repeated_errors Off Off
ignore_repeated_source Off Off
ignore_user_abort 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_gpc Off Off
magic_quotes_runtime Off Off
magic_quotes_sybase Off Off
max_execution_time 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_buffering no value no value
output_handler no value no value
post_max_size 8M 8M
precision 14 14
register_argc_argv On On
register_globals 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_include_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_precision 100 100
short_open_tag On On
SMTP localhost localhost
smtp_port 25 25
sql.safe_mode Off Off
track_errors Off Off
unserialize_callback_func no value no value
upload_max_filesize 2M 2M
upload_tmp_dir no value no value
user_dir no value no value
variables_order EGPCS EGPCS
xmlrpc_error_number 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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Haluk Durmus | last post: by
3 posts views Thread by Chris Fortune | last post: by
3 posts views Thread by mahbubur045 | last post: by
2 posts views Thread by Vish | last post: by
9 posts views Thread by Conrad F | last post: by
reply views Thread by rgparkins | last post: by
1 post views Thread by Rory | last post: by
7 posts views Thread by lawrence k | last post: by
17 posts views Thread by Paul van Brouwershaven | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.