|
Ed
|
 |
« Reply #15 on: November 12, 2005, 06:01:32 AM » |
|
By default the error reporting is set to display all errors and all warnings.
Do a phpinfo() on LP if you want to mimic their setup for development.
- Ed
|
|
|
|
|
Logged
|
|
|
|
|
landing
|
 |
« Reply #16 on: November 12, 2005, 06:18:27 AM » |
|
Lovely stuff.
Thanks Nibbler & Ed.
Cheers
|
|
|
|
|
Logged
|
Best regards
|
|
|
|
landing
|
 |
« Reply #17 on: November 12, 2005, 08:12:32 AM » |
|
Is it possibly to download or extract a copy of the LP php.ini?
Would save me hours of comparing and amending settings.
Cheers
|
|
|
|
|
Logged
|
Best regards
|
|
|
|
Nibbler
|
 |
« Reply #18 on: November 12, 2005, 08:49:14 AM » |
|
First of all disable your custom php.ini if you have one. Then do a phpinfo() which will tell you where the main php.ini file is located on your server. You can then upload and run a php script to copy the file into your home directory for examination. Here's an example, change the paths to suit <?php passthru('cp /usr/local/Zend/etc/php.ini ~/server.php.ini'); ?>
You probably won't want to use it as it is, as some settings may break your local setup.
|
|
|
|
|
Logged
|
Missing since 1983 
|
|
|
|
landing
|
 |
« Reply #19 on: November 12, 2005, 09:41:44 AM » |
|
Thanks Nibbler. I'll take a look.
|
|
|
|
|
Logged
|
Best regards
|
|
|
|
oxsley
|
 |
« Reply #20 on: November 23, 2005, 08:00:44 PM » |
|
For testing purposes, here's a trick I use.... I create a test directory and test files on the live server. But, just before I upload the new test stuff, I edit my .htaccess file to restrict all IP addresses to the test stuff except mine. Something like:
# Restrict access to test directory RewriteCond %{REQUEST_URI} ^/testdirectory/.*$ RewriteCond %{REMOTE_ADDR} !^12\.345\.678\.999$ RewriteRule .*$ index.html
Basically, this translates as: Line 1: If the request is for anything in the test directory (testdirectory), and Line 2: If the request is not from your IP address (12.345.678.999) Line 3: Re-direct all requests (.*$) to the home page (index.html)
There are other variations, such as you could redirect to a 401 page. The exact edits to your .htaccess file may be slightly different based on what you already have in there. Of course, you'll want to set things back when you are done testing. This trick is probably best for small-scale tests. And, editing your .htaccess file can be tricky... it's easy to make a mistake and mess up access to your site.
|
|
|
|
« Last Edit: November 23, 2005, 08:07:54 PM by oxsley »
|
Logged
|
|
|
|
|
Tom Veik
|
 |
« Reply #21 on: December 11, 2005, 06:45:18 PM » |
|
I have PHP MySQL and Apache running in my home windows pc to do testing, but I don't have mod rewrite. How do I add that? Does that require a recompile of the EXE?
|
|
|
|
|
Logged
|
|
|
|
|
Tom Veik
|
 |
« Reply #22 on: December 11, 2005, 08:01:54 PM » |
|
Never mind, figured it out. All I had to do was un-comment a couple lines in httpd.conf.
|
|
|
|
|
Logged
|
|
|
|
|
MrPhil
|
 |
« Reply #23 on: April 18, 2006, 12:51:04 PM » |
|
xampp works well for this purpose too. Also includes addons phpMyAdmin, and a few other nifty things.
I'm trying to set up LAMPP (XAMPP for Linux) and am having trouble with Perl. I can't run a Perl script either from the URL or via a PHP page. Please see http://www.lunarforums.com/forum/index.php?topic=21408.msg243673#msg243673 for details, if you have any experience with this. Thanks! Phil
|
|
|
|
|
Logged
|
|
|
|
|
Rowan
|
 |
