DeveloperSide.NET Forums
December 09, 2019, 04:46:06 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: php4.4.2 and apache2.2?  (Read 33573 times)
0 Members and 2 Guests are viewing this topic.
jlct
Member
*
Posts: 13


View Profile
« on: May 10, 2006, 10:50:59 AM »

Hi
Im having problems with the two parts.
The Apache2.2, does it have compatibility support for PHP4.4.2? or vice versa?

I get a horrendeus error when running phpinfo() being

    PHP Warning:  Unknown(/usr/local/apache2/htdocs/php/phpinfo.php): failed to open stream: Permission denied in Unknown on line 0, referer:
http://localhost/php/
[/list]
    PHP Warning:  (null)(): Failed opening '/usr/local/apache2/htdocs/php/phpinfo.php' for inclusion (include_path='.:/usr/local/php/lib/php') in Unknown on line 0, referer:
http://localhost/php/[/list]

Is there anyway to overcome this? Thanks in advance, Jason
Logged
admin
Administrator
Master of All Subjects
*****
Posts: 3272


View Profile WWW Email
« Reply #1 on: May 10, 2006, 03:56:22 PM »

Is this under Linux?

Have you given the php/ dir permissions under httpd.conf?

Have you set the proper file permissions for phpinfo.php?
Logged

DeveloperSide.NET
Advanced PHP and MySQL Solutions for your Web Design and Development needs with Web.Developer Server Suite.
jlct
Member
*
Posts: 13


View Profile
« Reply #2 on: May 11, 2006, 03:00:22 AM »

oh, yes.
I forgot to mention, Fedora Core 5, x86-64

edit: I should also mention, it does it on Apache 2.0.54 as well

Thanks
Jason
Logged
admin
Administrator
Master of All Subjects
*****
Posts: 3272


View Profile WWW Email
« Reply #3 on: May 11, 2006, 03:25:38 PM »

Sounds like a permission problem. Why dont you chmod it to 777 and chown it to root:root -- if that helps, move the permissions to something more appropriate.
Logged

DeveloperSide.NET
Advanced PHP and MySQL Solutions for your Web Design and Development needs with Web.Developer Server Suite.
jlct
Member
*
Posts: 13


View Profile
« Reply #4 on: May 12, 2006, 11:10:37 AM »

Hi
Thanks for the help but it doesnt seem to work for me.
changing to 777 and chown to root, well its already under root ownership.
It does not work.
It still gives the same error
any more suggestions?
thanks
Jason
Logged
admin
Administrator
Master of All Subjects
*****
Posts: 3272


View Profile WWW Email
« Reply #5 on: May 12, 2006, 04:06:46 PM »

And the php dir?
Logged

DeveloperSide.NET
Advanced PHP and MySQL Solutions for your Web Design and Development needs with Web.Developer Server Suite.
jlct
Member
*
Posts: 13


View Profile
« Reply #6 on: May 13, 2006, 11:39:46 PM »

Changing to 777 the /usr/local/apache2, /usr/local/lib/php, /usr/local/include/php still has the problem. Also, I changed ti 32bit so I think this problem is realted to misconfiguration.

It also gives the same error on Apache 2.0.58 as well as Apache 2.2
The php works perfectly from the command line though, just not from Apache


So I am still lost here
Logged
admin
Administrator
Master of All Subjects
*****
Posts: 3272


View Profile WWW Email
« Reply #7 on: May 14, 2006, 07:49:40 PM »

The file phpinfo.php is under /usr/local/apache2/htdocs/php/phpinfo.php ?

And you alias that to /php under httpd.conf ? All the permissions given and all the dirs and files are correct ?

chmod/chown will only set the specifed dir/file -- not sub dirs (without an -R).
Logged

DeveloperSide.NET
Advanced PHP and MySQL Solutions for your Web Design and Development needs with Web.Developer Server Suite.
jlct
Member
*
Posts: 13


View Profile
« Reply #8 on: May 15, 2006, 04:32:53 AM »

Hi
I actually went playing with the chmod and changed file to 777(havent tried other settings yet) and it works if it is only on THE file (im used to windows where changing a folder, you can change its subdirs as well) so Im thinking, is there someway of granting php/apache whichever is appropriate access to the files by assigning it to a user? Thanks
Logged
admin
Administrator
Master of All Subjects
*****
Posts: 3272


View Profile WWW Email
« Reply #9 on: May 15, 2006, 01:36:43 PM »

The main Apache process runs as root (and the forked processes run as nobody or www), so any user/group will do for the dirs and files your are serving. Actually, its best to set weboot as root, so if a sub process gets compromised, none of the files will be accessible -- and if the main process gets compromised, well, its already root and there is nothing you can do.

chown -R root:root /usr/local/webroot
chmod -R 644 /usr/local/webroot

Would set everything up, all files and subdir of /usr/local/webroot
Logged

DeveloperSide.NET
Advanced PHP and MySQL Solutions for your Web Design and Development needs with Web.Developer Server Suite.
jlct
Member
*
Posts: 13


View Profile
« Reply #10 on: May 16, 2006, 08:04:02 AM »

Hi
Thanks I will do that,
Also, how do I get apache2.2 to start on boot (as in a service/daemon)?
Thank would be nice too
Your support has been much appreciated
Once again, Thanks

Edit::
Im probably the biggest noob alive here, I was installing some PEAR modules for PHP and got the following:
Quote

Warning: main(Console/Getopt.php): failed to open stream: No such file or directory in System.php on line 27

Fatal error: main(): Failed opening required 'Console/Getopt.php' (include_path='/usr/local/lib/php') in /usr/local/lib/php/System.php on line 27


The file listed obviously does not exist and I found during make that it came up with this:
Quote
[PEAR] Archive_Tar: bad md5sum for file tar.php

or something along those lines
This error repeats itself for the tar module, console:getopt module and the HTMLTemplateIT module.

Is there anyway of fixing it? Thanks
Logged
admin
Administrator
Master of All Subjects
*****
Posts: 3272


View Profile WWW Email
« Reply #11 on: May 16, 2006, 12:39:48 PM »

Re-download the corrupted file?
Logged

DeveloperSide.NET
Advanced PHP and MySQL Solutions for your Web Design and Development needs with Web.Developer Server Suite.
jlct
Member
*
Posts: 13


View Profile
« Reply #12 on: May 17, 2006, 11:13:12 AM »

Hi
Ok, thanks, that worked out expected
Now how do I get apache2 to start up as a service upon boot?
Thanks
Jason
Logged
admin
Administrator
Master of All Subjects
*****
Posts: 3272


View Profile WWW Email
« Reply #13 on: May 18, 2006, 03:40:05 AM »

That can depend on your distro...
http://www.google.com/search?&q=linux+start+apache+OR+httpd+rc.d
Logged

DeveloperSide.NET
Advanced PHP and MySQL Solutions for your Web Design and Development needs with Web.Developer Server Suite.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.9 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!