Custom PHP5



I am new to dreamhost. I uploaded my script & tried to run it. It gave me the error: allow_call_time_pass_reference in INI file.
I tried to look through wiki I found this

But it all look like a puzzle to me…:frowning: Can anybody help me out? Thanks in advance.



i remember I had problems with that one. Try the alternative at

$97 DISCOUNT [color=#CC0000]DISCOM97[/color], Double bandwidth or disk [color=#CC0000]DISCOMX2BW[/color] or [color=#CC0000]DISCOMX2SPACE[/color] More codes


@ monkeyboy7706

Thank you for your reply. I tried to use that script & even the “installscript” but I am continuously getting error, ‘host not responding’. Can you please tell me what can be the problem? I am like stuck because of this…:frowning:



I am not a coder myself so please excuse me here if you think my questions are little primary. But I am really stuck because of these problems.

My script gives 3 errors so far

  1. allow_call_time_pass_reference
  2. allow_url_fopen
  3. My forum feed is not showing anything

I read the install script, there is a section which says user defined PHP features. Am I suppose to edit those option? What should I do to get above 3 options enabled? I would be very happy if somebody can help me out in this. Thanks in advance.



[quote]My script gives 3 errors so far

  1. allow_call_time_pass_reference
  2. allow_url_fop en
  3. My forum feed is not showing anything[/quote]
    What script are you trying to run?
  1. allow_call_time_pass_reference -> From the PHP manual:

[quote] " allow_call_time_pass_reference boolean

Whether to warn when arguments are passed by reference at function call time. This method is deprecated and is likely to be unsupported in future versions of PHP/Zend. The encouraged method of specifying which arguments should be passed by reference is in the function declaration. You’re encouraged to try and turn this option Off and make sure your scripts work properly with it in order to ensure they will work with future versions of the language (you will receive a warning each time you use this feature). "[/quote]
2) allow_url_fopen -> There is a much better way to do this that is safer for your site and for others that share your server.

  1. Again, what software/script are you trying to run, and what, if any, error messages are you getting? There could be any number of reasons this is happening.

You can resolve items 1 and 2 above without compiling and installing your own PHP, by instead using a copy of DH’s PHP-CGI and your own php.ini as described in the DreamHost Wiki:

While this is still considered “advanced”, most find it easier to do than a complete PHP install.

That said, unless you clearly understand the ramifications of doing so, and are sure your code will not be exploitable (as opposed to just trying to facilitate running a script that needs those settings to run), you probably should not make these changes. DreamHost has set these things up in the way they feel is most secure for your, and your server neighbors, safety; changing them puts all the responsibility on you.

DreamHost support will not provide support for such changes and you are on your own if you bork it up.

I suggest you contact the author of your script to see if updates are available that use curl and don’t rely on the deprecated allow_call_time_pass_reference setting, or find another script that is coded to more modern standards.




Thanks for the reply. I use a dynamic php networking script which is widely used on many hosts (php5 servers) successfully, without much customization. The only thing required was to have PHP Safe Mode & PHP Register Globals off.
I tried to follow your advanced php configuration & I could even do as per guidelines but, still the results were not what was intended. Do I have to modify anything to get desired results, apart from what is mentioned in that article? And is “.htaccess” already enabled on DH servers by default or I have to do it myself?
allow_call_time_pass_reference error is now not there but, “file_get_contents” is still a problem on both php4 & 5 versions. It says, ‘no suitable wrapper could be found’. Am I missing anything? I would highly appreciate any help on this please. Thanks in advance.



I’d have a much better chance of determining what the remaining problems might be if you would tell us what script you are running. DreamHost is large enough that there may very well be those who have already solved whatever issues your script encounters at DreamHost.

What were the results that you obtained?

I can’t know without a better idea of what you mean by “the desired results”. I don’t know what you mean by “is .htaccess already enabled”; DreamHost is set up by default to read the contents of the .htaccess file, but not every .htaccess setting that is related to PHP usage will be recognized (DreamHost runs PHP-CGI so .htaccess directives related to mod_php will have no effect). The first step in seeing whether or not you have correctly or successfully modified your php.ini file, and if your version is being used at runtime on your domain, is to inspect the output of the phpinfo() command.

