Pomoc - Szukaj - Użytkownicy - Kalendarz
Pełna wersja: [MySQL][PHP]nie mogę sie zalogować
Forum PHP.pl > Forum > Przedszkole
Johnas
Witam mam problem z zalogowaniem sie nie wiem czemu... na stronie cs-master.xaa.pl wszystko działa a na nowej pod linkiem youphoto po prubie zalogowania sie wyskakuje okno i nic sie nie robi jak by $_post nie działał... kod mam taki
  1. if (isset($_SESSION['login'])) { // dostęp dla niezalogowanego użytkownika
  2.  
  3.  
  4. header("Location: profile.php");
  5. } else {
  6. ?>
  7. <h2>Panel logowania</h2>
  8. <div class="box">
  9. <div class="inner">
  10. <div class="wrapper">
  11. <?php
  12. if ($_POST['logowanie']) { // jeżeli formularz został wysłany, to wykonuje się poniższy skrypt
  13.  
  14.  
  15. $tabela = 'rejestracja'; // zdefiniowanie tabeli MySQL
  16.  
  17. $login = mb_strtolower($_POST["login"]);
  18. $haslo = $_POST["pass"];
  19.  
  20. $haslo = md5($haslo); // szyfrowanie podanego hasła
  21.  
  22. $wynik=mysql_query("SELECT * FROM $tabela WHERE
  23. login='$login' and haslo='$haslo' and status=0");
  24.  
  25.  
  26. // jeżeli użytkownik zarejestrował się, a nie aktywował swojego konta, to wyświetla się komunikat
  27. if (mysql_num_rows($wynik) == 1) {
  28. $informacja = mysql_fetch_array($wynik);
  29. echo '<span class="blad">Nie aktywowałeś jeszcze swojego konta. Aby to zrobić, wejdź w swoją skrzynkę odbiorczą, a następnie znajdź wiadmość z linkiem aktywacyjnym i aktywuj swoje konto</span>';
  30. }
  31.  
  32. // jeżeli wszystko jest dobrze, użytkownik się loguje
  33. $wynik=mysql_query("UPDATE $tabela SET online=1 WHERE
  34. login='$login' and haslo='$haslo' and status=1");
  35. $wynik=mysql_query("SELECT * FROM $tabela WHERE
  36. login='$login' and haslo='$haslo' and status=1");
  37.  
  38. if (mysql_num_rows($wynik) == 1) {
  39. $informacja = mysql_fetch_array($wynik);
  40. $_SESSION["login"] = $informacja["login"];
  41. $_SESSION["email"] = $informacja["email"];
  42. $_SESSION["imie"] = $informacja["imie"];
  43. $_SESSION["nazwisko"] = $informacja["nazwisko"];
  44. $_SESSION["id"] = $informacja["id"];
  45. $_SESSION["id_rangi"] = $informacja["id_rangi"];
  46.  
  47. header('Location: profile.php?act=o_mnie ');
  48. } else {
  49. echo '<span class="blad">Nie poprawny login lub hasło!</span> ';
  50. }
  51.  
  52. }
  53.  
  54. ?>
  55. <!-- PANEL LOGOWANIA -->
  56.  
  57. <form action="index.php" method="post">
  58. <input type="hidden" name="logowanie" value="TRUE" />
  59. <div id="logowanie">
  60. <p>Login: <input type="text" name="login" id="acpro_inp0"></p>
  61. <p>Hasło: <input type="password" name="pass" id="acpro_inp0"></p>
  62. </div>
  63.  
  64. <p><input type="checkbox" name="nazwa" value="wartość" id="acpro_inp0" /> Zapamiętaj
  65.  
  66. <center><input align="center" class="submit" type="submit" value="Zaloguj" /></center>
  67.  
  68. </form>
  69. <hr />
  70. <a href="memory.php">Zapomniałeś hasła? Kliknij tutaj!</a>
  71. <!-- KONIEC PANELU -->
  72. <div class="clear"></div>
  73. </div>
  74. </div>
  75. </div>


To jest tylko fragment odpowiedzialny za logowanie... nie wiem co może być nie tak


Dodam że przenoszę strone na VPS
sadistic_son
Pewnie u siebie masz aktywną opcję register globals a na serwerze już nie. Spróbuj przejżeć co zawiera post, może wtedy wpadniesz na to czego brakuje, gdzie jest błąd:
  1. echo'<pre>';
  2. print_r($_POST);
  3. echo'</pre>';
Johnas
Dostałem coś takiego:
Kod
Array
(
    [logowanie] => TRUE
    [login] =>
    [pass] =>
)


czyli wychodzi na to że loginu brakuje i passów tylko czemu?

nie no odbieram dane czyli brakuje mi arry ? jak tak to gdzie mam wstawić?
sadistic_son
Cytat(Jonek_1993 @ 21.02.2011, 00:48:07 ) *
nie no odbieram dane czyli brakuje mi arry ? jak tak to gdzie mam wstawić?
Nie za bardzo rozumiem o co Ci tu chodzi...
Co do zawartości $_POST to dość dziwne, zmienne są, ale puste hmmm..... dry.gif
Johnas
odebrałem je... pewnie nie wpisałem nic w pole login i hasło

napisałeś
Kod
może wtedy wpadniesz na to czego brakuje
ale się nie domyśliłem

i co jeszcze jest dziwne opcja register globals na serwerze jest aktywna niby

  1. if ($_POST['logowanie']) { // jeżeli formularz został wysłany, to wykonuje się poniższy skrypt
  2.  
  3.  
  4. $tabela = 'rejestracja'; // zdefiniowanie tabeli MySQL
  5.  
  6. $_POST['login'] = mb_strtolower($_POST["login"]);
  7. $_POST['pass'] = $_POST["pass"];
  8.  
  9. $_POST['pass'] = md5($_POST['pass']); // szyfrowanie podanego hasła
  10.  
  11. $wynik=mysql_query("SELECT * FROM $tabela WHERE
  12. login={$_POST['login']} and haslo={$_POST['pass']} and status=0");
  13.  
  14.  
  15. // jeżeli użytkownik zarejestrował się, a nie aktywował swojego konta, to wyświetla się komunikat
  16. if (mysql_num_rows($wynik) == 1) {
  17. $informacja = mysql_fetch_array($wynik);
  18. echo '<span class="blad">Nie aktywowałeś jeszcze swojego konta. Aby to zrobić, wejdź w swoją skrzynkę odbiorczą, a następnie znajdź wiadmość z linkiem aktywacyjnym i aktywuj swoje konto</span>';
  19. }
  20.  
  21. // jeżeli wszystko jest dobrze, użytkownik się loguje
  22. $wynik=mysql_query("UPDATE $tabela SET online=1 WHERE
  23. login={$_POST['login']} and haslo={$_POST['pass']} and status=1");
  24. $wynik=mysql_query("SELECT * FROM $tabela WHERE
  25. login={$_POST['login']} and haslo={$_POST['pass']} and status=1");
  26.  
  27. if (mysql_num_rows($wynik) == 1) {
  28. $informacja = mysql_fetch_array($wynik);
  29. $_SESSION["login"] = $informacja["login"];
  30. $_SESSION["email"] = $informacja["email"];
  31. $_SESSION["imie"] = $informacja["imie"];
  32. $_SESSION["nazwisko"] = $informacja["nazwisko"];
  33. $_SESSION["id"] = $informacja["id"];
  34. $_SESSION["id_rangi"] = $informacja["id_rangi"];
  35.  
  36. header('Location: profile.php?act=o_mnie ');
  37. } else {
  38. echo '<span class="blad">Nie poprawny login lub hasło!</span> ';
  39. }
  40.  
  41. }
  42.  
  43. ?>
  44. <!-- PANEL LOGOWANIA -->
  45.  
  46. <form action="" method="post">
  47. <input type="hidden" name="logowanie" value="TRUE" />
  48. <div id="logowanie">
  49. <p>Login: <input type="text" name="login" id="acpro_inp0"></p>
  50. <p>Hasło: <input type="password" name="pass" id="acpro_inp0"></p>
  51. </div>
  52.  
  53. <p><input type="checkbox" name="nazwa" value="wartość" id="acpro_inp0" /> Zapamiętaj
  54.  
  55. <center><input align="center" class="submit" type="submit" value="Zaloguj" /></center>
  56.  
  57. </form>
  58. <hr />
  59. <a href="memory.php">Zapomniałeś hasła? Kliknij tutaj!</a>
  60. <!-- KONIEC PANELU -->
  61. <div class="clear"></div>
  62. </div>
  63. </div>
  64. </div>


Zrobiłem tak dalej nic sad.gif

Logi serwera:

Kod
[Mon Feb 21 03:44:50 2011] [error] [client 93.94.189.1] File does not exist: /home/youphoto/public_html/demos.css, referer: http://youphoto.pl/
[Mon Feb 21 03:44:50 2011] [error] [client 93.94.189.1] PHP Fatal error:  Call to undefined function mb_strtolower() in /home/youphoto/public_html/index.php on line 38, referer: http://youphoto.pl/
[Mon Feb 21 03:44:50 2011] [error] [client 93.94.189.1] PHP Notice:  Undefined index:  login in /home/youphoto/public_html/header.php on line 27, referer: http://youphoto.pl/
[Mon Feb 21 03:44:48 2011] [error] [client 93.94.189.1] File does not exist: /home/youphoto/public_html/404.shtml
[Mon Feb 21 03:44:48 2011] [error] [client 93.94.189.1] File does not exist: /home/youphoto/public_html/favicon.ico
[Mon Feb 21 03:44:47 2011] [error] [client 93.94.189.1] PHP Notice:  Undefined index:  wylogowanie in /home/youphoto/public_html/index.php on line 231
[Mon Feb 21 03:44:47 2011] [error] [client 93.94.189.1] PHP Notice:  Undefined index:  logowanie in /home/youphoto/public_html/index.php on line 33
[Mon Feb 21 03:44:47 2011] [error] [client 93.94.189.1] PHP Notice:  Undefined index:  login in /home/youphoto/public_html/header.php on line 27
[Mon Feb 21 03:44:45 2011] [error] [client 93.94.189.1] File does not exist: /home/youphoto/public_html/404.shtml
[Mon Feb 21 03:44:45 2011] [error] [client 93.94.189.1] File does not exist: /home/youphoto/public_html/favicon.ico
[Mon Feb 21 03:44:45 2011] [error] [client 93.94.189.1] File does not exist: /home/youphoto/public_html/404.shtml, referer: http://youphoto.pl/
[Mon Feb 21 03:44:45 2011] [error] [client 93.94.189.1] File does not exist: /home/youphoto/public_html/images/logo.gif, referer: http://youphoto.pl/
[Mon Feb 21 03:44:45 2011] [error] [client 93.94.189.1] File does not exist: /home/youphoto/public_html/404.shtml, referer: http://youphoto.pl/
[Mon Feb 21 03:44:45 2011] [error] [client 93.94.189.1] File does not exist: /home/youphoto/public_html/images/logo-bg.png, referer: http://youphoto.pl/
[Mon Feb 21 03:44:45 2011] [error] [client 93.94.189.1] File does not exist: /home/youphoto/public_html/404.shtml, referer: http://youphoto.pl/
[Mon Feb 21 03:44:45 2011] [error] [client 93.94.189.1] File does not exist: /home/youphoto/public_html/images/main-tail-bot.gif, referer: http://youphoto.pl/
[Mon Feb 21 03:44:45 2011] [error] [client 93.94.189.1] File does not exist: /home/youphoto/public_html/404.shtml, referer: http://youphoto.pl/
[Mon Feb 21 03:44:45 2011] [error] [client 93.94.189.1] File does not exist: /home/youphoto/public_html/demos.css, referer: http://youphoto.pl/
[Mon Feb 21 03:44:45 2011] [error] [client 93.94.189.1] PHP Fatal error:  Call to undefined function mb_strtolower() in /home/youphoto/public_html/index.php on line 38, referer: http://youphoto.pl/
[Mon Feb 21 03:44:45 2011] [error] [client 93.94.189.1] PHP Notice:  Undefined index:  login in /home/youphoto/public_html/header.php on line 27, referer: http://youphoto.pl/
[Mon Feb 21 03:44:43 2011] [error] [client 93.94.189.1] File does not exist: /home/youphoto/public_html/404.shtml
[Mon Feb 21 03:44:43 2011] [error] [client 93.94.189.1] File does not exist: /home/youphoto/public_html/favicon.ico
[Mon Feb 21 03:44:43 2011] [error] [client 93.94.189.1] File does not exist: /home/youphoto/public_html/404.shtml, referer: http://youphoto.pl/
[Mon Feb 21 03:44:43 2011] [error] [client 93.94.189.1] File does not exist: /home/youphoto/public_html/images/footer.gif, referer: http://youphoto.pl/
[Mon Feb 21 03:44:42 2011] [error] [client 93.94.189.1] File does not exist: /home/youphoto/public_html/404.shtml, referer: http://youphoto.pl/
[Mon Feb 21 03:44:42 2011] [error] [client 93.94.189.1] File does not exist: /home/youphoto/public_html/images/logo.gif, referer: http://youphoto.pl/
[Mon Feb 21 03:44:42 2011] [error] [client 93.94.189.1] File does not exist: /home/youphoto/public_html/404.shtml, referer: http://youphoto.pl/
[Mon Feb 21 03:44:42 2011] [error] [client 93.94.189.1] File does not exist: /home/youphoto/public_html/images/logo-bg.png, referer: http://youphoto.pl/
[Mon Feb 21 03:44:42 2011] [error] [client 93.94.189.1] File does not exist: /home/youphoto/public_html/404.shtml, referer: http://youphoto.pl/
[Mon Feb 21 03:44:42 2011] [error] [client 93.94.189.1] File does not exist: /home/youphoto/public_html/images/main-tail-bot.gif, referer: http://youphoto.pl/
[Mon Feb 21 03:44:42 2011] [error] [client 93.94.189.1] File does not exist: /home/youphoto/public_html/404.shtml, referer: http://youphoto.pl/
[Mon Feb 21 03:44:42 2011] [error] [client 93.94.189.1] File does not exist: /home/youphoto/public_html/demos.css, referer: http://youphoto.pl/
[Mon Feb 21 03:44:42 2011] [error] [client 93.94.189.1] PHP Notice:  Undefined index:  wylogowanie in /home/youphoto/public_html/index.php on line 231
[Mon Feb 21 03:44:42 2011] [error] [client 93.94.189.1] PHP Notice:  Undefined index:  logowanie in /home/youphoto/public_html/index.php on line 33
[Mon Feb 21 03:44:42 2011] [error] [client 93.94.189.1] PHP Notice:  Undefined index:  login in /home/youphoto/public_html/header.php on line 27


Jak by tego było mało to nie działa mi praktycznie nic... tzn index naprawiłem była to niby wina tego mb_strtolower() bo jak usunołem to gra ale teraz nie działa mi klasa, zmiana aavataru i połowa funkcji czemu i jak to naprawić? PILNE
nospor
Cytat
ale teraz nie działa mi klasa, zmiana aavataru i połowa funkcji czemu i jak to naprawić?
blink.gif
Czemu? Spowodu plam na słońcu :/

No skąd mamy widzieć, czemu ci nie działa zmiana avataru i połowa funkcji skoro:
1) Nie podałeś kodu
2) Nie napisałeś czym się objawia to nie działanie.

Zanim napiszesz kolejnego posta obowiązkowo zapoznaj się
Temat: Jak poprawnie zada pytanie
Johnas
Teraz się rozpiszę trochę bo idę zaraz do pracy pomóc koledze. Wszystko w rejestracji działa po usunięciu tego fragmentu kodu. w profilu też wszystko działa po za klasą zmiany zdjęć (tutaj nie dodaje napisu friendsbook i nie zmienia formatu z png na jpg) oraz uploadu avataru (nie uploaduje i nie daje jednocześnie zapytania do sql.

AVatar wygląda tak:
  1. elseif ($_GET['actphoto'] == "avatar")
  2. {
  3.  
  4. if ($_GET['photoid'] ){
  5. $idphoto = $_GET['photoid'];
  6. $infop = mysql_fetch_array(mysql_query("SELECT * FROM photo WHERE id=$idphoto"));
  7.  
  8. if ($infop) {
  9. $iddodajacego = $infop['iduser'];
  10. if ($iddodajacego == $myid) {
  11. $avat = $infop['link'];
  12. // ================================================Start avat =========================================================
  13. $los = rand(1, 9999999999999999);
  14. $upload_dir = "upload_pic"; // The directory for the images to be saved in
  15. $upload_path = $upload_dir."/"; // The path to where the image will be saved
  16. $large_image_name = $avat; // New name of the large image
  17. $thumb_image_name = "avat_".$login."_". $los .".jpg"; // New name of the thumbnail image
  18. $max_file = "1148576"; // Approx 1MB
  19. $max_width = "500"; // Max width allowed for the large image
  20. $thumb_width = "100"; // Width of thumbnail image
  21. $thumb_height = "100"; // Height of thumbnail image
  22. $wyniksql = $upload_path.$thumb_image_name;
  23.  
  24.  
  25. //Image functions
  26. //You do not need to alter these functions
  27. function resizeImage($image,$width,$height,$scale) {
  28. $newImageWidth = ceil($width * $scale);
  29. $newImageHeight = ceil($height * $scale);
  30. $newImage = imagecreatetruecolor($newImageWidth,$newImageHeight);
  31. $source = imagecreatefromjpeg($image);
  32. imagecopyresampled($newImage,$source,0,0,0,0,$newImageWidth,$newImageHeight,$width,$height);
  33. imagejpeg($newImage,$image,90);
  34. chmod($image, 0777);
  35. return $image;
  36. }
  37. //You do not need to alter these functions
  38. function resizeThumbnailImage($thumb_image_name, $image, $width, $height, $start_width, $start_height, $scale){
  39. $newImageWidth = ceil($width * $scale);
  40. $newImageHeight = ceil($height * $scale);
  41. $newImage = imagecreatetruecolor($newImageWidth,$newImageHeight);
  42. $source = imagecreatefromjpeg($image);
  43. imagecopyresampled($newImage,$source,0,0,$start_width,$start_height,$newImageWidth,$newImageHe
    ight,$width,$height);
  44. imagejpeg($newImage,$thumb_image_name,90);
  45. chmod($thumb_image_name, 0777);
  46. return $thumb_image_name;
  47. }
  48. //You do not need to alter these functions
  49. function getHeight($image) {
  50. $sizes = getimagesize($image);
  51. $height = $sizes[1];
  52. return $height;
  53. }
  54. //You do not need to alter these functions
  55. function getWidth($image) {
  56. $sizes = getimagesize($image);
  57. $width = $sizes[0];
  58. return $width;
  59. }
  60.  
  61. //Image Locations
  62. $large_image_location = $large_image_name;
  63. $thumb_image_location = $upload_path.$thumb_image_name;
  64.  
  65. //Create the upload directory with the right permissions if it doesn't exist
  66. if(!is_dir($upload_dir)){
  67. mkdir($upload_dir, 0777);
  68. chmod($upload_dir, 0777);
  69. }
  70.  
  71. //Check to see if any images with the same names already exist
  72. if (file_exists($large_image_location)){
  73. if(file_exists($thumb_image_location)){
  74. $thumb_photo_exists = "<img src=\"".$upload_path.$thumb_image_name."\" alt=\"Thumbnail Image\"/>";
  75. }else{
  76. $thumb_photo_exists = "";
  77. }
  78. $large_photo_exists = "<img src=\"".$upload_path.$large_image_name."\" alt=\"Large Image\"/>";
  79. } else {
  80. $large_photo_exists = "";
  81. $thumb_photo_exists = "";
  82. }
  83.  
  84. if (isset($_POST["upload"])) {
  85. //Get the file information
  86. $userfile_name = $_FILES['image']['name'];
  87. $userfile_tmp = $_FILES['image']['tmp_name'];
  88. $userfile_size = $_FILES['image']['size'];
  89. $filename = basename($_FILES['image']['name']);
  90. $file_ext = substr($filename, strrpos($filename, '.') + 1);
  91.  
  92. //Only process if the file is a JPG and below the allowed limit
  93. if((!empty($_FILES["image"])) && ($_FILES['image']['error'] == 0)) {
  94. if (($file_ext!="jpg") && ($userfile_size > $max_file)) {
  95. $error= "ONLY jpeg images under 1MB are accepted for upload";
  96. }
  97. }else{
  98. $error= "Select a jpeg image for upload";
  99. }
  100. //Everything is ok, so we can upload the image.
  101. if (strlen($error)==0){
  102.  
  103. if (isset($_FILES['image']['name'])){
  104.  
  105. move_uploaded_file($userfile_tmp, $large_image_location);
  106. chmod($large_image_location, 0777);
  107.  
  108. $width = getWidth($large_image_location);
  109. $height = getHeight($large_image_location);
  110. //Scale the image if it is greater than the width set above
  111. if ($width > $max_width){
  112. $scale = $max_width/$width;
  113. $uploaded = resizeImage($large_image_location,$width,$height,$scale);
  114. }else{
  115. $scale = 1;
  116. $uploaded = resizeImage($large_image_location,$width,$height,$scale);
  117. }
  118. //Delete the thumbnail file so the user can create a new one
  119. if (file_exists($thumb_image_location)) {
  120. unlink($thumb_image_location);
  121. }
  122. }
  123. //Refresh the page to show the new uploaded image
  124. header("location:".$_SERVER["PHP_SELF"]);
  125. exit();
  126. }
  127. }
  128.  
  129. if (isset($_POST["upload_thumbnail"]) && strlen($large_photo_exists)>0) {
  130. //Get the new coordinates to crop the image.
  131. $x1 = $_POST["x1"];
  132. $y1 = $_POST["y1"];
  133. $x2 = $_POST["x2"];
  134. $y2 = $_POST["y2"];
  135. $w = $_POST["w"];
  136. $h = $_POST["h"];
  137. //Scale the image to the thumb_width set above
  138. $scale = $thumb_width/$w;
  139. $cropped = resizeThumbnailImage($thumb_image_location, $large_image_location,$w,$h,$x1,$y1,$scale);
  140. //Reload the page again to view the thumbnail
  141. if ($avatar == 'img/avatar-start.png'){
  142. $wynik = mysql_query("UPDATE rejestracja SET avatar='$wyniksql' WHERE id=$myid");
  143. } else {
  144. unlink($avatar);
  145. $wynik = mysql_query("UPDATE rejestracja SET avatar='$wyniksql' WHERE id=$myid");
  146. }
  147. header("location: profile.php?avat=good");
  148. exit();
  149. }
  150.  
  151. if ($_GET['a']=="delete"){
  152. if (file_exists($large_image_location)) {
  153. unlink($large_image_location);
  154. }
  155. if (file_exists($thumb_image_location)) {
  156. unlink($thumb_image_location);
  157. }
  158. header("location:".$_SERVER["PHP_SELF"]);
  159. exit();
  160. }
  161. if(strlen($large_photo_exists)>0){
  162. $current_large_image_width = getWidth($large_image_location);
  163. $current_large_image_height = getHeight($large_image_location);?>
  164. <script type="text/javascript">
  165. function preview(img, selection) {
  166. var scaleX = <?php echo $thumb_width;?> / selection.width;
  167. var scaleY = <?php echo $thumb_height;?> / selection.height;
  168.  
  169. $('#thumbnail + div > img').css({
  170. width: Math.round(scaleX * <?php echo $current_large_image_width;?>) + 'px',
  171. height: Math.round(scaleY * <?php echo $current_large_image_height;?>) + 'px',
  172. marginLeft: '-' + Math.round(scaleX * selection.x1) + 'px',
  173. marginTop: '-' + Math.round(scaleY * selection.y1) + 'px'
  174. });
  175. $('#x1').val(selection.x1);
  176. $('#y1').val(selection.y1);
  177. $('#x2').val(selection.x2);
  178. $('#y2').val(selection.y2);
  179. $('#w').val(selection.width);
  180. $('#h').val(selection.height);
  181. }
  182.  
  183. $(document).ready(function () {
  184. $('#save_thumb').click(function() {
  185. var x1 = $('#x1').val();
  186. var y1 = $('#y1').val();
  187. var x2 = $('#x2').val();
  188. var y2 = $('#y2').val();
  189. var w = $('#w').val();
  190. var h = $('#h').val();
  191. if(x1=="" || y1=="" || x2=="" || y2=="" || w=="" || h==""){
  192. alert("Musisz zaznaczyć obszar avataru");
  193. return false;
  194. }else{
  195. return true;
  196. }
  197. });
  198. });
  199.  
  200. $(window).load(function () {
  201. $('#thumbnail').imgAreaSelect({ aspectRatio: '1:1', onSelectChange: preview });
  202. });
  203.  
  204. </script>
  205. <?php }?>
  206.  
  207. <?php
  208. //Display error message if there are any
  209. if(strlen($error)>0){
  210. echo "<ul><li><strong>Error!</strong></li><li>".$error."</li></ul>";
  211. }
  212. if(strlen($large_photo_exists)>0 && strlen($thumb_photo_exists)>0){
  213. echo "<p><strong>NOTE:</strong> If the thumbnail image looks the same as the previous one, just hit refresh a couple of times.</p>";
  214. echo $large_photo_exists."&nbsp;".$thumb_photo_exists;
  215. echo "<p><a href=\"".$_SERVER["PHP_SELF"]."?a=delete\">Delete Images</a></p>";
  216. }else{
  217. if(strlen($large_photo_exists)>0){
  218. echo <<< av
  219.  
  220.  
  221. <div style="padding: 0 0 0 270px;">
  222. <img src="$large_image_name" style="float: left; margin-right: 10px;" id="thumbnail" alt="Create Thumbnail" />
  223. <div style="float:left; position:relative; overflow:hidden; width:{$thumb_width}px; height:{$thumb_height}px;">
  224. <img src="$large_image_name" style="position: relative;" alt="Thumbnail Preview" />
  225. </div>
  226. <br style="clear:both;"/>
  227. <form name="thumbnail" action="" method="post">
  228. <input type="hidden" name="x1" value="" id="x1" />
  229. <input type="hidden" name="y1" value="" id="y1" />
  230. <input type="hidden" name="x2" value="" id="x2" />
  231. <input type="hidden" name="y2" value="" id="y2" />
  232. <input type="hidden" name="w" value="" id="w" />
  233. <input type="hidden" name="h" value="" id="h" />
  234. <input type="submit" name="upload_thumbnail" class="submit" value="Zapisz" id="save_thumb" />
  235. </form>
  236. </div>
  237. <br>
  238. av;
  239.   }
  240. echo <<< a
  241.  
  242. a;
  243. }
  244.  
  245. //==================================================END===========================
    ======================
  246. }

Dodam że tu opcja register_globals jest włączona a na localu nie mam i śmiga

Czy to może być wina braku isset`ów?

Wie ktoś może czemu tutaj nie wykonuje mi $_POST ? Ja nie widzę żadnego błędu sad.gif

znalazłem też funkcje wyłączoną na serwerze gdzie stronka nie działa, a gdzie działa to jest włączona. nie wiem czy to od tego zależy. funkcja nazywa się allow_call_time_pass_reference
darko
Nie mam już o tej porze sił analizować kod, ale strzelam, że masz magic_quotes_gpc ustawione na off na serwerze.
Johnas
Zgadza się... Ale na localhoście mam też na off a działa... Wiem już też czemu nie działa mi dodawanie napisów na obrazek podczas dodawania. nie mam zainstalowanej biblioteki GD ale czy to też wina że nie dodaje avataru?

Wersja php na którym stronka nie działa tak jak należy to: PHP Version 5.2.9

Wersje na których działa idealnie to:
PHP Version 5.2.14 <-- wersja na xaa.pl
PHP Version 5.3.1 <-- wersja mojego localhosta

Na których działa też jest biblioteka GD

Wiec mówić adminowi aby zrobił update php i instalował GD czy tylko instalował GD?

Dobra zrobiono mi update do wersji:

PHP Version 5.2.16
Apache/2.2.17

Co jeszcze może blokować? Jakieś ustawienia odmienne?
To jest wersja lo-fi głównej zawartości. Aby zobaczyć pełną wersję z większą zawartością, obrazkami i formatowaniem proszę kliknij tutaj.
Invision Power Board © 2001-2025 Invision Power Services, Inc.