קובץ PHP לא פועל למה?

rozeyoter

New member
קובץ PHP לא פועל למה?

כל ההתחלות קשות. יש לי חלונות 98. ושרת PWS רגיל. שמתי בו קובץ default.php עם הקוד הבא: <html><head><title>PHP Test</title></head> <body> <?php echo "Hello World<p>"; ?> </body></html> לצידו שמתי עמוד HTML רגיל עם הפניה אליו כקישור. כשלחצתי על הקישור לא ראיתי כלום. צריך להתקין משהו לצד ה PWS כדי להריץ סקריפטים של PHP? בברכה.
 

אמיר ט

New member
מן הסתם ../images/Emo8.gif

אתה צריך להתקין את ה PHP עצמו, את המנוע שלו. אתה יכול להוריד תכנית התקנה שתעשה את כל העבודה בשבילך מהאתר הרשמי : www.php.net אמיר.
 

rozeyoter

New member
הורדתי את "תוכנת ההתקנה"

ש"עשתה עבורי את כל העבודה (איפה האייקון של הסמיילי) כמובן שכלום לא עובד. צרפתי פה את קובץ ההוראות ל"התקנה תחת חלונות" של העסק. אם מישהו צריך סיבה למה להמשיך ב ASP וותיק ונוח הנה הסיבה: אגב אי אפשר לשגר מעל 7000 מילים לכן המסמך מקוצץ... PHP/Windows Installation Notes ============================== Installation on Windows 9x/Me/NT/2000 systems ============================================= There are two main ways to install PHP for Windows: either manually or by using the InstallShield installer. Windows InstallShield ===================== The Windows PHP installer is available from the downloads page at www.php.net. This installs the CGI version of PHP and, for IIS, PWS, and Xitami, configures the web server as well. Note that this version does *NOT* install any extensions or server api versions of PHP. Install your selected HTTP server on your system and make sure that it works. Run the executable installer and follow the instructions provided by the installation wizard. Two types of installation are supported - standard, which provides sensible defaults for all the settings it can, and advanced, which asks questions as it goes along. The installation wizard gathers enough information to set up the php.ini file and configure the web server to use PHP. For IIS and also PWS on NT Workstation, a list of all the nodes on the server with script map settings is displayed, and you can choose those nodes to which you wish to add the PHP script mappings. Once the installation has completed the installer will inform you if you need to restart your system, restart the server, or just start using PHP. Windows Manual installation from zip binary distribution ======================================================== This install guide will help you manually install and configure PHP on your Windows 9x/Me/NT/2000 webservers. This guide was compiled by Bob Silva. The original version can be found at http://www.umesd.k12.or.us/php/win32install.html This guide provides manual installation support for: Personal Web Server 3 and 4 or newer Internet Information Server 3 and 4 or newer Apache 1.3.x OmniHTTPd 2.0b1 and up Oreilly Website Pro Xitami Netscape Enterprise Server, iPlanet PHP 4 for Windows comes in two flavours - a CGI executable (php.exe), and several SAPI modules (for exapmle php4isapi.dll). The latter form is new to PHP 4, and provides significantly improved performance and some new functionality. However, please note that the SAPI modules are *NOT* yet considered to be production quality. In particular, with the ISAPI module, you are likely to encounter serious reliability problems especially on platforms older than W2K - you may witness a lot of server 500 errors and suffer from other server modules such as ASP also failing. You have been warned! The reason for this is that the PHP SAPI modules are using the thread-safe version of the PHP code, which is new to PHP 4, and has not yet been tested and pounded enough to be considered completely stable, and there are actually a few known bugs. On the other hand, some people have reported very good results with the SAPI modules, and there a few reports of problems with the Apache module version. In short - your mileage may vary; If you need absolute stability, trade the performance of the SAPI modules with the stability of the CGI executable. If you choose one of the SAPI modules and use Windows 95, be sure to download the DCOM update from http://download.microsoft.com/msdownload/dcom/95/x86/en/dcom95.exe" For the ISAPI module, an ISAPI 4.0 compliant Web server is required (tested on IIS 4.0, PWS 4.0 and IIS 5.0). IIS 3.0 is *NOT* supported; You should download and install the Windows NT 4.0 Option Pack with IIS 4.0 if you want native PHP support. The following steps should be performed on all installations before the server specific instructions. Extract the distribution file to a directory of your choice. C:\PHP\ is a good start. You need to ensure that the dlls which php uses can be found. The precise dlls involved depend on which web server you use and whether you want to run php as a cgi or as a server module. php4ts.dll is always used. If you are using a server module (e.g. isapi or apache) then you will need the relevent dll from the sapi folder. If you are using any php extension dlls then you will need those as well. To make sure that the dlls can be found, you can either copy them to the system directory (e.g. winnt/system32 or windows/system) or you can make sure that they live in the same directory as the main php executable or dll your web server will use (e.g. php.exe, php4apache.dll).
 

rozeyoter

New member
לא רק שזה לא עובד

