error in php

Problems with the Linux version of XAMPP, questions, comments, and anything related.

error in php

Postby r5000 » 15. November 2010 23:02

hello, I installed ubuntu to test my platform in the same, only after you have installed lampp, got errors on windows that did not, I think I need help.
They advised me to update the libraries of php, but do not know it in xampp.

Image
r5000
 
Posts: 6
Joined: 14. November 2010 00:21

Re: error in php

Postby sili » 16. November 2010 12:42

Show us your code. But you probably use $var[page] instead of $var['page'].
sili
 
Posts: 54
Joined: 15. March 2003 16:05
XAMPP version: dfg
Operating System: dfg

Re: error in php

Postby Nobbie » 16. November 2010 14:01

Switch off error reporting of PHP or change the error_level of reported errors. Therefore edit php.ini of your installation and look for the appropriate lines (you may search for "E_ALL" for example to get there quickly). You will find some comments in php.ini which will help you how to change values.

As you see, these messages aren't severe errors, they are "Notices" only. The script will work correctly anyway. You only have to suppress these notices by changing php.ini

Restart Apache after you did your changes.
Nobbie
 
Posts: 13183
Joined: 09. March 2008 13:04

Re: error in php

Postby r5000 » 16. November 2010 19:50

hello, I have corrected some errors, as they gave the suggestion was the lack of -> ' <- this only appeared after the major errors, which are GET [' page '] is not defined, and the id which is set in session, but it I do not know how to solve :s

IMAGE:

Image

INDEX.php
Code: Select all
<?php include('mysql.php');



    session_start();

   

    if ($_GET['page'] == 'login_make')

    {

        include('login_make.php');

    }

    else if ($_GET['page'] == 'logout')

    {

        include('logout.php');   

    }







?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">



<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

<head>

<link rel=“shortcut icon” href=“favicon.ico“ type="image/x-icon"/>

<meta name="Description" content="NexuS! O melhor de uma comunidade está aqui!" />

<meta name="Keywords" content="nexus,nexusystem,comunity,comunidade,sistema,ligação" />

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<meta name="Distribution" content="Global" />

<meta name="Author" content="NexuS Team --> admin.nexusystem@sapo.pt" />

<meta name="Robots" content="index,follow" />



<link rel="stylesheet" href="images/Envision.css" type="text/css" />



<title>NexuSystem</title>

   

</head>



<body>

<!-- wrap starts here -->

