![]() |
![]() |
![]()
Post
#1
|
|
Grupa: Zarejestrowani Postów: 4 Pomógł: 0 Dołączył: 22.01.2013 Ostrzeżenie: (0%) ![]() ![]() |
Cześć czołem.
Postanowiłem zrobić coś dla siebie i nauczyć się coś niecoś z PHP i MySQL. Działam na podstawie książki PHP5, Apache, MySQL - Od podstaw. Wszystko szło elegancko do momentu kiedy zaczęło się korzystanie z bazy danych. Już na początku rozdziału utknąłem i mimo przeanalizowania konfiguracji od początku, nie mogę znaleźć błędu i ruszyć dalej ['] Nie wiem w czym tkwi problem, ale po napisaniu danej strony i próbie otworzenia jej w przeglądarce, wyskakuje error 500 i po zawodach.
według jakiegoś online syntax checkera sam kod jest poprawny. mysql włącza mi się razem z windowsem, apache również śmiga na bieżąco. ku formalności - korzystam z php w wersji 5.2.17 oraz mysql w wersji 6.0.0. Hilfe, nie mogę ruszyć dalej z nauką ; / Ten post edytował mistrzuni0 22.01.2013, 18:39:39 |
|
|
![]() |
![]()
Post
#2
|
|
Grupa: Zarejestrowani Postów: 4 Pomógł: 0 Dołączył: 22.01.2013 Ostrzeżenie: (0%) ![]() ![]() |
error 404 dla powyższego linku, możesz poprawić?
Dalej nie ogarniam kuwety z tym sqlem. W nadziei, że to coś pomoże, zainstalowałem Apache w wersji 2.2 i php w wersji 5.3. MySql nie zmieniałem. w php.ini zmienilem zawartość na następującą: Kod ;;;;;;;;;;;;;;;;;;;;;; ; Dynamic Extensions; ;;;;;;;;;;;;;;;;;;;;;; ; ; If you wish to have an extension loaded automatically, use the following ; syntax: ; ; extension=modulename.extension ; ; For example, on Windows: ; extension=php_mysql.dll extension_dir="C:\PHP\ext" log_errors=On error_log="C:\Windows\temp\php-errors.log" Ale dalej nic z tego. Teraz w nowszym php wywala mi po prostu więcej błędów zamiast jednej linijki ;p Cytat Warning: mysql_connect() [function.mysql-connect]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Paris' for '1.0/no DST' instead in C:\Program Files\Apache Software Foundation\Apache2.2\test\createmovie.php on line 7 Warning: mysql_connect() [function.mysql-connect]: php_network_getaddresses: getaddrinfo failed: Nieznany host. in C:\Program Files\Apache Software Foundation\Apache2.2\test\createmovie.php on line 7 Warning: mysql_connect() [function.mysql-connect]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Paris' for '1.0/no DST' instead in C:\Program Files\Apache Software Foundation\Apache2.2\test\createmovie.php on line 7 Warning: mysql_connect() [function.mysql-connect]: [2002] php_network_getaddresses: getaddrinfo failed: Nieznany host. (trying to connect via tcp://localhostkrystianhaslo:3306) in C:\Program Files\Apache Software Foundation\Apache2.2\test\createmovie.php on line 7 Warning: mysql_connect() [function.mysql-connect]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Paris' for '1.0/no DST' instead in C:\Program Files\Apache Software Foundation\Apache2.2\test\createmovie.php on line 7 Warning: mysql_connect() [function.mysql-connect]: php_network_getaddresses: getaddrinfo failed: Nieznany host. in C:\Program Files\Apache Software Foundation\Apache2.2\test\createmovie.php on line 7 Sprawd połšczenie z serwerem. Pomóżcie, Panowie (IMG:style_emoticons/default/smile.gif) Coś si ruszyło. Powyższy natłok błędów udało się usunąć dodając na początku skryptu linijkę date_default_timezone_set('Europe/Warsaw'); teraz całość wygląda w następujący sposób:
Ale dalej nie działa jak należy i wypluwa przy próbie załadowania strony coś takiego: Kod You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'defeault 0, movie_year int(4) NOT NULL defeault 0, movie_leadactor int(11) N' at line 4 Gdzie jest błąd? ; ( |
|
|
![]() ![]() |
![]() |
Aktualny czas: 11.10.2025 - 14:35 |