SitePoint Sponsor

User Tag List

Page 3 of 5 FirstFirst 12345 LastLast
Results 51 to 75 of 119
  1. #51
    SitePoint Member
    Join Date
    Nov 2006
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I have a similar problem. When I click on the link in the welcome1.html I get presented with a dialog box to open or save the file. I am using PHP 5.2, with Apache 2.0.55 on Win2K

  2. #52
    SitePoint Author Kevin Yank's Avatar
    Join Date
    Apr 2000
    Location
    Melbourne, Australia
    Posts
    2,571
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    If your browser is offering you the PHP file as a download, and the download you receive contains the PHP code, this means that your web server has not been correctly configured to process PHP scripts before sending them as web pages to the browser.

    You should go over the instructions in Chapter 1 again to make sure you followed all the steps. In particular, make sure you followed the section on editing httpd.conf to the letter, and that the resulting file was saved as httpd.conf, not httpd.conf.txt (as Notepad sometimes likes to do).
    Kevin Yank
    CTO, sitepoint.com
    I wrote: Simply JavaScript | BYO PHP/MySQL | Tech Times | Editize
    Baby’s got back—a hard back, that is: The Ultimate CSS Reference

  3. #53
    SitePoint Member sardoman's Avatar
    Join Date
    Feb 2006
    Location
    Sardinia, Italy
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Just like to say that after a lot of hair pulling and shouting at the monitor all is working fine with Apache installed instead of IIS.

    Onto the good stuff....

  4. #54
    SitePoint Zealot
    Join Date
    Dec 2005
    Posts
    101
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm having loads of troubles while trying to install Apache. I just need a few things straigtened out.

    I've installed MySQL but waited on PHP until Apache was setup, but thinking I screwed it up, I just deleted the MySQL folder. When I thought Apache was up and running, I did everything I needed to do in order to install PHP, but when I realized Apache wasn't working, I redid everything I did for the PHP and deleted that folder. Now I'm in a bind. I've reinstalled Apache (different versions and stuff) about 4 times now, without any useful help from the Apache.org documentation. Now, I feel like I've completely screwed up my computer by just removing Apache from my computer via Add & Remove programs and deleteing remaining files. I just want to install it right without screwing anything else up and so far I haven't had a reply in the forum in which I posted my problem.

    I am on a Windows XP (Pro, but I don't want to use IIS) machine, with a copy of PHP 5.2.0, MySQL 5.0.27 win32, and the Apache 2.2.3 msi installer. If you can at least link to a straightfoward list of exactly what I need to do, that would be great. I love your article/book, but it jumps around from Windows to Unix to Mac too much too keep me focused on what I need to do. Just gets me confused.

    I've spent the entire day trying to get this up and running, and honestly, it shouldn't be too hard, should it?

    Any help is very appreciated.

    Also, when looking through the httpd.conf file when I was editing when I thought I had Apache running, I couldn't find the line which said: "session.save_data" as the only ones I found were commented and just showing an example.

  5. #55
    SitePoint Author Kevin Yank's Avatar
    Join Date
    Apr 2000
    Location
    Melbourne, Australia
    Posts
    2,571
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Hi Chronic,

    I'll be happy to walk you through the process, but rather than writing out all the instructions for you again, let's follow the steps in the book. I'll assume you're working from the 3rd edition ("Latest Edition: June 2006" on the credits page), starting with the "Windows Installation" section on page 2.

    Pages 2-4 step you through installing MySQL and modifying the my.ini file to use the old-passwords format for PHP compatibility.

    Pages 4-5 talk you through downloading the correct version of PHP (the ZIP package), then setting up IIS. You can ignore the instructions for installing IIS, since you plan to use Apache.

    Pages 5-6 give 4 steps that must be completed to install PHP on your system before configuring your web server to use it. In particular, this involves copying two vital files to your Windows SYSTEM32 folder and a third file (php.ini) to your main Windows folder. You must then edit the php.ini file to modify session.save_path (not edit httpd.conf to modify session.save_data, as your post asked).

    Next, you need to download and install Apache, and then verify that it is running on your system by attempting to load http://localhost/ in your browser.

    Then you can follow the steps on pages 9-10 to configure Apache to work with your copy of PHP.

    With that done, skip over the Linux and Mac OS X instructions to page 21, where you're guided through a few final tasks: set a MySQL root password, double-check a couple of settings in your php.ini file, and then restart Apache (which you can do in Windows using the shortcuts that the installation added to your Start menu).


    Now, obviously you're having trouble with one of these steps. If you follow these steps exactly, let me know precisely when something happens that you don't expect, and which might indicate a problem. Tell me what you expected to happen, and what happened instead. I should be able to assist you from there.
    Kevin Yank
    CTO, sitepoint.com
    I wrote: Simply JavaScript | BYO PHP/MySQL | Tech Times | Editize
    Baby’s got back—a hard back, that is: The Ultimate CSS Reference

  6. #56
    SitePoint Zealot
    Join Date
    Dec 2005
    Posts
    101
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    First off, reading through your post, it pointed out a mistake I made. In my post, I mentioned I was looking for a line in the httpd.conf file when infact it was php.ini as your post pointed out. I still didn't find it (using ctrl+f).

    Also, I'll have to work through it tomorrow as it is late here and should be going to get some sleep. I'm sure that if I follow them correctly in order again and just double check what I am doing, I should be able to get it.

    Thanks again. However, if Apache doesn't work again, what is a good resource to troubleshoot it? I haven't had a good look through the help file that comes with Apache in the start menu, so i'm not sure if it's in there.

  7. #57
    SitePoint Author Kevin Yank's Avatar
    Join Date
    Apr 2000
    Location
    Melbourne, Australia
    Posts
    2,571
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by chronic
    First off, reading through your post, it pointed out a mistake I made. In my post, I mentioned I was looking for a line in the httpd.conf file when infact it was php.ini as your post pointed out. I still didn't find it (using ctrl+f).
    What is the exact string you're searching for? In your question, you indicated you were searching for session.save_data, when in my message I pointed out it's actually session.save_path you should be looking for.

    Thanks again. However, if Apache doesn't work again, what is a good resource to troubleshoot it?
    The best way to troubleshoot Apache is to launch it from the command prompt so you can see any error messages. I'll talk you through that if it's required.
    Kevin Yank
    CTO, sitepoint.com
    I wrote: Simply JavaScript | BYO PHP/MySQL | Tech Times | Editize
    Baby’s got back—a hard back, that is: The Ultimate CSS Reference

  8. #58
    SitePoint Zealot
    Join Date
    Dec 2005
    Posts
    101
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Okay, I got MySQL and Apache working, but now I'm still having one small issue with PHP.

    I am looking for the following string in php.ini: session.save_path, however, I only find 4 tokens, all are commented out.

    I find:
    ; session.save_path = "N;/path"
    ; session.save_path = "N;MODE;/path"
    ;session.save_path = "/tmp"
    ; (see session.save_path above), then garbage collection does *not*
    Those are the only ones that use that phrase.

    Any ideas? (PHP 5.2.0)

  9. #59
    SitePoint Author Kevin Yank's Avatar
    Join Date
    Apr 2000
    Location
    Melbourne, Australia
    Posts
    2,571
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    The third one is the one you're supposed to uncomment (by removing the semicolon) and then adjust the value of to suit your system. In previous versions of PHP, this line was not commented by default. I'll make a note to update the book accordingly.
    Kevin Yank
    CTO, sitepoint.com
    I wrote: Simply JavaScript | BYO PHP/MySQL | Tech Times | Editize
    Baby’s got back—a hard back, that is: The Ultimate CSS Reference

  10. #60
    ace
    SitePoint Community Guest
    I have problem with the Apache when i type the command LoadModule....php4apache2.dll and when i restart Apache it says: The reqested operation has failed!
    why i cant load it?

  11. #61
    SitePoint Author Kevin Yank's Avatar
    Join Date
    Apr 2000
    Location
    Melbourne, Australia
    Posts
    2,571
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    ace,

    The Apache error log may have additional information on why the error has failed.

    Some things to check:

    Is php4apache2.dll in the location you indicated in your httpd.conf file? Is it definitely named php4apache2.dll (if you've installed PHP 5, for example, it's called php5apache2.dll). Are you running Apache 2, and not Apache 1.3? Have you copied php4ts.dll to your Windows SYSTEM32 directory?
    Kevin Yank
    CTO, sitepoint.com
    I wrote: Simply JavaScript | BYO PHP/MySQL | Tech Times | Editize
    Baby’s got back—a hard back, that is: The Ultimate CSS Reference

  12. #62
    SitePoint Member
    Join Date
    May 2007
    Location
    Toronto, Canada
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Apache 2.2 error:Specified module cannot be found

    Quote Originally Posted by ArticleBot View Post
    This is a dedicated thread for discussing the SitePoint article 'Build your own Database Driven Website using PHP & MySQL - Part 1: Installation'
    On line 486 of httpd.conf the following error is referenced.
    Connot load c:'php/php5apache2.dll into server: The specified module could not be found.

    Before installing PHP I downloaded Apache 2.2, installed it and confirmed that it worked.

    I then downloaded PHP 5.0 as instructed in the book starting on page 6. I then performed steps 1-5 from page 7 and top of page 8.

    I then skipped pages 8-10 because my XP Professional does not have IIS.

    I performed the steps 1-5 on page 11. Step 5 failed because Apache would not restart.

    I disabled the last 3 statements in the httpd.conf file and was able to start Apache.

    I am running on Windows XP on the HP Pavilion dv2040ca Notebook. The last 3 lines in the httpd.conf file are:

    LoadModule php5_module c:/php/php5apache2.dll
    AddType application/x-httpd-php .php
    AddType application/x-httpd-php-source .phps

    I have confirmed that the file c:/php/php5apache2.dll does exist. Have I missed a reference to php5_module somewhere? Any assistance would be appreciated.

    ... Ralph

  13. #63
    SitePoint Author Kevin Yank's Avatar
    Join Date
    Apr 2000
    Location
    Melbourne, Australia
    Posts
    2,571
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Ralph,

    From the page numbers you're quoting, it sounds like you don't have a slightly older version of the book, perhaps the October 2004 reprint (the latest version was printed in June 2006). You can see which version you have on the credits page at the start of the book.

    Assuming you're working with the October 2004 edition, you may have missed a step in the installation of PHP 5 that was left out of that version, and is documented on the errata page for the book:

    p.7 step 2
    In PHP 5 or later, you must copy the libmysql.dll file from the PHP installation directory to your system32 directory along with php5ts.dll.
    Let me know whether copying that file solves your problem or not. Hopefully it should get you going!
    Kevin Yank
    CTO, sitepoint.com
    I wrote: Simply JavaScript | BYO PHP/MySQL | Tech Times | Editize
    Baby’s got back—a hard back, that is: The Ultimate CSS Reference

  14. #64
    SitePoint Member
    Join Date
    May 2007
    Location
    Toronto, Canada
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Apache 2.2 error:Specified module cannot be found -reply

    Quote Originally Posted by Kevin Yank View Post
    Ralph,

    From the page numbers you're quoting, it sounds like you don't have a slightly older version of the book, perhaps the October 2004 reprint (the latest version was printed in June 2006). You can see which version you have on the credits page at the start of the book.

    Assuming you're working with the October 2004 edition, you may have missed a step in the installation of PHP 5 that was left out of that version, and is documented on the errata page for the book:



    Let me know whether copying that file solves your problem or not. Hopefully it should get you going!
    Thank you for the reply but...
    I had used the online instructions that included the instruction of moving libmysql.dll to the Windows/system32 folder. The pdf file I used for follow up reference is the October 2004 version. In any event this is not the problem.

    Without the PHP references, MySQL and Apache2.2 are operational. I re-installed PHP 5.2.3 (using zip file) from the PHP download site. I still have the error that the module cannot be loaded by Apache.

    Do you have any other ideas?

    ... Ralph

  15. #65
    SitePoint Author Kevin Yank's Avatar
    Join Date
    Apr 2000
    Location
    Melbourne, Australia
    Posts
    2,571
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by RalphGault View Post
    Do you have any other ideas?
    Nothing leaps to mind. Can you confirm the exact revision of Apache you're using (e.g. 2.2.4) so that I can run through the instructions on my end with the exact same versions to confirm that they work?

    -Kev.
    Kevin Yank
    CTO, sitepoint.com
    I wrote: Simply JavaScript | BYO PHP/MySQL | Tech Times | Editize
    Baby’s got back—a hard back, that is: The Ultimate CSS Reference

  16. #66
    SitePoint Member
    Join Date
    May 2007
    Location
    Toronto, Canada
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Kevin,

    Yes, I have installed Apache 2.2.4.

  17. #67
    SitePoint Author Kevin Yank's Avatar
    Join Date
    Apr 2000
    Location
    Melbourne, Australia
    Posts
    2,571
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Hi Ralph,

    I've just gone through the setup process on my own system and I can confirm that something has indeed changed. With the release of Apache 2.2, you now need to point to the file php5apache2_2.dll (not php5apache2.dll) when editing your httpd.conf file.

    Give this a try and let me know if it works for you.
    Kevin Yank
    CTO, sitepoint.com
    I wrote: Simply JavaScript | BYO PHP/MySQL | Tech Times | Editize
    Baby’s got back—a hard back, that is: The Ultimate CSS Reference

  18. #68
    SitePoint Member
    Join Date
    May 2007
    Location
    Toronto, Canada
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks. I made the change to php5apache2_2.dll and now I am operational. After doing the samples in the first 4 chapters I am now ready to buy the book. Thanks again... Ralph

  19. #69
    SitePoint Enthusiast Pure L's Avatar
    Join Date
    Oct 2007
    Posts
    47
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    mysql password on mac 10.3.9 ??

    Quote Originally Posted by vicki View Post
    I am following the tutorial that walks you throught the steps of how to install mysql and php. I have installed both and I am now at the step of :

    To set a root password for MySQL, open a command prompt (or Terminal window) and type the following command in the bin directory of your MySQL installation:

    mysql -u root mysql

    Once I enter this into the terminal window, it says that there is no such command. I am running OSX 10.4. I have made sure that mysql server is running. Can you tell me what my problem is?
    I'm having this exact same problem. I'm on 10.3.9, however.

    Has anyone figured this out yet?

  20. #70
    ¬.¬ shoooo... silver trophy logic_earth's Avatar
    Join Date
    Oct 2005
    Location
    CA
    Posts
    9,013
    Mentioned
    8 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Pure L View Post
    I'm having this exact same problem. I'm on 10.3.9, however.

    Has anyone figured this out yet?
    Is the MySQL binary with in your path? On Mac I don't know how to set it.
    But perhapes if you run the command in the MySQL binary directory.
    Logic without the fatal effects.
    All code snippets are licensed under WTFPL.


  21. #71
    SitePoint Enthusiast Pure L's Avatar
    Join Date
    Oct 2007
    Posts
    47
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
    ThisHereComputer:/bin Pure L$ mysql -u root mysql
    -bash: mysql: command not found
    I'm no expert at this (quite a newbie, in fact) but, from what I can tell, it's not working from /bin either.

  22. #72
    SitePoint Member
    Join Date
    Sep 2008
    Location
    North-West UK
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm just starting to look at PHP/MySQL and I've tried the installation offered in the opening chapter of the Sitepoint book under XP Pro. All appears to be running but the last step to configure passwords for MySQL has thrown up a problem: I can't seem to log onto the server.

    Trying the 'mysql -u root mysql' command gives me "ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)". I'm going word-blind checking that I've not missed something in the configurations of the various components (MySQL 5.0.51b, PHP 5.2.6, Apache 2.2.9).

    Can anyone shed some light as to what I'm missing?

    Thanks

  23. #73
    SitePoint Author Kevin Yank's Avatar
    Join Date
    Apr 2000
    Location
    Melbourne, Australia
    Posts
    2,571
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Hi ldp,

    It sounds like you have successfully set up a root password on your MySQL server. To log in with that password, you need to add -p to the mysql command:

    Code:
    mysql -u root -p mysql
    The -p tells MySQL that you wish to provide a password with your connection request.
    Kevin Yank
    CTO, sitepoint.com
    I wrote: Simply JavaScript | BYO PHP/MySQL | Tech Times | Editize
    Baby’s got back—a hard back, that is: The Ultimate CSS Reference

  24. #74
    SitePoint Member
    Join Date
    Sep 2008
    Location
    North-West UK
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Smile

    Hi Kevin,

    Thanks for the very quick response.

    I sort of worked out that the server was wanting a password, but the problem was that I couldn't remember setting one! I tried a number of usual suspects but no joy. When I tried the configuration wizard and wanted to see what happened when I tried the password setup there it was asking me again for the password...

    Anyway, its a new day and determined to solve this one I have just embarked on installing MySQL on my notebook. I'm going through the configuration wizard and I get to the 'Network Options' and scrutinise the text of your book and begin to wonder whether I unchecked 'Strict Mode' previously as per instructions ......?

    Viola! I can get in. Sometimes you just have to walk away from a problem and do something else (i.e. sleep). I'm making an assumption that 'Strict Mode' has a bearing on security/passwords. Is this true?

    Anyway thanks for confirming my suspicions, and focusing my attention. On with the rest of the book ........

    L

  25. #75
    Danny Fahy
    SitePoint Community Guest
    Hi Kevin,
    How do I type commands into a bin directory. WHy I type mysql -u root mysql" I get "command not found"


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
  •