Page 2 of 2

Posted: Fri Sep 10, 2004 9:21 pm
by Slacker
It sounds like you want something local to test your own PHP scripts before you upload them. If that's the case, you should d/l an FTP client and use it to FTP into your host. It'd be much easier and quicker and far more concrete than setting up a webserver, php, and a db program on your local machine. Specially a windows box, let alone win 98.

Even on a 33k modem, you can upload php/html files relatively fast. And you don't have to wait for the page load times of a control panels file manager.

As far as testing goes, it's much better to test code on the system the code will be processed rather than one just used for testing purposes.

Trust me, I used to run apache/php/mysql on my windows 2000 box for testing and site building purposes. Then I realized that just getting everything setup in my hosts control panel and FTP'ing in to upload files for testing was far more easier, quicker, and better.

Posted: Fri Sep 10, 2004 10:48 pm
by Christopher
You seemed to have a couple of questions: can I test my pages without a web connection? (yes) and how to make your URL more portable? (you can) Let me give it a try:

FIrst, if you install Apache on your PC and then install PHP (again on your PC, not the server) your can open a browser and type "http://localhost/index.php" and you will see the page. Further you can also install say MySQL on your PC and configure it. The trick is to set the database names and passwords the same for the connections on PC and server. I have a laptop setup this way. I copy the pages and a dump of the databse onto the laptop and then I can work on projects on the road.

Second, to make you code more portable you can reference your pages (in your PHP code) with relative URLs such as "index.php" rather than "http://mysite.com/index.php". PHP will sort out the path and display the page. Another way to do it is to define the base path and comment/uncomment depending on which server:

define('BASEURL', 'http://mysite.com/');
#define('BASEURL', 'http://localhost/');

$url = BASEURL . ''index.php';

Better yet is to put the defines in a config.php file to seperate it from the code. Hope any of this helps.

Posted: Fri Sep 10, 2004 11:09 pm
by drale
what about?
http://www.priadoblender.com/index.php? ... &cslot_1=2.

I have no experiences with doing what you want except by just running my own server. But I found this in a post somewhere on the forum.

Posted: Fri Sep 10, 2004 11:11 pm
by andre_c
Benrr101 wrote:Oh, and I can't download bigapache, it's 101 megs!
Actually the apache binary is 6.4 megs.

Posted: Sat Sep 11, 2004 12:20 am
by John Cartwright
Slacker wrote:It sounds like you want something local to test your own PHP scripts before you upload them. If that's the case, you should d/l an FTP client and use it to FTP into your host. It'd be much easier and quicker and far more concrete than setting up a webserver, php, and a db program on your local machine. Specially a windows box, let alone win 98.

Even on a 33k modem, you can upload php/html files relatively fast. And you don't have to wait for the page load times of a control panels file manager.

As far as testing goes, it's much better to test code on the system the code will be processed rather than one just used for testing purposes.

Trust me, I used to run apache/php/mysql on my windows 2000 box for testing and site building purposes. Then I realized that just getting everything setup in my hosts control panel and FTP'ing in to upload files for testing was far more easier, quicker, and better.
I fully disagree. Having a local webserver in my opinion is way faster than always having to deal with uploading files to your ftp server. Plus localhost is a lot faster :P

http://www.hotscripts.com/PHP/Software_ ... index.html

Posted: Sat Sep 11, 2004 9:17 am
by m3mn0n
I'd just redo the pages without PHP.

Simplest solution. 8)

Posted: Sat Sep 11, 2004 10:03 am
by Breckenridge
Have a local web server is nice, make sure that your real server and development servers have similar configuration php.ini files.

Posted: Sat Sep 11, 2004 10:26 am
by AGISB
Phenom wrote:
I fully disagree. Having a local webserver in my opinion is way faster than always having to deal with uploading files to your ftp server. Plus localhost is a lot faster :P

http://www.hotscripts.com/PHP/Software_ ... index.html
I disagree with the 'fully disagree' as it can be very disturbing to test your pages on localhost and if uploaded they are to slow.

I always prefer to test my pages with a 56k modem. Many times programmers and designers with a cable modem or DSL test their pages and wonder why 56k users simply don't surf the sites due to load times beyond acceptance.

Guess it all depends what you are testing for.

Posted: Sun Sep 12, 2004 8:18 am
by Slacker
Guess it depends on your preferences. I just prefer to test mine on my host, that way, when they make changes to their configuration of the webserver, mysql, php, and whatever else, I don't have to mirror it on my machine.

For me, it's more convenient this way. For others it might not be.

Posted: Sun Sep 12, 2004 9:49 am
by dull1554
if you dont want to set up a web server to test your php scritpts locally i'd suggest getting zend studio, i believe you can download a trial like 20 megs and if you on dialup it will take like 3 or 4 hours, it lets you edit and run php scripts as well as edit pretty much any other web based script file(html JS ASP cfm and many more)

yet again my 2 cents

Posted: Sun Sep 12, 2004 10:49 am
by John Cartwright
AGISB wrote:
Phenom wrote:
I fully disagree. Having a local webserver in my opinion is way faster than always having to deal with uploading files to your ftp server. Plus localhost is a lot faster :P

http://www.hotscripts.com/PHP/Software_ ... index.html
I disagree with the 'fully disagree' as it can be very disturbing to test your pages on localhost and if uploaded they are to slow.

I always prefer to test my pages with a 56k modem. Many times programmers and designers with a cable modem or DSL test their pages and wonder why 56k users simply don't surf the sites due to load times beyond acceptance.

Guess it all depends what you are testing for.
That's the only bad thing about localhost, because it parses things way too fast, and sometimes can cause problems later on, but it is not a common problem.. localhost drastically speeds up developping times though ;)