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.

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'].
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.
Posts: 11611
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



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



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




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





<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "">

<html xmlns="" xml:lang="en" lang="en">


<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 -->" />

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

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





<!-- 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">


                <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>           






        <!-- menu -->   

        <div  id="menu">


                <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 } ?>   




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

        <div id="content-wrap">


            <div id="sidebar">


                <h3>Search Box</h3>   

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


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

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




                <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="">More Free Templates</a></li>   

                    <li><a href="">Premium Templates</a></li>                       





                <ul class="sidemenu">

                    <li><a href=""></a></li>

                    <li><a href="">Squidfingers</a></li>

                    <li><a href="">Alistapart</a></li>                   

                    <li><a href="">CSS Remix</a></li>

                    <li><a href="">CSS Mania</a></li>




                <ul class="sidemenu">

                    <li><a href=""><strong>4templates</strong></a> <br /> Low Cost Hi-Quality Templates</li>

                    <li><a href=""><strong>TemplateMonster</strong></a> <br /> Delivering the Best Templates on the Net!</li>

                    <li><a href=""><strong>Text Link Ads</strong></a> <br /> Monetized your website</li>

                    <li><a href=""><strong>Fotolia</strong></a> <br /> Free stock images or from $1</li>

                    <li><a href=""><strong>Dreamstime</strong></a> <br /> Lowest Price for High Quality Stock Photos</li>

                    <li><a href=""><strong>Dreamhost</strong></a> <br /> Premium webhosting</li>



                <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>



                <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="">donate link</a> on my website - it will

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





            <div id="main">





                include ('includes.php');






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



        <!--footer starts here-->

        <div id="footer">



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

            Design by: <a href="">styleshout</a> |

            Valid <a href="">XHTML</a> |

            <a href="">CSS</a>




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

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

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




<!-- wrap ends here -->




<?php    mysql_close($con);    ?>
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
AF Moderator
Posts: 10265
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 10 Pro x64

Re: error in php

Postby r5000 » 17. November 2010 23:36

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

Return to XAMPP for Linux

Who is online

Users browsing this forum: No registered users and 17 guests