Jump to content

DanePullman

New Members
  • Posts

    5
  • Joined

  • Last visited

Everything posted by DanePullman

  1. I got unpatient lol, as i need it done asap for school. So i just deleted it and found a easier one. Thank you anyways.
  2. Fixed the mistakes you said to, just opened in Google Chrome (localhost) and it just returned with this: ( ! ) Notice: Use of undefined constant _FILE_ - assumed '_FILE_' in C:\wamp\www\pk\core\init.inc.php on line 3 Call Stack # Time Memory Function Location 1 0.0006 128088 {main}( ) ...\index.php:0 2 0.0011 134952 include( 'C:\wamp\www\pk\core\init.inc.php' ) ...\index.php:3 ( ! ) Notice: Undefined variable: GET in C:\wamp\www\pk\core\init.inc.php on line 5 Call Stack # Time Memory Function Location 1 0.0006 128088 {main}( ) ...\index.php:0 2 0.0011 134952 include( 'C:\wamp\www\pk\core\init.inc.php' ) ...\index.php:3 ( ! ) Warning: scandir(./pages,./pages): The system cannot find the file specified. (code: 2) in C:\wamp\www\pk\core\init.inc.php on line 5 Call Stack # Time Memory Function Location 1 0.0006 128088 {main}( ) ...\index.php:0 2 0.0011 134952 include( 'C:\wamp\www\pk\core\init.inc.php' ) ...\index.php:3 3 0.1301 135456 scandir ( ) ...\init.inc.php:5 ( ! ) Warning: scandir(./pages): failed to open dir: No such file or directory in C:\wamp\www\pk\core\init.inc.php on line 5 Call Stack # Time Memory Function Location 1 0.0006 128088 {main}( ) ...\index.php:0 2 0.0011 134952 include( 'C:\wamp\www\pk\core\init.inc.php' ) ...\index.php:3 3 0.1301 135456 scandir ( ) ...\init.inc.php:5 ( ! ) Warning: scandir(): (errno 2): No such file or directory in C:\wamp\www\pk\core\init.inc.php on line 5 Call Stack # Time Memory Function Location 1 0.0006 128088 {main}( ) ...\index.php:0 2 0.0011 134952 include( 'C:\wamp\www\pk\core\init.inc.php' ) ...\index.php:3 3 0.1301 135456 scandir ( ) ...\init.inc.php:5 ( ! ) Warning: in_array() expects parameter 2 to be array, boolean given in C:\wamp\www\pk\core\init.inc.php on line 5 Call Stack # Time Memory Function Location 1 0.0006 128088 {main}( ) ...\index.php:0 2 0.0011 134952 include( 'C:\wamp\www\pk\core\init.inc.php' ) ...\index.php:3 3 0.3704 135584 in_array ( ) ...\init.inc.php:5 ( ! ) Warning: Cannot modify header information - headers already sent by (output started at C:\wamp\www\pk\core\init.inc.php:5) in C:\wamp\www\pk\core\init.inc.php on line 6 Call Stack # Time Memory Function Location 1 0.0006 128088 {main}( ) ...\index.php:0 2 0.0011 134952 include( 'C:\wamp\www\pk\core\init.inc.php' ) ...\index.php:3 3 0.4570 135576 header ( ) ...\init.inc.php:6 ( ! ) Warning: Cannot modify header information - headers already sent by (output started at C:\wamp\www\pk\core\init.inc.php:5) in C:\wamp\www\pk\core\init.inc.php on line 7 Call Stack # Time Memory Function Location 1 0.0006 128088 {main}( ) ...\index.php:0 2 0.0011 134952 include( 'C:\wamp\www\pk\core\init.inc.php' ) ...\index.php:3 3 0.6046 135640 header ( ) ...\init.inc.php:7 ( ! ) Notice: Use of undefined constant _FILE_ - assumed '_FILE_' in C:\wamp\www\pk\core\init.inc.php on line 3 Call Stack # Time Memory Function Location 1 0.0006 128088 {main}( ) ...\index.php:0 2 0.0011 134952 include( 'C:\wamp\www\pk\core\init.inc.php' ) ...\index.php:3 ( ! ) Notice: Undefined variable: GET in C:\wamp\www\pk\core\init.inc.php on line 5 Call Stack # Time Memory Function Location 1 0.0006 128088 {main}( ) ...\index.php:0 2 0.0011 134952 include( 'C:\wamp\www\pk\core\init.inc.php' ) ...\index.php:3 ( ! ) Warning: scandir(./pages,./pages): The system cannot find the file specified. (code: 2) in C:\wamp\www\pk\core\init.inc.php on line 5 Call Stack # Time Memory Function Location 1 0.0006 128088 {main}( ) ...\index.php:0 2 0.0011 134952 include( 'C:\wamp\www\pk\core\init.inc.php' ) ...\index.php:3 3 0.1301 135456 scandir ( ) ...\init.inc.php:5 ( ! ) Warning: scandir(./pages): failed to open dir: No such file or directory in C:\wamp\www\pk\core\init.inc.php on line 5 Call Stack # Time Memory Function Location 1 0.0006 128088 {main}( ) ...\index.php:0 2 0.0011 134952 include( 'C:\wamp\www\pk\core\init.inc.php' ) ...\index.php:3 3 0.1301 135456 scandir ( ) ...\init.inc.php:5 ( ! ) Warning: scandir(): (errno 2): No such file or directory in C:\wamp\www\pk\core\init.inc.php on line 5 Call Stack # Time Memory Function Location 1 0.0006 128088 {main}( ) ...\index.php:0 2 0.0011 134952 include( 'C:\wamp\www\pk\core\init.inc.php' ) ...\index.php:3 3 0.1301 135456 scandir ( ) ...\init.inc.php:5 ( ! ) Warning: in_array() expects parameter 2 to be array, boolean given in C:\wamp\www\pk\core\init.inc.php on line 5 Call Stack # Time Memory Function Location 1 0.0006 128088 {main}( ) ...\index.php:0 2 0.0011 134952 include( 'C:\wamp\www\pk\core\init.inc.php' ) ...\index.php:3 3 0.3704 135584 in_array ( ) ...\init.inc.php:5 ( ! ) Warning: Cannot modify header information - headers already sent by (output started at C:\wamp\www\pk\core\init.inc.php:5) in C:\wamp\www\pk\core\init.inc.php on line 6 Call Stack # Time Memory Function Location 1 0.0006 128088 {main}( ) ...\index.php:0 2 0.0011 134952 include( 'C:\wamp\www\pk\core\init.inc.php' ) ...\index.php:3 3 0.4570 135576 header ( ) ...\init.inc.php:6 ( ! ) Warning: Cannot modify header information - headers already sent by (output started at C:\wamp\www\pk\core\init.inc.php:5) in C:\wamp\www\pk\core\init.inc.php on line 7 Call Stack # Time Memory Function Location 1 0.0006 128088 {main}( ) ...\index.php:0 2 0.0011 134952 include( 'C:\wamp\www\pk\core\init.inc.php' ) ...\index.php:3 3 0.6046 135640 header ( ) ...\init.inc.php:7
  3. Not exactly sure on what bit is causing the error, as im new to php hence why I was following video, but heres code from main file: <?php $core_path = dirname(_FILE_); if (empty($GET['page']) || in_array("{$GET['page']}.page.inc.php", scandir("{$core_path}/pages")) == false){ header('HTTP/1.1 404 Not Found'); header('Location: index.php?page=inbox'); die(); } session_start(); mysql_connect('127.0.0.1', 'example_user', 'example_pass'); mysql_select_db('private_message_system'); include("{$core_path}/inc/user.inc.php"); if (isset($_POST['user_name'], $_POST['user_password'])){ if (($user_id = validate_credentials($_POST['user_name'], $_POST['user_password'])) !== false){ $_SESSION['user_id'] = $user_id; header('Location: index.php?page=inbox'); die(); } } if (empty($_SESSION['user_id']) && $_GET['page'] !== 'login'){ header('HTTP/1.1 403 Forbidden'); header('Location: index.php?page=login'); die(); } $include_file = "{$core_path}/pages/{$_GET['page']}.page.inc.php"; ?>
  4. I have been following the tutorial betterphp on YouTube on his tutorial on how to make a private message system (PHP Tutorial: Private Message System), but it uses a header {} tag and whenever I use it in Wamp, it loads for a while and eventually says "Connection Timed Out" "ERR_TOO_MANY_REDIRECTS". I have a link if anyone wants to check my code but I myself, and cannot find any errors. Private Message System (My Copy - Unfinished) - Download Link: https://www.dropbox.com/s/rm101g7uhqww7zh/PHP%20Private%20Message%20System.zip?dl=0 Video Tutorial - YouTube Link: https://www.youtube.com/watch?v=5DifzPbAhMU Thanks, Dane
×
×
  • 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.