i installed some code and it gives me the following error:
Warning: ereg() [function.ereg]: REG_EMPTY in /home/.titan/fencer/*****.com.ve/php/getURL.php on line 10

what can i do, where is that???

It’s in the thingamagiger by the combobulator.


funnie ha :-S

What code did you install, and what is in the lines surrounding an including line 10 in /home/.titan/fencer/*****.com.ve/php/getURL.php on line 10?

What do your error logs say?

Is there a reason you don’t include your domain name (so we can see the error “in the wild”)?

Obviously ereg() is not returning what is expected - I’ts really hard to tell why this is happening with no more information than you have provided. :wink:


this is my website, and I installed some script to get the download link from multiple video streaming sites (like youtube), the script is installed as is, but when i try to get the video download it shows the error in the header, and I already tried it at other hostings and it worked perfectly, these are the surrounding lines :-S, plz help me :

if (isset($_GET{‘url’})){

if (strstr($GET[‘url’],“youtube.com”)){
$data = @file_get_contents($GET[‘url’]);
] )&l=([0-9] )&t=([a-z0-9-
] )#i’, $data, $matches);
if (ereg($matches[1], $_GET[‘url’])) {
Header(“Location: http://www.youtube.com/get_video?video_id=$matches[1]&l=$matches[2]&t=$matches[3]”);

if (strstr($_GET[‘url’],“video.google.com”)){

I believe the problem is indicated by the “@file_get_contents(…” part of the code.

DreamHost does not have “fopen wrappers” enbaled for security reasons, and they are required for that code to work. This could explain (and most likely does explain) why they script works on some hosts but not on others. If a host has those fopen wrappers enabled, then it should work while if a host does not have those wrappers enabled, it will definitely will not.

My first suggestion is to contact the author of your script (you didn’t provide any linking information, so I can’t investigate the script further), and inquire as to whether they can provide a version that does not require those fopen wrappers (uses cURL?).

Alternately, if you are a proficient PHP coder, you can rewrite the script to use cURL for use on DreamHost.

You can also compile your own PHP and enable allow_url_fopen in that installation, or use and copy of DH’s PHP with a custom php.ini and enable all_url_fopen in that way (instructions for doing each of these things exist in the DreamHost wiki).

That said, the fact that you can do this does mean that you should. DreamHost has disabled those function fro good reason, and modifying your PHP environment to reverse that is not supported and you will be “on your own” if you bork it up. Additionally, doing this could introduce a significant security risk into your server’s environment; I recommend you do not do this.