themeatpuppet Posted September 6, 2007 Share Posted September 6, 2007 Hello I'm using this tutorial to compile my own version of php that support fwrite and fopen: http://www.hiveminds.co.uk/node/3201 For some reason the script only works within the domain of the original installation, I've followed all of the instructions: the second shell script successfully creates a new folder in in php5 with the new domain name as well as a cgi-bin (although it only has a php.cgi and not a php.fcgi) in the new domain. When I try a phpinfo the version of php is evidently the one on the server. What could be wrong? Are there alternatives methods to go about this? Thanks for reading! Quote Link to comment https://forums.phpfreaks.com/topic/68154-compiling-my-own-custom-php/ Share on other sites More sharing options...
Fadion Posted September 6, 2007 Share Posted September 6, 2007 No idea about your question, but aren't fwrite and fopen already supported? Quote Link to comment https://forums.phpfreaks.com/topic/68154-compiling-my-own-custom-php/#findComment-342634 Share on other sites More sharing options...
trq Posted September 6, 2007 Share Posted September 6, 2007 Yes. fwrite and fopen are part of php's core functionality. Anyway... the first question I'll ask is, what type of hosting do you have? Is it one of the ones spoken of in the tutorial or a vps or simular? Just if its a vps there are much simpler ways of going about this. Quote Link to comment https://forums.phpfreaks.com/topic/68154-compiling-my-own-custom-php/#findComment-342640 Share on other sites More sharing options...
themeatpuppet Posted September 6, 2007 Author Share Posted September 6, 2007 It is the same exact one as the tutorial: Dreamhost, its server's php version does not allow fopen, fwrite... as well as some other functions I need for my application, :'( This is why I had to compile a new version to edit that support in my php.ini file. Thanks for replying! Quote Link to comment https://forums.phpfreaks.com/topic/68154-compiling-my-own-custom-php/#findComment-342642 Share on other sites More sharing options...
trq Posted September 6, 2007 Share Posted September 6, 2007 You can't compile php without support for fwrite or fopen, maybe you meen url_wrappers are disabled? You should be able to tunr these on via a simple change to your php.ini... assuming you have access to it. Are there alternatives methods to go about this? Your probably going to need to do some debugging of the script to see what is happening. Change... #copy PHP CGI and FCGI mkdir -p ${HOME}/${DOMAIN}/cgi-bin chmod 0755 ${HOME}/${DOMAIN}/cgi-bin cp ${INSTALLDIR}/bin/php ${HOME}/${DOMAIN}/cgi-bin/php.cgi cp ${INSTALLDIR}/bin/php ${HOME}/${DOMAIN}/cgi-bin/php5.fcgi rm -fr $SRCDIR $DISTDIR to.... #copy PHP CGI and FCGI mkdir -p ${HOME}/${DOMAIN}/cgi-bin chmod 0755 ${HOME}/${DOMAIN}/cgi-bin cp -v ${INSTALLDIR}/bin/php ${HOME}/${DOMAIN}/cgi-bin/php.cgi cp -v ${INSTALLDIR}/bin/php ${HOME}/${DOMAIN}/cgi-bin/php5.fcgi rm -fr $SRCDIR $DISTDIR And let me know if you get any output. Quote Link to comment https://forums.phpfreaks.com/topic/68154-compiling-my-own-custom-php/#findComment-342651 Share on other sites More sharing options...
themeatpuppet Posted September 6, 2007 Author Share Posted September 6, 2007 Hm You mean to swapping those changes in the first script? That one actually worked and I have a folder called 'php5' before my domains, and the domain I name in that first installation is running that new version of php. I'm afraid that if I run that script again with the changes I might ruin something that was already working in the first place or make matters worse.... My actual problem is with redirecting that existing version of php into another domain on the same account. Do you think that swap will fix that? Quote Link to comment https://forums.phpfreaks.com/topic/68154-compiling-my-own-custom-php/#findComment-342668 Share on other sites More sharing options...
themeatpuppet Posted September 6, 2007 Author Share Posted September 6, 2007 oh and yeah, I do have access to the php.ini file for the domain that is running the version I compiled with this script, the problem indeed is that the url_wrappers are disabled in the php that is running on the server which I do not have access to. Quote Link to comment https://forums.phpfreaks.com/topic/68154-compiling-my-own-custom-php/#findComment-342673 Share on other sites More sharing options...
trq Posted September 6, 2007 Share Posted September 6, 2007 Ok, now I'm with you. Well, I see what your problem might be anyway. Sorry, I haven't used any host like this. I'll need to spend a little more time looking at the scripts to actually see what they are doing. I haven't really got time at the moment, but I will try and get back to it. So its the second script your having trouble with? This script is meant to copy your new install to another domain? I'll just have a quick look. Quote Link to comment https://forums.phpfreaks.com/topic/68154-compiling-my-own-custom-php/#findComment-342675 Share on other sites More sharing options...
trq Posted September 6, 2007 Share Posted September 6, 2007 Ok... try this as your second script. #!/bin/sh # Abort on any errors set -e # And where should it be installed? DOMAIN="hiveminds.co.uk" #copy it for where? SOURCEDOMAIN="demo.hiveminds.co.uk" #paths INSTALLDIR=${HOME}/php5 CGIFILE="$HOME/$SOURCEDOMAIN/cgi-bin/php.cgi" INIFILE="$HOME/php5/etc/php5/$SOURCEDOMAIN/php.ini" #copy config file mkdir -p ${INSTALLDIR}/etc/php5/${DOMAIN} cp ${INIFILE} ${INSTALLDIR}/etc/php5/${DOMAIN}/php.ini #copy PHP CGI mkdir -p ${HOME}/${DOMAIN}/cgi-bin chmod 0755 ${HOME}/${DOMAIN}/cgi-bin cp ${INSTALLDIR}/bin/php ${HOME}/${DOMAIN}/cgi-bin/php.cgi cp ${INSTALLDIR}/bin/php ${HOME}/${DOMAIN}/cgi-bin/php5.fcgi echo ---------- INSTALL COMPLETE! ---------- You did setup the .htaccess as sugested? Quote Link to comment https://forums.phpfreaks.com/topic/68154-compiling-my-own-custom-php/#findComment-342678 Share on other sites More sharing options...
themeatpuppet Posted September 6, 2007 Author Share Posted September 6, 2007 Yes I have the .htaccess, One question though just to make sure I'm doing this right, in the part of the script that says # And where should it be installed? DOMAIN="hiveminds.co.uk" I should write the new domain while at SOURCEDOMAIN="demo.hiveminds.co.uk" I should write the one that's already working right? Quote Link to comment https://forums.phpfreaks.com/topic/68154-compiling-my-own-custom-php/#findComment-342680 Share on other sites More sharing options...
trq Posted September 6, 2007 Share Posted September 6, 2007 Yeah, thats right. Quote Link to comment https://forums.phpfreaks.com/topic/68154-compiling-my-own-custom-php/#findComment-342685 Share on other sites More sharing options...
themeatpuppet Posted September 6, 2007 Author Share Posted September 6, 2007 Ugh no luck :'(. working php: http://www.amazero.com/phpinfo.php new domain: http://www.reinventingthecolorwheel.org/phpinfo.php Quote Link to comment https://forums.phpfreaks.com/topic/68154-compiling-my-own-custom-php/#findComment-342688 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.