Welcome to Linux Forums! With a comprehensive Linux Forum, information on various types of Linux software and many Linux Reviews articles, we have all the knowledge you need a click away, or accessible via our knowledgeable members.
Find the answer to your Linux question:
New to Linux Forums? Register here for free!
    Linux Forums > GNU Linux Zone > Servers > PHP Problem

Forgot Password?
 Servers   Anything server related, Apache, MySQL, Samba, server security, sendmail, exim, etc

Site Navigation
Linux Articles
Linux Forums
Linux Downloads
Linux Hosting
Free Magazines
Job Board
IRC Chat
RSS Feeds


Linux Forum Topics
Linux Forums
Your Distro
Linux Resources
GNU Linux Zone
The Community
Reply
 
Thread Tools Display Modes
Old 09-04-2006   #1 (permalink)
Just Joined!
 
Join Date: Aug 2006
Posts: 9
PHP Problem

Hi all.

I've been following the article "Setting Up a Server" Contributed by Davidlohr Bueso to this forum. I am totally new to Linux and trying to educate myself in its wonders. I am Using Debian and have successfully installed Apache2/2.0.54 and my simple website is up and running. I followed the instructions Installing and Configuring MySQL - no error messages there either!

However, when completing the procedures for "installing and Configuring PHP", all appeared to go well (I installed PHP4). However, when it came to running the recommended test document in my browser (/var/www/test.php which contains the single line):

<? phpinfo(); ?>

the following was returned:

"Warning: Unknown(/var/www/test.php): failed to open stream: Permission denied in Unknown on line 0

Warning: (null)(): Failed opening '/var/www/test.php' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in Unknown on line 0"


Looking in the Apache2 error log, there is a whole page of messages refering to this action, The first two lines are:

PHP Warning: Function registration failed - duplicate name - mysql_connect in Unknown on line 0
PHP Warning: Function registration failed - duplicate name - mysql_pconnect in Unknown on line 0


... and so on

I have tried to understand the problem but all that I have read so far has not provided me with any clue.

Can anyone help?

Thanks

Tom
g4bkf is offline  


Reply With Quote
Old 09-05-2006   #2 (permalink)
Just Joined!
 
Join Date: Sep 2006
Posts: 5
well I'm not sure if this applies to your PHP version but I know 5 has this feature where you have to put <?php for the script to work correctly. This can be modified on the php.ini file though but I would recomend just using <?php all the time for security. Also it is complaining about permissions...are you sure your web server has access to that file? Can you write a basic html file and see it.

example

<head>HELLO WORLD</head> save at index.htm and see if you can see it in the browser.

If you can you have the web server working fine but issues with PHP. Make sure you add support for your version of php in your apache httd.conf file as well. tries this out if no luck will post more.
thesheff17 is offline   Reply With Quote
Old 09-05-2006   #3 (permalink)
Just Joined!
 
Join Date: Aug 2006
Posts: 9
Hi and thanks for the advice.

Apahe2 is running ok as an HTML webserver. I have a simple website hosted on it and it is accessible from local (LAN) machines and the Internet.

I tried <?php in my test.php file, but to no avail.

As far as support for my version (4) of php in my apache2 httd.conf file, that file only contains the text:

# This is here for backwards compatability reasons and to support
# installing 3rd party modules directly via apxs2, rather than
# through the /etc/apache2/mods-{available,enabled} mechanism.
#
#LoadModule mod_placeholder /usr/lib/apache2/modules/mod_placeholder.so

I have a file in my mod's-enabled folder (php4.load) which contains:

LoadModule php4_module /usr/lib/apache2/modules/libphp4.so

The path is correctly directed at the locationof libphp4.so


So it would seem that there is a php issue. Any suggestions as to testing whether PHP is enabled other than the orifinal test file would be appreciated
g4bkf is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting 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 Off
Pingbacks are Off
Refbacks are Off

Free Magazines
Run Your Own Web Server Using Linux & Apache - Free 191 Page Preview
Learn about everything you'll need to build and maintain your Linux servers, and to deploy Web applications to them.
subscribe
Open Source Security Myths Dispelled
Dispel the five major myths surrounding Open Source Security and gain the tools necessary to make a truly informed decision for your IT organization
subscribe
InformationWeek
InformationWeek is the only newsweekly you'll need to stay on top of the latest developments in information technology.
subscribe



All times are GMT. The time now is 10:46 AM.






© 2000 - 2009 - All Rights Reserved - Property of  MAS Media

Content Relevant URLs by vBSEO 3.3.0 RC2