Setting Up Home Testing Station

liunx

Guest
I want a way to test my php scripts without having to upload them. Let me see if I have this correct. I'll need php installed. I'll need a server of somesort installed, right?? Will I need mySQL installed (since almost all of my php accesses a database at some point), or can I just point it to my mySQL database on the server here??<br /><br />Anything else I'll need??<!--content-->
Hi,<br /><br />You can do both.<br /><br />Ideally, you would want a box running apache (free download) and mysql (free download) However, they are not the easiest things to get to work unless you know what your doing.<br /><br />You can use the database on line yes, but you will need to start a help ticket and ask for remote connecting to be turned on<br /><br />Jim<!--content-->
I've seen another possible solution.<br /><br />Other members have had great success with Abyss web server software. I downloaded it to try and it was easy enough to install... several days passed before I got off my lazy butt to download php binaries.<br /><br />Before I could do so, Abyss started asking me to register.<br /><br />I just didn't want to mess with it. But others have said it works like a charm.<!--content-->
Thanks guys. I'm in no huge hurry to get this done, so I'll check out everything and decide what I feel like dealing with. <img src="http://www.totalchoicehosting.com/forums/style_emoticons/default/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" /><br /><br />I've got enough parts lying around that I'm thinking of building a new box that I may put apache on. I just need another comp case and some sort of graphics card to do that though (I'm sure I have one somewhere).<br /><br />I'll probably stick with having mySQL on my server, but thanks for letting me know that I'd have to get remote connectivity turned on to do it the other way. I probably would have racked my head for days trying to figure out what the problem was. <img src="http://www.totalchoicehosting.com/forums/style_emoticons/default/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" /><!--content-->
If you are using it purely as a home testing box, you can try PHPDev. Its a complete package where Apache, Mysql, PHP can be installed, "so phpdev is basically a pre configured version of apache/PHP/MySQL to get you started" as quoted on their site.<br /><br />I'm using it on my Windows box (from 98 till XP) and it's easy to install and get it up and running.<br /><br />However be warn that if you intend to show you site to the world (opening it up for access via internet) then you'll need to do some tweaking on the Apache end etc....<br /><br />Here's the link to the package if you are keen to try it out. <a href="http://www.firepages.com.au/phpdev4.htm" target="_blank">PHPDev4</a><br /><br />Dennis<!--content-->
wow... for now at least, that looks awesome Dennis. I do want to eventually setup a second comp to run apache and all on, but for now that's a great little link. <img src="http://www.totalchoicehosting.com/forums/style_emoticons/default/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" /><!--content-->
Ok, question. <img src="http://www.totalchoicehosting.com/forums/style_emoticons/default/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" /><br /><br />Obviously, I'm testing my site on my computer before uploading it. Since I tend to make a lot of minor changes, things get uploaded quite a bit. For this reason, I have a config.php file that holds my various addresses that will change.<br /><br />For example, this is what I have on the test server...<br /><!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->$pubdir = "F:/myTesting/phpdev/www/"; // public directory for site<br />$siteurl = "http://localhost"; // site url for homepage<br />$imagesite = "http://localhost/images/site"; //url for where the site images are located<!--c2--></div><!--ec2--><br />I then simply don't upload the config file and there's one already there with the real site info on it. Here comes my problem....<br /><br />At the moment I'm hardcoding the location of the config file into the pages that use it (which is almost every single one since I have my image folder listed in there). What's the best way to change the hardcoded location on my computer's testing station (F:/myTesting/phpdev/www/conf.php) to the site's (/home/bohican/public_html/conf.php)?? I'm currently thinking of opening all of the files and doing a mass 'find/replace' in all of them. Is there a better way??<br /><br />...................<br />I just realized that there must be relative folder positioning for includes with php.... what's the syntax for that and would that do what I want?? I remember being wary of relative positioning but I'm forgetting why at the moment. Is it a security issue? Does anyone know what it may have been??<br /><br />oh well, I guess that's enough of my rambling. <img src="http://www.totalchoicehosting.com/forums/style_emoticons/default/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" /><br /><br />- Vendlus<br /><br />*edit* after thinking about it (well... after working on something else and this popping into my head), I'm wondering if relative includes can be used for a folder outside your public_html folder?? If not, am I stuck using a mass find/replace??<!--content-->
I think that using include or require would be the easy way out for changing those pages that needs those variables. <br /><br />You can try using the full path to the variables or try echoing out the relative path using $_SERVER['PHP_SELF']<br /><br />Dennis<!--content-->
 
Back
Top