« Reply #24 on: April 18, 2006, 04:36:54 PM » |
|
@Mr Phill I just installed xampp last night on my kubuntu machine, i was surprised how easy it was to set up. Unfortionatly I will be having to do some Perl stuff soon so I'll let you know if I get it going. One thing to try. change $otherpage to have a local path instead of a URL. from http://nz2.php.net/fopen If PHP has decided that filename specifies a registered protocol, and that protocol is registered as a network URL, PHP will check to make sure that allow_url_fopen is enabled. If it is switched off, PHP will emit a warning and the fopen call will fail.
Check that the directories have permissions 777. I found that on lunarpages 755 worked, but 755 didn't work on my local machine. hope that might help
|
|
|
|
|
Logged
|
|
|
|
|
MrPhil
|
 |
« Reply #25 on: April 19, 2006, 02:58:59 PM » |
|
Thanks for the tips, BigBirdFluHuman  . I'll give 'em a try. Except for the Perl problem, XAMPP has been a very nice testbed for development (so far). It's nice not to have to upload everything to LP and worry about some infinite loop during debugging getting me banished...
|
|
|
|
|
Logged
|
|
|
|
|
officexpboy
|
 |
« Reply #26 on: June 23, 2006, 02:58:17 AM » |
|
WAMP (software bundle) is tool that we can use as development server. Can be offline, only localhost (your computer) can access to your server. WAMP is acronym for Windows, Apache, MySQL and PHP. WAMP5 - contains MySQL 5.0.22, Apache 2.0.58, phpmyadmin 2.8.1) as well as PHP4, MySQL administration and Zend Optimizer add-ons. I guess WAMP is better option http://www.wampserver.com/en/
|
|
|
|
|
Logged
|
To succeed in your mission, you must have single-minded devotion to your goal
|
|
|
|
JaphyR
|
 |
« Reply #27 on: June 23, 2006, 02:34:28 PM » |
|
I have an unanswered question that I've been ignoring for a while. I installed PHPerl on my machine a while ago, to have a local testing environment, and it has been very satisfying. I never did anything, though, to ensure that the server on my laptop is inaccessible to anyone throughmy internet connection.
Is there anything I'm supposed to do that will restrict any and all use of this server to my computer, like changing ports or permissions?
|
|
|
|
|
Logged
|
1000 Random Walks - A collaborative art project, using people on the internet as a source of randomness.
|
|
|
|
GMTurner
|
 |
« Reply #28 on: June 23, 2006, 09:20:25 PM » |
|
One thing that provides some degree of protection, is the Windows firewall (if you have XP that is...) I wouldn't say it is the best out there, but as long as you do not allow the computer to accept outside connections you should be alright... to be better off, use a product like ZoneAlarm (or other firewall) as an added layer of protection... make sure file sharing is turned off, etc... And of course the best way at all, don't connect to the internet, but that's always seemed a bit extreme to me 
|
|
|
|
|
Logged
|
The above post was made at a time when I gave a dang and doesn't necessarily reflect my current views or opinions. For those no longer with us ... Turner's Lounge
|
|
|
Urashmi
Tweetle Beetle Battler
Trekkie

Offline
Posts: 13
|
 |
« Reply #29 on: June 24, 2006, 06:33:06 AM » |
|
I have an unanswered question that I've been ignoring for a while. I installed PHPerl on my machine a while ago, to have a local testing environment, and it has been very satisfying. I never did anything, though, to ensure that the server on my laptop is inaccessible to anyone throughmy internet connection.
Is there anything I'm supposed to do that will restrict any and all use of this server to my computer, like changing ports or permissions?
You must ensure there is a firewall between you and the internet, not just for PHPerl, an unprotected PC will be hacked in no time. Win XP sp2 has a firewall built in, but I recommend using a separate device (e.g. an old 486 PC can easily be configured to act as a firewall), or if you have a broadband connection use a firewall/router/modem, they cost little more than a modem.
|
|
|
|
|
Logged
|
|
|
|
|