ההתקנה של תוכנת החינם הלא מזוהה הזו של ה PHP דפקה לי את כל ה PWS ואפילו התקנה חוזרת לא עוזרת טוב אז בדרך לפירמוט המחשב, לא בטוח שכדאי בזבוז הזמן הזה של הPHP אני כותב את זה לכל מי שקרא את כל המאמרים הנפלאים וחושב שהעסק פשוט.
 

rozeyoter

New member
פתרון לבעיה

צריך לאפשר EXECUTE בשרת ה PWS אחרי שחצי שעה נלחמתי עם זה הגעתי לזה. טוב, ברור שנושאיי אבטחה על חלונות לא כ"כ מעניינים את כותבי ה PHP...
 

Megapuzik

New member
על חלונות אין כל כך הרבה אבטחה..

ורב כותבי הphp מעדיפים את השילוב המנצח---> "PHP+Apache+Linux"...ועם כבר חלונות אז שרת אפאצי..
 

rozeyoter

New member
חוץ מזה שלינוקס זו תוכנת חינם

אני לא מאמין שאפשר לבסס עליה בית תוכנה. אולי משתמש סתם יכול לשחק עליה משחקים. שמעתי שיש בה הרבה מאוד בעיות ובגלל זה לא נראה לי שאעדיף אותה על החלונות שלי :)
 

תמר,

New member
אני הייתי אומרת דווקא ההפך

לינוקס הרבה יותר טובה מ-windows עבור שרתים וכדומה: יותר יציבה, פחות פגיעה לפריצות, והבסיס של מערכת ההפעלה לא צורך משאבי מערכת עבור ה-gui. (אם מישהו יוכל להסביר לי בשביל מה שרת צריך ממשק ענק כמו של windows, עם כל המשאבים שהוא צורך - שיקום) חלונות היא תוכנה נוחה מאוד למי שמשתמש בעברית, עבור משחקים וכדומה, ועבור אנשים לא מנוסים, שצריכים gui בשביל בשביל להגדיר את השרתים שלהם.
 
בורות מדהימה ../images/Emo70.gif

נדהמתי, בתור אחד שחושב עצמו מבין בשרתים. היה מוטב שתבדוק קודם. בניגוד לשרתי מיקרוספט הנופלים מעצמם, אפילו ללא וירוס או חדירה, סתם ככה הם נופלים. שרתי הלינוקס יציבים ועובדים רצוף משך שנים רבות. שרת ה- APACHE יציב יותר מכל שרת "מיקוספטי" אחר. ו- PHP עובד פי חמש מהר יותר מכל מערכת "מיקרוסופטית" משום מה, כל ילד שאינו מבין במחשבים, עובר איזה קורס של מיקרוסופט וחושב עצמו "מהנדס רשתות", תואר "מיקרוסופטי" שגם הוא ללא כיסוי. היה רצוי שתלמד קודם מה זה מחשב, מה זו מערכת הפעלה, ורק אחר כך תתחיל לדבר.
 

rozeyoter

New member
למה תמיד זה נגמר בעלבונות?

למה אתה חושב שקורס רישמי לא נותן לי זכות לאמר דברים שהם מבוססים על לימוד, ניסיון אישי, ונסיונם של אחרים? לינוקס נופל ןמתרסק, הרבה יותר גרוע מחלונות. כנס לפורום של לינוקס כאן ותקרא לבד. ההתקנות קשות. אני מניח שתוכנות (וכאן אני עונה לתמר שטענה ש"רק משחקים" טובים לחלונות...נו...) כמו וורד, אקסל, אקספלורר, דואר אלקטרוני, תוכנות גראפיות, תכלס הרי אני לא מחפש שרת, אני רוצה גם לעבוד על המחשב, קומפיילר של ויזואל C++... נראה לי שלינוקס לא ממש יסתדר עם זה. לינוקס טוב לילדים שיש להם זמן לשחק ולהתקין, ולקנפג, ולקמפל, ולפרמט, ובסוף להגיע למסקנה שהכי קצר זה לשים חלונות ולהריץ תוכנה רצינית, שבית תכנה רציני עומד מאחוריה. שרתים, כמובן, הרי לא הייתי חושב על לינוקס אילולי היו לו גם יתרונות בצד החסרונות. אבל ביננו, למי יש היום זמן חשק וכוח "לדבר" עם בסיסי נתונים רק בסקריפטים, ולהריץ כל דבר עם שורת פקודה... לא לשכוח זמן=גם כסף וגם אנרגיה. אני לא מריץ "משחקים" על חלונות. ולא ראיתי אף מקום ראוי לשמו, בלי להעליב את משתמשי הלינוקס, שמשתמש ללינוקס לצרכים משרדיים. וכמפתח לא נראה לי שאפשר לפתח תוכנות אמיתיות על פלטפורמת לינוקס. נקודה.
 

rozeyoter

New member
באמצע התקנת האפצ´י ראיתי את זה

Apache should never be used as a production server under any consumer operating system such as Windows 95, 98, or ME (Millennium Edition). Only Windows NT 4.0 or 2000 should be considered, and only with appropriate NTFS file system and user security administration. Apache runs on these consumer Windows environments only to provide test, development or trusted intranet server platforms.
 
למעלה