<div id="wrap">

       

        <!--header -->

        <div id="header">           

               

            <h1 id="logo-text"><a href="index.php">System</a></h1>       

            <p id="slogan">Community of NexuS</p>       

           

            <div id="header-links">

            <p>

                <a href="index.php">Inicio</a> |

                <?php if ($_SESSION['id'] == '') {?><a href="index.php?page=register">Registar</a> | <?php } ?>

                <a href="index.php">Sobre</a>           

            </p>       

        </div>       

                       

        </div>

       

        <!-- menu -->   

        <div  id="menu">

            <ul>

                <li id="current"><a href="index.php">Inicio</a></li>

                <li><a href="index.php?page=forum">Forum</a></li>

                <li><a href="index.php">Serviços</a></li>

                <li><a href="index.php">Sobre</a></li>

                <?php if ($_SESSION['id'] != ''){ ?><li><a href="index.php?page=account">Conta</a></li>

                <li class="last"><a href="index.php?page=logout">Sair</a></li>    <?php } ?>   

            </ul>

        </div>                   

           

        <!-- content-wrap starts here -->

        <div id="content-wrap">

               

            <div id="sidebar">

           

                <h3>Search Box</h3>   

                <form action="#" class="searchform">

                    <p>

                    <input name="search_query" class="textbox" type="text" />

                      <input name="search" class="button" value="Search" type="submit" />

                    </p>           

                </form>   

                   

                <h3>Sidebar Menu</h3>

                <ul class="sidemenu">               

                    <li><a href="index.html">Home</a></li>

                    <li><a href="#TemplateInfo">Template Info</a></li>

                    <li><a href="#SampleTags">Sample Tags</a></li>

                    <li><a href="http://www.styleshout.com/">More Free Templates</a></li>   

                    <li><a href="http://www.4templates.com/?aff=ealigam">Premium Templates</a></li>                       

                </ul>   

               

           

                <h3>Links</h3>

                <ul class="sidemenu">

                    <li><a href="http://www.pdphoto.org/">PDPhoto.org</a></li>

                    <li><a href="http://www.squidfingers.com/patterns/">Squidfingers</a></li>

                    <li><a href="http://www.alistapart.com">Alistapart</a></li>                   

                    <li><a href="http://www.cssremix.com">CSS Remix</a></li>

                    <li><a href="http://www.cssmania.com/">CSS Mania</a></li>

                </ul>

           

                <h3>Sponsors</h3>

                <ul class="sidemenu">

                    <li><a href="http://www.4templates.com/?aff=ealigam"><strong>4templates</strong></a> <br /> Low Cost Hi-Quality Templates</li>

                    <li><a href="http://store.templatemonster.com?aff=ealigam"><strong>TemplateMonster</strong></a> <br /> Delivering the Best Templates on the Net!</li>

                    <li><a href="http://tinyurl.com/3cgv2m"><strong>Text Link Ads</strong></a> <br /> Monetized your website</li>

                    <li><a href="http://www.fotolia.com/partner/114283"><strong>Fotolia</strong></a> <br /> Free stock images or from $1</li>

                    <li><a href="http://www.dreamstime.com/res338619"><strong>Dreamstime</strong></a> <br /> Lowest Price for High Quality Stock Photos</li>

                    <li><a href="http://www.dreamhost.com/r.cgi?287326"><strong>Dreamhost</strong></a> <br /> Premium webhosting</li>

                </ul>

               

                <h3>Wise Words</h3>

                <div class="left-box">

                    <p>&quot;Evaluation of the past is the first step toward

                    vision for the future.&quot; </p>

                   

                    <p class="align-right">- Chris Widener</p>

                </div>   

               

                <h3>Support Styleshout</h3>

                <div class="left-box">

                    <p>If you are interested in supporting my work and would like to contribute, you are

                    welcome to make a small donation through the

                    <a href="http://www.styleshout.com/">donate link</a> on my website - it will

                    be a great help and will surely be appreciated.</p>

                </div>                           

                               

            </div>

               

            <div id="main">

           

           

            <?php

               

                include ('includes.php');



            ?>

           

           

            </div>

       

        <!-- content-wrap ends here -->   

        </div>

                   

        <!--footer starts here-->

        <div id="footer">

           

            <p>

            &copy; 2006 <strong>NexuS Team</strong> |

            Design by: <a href="http://www.styleshout.com/">styleshout</a> |

            Valid <a href="http://validator.w3.org/check?uri=referer">XHTML</a> |

            <a href="http://jigsaw.w3.org/css-validator/check/referer">CSS</a>

           

           &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

           

            <a href="index.php">Inicio</a>&nbsp;|&nbsp;

           <a href="index.php">Sobre</a>&nbsp;|&nbsp;

           <a href="index.php">RSS Feed</a>

           </p>

               

        </div>   



<!-- wrap ends here -->

</div>



</body>

</html>

<?php    mysql_close($con);    ?>
r5000
 
Posts: 6
Joined: 14. November 2010 00:21

Re: error in php

Postby Altrea » 17. November 2010 03:47

Code: Select all
 if ($_GET['page'] == 'login_make')

check either $_GET['page'] is setted before or not with PHP-functions isset() or empty()
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 11935
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64

Re: error in php

Postby r5000 » 17. November 2010 23:36

Yes it is declared before!
r5000
 
Posts: 6
Joined: 14. November 2010 00:21


Return to XAMPP for Linux

Who is online

Users browsing this forum: No registered users and 9 guests