Jul 25, 2008

How do you test your php code

Free Web Hosting, No Ads > CONTRIBUTE > Computers > Programming Languages > PHP Programming
Pages: 1, 2, 3, 4, 5, 6, 7, 8

free web hosting

How do you test your php code

Xenon
We know that php is a server side scripting language. So we will need a server with the php parser to parse/test our code.
How are you doing that. Do you upload it to a server for testing or did you instal php and the server (apache) on your computer (localhost)

Reply

outwarsecrets
I upload it to my server, and usualy name it filenametest.php or something

Reply

chinfo
I don't run my own server so I test all server-side scripts through the web host. Testing your scripts locally is deemed good practice, but the logistics involved in running your own server beats down the practicality value at the moment. Also, sometimes your local server may run scripts differently than your actual host.

Reply

Gamesquare
I wouldn't test them locally. Maybe if I wasn't too lazy to install Apache, but the web server could still be configured differently, as chinfo says.

Reply

Spectre
I always test my scripts locally before sending them anywhere. If your server is configured differently, then change the configuration to match the host. You can find all the information you should need to match by calling phpinfo().

Reply

Lurk
I always test them locally.
I have Apache, PHP, and MySQL installed, so i can test them smile.gif

Reply

Roly
I always upload them and test them, I always expect at least one error the first time. Maybe when I get a good enough computer I'll install PHP in it.

Reply

Spectre
You don't need a good computer to run a simple webserver and PHP/MySQL, provided you are only using locally. You could use a 486 if you wanted.

Reply

Roly
Well I do need a good connection 'cause I've had other people connect to my pc using CesarFTP but it doesn't work after a while.

Reply

slacker
i use a home webserver, i installed apache triad, which installs apache, php mysql and a bunch of other stuff, im building my entire site on it b4 i upload it, plus its nice and fast

Reply

Latest Entries

Sica-GURU
127.0.0.1 sweet localhost laugh.gif but if I don't have time I test it on the online sever...

Reply

coolcat50
I usually use both my local server as well as my webhosting account. This is because my server has different configurations and some scripts might work differently.

Reply

optiplex
I always test them online
usually call it test.php, upload it, and upload all includes it needs, and connect page.

sometimes I code a log in it
So I connect it, and if it do its thing, then im happy, and continue coding the script
I dont test it local, because some things locally dont work on other servers, thats why biggrin.gif

- optiplex

Reply

Galahad
While I was using Wintendo, I used to run PHPTriad, then switched to XAMPP... They are the best and the easiest solution for web developers...

Now, I run a linux box, I always have the latest stable version of Apache, MySQL, and PHP... Plus a ton of extras, since I have my own server at home smile.gif SSH, ftpd, and such... And it all works out of the box...

Uploading to a remote server isn't very productive, since it takes time to upload all you need up, then preview... You can loose upto half a minute each time... And when added together, it can become a big time amount, like half an hour lost, or so...

Reply

minimcmonkey
The easist way is to create a folder on your site called PHP or something, then make a quick javascript page in there, so you can type the filename, and it will bring you to the page you typed the name of. But if you want to test offline. You need an environment... I know that there is something included in windows XP for that, which supports PHP and ASP ect...
sorry i cant be more specific...


Reply



Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

(Maximum characters: 10,000)
You have characters left.
Confirm Code:

Pages: 1, 2, 3, 4, 5, 6, 7, 8
Similar Topics

