#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2013
    Posts
    3
    Rep Power
    0

    Unable to execute the php code


    Hi, I am a newbie beginning to learn PHP. My apologies in advance if I am make a formatting error of any kind.

    I have a html5 form that invokes a php module using the POST method.

    However, when I try to execute the HTML, I get an error.
    --------------------
    Object not found!

    The requested URL was not found on this server. The link on the referring page seems to be wrong or outdated. Please inform the author of that page about the error.

    If you think this is a server error, please contact the webmaster.

    Error 404
    localhost
    Apache/2.4.4 (Win32) PHP/5.5.0

    ---------------------

    I understand the html is not able to invoke the php module. Both the html and php are present in the same folder. I am running this under my local server (apache)

    The error URL is "http://localhost/projects/orders/%E2%80%9Dprocessorder.php%E2%80%9D?%94tireqty%94=10&%94oilqty%94=10&%94sparkqty%94=10"


    I have the following in the HTML with a bunch of inputs

    <form action="processorder.php" method="post">

    All I have in the processorder.php is this

    <?php
    echo "<p>Order processed at ".date('H:i, jS F Y')."</p>";
    ?>

    Any help would be greatly appreciated

    Thanks
    Last edited by knn9413; July 6th, 2013 at 07:46 AM. Reason: add the error url
  2. #2
  3. No Profile Picture
    I haz teh codez!
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Dec 2003
    Posts
    2,556
    Rep Power
    2338
    See these?

    %E2%80%9D

    That appears to be the URL encoding of a "smart quote", which likely means you're using a full-fledged word processor to write your code. This is a bad thing, because the web wants its text to be just that: text. So you need a text editor.

    I would suggest using something like Notepad++, which will not only save your file as just text, but also has features to make writing your code easier.
    I ♥ ManiacDan & requinix

    This is a sig, and not necessarily a comment on the OP:
    Please don't be a help vampire!
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2013
    Posts
    3
    Rep Power
    0
    That seems to appear in firefox. Chrome is fine. I use komodo for my editor. It is my first time working with PHP. My HTML / CSS works fine. I was able to execute those successfully
  6. #4
  7. No Profile Picture
    I haz teh codez!
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Dec 2003
    Posts
    2,556
    Rep Power
    2338
    Is it possible you don't have PHP installed or maybe properly configured? How did you install it? If you create a file in the same folder named phpinfo.php and just put this in it:

    Code:
    <?php
    
    phpinfo(); 
    
    ?>
    , then go to http://localhost/project/orders/phpinfo.php, what happens?
    I ♥ ManiacDan & requinix

    This is a sig, and not necessarily a comment on the OP:
    Please don't be a help vampire!
  8. #5
  9. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2013
    Posts
    3
    Rep Power
    0
    I actually installed it using easyphp. Am I supposed to configure something? The php file runs good from within the easyphp though. Just looks like I am missing some config somewhere

IMN logo majestic logo threadwatch logo seochat tools logo