Jump to content

aleX_hill

Members
  • Posts

    143
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

aleX_hill's Achievements

Member

Member (2/5)

0

Reputation

  1. Thank you very much for the in depth replies. I will take a look at the code when I get a spare moment and take a look at the things you mentioned. If it doesnt make any difference I will post some code up for more specific troubleshooting. Cheers, Alex
  2. And so the plot thickens. Two different users on different computers get different errors. User 1: Warning: include() [function.include]: Unable to access ../profiles/singleton.php in /path/pages/login.php on line 16 Warning: include(../profiles/singleton.php) [function.include]: failed to open stream: No such file or directory in /path/pages/login.php on line 16 Warning: include() [function.include]: Unable to access ../profiles/singleton.php in /path/pages/login.php on line 16 Warning: include(../profiles/singleton.php) [function.include]: failed to open stream: No such file or directory in /path/pages/login.php on line 16 Warning: include() [function.include]: Failed opening '../profiles/singleton.php' for inclusion (include_path='.:/usr/share/php5/') in /path/pages/login.php on line 16 Warning: mysql_connect() [function.mysql-connect]: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (13) in /path/includes/sqlConnect.php on line 5 Warning: mysql_select_db(): supplied argument is not a valid MySQL-Link resource in /path/includes/sqlConnect.php on line 6 Warning: mysql_query() [function.mysql-query]: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (13) in /path/pages/login.php on line 22 Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in /path/pages/login.php on line 22 Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /path/pages/login.php on line 23 User 2: Warning: mysql_query() [function.mysql-query]: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (13) in /path/includes/menu.php on line 3 Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in /path/includes/menu.php on line 3 Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /path/includes/menu.php on line 4 Followed by general SQL errors further down the page. The user 1 stuff makes sense to a degree. The SQL login details are in one of the include files, so when it cant find that there will be SQL errors. But user 2 can include the files (lack of errors and the session details stored in one of the included files are active), but cannot connect to the SQL server. The SQL connect statement uses information from the SESSION vars, which are all active and populated with the correct details. And like I said in my first post, the errors are not happening when I am not on the work network, so I doubt its a code issue as such.
  3. The include is right at the top of the page. All that comes before it are the open php tag and session_start. The file worked fine on the work network for a long time, but just recently stopped. I think the server it was hosted on needed to change nameservers due to a DoS attack, but as far as I can tell that shouldnt be the issue considering I can still access the site, just the servers are having issues accessing the included files. And correct, not on the home network. It seems that the work network is the only place where it wont work.
  4. OK, so I dont think this is a code issue as such, but I am completely stumped as to where the issue could be. I have a page with some standard include() functions at the top. When I access the page from home, everything operates as it should, when I access it from work (on multiple machines), I get the standard "unable to open stream" and "unable to access" warnings for the include statements. I have tried hard refreshing and deleting cache (not that it should make a shred of difference) etc, but the error is still there after a week or so. Does anyone know what could be causing this issue?
  5. I do realise I am a bit vague on the code. The function file is over 600 lines long, hence me not posting it here. I will try removing all other functions and see how that goes...
  6. Thanks thorpe. I know that, which is why I am so puzzled...
  7. OK, this is a strange one I am hoping someone can help with. I have a file with a heap of functions which work fine. This file is included in my other files, and the function to display the content is called. For example I include the master file in guestbook.php, which calls showGuestbook(). Same with contact.php, it calles showContact(); etc. The file is outside the web root of the website calling it. So I went to add another function called downloadFile(). When I try to call the function, it gives me the "call to undefined function" error. I have tried renaming it to a few diff things, same error. So I thought there could be a brace error somewehere in the file. This is the strange bit.... When I put that function at the top of the file, the page seems to fail to parse. None of the functions are available... The function so far is simply: function downloadFile() { echo "Download File"; } Can anyone shed some light on this strange behaviour, especially the errors that occur just because I move the code higher up the file.
  8. $sql = "SELECT * FROM skills WHERE id='$sid'"; --> include quotes around '$sid' and see if that changes things.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.