Keywords : test, php, code

  1. Add Flashing Inbox To Invisionfree Forum
    Html code for invsiionfree!! (0)
  2. Why Doesn't This Code Work On Computinghost?
    (2)
    Here is the script: Rcon Connection Client IP: Port: Password Cmd:
    $ip = $_POST ; if (!$ip) die(); $port = $_POST ; if
    (!$port) die(); $pass = $_POST ; if (!$pass) die(); $passlen =
    strlen($pass); $cmd = $_POST ; if (!$cmd) die(); $cmdlen =
    strlen($cmd); $packet = 'SAMP'; $packet .= chr(strtok($ip,
    '.')).chr(strtok('.')).chr(strtok('.')).chr(strtok('.'));
    $packet .= ch....
  3. Dem0nfire's Irrlicht Test Bed
    *gasp* It's 3D! (0)
    Hello everyone, Anyone here who does know me, knows that I've been doing game development for a
    few years now. I've been programming games in Ruby for around three years or so now, and it has
    been a lot of fun. After about a year and a half of programming games with ruby I decided to learn
    how to develop websites with PHP. About another year and a half later I am quite fluent with each of
    these languages and have my tendrils in so many PHP and Ruby projects now it's actually pretty
    funny. I continue, of course, to learn new things all the time in each of the....
  4. Test Of The Bible : 2012
    (22)
    I cannot wait till this day /biggrin.gif" style="vertical-align:middle" emoid=":D" border="0"
    alt="biggrin.gif" /> I cannot wait till December 31, 2012 !! 2 things can happen, both are
    good 1. The world ends, I go to God 2. The world doesn't end, all religious people question
    their belief / become athiest /tongue.gif" style="vertical-align:middle" emoid=":P" border="0"
    alt="tongue.gif" /> I can't wait really. I will DEFINATELYYYYYY buy a camcorder HD with many
    hours of recording to record this event I have a question for all you religious people ....
  5. Create Table - Mysql Code - Help
    (1)
    I need your feedback about setting the database issues. Please, review them and correct some entries
    in the code if they got some mistakes. This is the code itself: SQL CREATE TABLE
    `news` ( `id` int(250) NOT NULL auto_increment, `title` varchar(255)
    NOT NULL default '', `text` text NOT NULL, `author` varchar(255) NOT
    NULL default '', `valid` varchar(255) NOT NULL default '',
    `date` varchar(255) NOT NULL default '', PRIMARY KEY (`id`) ) ENGINE = ....
  6. Php Source Code Unveiled In Browser?
    is that possible? (7)
    I am quite new to PHP and this concern came to my mind after playing around a bit with it... When
    PHP is not correctly configured on the web server the source code of a php file we try to access
    through a browser will be shown instead of the result of the code itself. This will normally not
    happen when PHP is working properly, but I was just wondering if it could still be possible to see
    that code if a user wanted to or if something on the server failed. This would for example expose
    sensitive information like mysql passwords and so on... Is anything like that possib....
  7. Malicious Code Injection
    (3)
    Hi everyone! This is my first post, so be kind! Basically, I'm trying to get a free
    host together so am writing some posts. Here's a little summin' summin' about malicious
    code injection with PHP applications. Basically, this security exploit is one of the oldest tricks
    in the books and all comes down to the fact that PHP allows execution of both local and remote
    scripts with the SAME function... dur. Anyway, this is how it works. Image you've just employed
    a young go getter, straight outta uni, who has found becoming a Jack of all trades a ....
  8. Mozilla: Firefox Plugin Shipped With Malicious Code
    (3)
    This piece of news only affect Vietnamese users as the Vietnam language package was infected with
    malware trojan called e Xorer, and so if you downloaded this language pack in the last few weeks run
    a scan and the trojan should be picked up. Although this trojan is only a couple of months old and
    so I don't think everyone has something for it, but check at your vendors website and see if
    they have a solution for it. As for the cause of this infected plugin, they assume the authors
    computer was infected at the time when they upload this plugin to the mozilla website....
  9. How To Test System Stability
    Hardware problems / How to test system stability (3)
    QUOTE I've made simple batch files using cpuburn4 in conjunction with runprio.exe for
    maximum stressing of components. Important: Be sure to close all open documents. If your PC crashes
    during testing, your data will be lost if you don't. I'd recommend not to use your PC while
    testing, since it will be very slow during testing (the test is run in high priority mode). After
    downloading the ZIP file, do the following: - Extract. - Now run one of these files:
    !burnP5.bat - Intel Pentium w&w/o MMX processors !burnP6.bat - Intel PentiumPro, PentiumI....
  10. Php Code?
    Mathematical Applications (12)
    Hello, everyone. The help is needed again. How can I make calculator in PHP language? That will act
    like that a user just type in the fields known values, then click the button, and it's going to
    be solved automatically. In other words, have can I write a formula in PHP, how to plug it inside
    that language. For example, the formula to find a peremeter of square is: P=4a. So, a user
    just can write the known value which is peremeter itself and it will find the side of a square; and
    vice versa. If you can write many things how to do such formulas, such as comp....
  11. How Do I Code A Design?
    (6)
    Okey, so I saw another topic here regarding how to make a design. I know how to do that, so that is
    no problem. But I have always had some problems on how to code a design. I am tired of that I always
    need to use some sort of program, drag&drop webhost (like piczo) or use a free design I found
    online. I have noticed that people need to "cut" the design in different parts, but I have never
    understood what way the do it. So I do not understand anything about this, and really need some
    help. I will be happy for all help I get. /smile.gif" style="vertical-align:middle"....
  12. Html Code Tester. Online Script
    (15)
    Yes, yes. I have another script that I have written and I am distributing. I am not entirely sure if
    this works. I have not tested it yet, but I will later and post back with a demo and fix it up.
    Current script: CODE <?php //Save this as something like htmltest.php function
    CheckForm() { $html_unsafe=$_POST['code']; //Gives us our user
    input $html_safe=str_replace("<?php"," ",$html_unsafe);
    //Starts security measures $html_safe=str_replace("?>","
    ",$html_sa....
  13. Runescape 2 Private Server: Code/guide 1
    Creating a wilderness training zone. (10)
    Purpose: To make a cool training area in the wild. Difficulty: 1-3 Classes Modified:
    Client.java, shop.cfg, autospawn.cfg, npchandler, item2.java, shop.cfg Assumed Knowledge:
    Copy/paste, basic knowledge of cases, and how to search. Credits: 10% fedexer(global object tut),
    10% to my friend for teaching me how to make monsters drop random things, 80% me for the idea, and
    comming up with it. REQUIREMENTS: Make sure that your server can use herblore, mining,
    woodcutting, theiving, and prayer. You must also have fedexer's global objects code. Other
    Thi....
  14. Test Your Browser For Security
    take the browser security test (11)
    test your browser for security holes: http://bcheck.scanit.be/bcheck/ This checks for the most
    commonly occurring security vulnerabilities in the major browsers.In total there are some 40 tests
    and may take a long time to finish. I have run this test on 4 browsers: 1)IE 7 : 0 vulnerabilities
    (but the browser goes crazy, opening several windows and applications) 2)IE 6 : 1 medium risk (the
    browser goes crazy like IE7) 3)Firefox 2.0.0.3: 1 medium risk (i think some plugin might have caused
    this as some others have had different results) 4)Opera 9.2: 0 vulnerabilities ....
  15. Error Code In Subscriptions Page
    problems subscribing to topics (5)
    I'm seeing some weird warning message show up at the top of my page when I go into "my
    controls," then load my topic subscriptions page. At the top of the page, the following code appears
    several times: IPB WARNING in_array() : Wrong datatype for second argument (Line: 2711 of
    /sources/action_public/usercp.php) I'm guessing maybe that has something to do with the fact
    I'm having problems subscribing to my topics and posts? Thanks in advance for your help.....
  16. Test Our New Free File Hosting! The Fastest In The World! Check It :)
    (12)
    Another freebie guys, and it certainly rocks! /smile.gif" style="vertical-align:middle"
    emoid=":)" border="0" alt="smile.gif" /> We launched the new Free File Hosting files-upload.com –
    check the speed! Take out anything you like, no limitation at all. http://files-upload.com ....
  17. Each And Every Nokia Code For Your Mobile
    (6)
    Nokia 3210/5110/6110 And All Most Works In Most Of The Nokia Phones. QUOTE To view IMEI number
    *#06# To view Software Version enter *#0000# To view Status of Sim Clock Stop. Enter *#746025625#
    Latest Version is under Phone Info Type is NSE-3NX *#92702689# offers you Serial Number and also
    IMEI number. There are various options to scroll here. The code is easier to remember as *#war0anty#
    (warranty) The next screen is the date of manufacture in the format Made: 1197 The next screen is
    the purchase date in the format Purchasing Date: 1197 (this can be edited) The nex....
  18. Personality Test - With Birth Date
    (18)
    If your birthday is on.. Scroll down to find out about your nature.. QUOTE December 23rd -
    January 1st Red January 2nd - January 11th
    Orange January 12th - January 24th Yellow January 25th - February 3 Pink February
    4th - February 8th Blue February 9th - February 18th Green February 19th - February
    28th Brown March1st - Match 10th Aqua March 11 - March 20th Lime March 21 st
    Black March 22 nd - March 31st Purple April 1st - April 10th Navy April 1....
  19. Wap Source Code Viewer
    Mobile/wap source code viewer page (4)
    This is a source code viewer that will workl on wap/mobile sites but you can easily convert it to
    work on web im sure ;-) CODE <? header("Content-Type:
    text/vnd.wap.wml"); echo '<?xml version="1.0"
    encoding="utf-8"?> <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN"
    "http://www.wapforum.org/DTD/wml_1.1.xml"> <wml> <head><meta
    http-equiv="Cache-Control" content="no-cache"
    forua="true"/></head> <card title="s60.nerds.....
  20. My Program, Test It Please
    (5)
    Alright well I made this program about 3 weeks ago during Spring Break and decided to let you all
    test it. It is a program that you can type in questions you would like it to ask and the answers
    that go along with them. You have to tell it how many questions there should be before you type
    them in. After you are done typing them in you can edit them if you would like or just save and run
    them, you can't edit them after you say no. There are two modes for it, Exact Answer and
    Typical; if you go Exact Answer you have to have in the exact answer letter for letter a....
  21. How To Make A Search Form And Php Code?
    Can you help please? (10)
    I am looking to put a whole Bible on my site, don't worry about copyrights, I already have all
    that. It will be put into my site book by book. My problem? I need a form that will only search
    the /Bible part of my database. I need an html form, and then a php code that can be put into just
    ONE file but that will display a search page afterward. If you could help me out here, I would
    greatly appreciate it since I will need this in order for it to work. The goal is simple, have an
    html form, that will lead to a search of my entire inneed.mxweb.co.uk/bible database....
  22. Simple C File Handling In Action
    Small code snipet which covers most of basic file handling and navigat (3)
    Yesterday I suddenly got a lot of work. The same work we try to push off, yes you are right all
    formalities to get the code review incorporated and update all source code files with code review
    headers. Imagine if you need to open 300 files one by one and append code review headers at the
    end. Since most files are reviewed in groups of 20 to 30 files. We require one header to be placed
    in say 20 to 30 files. To simplify I went back to my class assignment days and wrote this small c
    utility to open all files passed on command line and open attach code review headers an....
  23. Need Help With C Program To Test If A Number Is Prime
    Ending unexpectedly somewhere near for-loop (12)
    CODE #include <stdio.h> main() {       printf("Enter a number:
    ");              int n;       scanf("%d", &n);              if(n ==
    2)            printf("%d is prime", n);       else if(n % 2 == 0 || n <
    2)            printf("%d is not prime", n);       else       {            int x;
               for(x = 0; x < (int)sqrt((double)n); x++)
                    if(n % x == 0)                 {                      printf("%....
  24. Myspace Music Player
    Anyone have the code? (9)
    Hey, I was looking around on MySpace to see if they had a particular song with a player that you see
    on many different MySpaces, but they did not have one for the song I wanted. I was wondering if
    anyone had the proper code for a music player. I do have the song I want and have the capability to
    upload it, but I just need the code for it. If you can help at all I'd really appreciate it.
    Example on the top right of this MySpace (but I just want a one song player):
    http://www.myspace.com/ofarevolution ....
  25. Html Tag For A Code Box
    Where You Put HTML Code For Your Users (4)
    Well I have seen it all over the web. Lots of sites have code boxes so you can promote them or they
    show you a code you can use for javascript and stuff like that. I would like to know the HTML code
    for those boxes. Thanks in advance for your help.....
  26. Da Vinci Code
    What's it about?? (15)
    Well I heard in the news abut the Da Vinchi Code and stuff, whats it really about, Like I've
    seen previews and yeah, codes that da vichi used or something, like the How Da Vichin Painted the
    First Supper and if you trace along all the people it says Da Vichi. So I like to Know What The Book
    is about???? Maybe I'll buy it and read it myself....
  27. How To Put A Phpbb Login Box On Your Main Site.
    Code and .php included!!! (18)
    I have included my coded file with this... Ok here is the code. CODE // //Create login area,
    replace the phpBB2 in /phpBB2/login.php with your forum's //directory // <form
    action="/phpBB2/login.php" method="post" target="_top"> <table
    width="25%" cellspacing="2" cellpadding="2" border="0"
    align="center">  <tr> <td align="left"
    class="nav"><a href="/phpBB2/index.php" class="nav">Prank Place
    Forum Index</a></td>....
  28. Test Your Php Pages W/o Upload/internet
    complete *working* guide on how to test your php pages (57)
    In this tutorial, I'm going to show you how to test your PHP pages without the Internet or
    uploading the files to your trap17 server. This tutorial is similar to doom's, but the links he
    provided does not work, so I decided to make my own tutorial with working links. The program that I
    will be using for this tutorial is called XAMPP . XAMPP is a modification of the popular Apache
    server, and I'm using XAMPP because of its simplicity to install as well as maintain. The
    current version of XAMPP is 1.4.13 and it has the following bundled in the download: QUOT....
  29. Redirect Code Help
    (8)
    Can someone give me the code which redirects you automatically in the whole page instead of only in
    the frame? I'm using this code, but it just redirects inside a frame... CODE <meta
    HTTP-EQUIV="REFRESH" content="0; url=http://www.something.com"> But now
    .tk has added a ad to the pages so I don't want to use it anymore, so I want that people
    entering the site is being redirected to the "real" domain name now.......
  30. Java Script Drop Down Menu With Css
    - a full code for a dynamic drop down (2)
    Introduction This is a code that I use to dynamically create the drop down menus. First, you have
    to edit the following code and put it in your Javascript. Notice : /*** SET BUTTON'S FOLDER HERE
    ***/. Edit that to your folder. Also, the /*** SET BUTTONS' FILENAMES HERE ***/. This creates a
    mouseover when the drop down is activated. Put all your onmouseover images under: oversources = new
    array; and your onmouseout images under : upsources. Be sure to set your on and out images above
    each other. CODE /*** SET BUTTON'S FOLDER HERE ***/ var buttonFold....

    1. Looking for test, php, code

Searching Video's for test, php, code
Similar
Add Flashing
Inbox To
Invisionfree
Forum - Html
code for
invsiionfree
!!
Why
Doesn't
This Code
Work On
Computinghos
t?
Dem0nfire
9;s Irrlicht
Test Bed -
*gasp*
It's
3D!
Test Of The
Bible : 2012
Create Table
- Mysql Code
- Help
Php Source
Code
Unveiled In
Browser? -
is that
possible?
Malicious
Code
Injection
Mozilla:
Firefox
Plugin
Shipped With
Malicious
Code
How To Test
System
Stability -
Hardware
problems /
How to test
system
stability
Php Code? -
Mathematical
Applications
How Do I
Code A
Design?
Html Code
Tester.
Online
Script
Runescape 2
Private
Server:
Code/guide 1
- Creating a
wilderness
training
zone.
Test Your
Browser For
Security -
take the
browser
security
test
Error Code
In
Subscription
s Page -
problems
subscribing
to topics
Test Our New
Free File
Hosting!
The Fastest
In The
World!
Check It :)
Each And
Every Nokia
Code For
Your Mobile
Personality
Test - With
Birth Date
Wap Source
Code Viewer
- Mobile/wap
source code
viewer page
My Program,
Test It
Please
How To Make
A Search
Form And Php
Code? - Can
you help
please?
Simple C
File
Handling In
Action -
Small code
snipet which
covers most
of basic
file
handling and
navigat
Need Help
With C
Program To
Test If A
Number Is
Prime -
Ending
unexpectedly
somewhere
near
for-loop
Myspace
Music Player
- Anyone
have the
code?
Html Tag For
A Code Box -
Where You
Put HTML
Code For
Your Users
Da Vinci
Code -
What's
it about??
How To Put A
Phpbb Login
Box On Your
Main Site. -
Code and
.php
included!
;!!
Test Your
Php Pages
W/o
Upload/inter
net -
complete
*working*
guide on how
to test your
php pages
Redirect
Code Help
Java Script
Drop Down
Menu With
Css - - a
full code
for a
dynamic drop
down
advertisement



How do you test your php code



 

 

 

 

ADD REPLY / Got an Opinion! Remove these ADs! RAPID SEARCH! Free Web Hosting [X]
Express your Opinions, Thoughts or Contribute more info. to help others.
Ask your Doubts & Queries to get answers, So that "Together We can help others!"
Register FREE for AD-FREE forum, Create your own topics, Ask Questions, track topics, setup subscriptions & notifications and Get a Free Website w/ Email and FTP.
500MB Space *No Ads*, CPanel, FTP, PHP, MySQL, EMails - 100% FREE