PHP Installation
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsPHP RelatedPHP Installation

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
  #1  
Old July 3rd, 2002, 01:23 PM
godmother godmother is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 8 godmother User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
php include problem

I am using RedHat7.2 Linux, and have installed the RPMs of

apache-1.3.22-6.i386.rpm

and

php-4.0.6-15.i386.rpm


However, when I am trying to run this simple script:

<html><head><title>PHP Test</title></head>
<body>
<?php phpinfo(); ?>
</body></html>


I got the following error message showing in the Mozilla browser:

Warning: Failed opening '/home/toto/public_html/hello.php' for inclusion (include_path='.:/php/includes:/usr/share/php') in Unknown on line 0


What is wrong? Can someone experienced help, please? Thanks in advance.

Reply With Quote
  #2  
Old July 3rd, 2002, 01:33 PM
Matt Matt is offline
Moderator
Codewalkers Specialist (4000 - 4499 posts)
 
Join Date: Apr 2007
Location: Florida
Posts: 4,158 Matt User rank is Private First Class (20 - 50 Reputation Level)Matt User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 4 h 10 m 23 sec
Reputation Power: 6
RE: php include problem

Try checking out the permissions on the '/home/toto/public_html/' dir. Make sure whatever user the webserver is running as has read and execute permissions....

Reply With Quote
  #3  
Old July 4th, 2002, 04:37 AM
godmother godmother is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 8 godmother User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
RE: php include problem

I don't think that is the problem. Because this works:

<html><head><title>PHP Test</title></head>
<body>
<?php echo "hello world"; ?>
</body></html>


I suspect it is because php server can't find "phpinfo()". But I don't know how to fix it.

What do you think?

Reply With Quote
  #4  
Old July 4th, 2002, 06:42 AM
godmother godmother is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 8 godmother User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
RE: php include problem

I think you are right. I got the program:


<html><head><title>PHP Test</title></head>
<body>
<?php phpinfo(); ?>
</body></html>

work.


However, I still can't get this work:

<html><head><title>PHP Test</title></head>
<body>
<?php echo $_SERVER["HTTP_USER_AGENT"]; ?>
</body></html>

Do you know why?

Reply With Quote
  #5  
Old July 4th, 2002, 07:48 AM
CmdrDats CmdrDats is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: <br><img src='http://www.dats.co.za/icon.gif'>
Posts: 269 CmdrDats User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
Send a message via ICQ to CmdrDats Send a message via AIM to CmdrDats Send a message via Yahoo to CmdrDats
RE: php include problem

What version of php are you running?

try :

print_r($HTTP_SERVER_VARS);

and see what that gives you?

Reply With Quote
  #6  
Old July 4th, 2002, 11:39 AM
EvilivE EvilivE is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Milwaukee, WI USA
Posts: 291 EvilivE User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
Send a message via Yahoo to EvilivE
RE: php include problem

Server variables: $_SERVER
Note: Introduced in 4.1.0. In earlier versions, use $HTTP_SERVER_VARS.

http://www.php.net/manual/en/reserv...ariables.server

Reply With Quote
  #7  
Old July 5th, 2002, 06:23 AM
godmother godmother is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 8 godmother User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
RE: php include problem

Since I installed php-4.0.6-15.i386.rpm, the version of php is 4.0.6-15 .


print_r($HTTP_SERVER_VARS); gives:


Array ( [DOCUMENT_ROOT] => /home/toto/public_html [HTTP_ACCEPT] => text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,video/x-mng,image/png,image/jpeg,image/gif;q=0.2,text/css,*/*;q=0.1 [HTTP_ACCEPT_CHARSET] => ISO-8859-1, utf-8;q=0.66, *;q=0.66 [HTTP_ACCEPT_ENCODING] => gzip, deflate, compress;q=0.9 [HTTP_ACCEPT_LANGUAGE] => en-us, en;q=0.50 [HTTP_CACHE_CONTROL] => max-age=0 [HTTP_CONNECTION] => keep-alive [HTTP_HOST] => localhost [HTTP_KEEP_ALIVE] => 300 [HTTP_USER_AGENT] => Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.9) Gecko/20020513 [PATH] => /sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin [REMOTE_ADDR] => 127.0.0.1 [REMOTE_PORT] => 1394 [SCRIPT_FILENAME] => /home/toto/public_html/hello.php [SERVER_ADDR] => 127.0.0.1 [SERVER_ADMIN] => root@localhost [SERVER_NAME] => localhost [SERVER_PORT] => 80 [SERVER_SIGNATURE] =>
Apache/1.3.22 Server at localhost Port 80
[SERVER_SOFTWARE] => Apache/1.3.22 (Unix) (Red-Hat/Linux) PHP/4.0.6 [GATEWAY_INTERFACE] => CGI/1.1 [SERVER_PROTOCOL] => HTTP/1.1 [REQUEST_METHOD] => GET [QUERY_STRING] => [REQUEST_URI] => /hello.php [SCRIPT_NAME] => /hello.php [PATH_TRANSLATED] => /home/toto/public_html/hello.php [PHP_SELF] => /hello.php [argv] => Array ( ) [argc] => 0 )

Reply With Quote
  #8  
Old July 5th, 2002, 06:27 AM
godmother godmother is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 8 godmother User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
RE: php include problem

EvilivE is right. Thank you.

And thanks to all of you, who concerned.

Reply With Quote
  #9  
Old July 5th, 2002, 06:30 AM
godmother godmother is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 8 godmother User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
RE: php include problem

By the way, is there a way to find out what I should put for the "include_path" in php.ini?

Reply With Quote
Reply

Viewing: Codewalkers ForumsPHP RelatedPHP Installation > php include problem


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

 Free IT White Papers!
 
Accelerating Trading Partner Performance
One in five. That's how many partner transactions have at least one error. That is an amazing statistic, particularly given the extraordinary leaps in innovation across the global supply chain during the past two decades. Download this white paper to learn more.

 
Competing on Analytics
This Tech Analysis is designed to help identify characteristics shared by analytics competitors, and includes information about 32 organizations that have made a commitment to quantitative, fact-based analysis.

 
Cost Effective Scaling with Virtualization and Coyote Point Systems
An overview of the industry trend toward virtualization, how server consolidation has increased the importance of application uptime and the steps being taken to integrate load balancing technology with virtualized servers.

 
Five Checkpoints to Implementing IP Telephony
Implementation planning for IP PBX software and IP telephony has become vital as businesses replace discontinued legacy PBX phone systems. This informative whitepaper outlines five &quot;checkpoints&quot; for any implementation plan that will help make IP communications a successful proposition.

 
Hosted Email Security: Staying Ahead of New Threats
In the last two years, email has become a fierce battleground between the nefarious forces of spam and malware, and the heroes of messaging protection. The spam volumes increased alarmingly every month, bringing clever new forms of phishing and virus propagation attacks.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway