Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Mac OS X > PHP stopped working!

PHP stopped working!
Thread Tools
Fresh-Faced Recruit
Join Date: Jan 2004
Location: Iceland
Status: Offline
Reply With Quote
Jan 6, 2004, 04:17 PM
 
Hi,
PHP on Panther on my PB was running happily some time, but now always when I try to test some php file localy, it jumps to the file in finder and doesnt procces it. I tried to restart server, I've checked if httpd.conf file has all neccesary lines unquoted, php.ini is on its place. Can somebody advice me how to procceed to find the problem?

here is my httpd error_log file :

[Sat Jan 3 04:32:57 2004] [notice] Apache/1.3.28 (Darwin) PHP/4.3.2 configured -- resuming normal operations
[Sat Jan 3 04:32:57 2004] [notice] Accept mutex: flock (Default: flock)
[Sun Jan 4 12:35:00 2004] [warn] mod_rendezvous_apple: Skipping user 'Mtj' - cannot read index file '/Users/Mtj/Sites/index.html'.
[Sun Jan 4 12:35:00 2004] [notice] Apache/1.3.28 (Darwin) PHP/4.3.2 configured -- resuming normal operations
[Sun Jan 4 12:35:00 2004] [notice] Accept mutex: flock (Default: flock)
[Sun Jan 4 19:59:54 2004] [warn] child process 315 still did not exit, sending a SIGTERM
[Sun Jan 4 19:59:59 2004] [error] child process 315 still did not exit, sending a SIGKILL
[Sun Jan 4 19:59:59 2004] [notice] caught SIGTERM, shutting down
[Sun Jan 4 20:01:58 2004] [warn] mod_rendezvous_apple: Skipping user 'Mtj' - cannot read index file '/Users/Mtj/Sites/index.html'.
[Sun Jan 4 20:01:59 2004] [notice] Apache/1.3.28 (Darwin) PHP/4.3.2 configured -- resuming normal operations
[Sun Jan 4 20:01:59 2004] [notice] Accept mutex: flock (Default: flock)
[Mon Jan 5 15:10:38 2004] [warn] child process 379 still did not exit, sending a SIGTERM
[Mon Jan 5 15:10:43 2004] [notice] caught SIGTERM, shutting down
[Mon Jan 5 15:12:40 2004] [warn] mod_rendezvous_apple: Skipping user 'Mtj' - cannot read index file '/Users/Mtj/Sites/index.html'.
[Mon Jan 5 15:12:40 2004] [notice] Apache/1.3.28 (Darwin) PHP/4.3.2 configured -- resuming normal operations
[Mon Jan 5 15:12:40 2004] [notice] Accept mutex: flock (Default: flock)
[Tue Jan 6 08:32:06 2004] [warn] child process 380 still did not exit, sending a SIGTERM
[Tue Jan 6 08:32:11 2004] [notice] caught SIGTERM, shutting down
[Tue Jan 6 08:34:35 2004] [warn] mod_rendezvous_apple: Skipping user 'Mtj' - cannot read index file '/Users/Mtj/Sites/index.html'.
[Tue Jan 6 08:34:35 2004] [notice] Apache/1.3.28 (Darwin) PHP/4.3.2 configured -- resuming normal operations
[Tue Jan 6 08:34:35 2004] [notice] Accept mutex: flock (Default: flock)
[Tue Jan 6 13:25:47 2004] [notice] caught SIGTERM, shutting down
[Tue Jan 6 13:28:18 2004] [warn] mod_rendezvous_apple: Skipping user 'Mtj' - cannot read index file '/Users/Mtj/Sites/index.html'.
[Tue Jan 6 13:28:18 2004] [notice] Apache/1.3.28 (Darwin) PHP/4.3.2 configured -- resuming normal operations
[Tue Jan 6 13:28:18 2004] [notice] Accept mutex: flock (Default: flock)
[Tue Jan 6 13:41:54 2004] [notice] caught SIGTERM, shutting down
[Tue Jan 6 13:43:56 2004] [warn] mod_rendezvous_apple: Skipping user 'Mtj' - cannot read index file '/Users/Mtj/Sites/index.html'.
[Tue Jan 6 13:43:57 2004] [notice] Apache/1.3.28 (Darwin) PHP/4.3.2 configured -- resuming normal operations
[Tue Jan 6 13:43:57 2004] [notice] Accept mutex: flock (Default: flock)
[Tue Jan 6 13:49:42 2004] [notice] caught SIGTERM, shutting down
[Tue Jan 6 13:51:45 2004] [warn] mod_rendezvous_apple: Skipping user 'Mtj' - cannot read index file '/Users/Mtj/Sites/index.html'.
[Tue Jan 6 13:51:45 2004] [notice] Apache/1.3.28 (Darwin) PHP/4.3.2 configured -- resuming normal operations
[Tue Jan 6 13:51:45 2004] [notice] Accept mutex: flock (Default: flock)
[Tue Jan 6 21:36:44 2004] [notice] caught SIGTERM, shutting down
[Tue Jan 6 21:36:46 2004] [warn] mod_rendezvous_apple: Skipping user 'Mtj' - cannot read index file '/Users/Mtj/Sites/index.html'.
Processing config directory: /private/etc/httpd/users/*.conf
Processing config file: /private/etc/httpd/users/Mtj.conf
[Tue Jan 6 21:36:47 2004] [notice] Apache/1.3.28 (Darwin) PHP/4.3.2 configured -- resuming normal operations
[Tue Jan 6 21:36:47 2004] [notice] Accept mutex: flock (Default: flock)
(Last edited by tomatej; Jan 9, 2004 at 06:59 AM. )
     
Occasionally Useful
Join Date: Jun 2001
Location: Liverpool, UK
Status: Offline
Reply With Quote
Jan 6, 2004, 05:20 PM
 
two points:

1. did it really just "start" doing this? can you pinpoint anything you might have done?
2. why is it saying it can't read index.html, if you're calling a php page? are you calling the page from your sites folder?
"Have sharp knives. Be creative. Cook to music" ~ maxelson
     
Addicted to MacNN
Join Date: Feb 2001
Location: zurich, switzerland
Status: Offline
Reply With Quote
Jan 6, 2004, 05:25 PM
 
Have you turned on Filevault by chance?
weird wabbit
     
Occasionally Useful
Join Date: Jun 2001
Location: Liverpool, UK
Status: Offline
Reply With Quote
Jan 6, 2004, 05:36 PM
 
Originally posted by theolein:
Have you turned on Filevault by chance?
ahh... and the fog lifted, and all was clear
"Have sharp knives. Be creative. Cook to music" ~ maxelson
     
tomatej  (op)
Fresh-Faced Recruit
Join Date: Jan 2004
Location: Iceland
Status: Offline
Reply With Quote
Jan 6, 2004, 08:12 PM
 
well....If I tell you how it was you will be laughing at me
I was opening the files all the time from finder instead of running them through a webserver...all the time
I managed to digg through everything and even reinstall php module
and now in the end when I realised that PHP was all the time OK, the MySQL stopped working...

this comes in the terminal :

Last login: Wed Jan 7 01:48:48 on ttyp1
Welcome to Darwin!
Matej:~ Mtj$ /usr/local/mysql/bin/mysql

Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 22 to server version: 4.0.17-standard

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql>
mysql> use test;
ERROR 1049: Unknown database 'test'
mysql> create database test1;
ERROR 1044: Access denied for user: '@localhost' to database 'test1'
mysql> show databases;



and nothing.......


I restarted server and no change..... Please help me somebody so I dont have to continue learning from my own mystakes...
     
Addicted to MacNN
Join Date: Feb 2001
Location: zurich, switzerland
Status: Offline
Reply With Quote
Jan 7, 2004, 06:11 AM
 
Originally posted by tomatej:
well....If I tell you how it was you will be laughing at me
I was opening the files all the time from finder instead of running them through a webserver...all the time
I managed to digg through everything and even reinstall php module
and now in the end when I realised that PHP was all the time OK, the MySQL stopped working...

this comes in the terminal :

Last login: Wed Jan 7 01:48:48 on ttyp1
Welcome to Darwin!
Matej:~ Mtj$ /usr/local/mysql/bin/mysql

Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 22 to server version: 4.0.17-standard

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql>
mysql> use test;
ERROR 1049: Unknown database 'test'
mysql> create database test1;
ERROR 1044: Access denied for user: '@localhost' to database 'test1'
mysql> show databases;



and nothing.......


I restarted server and no change..... Please help me somebody so I dont have to continue learning from my own mystakes...
Did you use the mysql package from http://www.entropy.ch or did you install and compile from source? The entropy package runs the installation scripts, but sometimes fails. I would simply use that package and read the installation instructions as well as the bit on reinitialising mysql. Here is the link to his mysql page.

I would also, as he recommends, read the user manual to mysql at http://www.mysql.com carefully, especially section 4.3 (initialising users etc). It sounds as if you're logging into mysql as the mysql nobody user, whereby you should initially set a mysql root user password with mysqladmin, log in as the mysql root user and set users, permissions etc. Note that the mysql users are NOT the same as the system users!
weird wabbit
     
tomatej  (op)
Fresh-Faced Recruit
Join Date: Jan 2004
Location: Iceland
Status: Offline
Reply With Quote
Jan 7, 2004, 11:28 AM
 
Hi,
thanks for all the points and links!
I was using the local mysql just for testing my php scripts so I was doing fine with just anonymous login and test_dbs, but now it seems I will have to dip little bit deeper and spend some time with mysql to make it work again.

I have obviously some privilleges problems. I was also messing little bit with privilleges of "privat" folder so I hope I didnt knock it out entirely.


d.o.n.t take it too seriously!
     
Addicted to MacNN
Join Date: Feb 2001
Location: zurich, switzerland
Status: Offline
Reply With Quote
Jan 7, 2004, 11:48 AM
 
Originally posted by tomatej:
Hi,
thanks for all the points and links!
I was using the local mysql just for testing my php scripts so I was doing fine with just anonymous login and test_dbs, but now it seems I will have to dip little bit deeper and spend some time with mysql to make it work again.

I have obviously some privilleges problems. I was also messing little bit with privilleges of "privat" folder so I hope I didnt knock it out entirely.
DON'T touch the privileges of the /private directory. You run the risk of f**king your system up so that things won't work anymore. In addition to that mysql should NOT be anywhere in the /private directory. It should be under /usr. Do yourself a favour and delete that mysql installation you have and get the entropy one from the link I provided above. Then FOLLOW the instructions and read the tutorials on mysql.com.
weird wabbit
     
Grizzled Veteran
Join Date: Nov 2003
Location: Hebburn, UK
Status: Offline
Reply With Quote
Jan 7, 2004, 11:54 AM
 
. In addition to that mysql should NOT be anywhere in the /private directory
mysql.sock is in /Private/tmp/ so maybe that had something to do with it....
     
tomatej  (op)
Fresh-Faced Recruit
Join Date: Jan 2004
Location: Iceland
Status: Offline
Reply With Quote
Jan 7, 2004, 12:53 PM
 
I got entropy, reinstalled mysql and I'm back to life!!!!

Thanks Theolein and others for time.....

By the way is it possible to make all these "secret" directories like usr or privat visible all the time? I like to see what I have on the disk no metter how "dangerous" it is .


d.o.n.t take it too seriously!
     
Addicted to MacNN
Join Date: Feb 2001
Location: zurich, switzerland
Status: Offline
Reply With Quote
Jan 7, 2004, 01:11 PM
 
Originally posted by tomatej:
I got entropy, reinstalled mysql and I'm back to life!!!!

Thanks Theolein and others for time.....

By the way is it possible to make all these "secret" directories like usr or privat visible all the time? I like to see what I have on the disk no metter how "dangerous" it is .
I assume from this that you're not using the Terminal? Or are you, since you posted about logging into mysql from the command line? Those directories are visible. Just cd to the / directory and there they are.

If you mean in the finder, then there is the defaults command in the Terminal that you used to be able to use to make everything visible, but which I can't see to be have that entry now for com.apple.finder. Perhaps macosxhints.com has it listed somewhere?

Edit: Here are the terminal commands to hide and show all the files in the finder:

show:

defaults write com.apple.finder AppleShowAllFiles ON

hide:

defaults write com.apple.finder AppleShowAllFiles OFF

P.S. You might have to force quit the Finder after doing this to get it to work (Finder restarts automatically)
(Last edited by theolein; Jan 7, 2004 at 01:23 PM. )
weird wabbit
     
Grizzled Veteran
Join Date: Nov 2003
Location: Hebburn, UK
Status: Offline
Reply With Quote
Jan 7, 2004, 04:10 PM
 
theolein, thats a great tip - cheers.

I had just made aliases to all the hidden folders I wanted and put them in a folder... This way is much nicer
     
tomatej  (op)
Fresh-Faced Recruit
Join Date: Jan 2004
Location: Iceland
Status: Offline
Reply With Quote
Jan 7, 2004, 07:37 PM
 
Originally posted by theolein:


Edit: Here are the terminal commands to hide and show all the files in the finder:

show:

defaults write com.apple.finder AppleShowAllFiles ON

hide:

defaults write com.apple.finder AppleShowAllFiles OFF

P.S. You might have to force quit the Finder after doing this to get it to work (Finder restarts automatically)
What a neat and simple solution!!

thanks


d.o.n.t take it too seriously!
     
Addicted to MacNN
Join Date: Feb 2001
Location: zurich, switzerland
Status: Offline
Reply With Quote
Jan 7, 2004, 09:38 PM
 
Originally posted by tomatej:
What a neat and simple solution!!

thanks
Well, if you liked that then you're going to love this one (also from macosxhints.com). An applescript that makes all this automatic (no terminal typing needed) with a nice GUI and buttons. It is apparently sometimes buggy, but if it hangs, just kill it and restart the finder by hand (clicking in the dock on the finder icon if the finder won't restart):

Code:
display dialog "Set the visibility of hidden files..." buttons {"Cancel", "Visible", "Invisible"} default button 1 copy the result as list to {buttonpressed} if the buttonpressed is "Invisible" then try tell application "Finder" to quit do shell script "defaults write com.apple.finder AppleShowAllFiles OFF" delay 1 tell application "Finder" to activate end try else if the buttonpressed is "Visible" then try tell application "Finder" to quit do shell script "defaults write com.apple.finder AppleShowAllFiles ON" delay 1 tell application "Finder" to activate end try end if
weird wabbit
     
tomatej  (op)
Fresh-Faced Recruit
Join Date: Jan 2004
Location: Iceland
Status: Offline
Reply With Quote
Jan 8, 2004, 06:14 AM
 
even better!

I was also searching a little bit in macosxhints.com, but I wasnt so lucky.

cheers


d.o.n.t take it too seriously!
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 10:49 AM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2