That’s only part of the error message (and it would very much help to see the whole error message), but from that it appears that you have not resolved the “allow_url_fopen issue”. Again, it would very much help us help you if:

  1. You provide additional information (the name, version, where did you get it, is it downloadable, etc) regarding the script you are using. (I’m trying to run “Superscript” version 2.3 from")

  2. A link to your script running “in the wild” so that we can see the whole error messages ourselves as they occur.



Hey rlparker, that would be great. I use a dolphin script by Its version is 6.0.0001. Currently version 6.0.0003 is available for
download on boonex site.
Index page of my site will show you that forum rss is not getting pulled
Currently php 5.2.2 version is set from control panel> manage domains. Tell
me if you need any more information ok. I really appreciate your help.


[Edited by Jeff C. upon request by forum poster]



It looks like you are not the only. user that is having trouble getting Dolphin from Boonex to run properly in the DreamHost environment. Hopefully when/if someone figures out how to do this, they will share it with all of us.

That said, from looking at your site, the errors:

[quote]"Warning: file_get_contents() [function.file-get-contents]: URL file-access is disabled in the server configuration in /home/.whiskas/umeshtmi1/ on line 245

Warning: file_get_contents( [function.file-get-contents]: failed to open stream: no suitable wrapper could be found in /home/.whiskas/umeshtmi1/ on line 245"[/quote]
… are certainly the result of you not having yet resolved the matter of allow_url_fopen being disabled at DreamHost.

This may also be the reason the Forum posts are not being “imported” into your home page, or it may have to do with the use of domxml (which you can read more about in the link provided in the next paragraph). I can’t tell for sure without going through the code, which I have not done.

If you insist on doing this, in spite of the potential security risks, I suggest you first create a phpinfo.php program (as described in this section of the DreamHost wiki) and study it’s output to see if your custom PHP.ini or custom PHP installation is actually being used by your domain. From the evidence on your site, it is either not being used, or it has not been successfully configured to enable allow_url_fopen (set to ON). This is why you are having the error indicated above.

You might also find some help in this other Forum thread, where another user is having problems with Boonex’s Dolphin.

In that thread there is information regarding a user who claims to have successfully installed Dolphin on DreamHost, and pointers to his tutorial and his website. If he has in fact successfully installed the software (while it is “running” it does not appear to actually host any data, so I don’t really know if it working properly or not), he may be to help you solve your problems.



Hey rlparker,

Thanks again for a great reply…:slight_smile: I read your reply to the other thread & I also visited the site which showcased dolphin installation. He has explained the installation very nicely. Great blog. Well I also did exactly the same as it has been mentioned in his blog. If you see his installation video you will notice that he also failed to get news rss pulled on to his website. Looks like he is a blogger and not dolphin administrator. I think he has just missed the problem there… I may be wrong though…:slight_smile: I will try to contact the blogger to see if he is approachable.

I have some doubts though.

  1. While upgrading the php version, am I suppose to edit the installation script to enable the required parameters? I mean making features like allow_url_fopen etc. Do I have to add/edit any line for that?
  2. The dolphin script creates .htaccess by itself. So how do I do the following operation mentioned in the wiki:

cat > ~/ << "EOF"
Options +ExecCGI
AddHandler php-cgi .php
Action php-cgi /php/php.cgi

I just have to add the lines between EOF in my current .htaccess, after the current line?

I think I managed to do the upgrade exactly the way it is mentioned in the wiki. And I didn’t get any errors also, but still it is not working for me…:frowning:

These questions might look very primary for you, but please excuse me as I am not a coder…:slight_smile: I can show you the phpinfo output of the host which has successfully installed dolphin. May be that can be of use. I will try my best to generate phpinfo for my domain & will tell you the results soon ok. I am ready to take risk to solve this problem. But I just want my site to work please…



Hey rlparker,

I checked my phpinfo() & guess what my php version was found to be upgraded. I have php5.2.3 now. BUT the allow_url_fopen is off :frowning: Now tell me how can I make it on…???
You know what is funny? when I included “php 4 cgi” in .htaccess, the site open, but when I try to include “php5 cgi” in .htaccess the site gives “500 internal server error”. I just dont understand why? The php & php5 both directories are there & both has got files in it as well.
When I remove the lines added to .htaccess & select php5.2.2 from the manage domain option, site opens. phpinfo() also shows ver 5.2.3 & not 5.2.2. with allow_url_fopen as “off” Whats is the matter? Did i miss anything? Please guide me. Thanks in advance.

Check this: on DreamHost on Servage
Both php versions are 5.2.3 but, there are lot more features allowed on Servage than DreamHost. How can I do it for my site?


[Edited by Jeff C. upon request by forum poster]


I think you may be correct about him not actually having the Dolphin properly/sucessfully installed (as I hinted in my earlier post). Maybe you can learn more if he responds to you. :wink:

That setting is actually made in your php.ini file.

[quote]2) The dolphin script creates .htaccess by itself. So how do I do the following operation mentioned in the wiki:

cat > ~/ << "EOF"
Options +ExecCGI
AddHandler php-cgi .php
Action php-cgi /php/php.cgi

I just have to add the lines between EOF in my current .htaccess, after the current line?[/quote]
Those lines (between the EOFs) should be added to your .htaccess file (I would put them first).

Customizing the DreamHost environment to facilitate this program can be challenging, particularly if such things are new to you; the output of phpinfo() will help you a lot, especially if you compare that to the phpinfo() output of a server where Dolphin is installed and fully working.

If you keep working at it, you should be able to get it to run (with the caveats I have already mentioned in my earlier post(s)re video functions).



Umesh, It seems like you are making progress!

You need to edit the php.ini file that is used by your PHP 5.2.3 installation to change that value from “off” to “on”.Note that you may be confused about whether the PHP being used by your application actually has been upgraded. You cannot,m in this case, rely solely on the version number as an indication of success (as it seems that your server’s DreamHost supplied version of PHP is also 5.2.3 (see discussion below) To tell for sure, you need to check you phpinfo() output and look at the variables). In the phpinfo() output you provided for your site (though it is 4.4.7, it appears you have a custom php installed. :wink:

You probably just need to double check to make sure you have the paths properly described and that you haven’t somehow written one version of your cutom PHP’s over another.

No, you didn’t miss anything there. While the manage domains section of the panel shows PHP 5.2.2, some servers at DreamHost actually have version 5.2.3 available (and neither of them has url_allow_ fopen enabled, for security reasons).

From comparing the phpinfo() outputs from the DreamHost and the Servage servers, you can see what tweaks you may need to make to your custom php installation (or php.ini - which may actually be enough) to make Dolphin work.

Unfortunately, the phpinfo() output you provided for your site was apparently generated after you had removed the handler for your PHP 5.2.3 installation from your .htaccess file (as it shows your site is running PHP 4.4.7).

What you need to do is to work through the Dolphin documentation and make sure that all the “features” that Dolphin describes as being required are installed and/or enabled in your version.

As I said in my earlier post to the other user (which I believe you have read), I think that Dolphin will not care whether you use PHP4.4.7 or PHP 5.2.2/3 as long as you meet those requirements.

IIRC, you will need to enable allow_url_fopen and allow_call_time_pass_reference (both of which can be done via your php.ini file - you should not need to actually install a custom PHP for those reasons alone).

You will also need to make sure that whatever functions they rely upon in domxml are available. This may be a problem as they,and DreamHost, use different modules for these things, and I am not sure about the details of compatibility between those modules, and how their codes uses the functions involved (they both use the same DOM libraries, but different XML libraries). The details of that are beyond my knowledge and expertise with PHP configuration (I’ve never researched the differences between those libraries). This may, or may not, be a problem. If this is a problem, then you will need to compile your own PHP, with the appropriate modules installed and enabled, to get the same “environment” that Servage has for running Dolphin.

You can always test by using the modified php.ini first and see if that works (change both settings described above); if it works you will not need to install your own PHP.

Additionally, in inspecting those provided phpinfo() outputs, you should note that Servage is running mod_php and DreamHost is running PHP-CGI, which can introduce some incompatibilities. This was previously discussed in the other thread, and seems to be what that blogger encountered when upgrading his Dolphin install (note where he added code to facilitate the difference in the environment variable used).




Guess what I am through with it… :slight_smile:
I finally managed to get through the forum & even the allow_url_fopen problem… & you have been one of the biggest help… Thanks a ton for the great support… I finally got through it… :slight_smile:
Now I am gonna play a little with my site to see if everything is working perfect… Hopefully everything should now… :slight_smile:
Again my sincere thanks to you buddy… take care Chao…


ps: and yes I am still on PHP 4.3.7 not on PHP 5.2.3… :wink:


I’m really glad to hear that you managed to get it sorted, and I hope that everything does work as intended. :slight_smile:

Once you have gotten everything tested and are happy that it is working, I think it would be great if you would post back here with a post describing exactly what changes you made, and how you made them, so that others struggling with the same script can avoid all the “trial and error” we went through in these two threads trying to get it to work! :wink:

I don’t think It did much except to try to help you think through it, but you are most welcome.



Oh yes for sure… Give me sometime to reach through all possible tests & I will then deliver the output in this thread…


That would be great! :slight_smile:



Ok people here is the dolphin installation problem solution revealed…

Install your dolphin script the usual way as mentioned in the dolphin installation procedure “”.

After you have done with the installation follow advanced “PHP5” configuration to have your own php5.cgi & php.ini “”.
Just follow PHP customization for PHP5.

After you have your own php5.cgi & php.ini, edit php.ini to change below two settings.

  1. allow_call_time_pass_reference
  2. allow_url_fopen

Both the settings will be off by default. Make it on by editing php.ini.

And you are done…!!!
See not difficult at all… :slight_smile:



Great! Thanks for posting that. I’m sure it will help others in the same situation. :slight_smile:

(edited to remove a stupid question :wink: )



Not a problem…:wink: I am not a coder to tell you in technical language the problems with php4. All I can say is with php4 there are some functions which don’t work. I guess that should help…:slight_smile: