Re: [PHP] 404 After Setting session.save_path to /tmp
Mark Sargent wrote: Chris wrote: I should say check your httpd.conf file for User and Group - they are capitalized. Alternatively: ps aux | grep httpd yes, did that one and see it as starting as root, then goijg to daemon. Now, if I add daemon to the root group, isn't that a security issue? Should I create a new group? Little confused? Cheers. Big security issue - don't do it. ps au | grep apache root /usr/sbin/apache htdocs /usr/sbin/apache htdocs /usr/sbin/apache My apache is running as htdocs. So as root create a temp folder and chown it to htdocs: mkdir /my_temp_dir chown htdocs. /my_temp_dir Done. -- Postgresql php tutorials http://www.designmagick.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] 404 After Setting session.save_path to /tmp
Chris wrote: Big security issue - don't do it. ps au | grep apache root /usr/sbin/apache htdocs /usr/sbin/apache htdocs /usr/sbin/apache My apache is running as htdocs. So as root create a temp folder and chown it to htdocs: mkdir /my_temp_dir chown htdocs. /my_temp_dir Hi All, ok, created dir, added htdocs user/group and changed ownership of dir to them. Thing I'm gettin is, every time I make an adjustment to either php.ini or httpd.conf, and do a restart, I keep getting a 404 error for all pages. Which only corrects when doing a reboot of the box. This was happening before I just followed your last steps. Thoughts? Cheers. Mark Sargent. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] 404 After Setting session.save_path to /tmp
Mark Sargent wrote: Chris wrote: Big security issue - don't do it. ps au | grep apache root /usr/sbin/apache htdocs /usr/sbin/apache htdocs /usr/sbin/apache My apache is running as htdocs. So as root create a temp folder and chown it to htdocs: mkdir /my_temp_dir chown htdocs. /my_temp_dir Hi All, ok, created dir, added htdocs user/group and changed ownership of dir to them. Thing I'm gettin is, every time I make an adjustment to either php.ini or httpd.conf, and do a restart, I keep getting a 404 error for all pages. Which only corrects when doing a reboot of the box. This was happening before I just followed your last steps. Thoughts? Cheers. Sounds like you're using the wrong script to restart apache. What command are you using? Rebooting will most likely pick up the /etc/init.d/apache or /etc/init.d/httpd script. -- Postgresql php tutorials http://www.designmagick.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] 404 After Setting session.save_path to /tmp
Chris wrote: Sounds like you're using the wrong script to restart apache. What command are you using? service httpd restart Rebooting will most likely pick up the /etc/init.d/apache or /etc/init.d/httpd script. Have this in /etc/rc.local on Fedora 5, startApache=/usr/local/apache2/bin/apachectl if [ -f $startApache ] ; then $startApache start fi and I see that I have left off start at the end of startApache. Cheers. Mark Sargent. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] 404 After Setting session.save_path to /tmp
Mark Sargent wrote: Chris wrote: Big security issue - don't do it. ps au | grep apache root /usr/sbin/apache htdocs /usr/sbin/apache htdocs /usr/sbin/apache My apache is running as htdocs. So as root create a temp folder and chown it to htdocs: mkdir /my_temp_dir chown htdocs. /my_temp_dir Hi All, ok, created dir, added htdocs user/group and changed ownership of dir to them. Thing I'm gettin is, every time I make an adjustment to either php.ini or httpd.conf, and do a restart, I keep getting a 404 error for all pages. Which only corrects when doing a reboot of the box. This was happening before I just followed your last steps. Thoughts? Cheers. Mark Sargent. I thought you said in earlier email that your apache was running as user daemon. The tmp directory has to be owned by the user running apache. If you want to run apache as user apache group apache then you will have to edit httpd.conf and change the User and Group directives. Otherwise chown chgrp the tmp directory to the user/group that is listed in the httpd.conf file. -- Ron Clark System Administrator Armstrong Atlantic State University 11935 Abercorn Street Savannah, Ga 31419 Phone: 912 961 3234 Fax: 912 927 5353 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] 404 After Setting session.save_path to /tmp
Mark Sargent wrote: Chris wrote: Sounds like you're using the wrong script to restart apache. What command are you using? service httpd restart Rebooting will most likely pick up the /etc/init.d/apache or /etc/init.d/httpd script. Have this in /etc/rc.local on Fedora 5, startApache=/usr/local/apache2/bin/apachectl if [ -f $startApache ] ; then $startApache start fi and I see that I have left off start at the end of startApache. There's your problem. service httpd restart will most likely restart /usr/sbin/httpd. That's not the same as /usr/local/apache2 Remove the rpm to save confusion next time: rpm -e httpd then when you need to restart, always use the /usr/local/apache2/bin/apachectl file. -- Postgresql php tutorials http://www.designmagick.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] 404 After Setting session.save_path to /tmp
Chris wrote: There's your problem. service httpd restart will most likely restart /usr/sbin/httpd. That's not the same as /usr/local/apache2 Remove the rpm to save confusion next time: rpm -e httpd then when you need to restart, always use the /usr/local/apache2/bin/apachectl file. Hi All, weird, as I distinctly left out installing any type of servers when initially installing FC5. Cheers. Mark Sargent -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] 404 After Setting session.save_path to /tmp
Mark Sargent wrote: Chris wrote: There's your problem. service httpd restart will most likely restart /usr/sbin/httpd. That's not the same as /usr/local/apache2 Remove the rpm to save confusion next time: rpm -e httpd then when you need to restart, always use the /usr/local/apache2/bin/apachectl file. Hi All, weird, as I distinctly left out installing any type of servers when initially installing FC5. Cheers. In my experience redhat and fedora don't really listen to what you want properly. What the hell does pcmcia have to do with a server installation? You need to check it each time you install. -- Postgresql php tutorials http://www.designmagick.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] 404 After Setting session.save_path to /tmp
Hi All, I get this, Not Found The requested URL /movie1.php was not found on this server. Apache/2.2.0 (Fedora) Server at localhost Port 80 when setting session.save_path to /tmp in /usr/local/lib/php.ini. Even if I change it back, I still get that error. Restarting httpd doesn't fix it. Only a reboot, ouch! Why is this happening? Cheers. httpd = 2.2.2 php = 5.1.4 OS = Fedora 5 Mark Sargent. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] 404 After Setting session.save_path to /tmp
Mark Sargent a écrit : Hi All, I get this, Not Found The requested URL /movie1.php was not found on this server. Apache/2.2.0 (Fedora) Server at localhost Port 80 when setting session.save_path to /tmp in /usr/local/lib/php.ini. Even if I change it back, I still get that error. Restarting httpd doesn't fix it. Only a reboot, ouch! Why is this happening? Cheers. Hi, you should check apache log files. I don't know if your server is allowed to write to /tmp. what's the initial (default) session.save_path ? try to set it to a subdirectory of your DocumentRoot. (check httpd.conf for the DocumentRoot). (/www/root/default_vhost/tmp for example, if /www/root/default_vhost is your DocumentRoot). N F httpd = 2.2.2 php = 5.1.4 OS = Fedora 5 Mark Sargent. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] 404 After Setting session.save_path to /tmp
nicolas figaro wrote: ... try to set it to a subdirectory of your DocumentRoot. (check httpd.conf for the DocumentRoot). (/www/root/default_vhost/tmp for example, if /www/root/default_vhost is your DocumentRoot). NO - DONT EVER DO THIS tmp/session files should not be stored in a directory that can be [potentially] read via http. .htaccess directives can be used to block access to the dir BUT I still would recommend keeping 'tmp' outside of the web root. just make sure 'tmp' is writable by the user the webserver is running as. N F httpd = 2.2.2 php = 5.1.4 OS = Fedora 5 Mark Sargent. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] 404 After Setting session.save_path to /tmp
Sounds to me like your boot scripts are using a different httpd.conf than the one you are using when you re-start it by hand. Once you accept that proposition, you're looking at some OTHER issue in the by-hand httpd.conf that is screwing up the URLs, probably mod_rewrite or messed up VirtualHosts or... Well, it could be anything, really, but it's got nothing to do with PHP at that point. http://apache.org I personally stopped using apachectl script. I always use the boot script in /etc/ (or /usr/local/etc/ for BSD folks) because then at least I know I've got the same settings as I'm going to have on re-boot. On Tue, May 16, 2006 3:58 am, Mark Sargent wrote: Hi All, I get this, Not Found The requested URL /movie1.php was not found on this server. Apache/2.2.0 (Fedora) Server at localhost Port 80 when setting session.save_path to /tmp in /usr/local/lib/php.ini. Even if I change it back, I still get that error. Restarting httpd doesn't fix it. Only a reboot, ouch! Why is this happening? Cheers. httpd = 2.2.2 php = 5.1.4 OS = Fedora 5 Mark Sargent. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] 404 After Setting session.save_path to /tmp
Jochem Maas wrote: NO - DONT EVER DO THIS tmp/session files should not be stored in a directory that can be [potentially] read via http. .htaccess directives can be used to block access to the dir BUT I still would recommend keeping 'tmp' outside of the web root. just make sure 'tmp' is writable by the user the webserver is running as. Hi All, thanx. How do I determine what user httpd is running as? Cheers. Mark Sargent -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] 404 After Setting session.save_path to /tmp
Mark Sargent wrote: Jochem Maas wrote: NO - DONT EVER DO THIS tmp/session files should not be stored in a directory that can be [potentially] read via http. .htaccess directives can be used to block access to the dir BUT I still would recommend keeping 'tmp' outside of the web root. just make sure 'tmp' is writable by the user the webserver is running as. Hi All, thanx. How do I determine what user httpd is running as? Cheers. Edit your httpd.conf file and look for user and group. -- Postgresql php tutorials http://www.designmagick.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] 404 After Setting session.save_path to /tmp
Mark Sargent wrote: Jochem Maas wrote: NO - DONT EVER DO THIS tmp/session files should not be stored in a directory that can be [potentially] read via http. .htaccess directives can be used to block access to the dir BUT I still would recommend keeping 'tmp' outside of the web root. just make sure 'tmp' is writable by the user the webserver is running as. Hi All, thanx. How do I determine what user httpd is running as? Cheers. I should say check your httpd.conf file for User and Group - they are capitalized. Alternatively: ps aux | grep httpd or ps aux | grep apache the first column is the user it's running as. or lastly, probably the quickest way, create a phpinfo page and look for User/Group -- Postgresql php tutorials http://www.designmagick.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] 404 After Setting session.save_path to /tmp
Chris wrote: I should say check your httpd.conf file for User and Group - they are capitalized. Alternatively: ps aux | grep httpd yes, did that one and see it as starting as root, then goijg to daemon. Now, if I add daemon to the root group, isn't that a security issue? Should I create a new group? Little confused? Cheers. Mark Sargent. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php