Closed Thread
Results 1 to 6 of 6

Thread: Trouble with PHP code

  1. #1
    injoigraphix is offline Newbie
    Join Date
    Mar 2010
    Posts
    3
    Rep Power
    0

    Smile Trouble with PHP code

    Im geting these errors:

    Warning: Unknown: open(/home/users/web/b1269/sl.injoigraphix/public_html/cgi-bin/tmp/sess_28eef456bb075ebc71a1a0e2cb826c2e, O_RDWR) failed: No such file or directory (2) in Unknown on

    Warning: session_start() [function.session-start]: open(/home/users/web/b1269/sl.injoigraphix/public_html/cgi-bin/tmp/sess_8d11520d210b21e0a822ab5e284b773a, O_RDWR) failed: No such file or directory (2) in /hermes/bosweb/web126/b1269/sl.injoigraphix/public_html/index.php on line 2

    Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /hermes/bosweb/web126/b1269/sl.injoigraphix/public_html/index.php:2) in /hermes/bosweb/web126/b1269/sl.injoigraphix/public_html/index.php on line 2

    Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /hermes/bosweb/web126/b1269/sl.injoigraphix/public_html/index.php:2) in /hermes/bosweb/web126/b1269/sl.injoigraphix/public_html/index.php on line 2

    Here is the code! Not sure where the error is:
    Code:
    <?php
      session_start
    ();
      
    $n1 rand(010);
      
    $n2 rand(010);
      
    $_SESSION['captcha'] = $n1 $n2;
      
      
    // IE6 string from user_agent
      
    $ie6 "MSIE 6.0";
      
      
    // detect browser
      
    $browser $_SERVER['HTTP_USER_AGENT'];
      
      
    // yank the version from the string
      
    $browser substr("$browser"258);
    ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>Injoi Graphix</title>
        
        <link href="style/style.css" rel="stylesheet" type="text/css" />    
        <link href="style/jquery.lightbox-0.5.css" rel="stylesheet" type="text/css" />
        
        <script src="script/jquery-1.3.1.min.js" type="text/javascript"></script>    
        <script src="script/jquery.smoothanchors2.js" type="text/javascript"></script> 

        <script src="script/jquery.cycle.all.min.js" type="text/javascript"></script>
        <script src="script/jquery.mousewheel.js" type="text/javascript"></script>    
        <script src="script/jScrollPane.js" type="text/javascript"></script> 
        <script src="script/jquery.lightbox-0.5.min.js" type="text/javascript"></script>
        
        <script src="script/dynamics.js" type="text/javascript"></script>
        
        <script type="text/javascript"> var n1=<?php echo $n1?>; var n2=<?php echo $n2?>; </script>    
        <script src="script/sendmail.js" type="text/javascript"></script>
        
        <script type="text/javascript">
          $(document).ready(function(){
               $.smoothAnchors(900, "swing", false);
          });
        </script>
          
        <?php include ("work.php"); ?> 
        
    </head>    
        <body>
        
        <?php 
            
    if($browser != $ie6){ // check user browser if ie6 = true shows Internet Explorer6 Alert 
        
    ?>

        <div id="header_bg">
           <div id="header">
             <div class="logo"><a href="#home" class="homepage"><img src="http://forum.codecall.net/images/logo.png" alt="DynamicPortfolio" title="DynamicPortfolio" /></a></div>
             
              <div id="main_nav">
               <ul>
                  <li><a href="#home" class="section1 selected">Home</a></li>
                  <li><a href="#portfolio" class="section2">Portfolio</a></li>
                  <li><a href="#about" class="section3">About</a></li>
                  <li><a href="#contact" class="section4">Contact</a></li>
               </ul>
             </div>
             <div class="clear"></div>
             </div>
        </div>
        
        <div id="page">
          <!-- HOMEPAGE section -->
          <div id="home">
            <a name="home"></a>
            <img src="http://forum.codecall.net/images/featured_work.png" alt="Featured work" title="Featured work" class="featured_work_txt" />
            <img src="http://forum.codecall.net/images/arrow1.png" alt="" class="arrow1" />
            <img src="http://forum.codecall.net/images/arrow2.png" alt="" class="arrow2" />
            <img src="http://forum.codecall.net/images/arrow3.png" alt="" class="arrow3" />
            <a href="#contact" class="section4"><img src="http://forum.codecall.net/images/get_in_touch.png" alt="Get in touch with me now" title="Get in touch with me now" class="get_in_touch_txt" /></a>
            <a href="#contact" class="section4"><img src="http://forum.codecall.net/images/available.png" alt="Available for freelance work" title="Available for freelance work" class="available_tag" /></a>
            <div class="featured_work">
                <div class="featured_gallery">
                    <ul id="featured">
                      <li><img src="http://forum.codecall.net/images/gallery/slide1_featured.jpg" alt="" title="" /></li>
                      <li><img src="http://forum.codecall.net/images/gallery/slide2_featured.jpg" alt="" title="" /></li>
                      <li><img src="http://forum.codecall.net/images/gallery/slide3_featured.jpg" alt="" title="" /></li>
                    </ul>
                </div>
            </div>
            <div class="welcome_txt">
                <img src="http://forum.codecall.net/images/welcome.png" alt="Hi there, welcome to my portfolio!" title="Hi there, welcome to my portfolio!" />
            </div>
            <div class="home_txt"> Our site is currently under construction but we would love to hear from you. Please contact us with your questions or comments! </div>        
          </div>
          <!-- Portfolio section --> 
          <div id="portfolio">
            <a name="portfolio"></a>
            <img src="http://forum.codecall.net/images/portfolio_showcase_txt.png" alt="Portfolio showcase" title="Portfolio showcase" class="portfolio_showcase_txt" />
            <div class="slideshow_nav">
                <ul>
                    <li class="prev_nav"><a href="javascript:;" id="prev"><img src="http://forum.codecall.net/images/prev_off.png" alt="Prev" /></a></li>
                    <li class="next_nav"><a href="javascript:;" id="next"><img src="http://forum.codecall.net/images/next_off.png" alt="Next" /></a></li>
                </ul>
            </div>
            <div class="bg_portfolio">
                <div id="info" class="work_info">
                    <?php   foreach ($slides as $name => $slide) { ?>
                          <div>
                              <h1><?php echo $name ?></h1>                        
                              <p><?php echo $slide['description'?></p>
                              <h2>TECHNOLOGIES</h2>
                              <p><?php echo $slide['technologies'?></p>
                              <a href="<?php echo $slide['url'?>" target="_blank"><img src="http://forum.codecall.net/images/btn_visit.gif" alt="visit site" title="visit site" /></a>
                          </div>
                      <?php }  ?>
                </div>
                <div class="work_gallery">
                    <ul id="work_slideshow">
                    <?php    foreach ($slides as $name => $slide) { ?>
                        <li>
                           <a href="http://forum.codecall.net/images/gallery/<?php echo $slide['large'?>" class="large_preview">
                               <img src="http://forum.codecall.net/images/gallery/<?php echo $slide['small'?>" alt="<?php echo $name ?>" title="<?php echo $name ?>" />
                           </a>
                        </li>
                    <?php }  ?>
                    </ul>
                </div>
            </div>
          </div>
          <!-- ABOUT section --> 
          <div id="about">
            <a name="about"></a>
            <img src="http://forum.codecall.net/images/about_me_txt.png" alt="About me" title="About me" class="about_me_txt" />
            <div class="bg_about">
                <div class="sec_nav">
                    <ul>
                        <li><a href="javascript:;" id="first_page" class="active">First page</a></li>
                        <li><a href="javascript:;" id="second_page">Second page</a></li>
                        <li><a href="javascript:;" id="third_page" >Third page</a></li>
                    </ul>
                </div>
                
                <div id="scroll_content" class="text">
                    <div class="first_page">
                      <h1>A Bit About Me Here</h1>
                      <h4>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Proin sed odio et ante adipiscing lobortis. Quisque eleifend, arcu a dictum varius, risus neque venenatis arcu, a semper massa mi eget ipsum.</h4>
                      <img src="http://forum.codecall.net/images/thumb1.jpg" alt="" class="floatLeft img_right_space" />
                      <p>It is a long <a href="http://www.google.com" target="_blank">established fact</a> that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using 'Content here, content here', making it look like readable English. Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text, and a search for 'lorem ipsum' will uncover many web sites still in their infancy. Various versions have evolved over the years, sometimes by accident, sometimes on purpose (injected humour and the like).</p>              
                      
                      <ul>
                        <li>It is a long established</li>
                        <li>Lorem ipsum</li>
                        <li>is simply dummy text of the printing and typesetting industry</li>
                        <li>Lorem Ipsum is not simply random text</li>
                      </ul>
                      <p>It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using 'Content here, content here', making it look like readable English.</p>
                      
                      <ol>
                        <li>It is a long established</li>
                        <li>Lorem ipsum</li>
                        <li>is simply dummy text of the printing and typesetting industry</li>
                        <li>Lorem Ipsum is not simply random text</li>
                      </ol>
                      
                      <blockquote>
                        There are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration in some form, by injected humour, or randomised words which don't look even slightly believable.
                      </blockquote>
                      
                        <h1>This is a H1 heading</h1>
                        <h2>This is a H2 heading</h2>
                        <h3>This is a H3 heading</h3>
                        <h4>This is a H4 heading</h4>
                        <h5>This is a H5 heading</h5>
                        <h6>This is a H6 heading</h6>
                    </div>
                        
                    <div class="second_page" style="display:none">
                        <h1>SECOND PAGE HERE</h1>
                        <h4>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Proin sed odio et ante adipiscing lobortis. Quisque eleifend, arcu a dictum varius, risus neque venenatis arcu, a semper massa mi eget ipsum.</h4>
                        <img src="http://forum.codecall.net/images/thumb2.jpg" alt="" class="floatRight img_left_space" />
                        <p>It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using 'Content here, content here', making it look like readable English. Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text, and a search for 'lorem ipsum' will uncover many web sites still in their infancy. Various versions have evolved over the years, sometimes by accident, sometimes on purpose (injected humour and the like).</p>
                        <ul>
                          <li>It is a long established</li>
                          <li>Lorem ipsum</li>
                          <li>is simply dummy text of the printing and typesetting industry</li>
                          <li>Lorem Ipsum is not simply random text</li>
                        </ul>
                        <p>It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using 'Content here, content here', making it look like readable English.</p>
                        
                        <ol>
                          <li>It is a long established</li>
                          <li>Lorem ipsum</li>
                          <li>is simply dummy text of the printing and typesetting industry</li>
                          <li>Lorem Ipsum is not simply random text</li>
                        </ol>
                        
                        <blockquote>
                          There are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration in some form, by injected humour, or randomised words which don't look even slightly believable.
                        </blockquote>
                        
                          <h1>This is a H1 heading</h1>
                          <h2>This is a H2 heading</h2>
                          <h3>This is a H3 heading</h3>
                          <h4>This is a H4 heading</h4>
                          <h5>This is a H5 heading</h5>
                          <h6>This is a H6 heading</h6>                   
                    </div>
                    
                    <div class="third_page" style="display:none">
                          <h1>THIRD PAGE HERE</h1>
                          <h4>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Proin sed odio et ante adipiscing lobortis. Quisque eleifend, arcu a dictum varius, risus neque venenatis arcu, a semper massa mi eget ipsum.</h4>
                          <img src="http://forum.codecall.net/images/thumb3.jpg" alt="" class="floatLeft img_right_space" />
                          <p>It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using 'Content here, content here', making it look like readable English. Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text, and a search for 'lorem ipsum' will uncover many web sites still in their infancy. Various versions have evolved over the years, sometimes by accident, sometimes on purpose (injected humour and the like).</p>
                          <ul>
                            <li>It is a long established</li>
                            <li>Lorem ipsum</li>
                            <li>is simply dummy text of the printing and typesetting industry</li>
                            <li>Lorem Ipsum is not simply random text</li>
                          </ul>
                          <p>It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using 'Content here, content here', making it look like readable English.</p>
                          
                          <ol>
                            <li>It is a long established</li>
                            <li>Lorem ipsum</li>
                            <li>is simply dummy text of the printing and typesetting industry</li>
                            <li>Lorem Ipsum is not simply random text</li>
                          </ol>
                          
                          <blockquote>
                            There are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration in some form, by injected humour, or randomised words which don't look even slightly believable.
                          </blockquote>
                          
                            <h1>This is a H1 heading</h1>
                            <h2>This is a H2 heading</h2>
                            <h3>This is a H3 heading</h3>
                            <h4>This is a H4 heading</h4>
                            <h5>This is a H5 heading</h5>
                            <h6>This is a H6 heading</h6>
                    </div>
                    <div class="forth_page" style="display:none">
                        <h1>FORTH PAGE HERE</h1>
                    </div>
                </div>
            </div>
          </div>
          <!-- CONTACT section --> 
          <div id="contact">
            <a name="contact"></a>
            <img src="http://forum.codecall.net/images/contact_txt.png" alt="Contact" title="Contact" class="contact_txt" />
            <div class="contact_info_bg">
                <div class="conact_info">
                  <h1>GET IN TOUCH</h1>
                  <p>It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout.</p>
                  <p>
                    <strong>Phone:</strong> 555-555-5555<br />      
                    <strong>Email:</strong> contact@email.com<br />
                    <strong>Address:</strong> 1000 12th Ave South 97 City, State
                  </p>
                  <img src="http://forum.codecall.net/images/map.gif" alt="Location" title="Location" />
                </div>            
            </div>
            <div class="contact_form">
                <h1>DROP ME A LINE</h1>
                <form action="#" method="post" id="sendEmail">                      
                  <p>
                    <label>Name:</label>
                    <input type="text" id="name" class="field" name="nume" />
                  </p>
                  <div class="clear"></div>
                  <p>
                    <label>E-mail:</label>
                    <input type="text" id="email" class="field" name="email" />
                  </p>
                  <div class="clear"></div>

                  <p>
                    <label>Message:</label>
                    <textarea class="field_textarea" rows="" cols="" id="message" name="message"></textarea>
                  </p>                      
                  <div class="clear"></div>
                  
                  <p>
                    <label><?php echo $n1 ' + ' $n2?> = </label>
                    <input type="text" id="captcha" class="captcha_field" name="captcha" />
                  </p>                      
                  <div class="clear"></div>
                                
                  <p id="loading"><label>&nbsp;</label><input type="image" id="submit" src="http://forum.codecall.net/images/send_btn.png" value="Send" /></p>
                </form>            
            </div>
          </div>             
        </div>
        
        <div id="footer_bg"></div>
        <div id="footer">
            <div class="footer_content">
                <div class="floatLeft">&copy; Copyright 2009 DynamicPortfolio. All rights reserved.</div>
                <div class="floatRight footer_nav">
                  <ul>
                    <li><a href="#home" class="section1 selected">Home</a></li>
                    <li><a href="#portfolio" class="section2">Portfolio</a></li>
                    <li><a href="#about" class="section3">About</a></li>
                    <li><a href="#contact" class="section4">Contact</a></li>
                 </ul>
                </div>
                <div class="clear"></div>
            </div>
        </div>    

        <?php } else { ?>     
            <!-- Internet Explorer 6 Alert -->
            <div class="ie6">
                <div class="modern_browsers">
                    <a href="http://www.microsoft.com/windows/internet-explorer/default.aspx"><img src="http://forum.codecall.net/images/upgrade_ie.gif" alt="Internet Explorer 8" /></a>
                    <a href="http://www.mozilla.com/en-US/firefox/personal.html"><img src="http://forum.codecall.net/images/upgrade_firefox.gif" alt="Firefox" /></a>
                    <a href="http://www.apple.com/safari/"><img src="http://forum.codecall.net/images/upgrade_safari.gif" alt="Safari" /></a>
                </div>
            </div>
        
        <?php ?>

        </body>
    </html>
    Last edited by Jaan; 03-16-2010 at 03:52 PM. Reason: Please use code tags when you are posting your codes!

  2. CODECALL Circuit advertisement
    Join Date
    Always
    Posts
    Many

     
  3. #2
    Feral is offline Programmer
    Join Date
    Jul 2008
    Posts
    163
    Rep Power
    15

    Re: Trouble with PHP code

    There is something wrong with the location that sessions are being saved, check to make sure that the folder "/home/users/web/b1269/sl.injoigraphix/public_html/cgi-bin/tmp" exists and is writeable

  4. #3
    injoigraphix is offline Newbie
    Join Date
    Mar 2010
    Posts
    3
    Rep Power
    0

    Re: Trouble with PHP code

    There is no such folder in the site????????? at all!

  5. #4
    Join Date
    Sep 2007
    Location
    Karlstad, Sweden
    Posts
    3,082
    Blog Entries
    7
    Rep Power
    42

    Re: Trouble with PHP code

    then create it and set the correct permissions.
    was this from a downloaded package /zip / tarball? then you might have extracted this omitting empty directories, which is a bad idea normally, just because of situations like this.
    __________________________________________
    I study Information Systems at Karlstad University when I'm not on CodeCall

  6. #5
    injoigraphix is offline Newbie
    Join Date
    Mar 2010
    Posts
    3
    Rep Power
    0

    Re: Trouble with PHP code

    I tried to create it. The FTP would not allow me to! I kept getting some error message when I got to then /b1269/ part!

  7. #6
    Join Date
    Sep 2007
    Location
    Karlstad, Sweden
    Posts
    3,082
    Blog Entries
    7
    Rep Power
    42

    Re: Trouble with PHP code

    your account will probably only have this part visible: /public_html/cgi-bin/tmp. everything else is probably outside your ftp access area. (otherwise, you could be able to see other users accounts)
    __________________________________________
    I study Information Systems at Karlstad University when I'm not on CodeCall

Closed Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. CSS + SSI trouble
    By ferdri3 in forum JavaScript and CSS
    Replies: 3
    Last Post: 05-29-2011, 03:25 AM
  2. Trouble using Functions
    By kmaj in forum Python
    Replies: 1
    Last Post: 04-13-2011, 05:16 AM
  3. How much trouble would I get in. . .
    By ki4jgt in forum General Programming
    Replies: 7
    Last Post: 11-10-2010, 02:12 AM
  4. MS in trouble for XML implementation!
    By zeroradius in forum Technology Ramble
    Replies: 5
    Last Post: 12-22-2009, 06:38 PM
  5. Program not working...code in trouble.
    By Oiprocs in forum C and C++
    Replies: 4
    Last Post: 10-26-2007, 03:49 PM

Tags for this Thread

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