I'm trying to import Pubmed id's but I get the following error:
Warning: fopen(http://ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?db=pubmed&retmode=text&rettype=medline&tool=refbase&email=info%40refbase.net&id=15900006): failed to open stream: Bad file descriptor in C:\Program Files\Apache Group\Apache2\htdocs\main\refbase\includes\import.inc.php on line 1504
Warning: Cannot modify header information - headers already sent by (output started at C:\Program Files\Apache Group\Apache2\htdocs\main\refbase\includes\import.inc.php:1504) in C:\Program Files\Apache Group\Apache2\htdocs\main\refbase\import_modify.php on line 474
Thanks in advance
It seems that, on your system, the 'fopen' function is not able (or allowed) to handle URLs. Which PHP version are you using? You're not using refbase together with a XAMPP package? If so, it may be worth to try refbase with a XAMPP installation (xampp.org) to see if this would cure your error.
I'm using Apache 2.0.48 and PHP 4.3.9.
You should run phpinfo:
create a file with the content:
<? phpinfo(); ?>
save it as f.e testphp.php
and open it with your browser.
look for the entry allow_url_fopen
It should be on.
If it is off have a look to the variable
it should be on if you would like to set
allow_url_fopen = on
but ... if you switch from save_mode off to on check all your webbased php forms.
Some of them like upload will not work with savemode off, because they are using f.e register_globals (old style)
but it is better to use safe_mode on and change all the old files.
Soory - a mistake:
Some of them like upload will not work with savemode on
I' ve updated PHP into 4.4.7 and then into 4.4.8-dev. Same problem.
allow_url_fopen was set to On in all tests.
I even tried safe mode= On but nothing changed.
maybe you could compare your php settings with my local XAMPP version.
I changed to php 4.X. The local Refbase installation is working (checked)including Pubmed import:
The online Refdb is at php 5 so it is better to compare with the local version.
I've checked you phpinfo page and changed my ini to match your's. Still fopen doesn't work. Can this be an Apache related issue?
Seems that you try to get Refdb working on your local Pc?
Are you able to change to php 5 - there was a bug in php 4 but normally only up to 4.3.1
I am ablöe to change between PHP 4 and PHP 5 with XAMPP from apachefriends - thats very useful.
Is it windos? Xp XP-prof.?
There could be many problems to get the "Bad file descriptor"
Windows XP build 2600.
I"m trying to figure if Apache is getting in the way and then i'll try PHP 5. I leave 5 as my last option since I use this machine to develop code that works in PHP 4 enabled server
As Matthias mentioned, you should try XAMPP
You need about 2 minutes to setup PHP 4 and 5 and you need about 10 sec to swicth between php 5 and 4.
You need about 5 minutes to setup the PHP 5 debugger ... if you know how , but this should be written in the debugger manual.
So maybe you should try XAMPP. In my phpinfo file are the default values of XAMPP. Therfore your refbase should work with it, including a peer to peer XP network when using the IP from you XAMPP computer instead localhost.
I do not understand why there is a complete path in the error message: C:\Program Files\Apache Group\Apache2\htdocs\main\refbase\includes\import.inc.php
Normally the error message from the windows apache (at least with xampp) should be http://localhost/main/refbase/includes/import.inc.php
or http://192.168.???.???/main/refbase/includes/import.inc.php if you are using the local network.
Normally you are not allowed to use local HD files - means only files from the http://localhost are allowed.
maybe you have a misconfiguration in your Refdb ini files - what do you think Matthias?
Is there a variable where he could write the full HD-path instead the Apache relative path?
No I was wrong I tried to open a file and the source path was given:
Warning: copy(E:/t/t.gif) [function.copy]: failed to open stream: No such file or directory in C:\localwebserver\htdocs\temp\test.php on line 10
Do you get error message with this tiny code?
$fp = fopen("http://www.google.com","r");
$file = fread($fp, 10000);
if not the problem is from outside f.e a proxy server which does not allow a socket connect .. I read about for a while ...