Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Page 1 of 2 12 LastLast
Results 1 to 15 of 16
  1. #1
    Regular Coder
    Join Date
    Jun 2002
    Location
    United Kingdom Confused: Often
    Posts
    859
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Macintosh [fixed] Server problems from apache on Mac OS X

    Hello everyone,

    I finally got myself a Mac Mini last week and figured out how to use OS X much faster than I expected! I worked out how to turn on the pre-installed Apache server today, which works fine when going to http://localhost/~jon which is apparently my user home directory. It lists the directories in my Sites folder, which is just fine. So I click into my "clients" folder, and then into a folder in the clients folder, and at that point I'm greeted with a Forbidden page:
    You don't have permission to access /~jon/clients/knuci/ on this server
    Any idea how to change these folder permissions so I can view these folders? Because it doesnt seem to make it obvious. Any ideas?

    Thanks everyone, let me know if you think you can help!
    Last edited by redhead; 04-01-2005 at 10:50 PM. Reason: Problem solved
    redhead

  • #2
    Senior Coder JamieR's Avatar
    Join Date
    Oct 2004
    Location
    United Kingdom
    Posts
    3,161
    Thanks
    0
    Thanked 5 Times in 5 Posts
    You usually get that from CHMOD errors, however I've never used Apache locally so I don't really know if would be that to blame.

  • #3
    Regular Coder
    Join Date
    Jun 2002
    Location
    United Kingdom Confused: Often
    Posts
    859
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Fixed! Kind of...

    Ah ha! 'Tis fixed, found how to set my whole clients folder to be accessible in the end. I had thought that there was a PHP interperator bundled in, but it appears that my PHP is very much not being interperated, so I'll have to try and install that as well.
    redhead

  • #4
    Regular Coder
    Join Date
    Jun 2002
    Location
    United Kingdom Confused: Often
    Posts
    859
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Making MySQL work?

    Hmmm, well I've installed PHP now (which works fine) and tried to install mySQL, it said it installed ok but cant get any scripts to connect to it, and I dont actually know how to set up a user, database or table on there without any interface for it (like phpMyAdmin if you get my drift).

    phpinfo() gives me the following information regarding mysql:

    Quote Originally Posted by phpinfo()
    mysql

    MySQL Support
    enabled

    Active Persistent Links
    0

    Active Links
    0

    Client API version
    4.1.3-beta

    MYSQL_MODULE_TYPE
    external

    MYSQL_SOCKET
    /tmp/mysql.sock

    MYSQL_INCLUDE
    -I/Users/marc/svn/entropy/php-module/src/mysql-standard-4.1.3-beta-apple-darwin7.4.0-powerpc/include

    MYSQL_LIBS
    -L/Users/marc/svn/entropy/php-module/src/mysql-standard-4.1.3-beta-apple-darwin7.4.0-powerpc/lib -lmysqlclient



    Directive
    Local Value
    Master Value

    mysql.allow_persistent
    On
    On

    mysql.connect_timeout
    60
    60

    mysql.default_host
    no value
    no value

    mysql.default_password
    no value
    no value

    mysql.default_port
    no value
    no value

    mysql.default_socket
    no value
    no value

    mysql.default_user
    no value
    no value

    mysql.max_links
    Unlimited
    Unlimited

    mysql.max_persistent
    Unlimited
    Unlimited

    mysql.trace_mode
    Off
    Off
    Any ideas how I can set up mySQL properly? If there is a link, other topic or a helpful google or whatever that I've missed then point me in it's direction. Thanks again
    Last edited by redhead; 04-02-2005 at 12:58 PM.
    redhead

  • #5
    Senior Coder JamieR's Avatar
    Join Date
    Oct 2004
    Location
    United Kingdom
    Posts
    3,161
    Thanks
    0
    Thanked 5 Times in 5 Posts
    I would think that you'd need to download phpmyadmin to administer MySQL - its free after all, so nothing to loose

  • #6
    Regular Coder
    Join Date
    Jun 2002
    Location
    United Kingdom Confused: Often
    Posts
    859
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Yep I have done, I've set the host to localhost, user to root and left the password clear and it says "#2002 - The server is not responding (or the local MySQL server's socket is not correctly configured)" so I guess this is down to my own mistake in configuring it? Hmmm I'm kinda clueless to be honest, cheers for your suggestion though weazel. Any ideas?
    redhead

  • #7
    Regular Coder
    Join Date
    Jun 2002
    Location
    United Kingdom Confused: Often
    Posts
    859
    Thanks
    0
    Thanked 0 Times in 0 Posts

    MySQL now running :)

    w00t, just for anyone's information if this thread gets searched up anywhen, mysql is running ok now Just had to type some commands into Terminal and it seems to be working.
    redhead

  • #8
    Senior Coder JamieR's Avatar
    Join Date
    Oct 2004
    Location
    United Kingdom
    Posts
    3,161
    Thanks
    0
    Thanked 5 Times in 5 Posts
    ah nice Glad it worked out. I'm gonna be installing a WAMP (Windows, Apache, MySQL, PHP) on a box I have here soon...I'd like to hear all the problems people have with it.

    ~Jamie.
    Last edited by JamieR; 04-02-2005 at 12:06 AM. Reason: me being a spanner again

  • #9
    Regular Coder
    Join Date
    Jan 2004
    Location
    Maryland
    Posts
    468
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by weazel
    WAMP (Windows, Apache, MySQL, Linux).
    Haha. Perhaps windows, apache, mysql, php?

  • #10
    Senior Coder JamieR's Avatar
    Join Date
    Oct 2004
    Location
    United Kingdom
    Posts
    3,161
    Thanks
    0
    Thanked 5 Times in 5 Posts
    Yeh thats it......god me thinking of Linux (I can't choose between Windoze and Linux, however I think I'll do a dual boot system) -

    lets get it right:

    WAMP - Windows, Apache, MySQL, PHP.

  • #11
    Regular Coder
    Join Date
    Jun 2002
    Location
    United Kingdom Confused: Often
    Posts
    859
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Ok it works more or less ok, the only thing is that if I have a PHP Parse error (and I have more than most ) it doesnt tell me! It just outputs absolutley nothing... Any ideas why that happens? Does anyone know how to fix such a thing? It's more than a little inconvienient to upload it just to find out where my parse error is!

    Thanks for any help... sorry my server problems keep cropping up, once it's sorted it'll be sorted
    redhead

  • #12
    New to the CF scene
    Join Date
    Apr 2005
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Thumbs up

    I was just surfing.. searching for solve the same error...
    and I solved reading this link http://help.scibit.com/mysql/manual_Problems.html
    I've just to change in your config.inc.php the localhost directive!!!!
    $cfg['Servers'][$i]['host'] = 'localhost'; // MySQL hostname or IP address
    to
    $cfg['Servers'][$i]['host'] = 'your_hostname'; // MySQL hostname or IP addres
    or
    $cfg['Servers'][$i]['host'] = 'your_IP'; // MySQL hostname or IP addres

    Ciao,
    Marco

  • #13
    New to the CF scene
    Join Date
    May 2005
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Redhead said she fixed this in terminal

    #2002 - The server is not responding (or the local MySQL server's socket is not correctly configured)"

    Hi Redhead said she fixed this in terminal but didn't specify how- any ideas?

  • #14
    Senior Coder gsnedders's Avatar
    Join Date
    Jan 2004
    Posts
    2,340
    Thanks
    1
    Thanked 7 Times in 7 Posts
    My advice: Install Apache and PHP from source, and MySQL from a binary before doing both. I've had problems doing what you did.

    Instructions (Where % represents the command line, and are in [code] blocks):
    Download the Standard OS 10.3 Installer Package from here (4.1 somes with a System Panel, which is useful ). Run all the installers in the disk image. Install it, and go to the MySQL panel is System Preferences, now, turn MySQL on.

    Open Terminal:
    Code:
    % cd ~/Desktop 
    % mkdir gdbuild
    % cd gdbuild
    % curl -O ftp://ftp.uu.net/graphics/jpeg/jpegsrc.v6b.tar.gz
    % curl -O http://heanet.dl.sourceforge.net/sourceforge/png-mng/libpng-1.2.7.tar.gz
    % gnutar xzf jpegsrc.v6b.tar.gz
    % gnutar xzf libpng-1.2.7.tar.gz
    % cd jpeg-6b
    % sudo mkdir -p /usr/local/include
    % sudo mkdir -p /usr/local/bin
    % sudo mkdir -p /usr/local/man
    % sudo mkdir -p /usr/local/lib
    % sudo mkdir /usr/local/man/man1
    % ./configure
    % sudo make install
    % sudo make install-lib
    % sudo ranlib /usr/local/lib/libjpeg.a
    % cd ..
    % cd libpng-1.2.7
    % cp scripts/makefile.macosx ./Makefile
    % pico Makefile
    Now, the changes you have to make are both near the top, find:
    Code:
    # Where the zlib library and include files are located
    #ZLIBLIB=/usr/local/lib
    #ZLIBINC=/usr/local/include
    ZLIBLIB=../zlib
    ZLIBINC=../zlib
    and replace with
    Code:
    # Where the zlib library and include files are located
    ZLIBLIB=/usr/local/lib
    ZLIBINC=/usr/local/include
    #ZLIBLIB=../zlib
    #ZLIBINC=../zlib
    Press Ctrl - O (as in Ouch), then Return to save, then Ctrl - X to exit.

    Then, back to the command line
    Code:
    % make
    % sudo make install 
    % sudo ranlib /usr/local/lib/libpng.a 
    % cd ..
    % cd ~/Desktop
    % mkdir apachebuild
    % cd apachebuild
    % curl -O http://apache.mirrors.esat.net/httpd/apache_1.3.33.tar.gz
    % gnutar -xzf apache_1.3.33.tar.gz
    % cd apache_1.3.33
    % ./configure \
    --enable-module=most \
    --enable-shared=max
    % make
    % sudo make install
    Now, for some odd reason, we have to reinstall all of the GD stuff, so, Terminal again.
    Code:
    % cd ~/Desktop 
    % mkdir gdbuild2
    % cd gdbuild2
    % curl -O ftp://ftp.uu.net/graphics/jpeg/jpegsrc.v6b.tar.gz
    % curl -O http://heanet.dl.sourceforge.net/sourceforge/png-mng/libpng-1.2.7.tar.gz
    % gnutar xzf jpegsrc.v6b.tar.gz
    % gnutar xzf libpng-1.2.7.tar.gz
    % cd jpeg-6b
    % sudo mkdir -p /usr/local/include
    % sudo mkdir -p /usr/local/bin
    % sudo mkdir -p /usr/local/man
    % sudo mkdir -p /usr/local/lib
    % sudo mkdir /usr/local/man/man1
    % ./configure
    % sudo make install
    % sudo make install-lib
    % sudo ranlib /usr/local/lib/libjpeg.a
    % cd ..
    % cd libpng-1.2.7
    % cp scripts/makefile.macosx ./Makefile
    % pico Makefile
    Now, the changes you have to make are both near the top, find:
    Code:
    # Where the zlib library and include files are located
    #ZLIBLIB=/usr/local/lib
    #ZLIBINC=/usr/local/include
    ZLIBLIB=../zlib
    ZLIBINC=../zlib
    and replace with
    Code:
    # Where the zlib library and include files are located
    ZLIBLIB=/usr/local/lib
    ZLIBINC=/usr/local/include
    #ZLIBLIB=../zlib
    #ZLIBINC=../zlib
    Press Ctrl - O (as in Ouch), then Return to save, then Ctrl - X to exit.[/code]
    Now, that's done again, we can get on with building PHP:
    Code:
    % cd ~/Desktop
    % mkdir phpbuild
    % cd phpbuild
    % curl -O http://ie.php.net/distributions/php-4.3.11.tar.gz
    % gnutar -xzf php-4.3.11.tar.gz
    % cd php-4.3.11
    % ./configure \
    --with-ftp \
    --with-xml \
    --with-zlib \
    --with-gd \
    --with-jpeg-dir=/usr/local \
    --with-png-dir=/usr/local \
    --with-mysql=/usr/local/mysql \
    --with-apxs=/usr/sbin/apxs
    % make
    % sudo make install
    If you want a php.ini file:
    Code:
    % sudo cp php.ini-dist /usr/local/lib/php.ini
    Now, you need to edit httpd.conf, so, pico again
    Code:
    % sudo pico /etc/httpd/httpd.conf
    This time, the edits are:
    Commenting out (Placing a # a the beginning of the line) the following lines:
    Code:
    LoadModule hfs_apple_module   libexec/httpd/mod_hfs_apple.so
    and
    Code:
    AddModule mod_hfs_apple.c
    Now, here's where it changes from OS to OS, if you are on Tiger (Mac OS 10.4), you have to comment out:
    Code:
    LoadModule bonjour_module     libexec/httpd/mod_bonjour.so
    and
    Code:
    AddModule mod_bonjour.c
    If you are on Panther (Mac OS 10.3), you have to comment out:
    Code:
    LoadModule rendezvous_module     libexec/httpd/mod_rendezvous.so
    and
    Code:
    AddModule mod_rendezvous.c
    Now, save and exit (Ctrl - O, Return, Ctrl - X). Now, all you need to do is start/restart Apache:
    Code:
    % sudo apachectl restart
    MySQL will now have it's default root password (nothing) and should be changed using
    Code:
    % /usr/local/mysql/bin/mysqladmin -u root password new_password_here
    Last edited by gsnedders; 05-12-2005 at 12:21 PM.

  • #15
    New to the CF scene
    Join Date
    May 2005
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Post 2 things...

    Just stumbled upon this thread - thought I'd clairfy a couple things. First of all, the parent post by Redhead was asking how to view the contents of folders in their Sites directory. By default , Apache on OS X is configured not to produce directory listings. So, if there is no index file in those directories, you cannot view them. To correct, either add an index.html or index.php file OR modify /etc/httpd/httpd.conf and turn on Indexes (though not the greatest of ideas if this is an open to the net server, imho).

    Later on, Redhead mentioned that PHP was not functioning. Rather than installing the whole mess via source, maybe you should try *turning it on* first - it's already installed. ;-) Edit /etc/httpd/httpd.conf, uncomment these 2 lines:

    LoadModule php4_module libexec/httpd/libphp4.so
    AddModule mod_php4.c

    Then restart the webserver by either issuing a /usr/sbin/apachectl graceful
    or simply go to System Preferences-->Sharing and turn off/turn on the webserver.


  •  
    Page 1 of 2 12 LastLast

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •