SitePoint Sponsor

User Tag List

Results 1 to 16 of 16
  1. #1
    SitePoint Guru D-flyer's Avatar
    Join Date
    Jan 2001
    Location
    Near a computer
    Posts
    782
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Simple cms doesn't seem to work on client pc??

    Hi all,

    I made a very simple cms with just two functions ( addContent and editContent), but on the client's computer it doesn't seem to worK??? And I don't get it.

    My client says they run a firewall, could this be problem???And how could i resolve this???

  2. #2
    SitePoint Wizard bronze trophy Tyssen's Avatar
    Join Date
    Oct 2005
    Location
    Brisbane, QLD
    Posts
    4,067
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by D-flyer View Post
    And I don't get it.
    That makes two of us then.

    You've told us next to nothing about the CMS you've created or what system it does work on as opposed to what system it doesn't work on or whatever 'it doesn't work' means exactly.

    You're going to have to get a lot more specific before anyone can help you.

  3. #3
    SitePoint Guru D-flyer's Avatar
    Join Date
    Jan 2001
    Location
    Near a computer
    Posts
    782
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    oops sorry,

    Well what can i say. My "CMS" is a webbased php/mysql application. After an admin login the client can edit or add new content. Just a simple textfield.(no tinymce or similar)

    My client is able to login in and make the changes but when he hits the edit content submit button nothing happens. That's the changes aren't being stored in the database.

    Now i have check it on different computers and on different locations without any problems.

    Hope this enough info.

  4. #4
    SitePoint Wizard bronze trophy Tyssen's Avatar
    Join Date
    Oct 2005
    Location
    Brisbane, QLD
    Posts
    4,067
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by D-flyer View Post
    Hope this enough info.
    Not for me. I'll leave it to someone with better deductive capabilities.

  5. #5
    SitePoint Wizard bronze trophy devbanana's Avatar
    Join Date
    Apr 2006
    Location
    Pennsylvania
    Posts
    1,736
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Did the client create the database and change the necessary database connection settings?
    Laudetur Iesus Christus!
    Christ's Little Flock
    Jesus is the Good Shepherd

  6. #6
    SitePoint Guru D-flyer's Avatar
    Join Date
    Jan 2001
    Location
    Near a computer
    Posts
    782
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    @devbanana, nope.

    I have check that and i am the one who created the db and made the db connection. like i said it works on all computer i have tried but not on the most important one: the client's pc.

    What am i overlooking???

  7. #7
    SitePoint Wizard bronze trophy Kailash Badu's Avatar
    Join Date
    Nov 2005
    Posts
    2,560
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Really, it's very hard to pin point the glitch unless you narrow down and be more specific. Your problem scope is too broad.

    First off, show us the code of the page that you think is not working. Second, explain what the code is supposed to do and what is it actually doing.

  8. #8
    SitePoint Wizard bronze trophy devbanana's Avatar
    Join Date
    Apr 2006
    Location
    Pennsylvania
    Posts
    1,736
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Have you checked if the db connection is ever made? is the database on a remote server? if so then the client's computer must be able to make an outgoing connection on port 3306
    Laudetur Iesus Christus!
    Christ's Little Flock
    Jesus is the Good Shepherd

  9. #9
    SitePoint Guru D-flyer's Avatar
    Join Date
    Jan 2001
    Location
    Near a computer
    Posts
    782
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    @kailash, i don't think it's a code related question. For example, here's my function addContent

    Code:
    function addContent(){
        global $database_connDB, $connDB;
        $sql = "INSERT INTO tblContent(contentText) VALUES ('".$_POST['contentText']."' )";
         $result = mysql_query($sql, $connDB) or die(mysql_error());
         if($result) {
             $msg = '<meta http-equiv="refresh" content="1" />';
            } else {
            $msg = "Oops, something went wrong";
            }
        return $msg;
    }
    which works fine on different pc's in different locations, except on my client's pc

  10. #10
    SitePoint Wizard silver trophy kyberfabrikken's Avatar
    Join Date
    Jun 2004
    Location
    Copenhagen, Denmark
    Posts
    6,157
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Do you get any errors? The display_errors directive may be On, in which case, errors won't get shown, but likely logged to an error-log of some kind.

  11. #11
    SitePoint Guru D-flyer's Avatar
    Join Date
    Jan 2001
    Location
    Near a computer
    Posts
    782
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    @devbanana,

    yep the db connection is made from the client's pc as he's able to login.

  12. #12
    SitePoint Wizard bronze trophy Kailash Badu's Avatar
    Join Date
    Nov 2005
    Posts
    2,560
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Apparently, the culprit is database connection. Yes, if MySQL database is on remote server. If yes, firewall could well be the problem. Your client’s PC must be able to make connection on the port 3306

  13. #13
    SitePoint Wizard bronze trophy Kailash Badu's Avatar
    Join Date
    Nov 2005
    Posts
    2,560
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Edit: above post doesn't make sense as db connection is ok. Now, next step is to turn on 'display_errors' and see if there is an error message being generated.

  14. #14
    SitePoint Guru D-flyer's Avatar
    Join Date
    Jan 2001
    Location
    Near a computer
    Posts
    782
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Wow,

    I have turned on 'display errors' with error_reporting (E_ALL);
    This gave me the following error(s)
    Code:
    Notice: Undefined index:
    So i have changed

    Code:
    if($_POST['submit']){
        echo "Updating....".editContent($_REQUEST['id']);
    }
    with
    
    if(isset($_POST['submit'])){
        echo "Updating....".editContent($_REQUEST['id']);
    }
    I have added isset() where necessary.

    Could this be the problem???

  15. #15
    SitePoint Wizard bronze trophy devbanana's Avatar
    Join Date
    Apr 2006
    Location
    Pennsylvania
    Posts
    1,736
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    No i don't think. Notices just show where code can be improved sometimes and otherwise can be annoying.
    Laudetur Iesus Christus!
    Christ's Little Flock
    Jesus is the Good Shepherd

  16. #16
    SitePoint Wizard silver trophy kyberfabrikken's Avatar
    Join Date
    Jun 2004
    Location
    Copenhagen, Denmark
    Posts
    6,157
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by D-flyer View Post
    Could this be the problem???
    Yes, if you had display-errors = off, and error-reporting = E_ALL, it would cause your script to die silently on those notices.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •