#41  
Old 22nd October 2005, 15:13
ctroyp ctroyp is offline
Senior Member
 
Join Date: Sep 2005
Posts: 292
Thanks: 3
Thanked 2 Times in 1 Post
Default

Quote:
Originally Posted by till
It looks like there are no PHP4 packages available for Fedora Core 4. So you have to use the PHP5 packages or compile and install PHP manually, which I can not recommend.
I guess I don't have a choice. I will either have to install PHP manually or use another Linux distribution. Without PHP4, I cannot get PHPBB2, nor osCommerce to run.

Can you offer any recommendations on installing PHP4 manually? Last time I used the installation instructions from PHP.net and it did not go so well. This is why I had to reinstall my Fedora server. Would it be better to install Apache seperately, then install PHP4 afterwards?
Sponsored Links
  #42  
Old 22nd October 2005, 16:02
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,741 Times in 2,575 Posts
Default

This is how you compile PHP4 (in this case it's 4.3.9) with Apache 1.3:

Code:
tar xvfz php-4.3.9.tar.gz
cd php-4.3.9
./configure --with-apxs=/path/to/apxs --enable-track-vars --enable-sockets --with-config-file-path=/path/to/php.ini --enable-ftp  --with-mysql=/usr 
make
make install
Before running configure, you can find out about all configuration options with
Code:
./configure --help
The /path/to/apxs is important, that integrates PHP into your Apache. For Apache2 it's --with-apxs2=/path/to/apxs2 (I think but I'm not quite sure right now...).

After you've compiled PHP you have to restart Apache.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
  #43  
Old 22nd October 2005, 16:09
ctroyp ctroyp is offline
Senior Member
 
Join Date: Sep 2005
Posts: 292
Thanks: 3
Thanked 2 Times in 1 Post
Default

Okay. I plan to install Apache2 first, then I will move to the php.net installation instructions which are relevant to Apache2. Only thing, I will have to change the apxs2 path.

I think I can handle this. At least this will be the first and ONLY Apache install on my system until I install ISPConfig.

Thanks for posting the example...
  #44  
Old 22nd October 2005, 19:36
ctroyp ctroyp is offline
Senior Member
 
Join Date: Sep 2005
Posts: 292
Thanks: 3
Thanked 2 Times in 1 Post
Default

It looks like PHP4 installed okay by using:
Code:
./configure --with-apxs2=/usr/sbin/apxs --enable-track-vars --enable-sockets --with-config-file-path=/etc/php.ini --enable-ftp  --with-mysql

make

make install
After installing, then restarting httpd I tried to search for my php.ini file and could not locate it. Notice above that I used "--with-config-file-path=/etc/php.ini". I couldn't find it in that location either.

I ran updatedb and searched and it only found one instance of php.ini which is in the PHP-4.4.0 directory which is was was uncompressed from the .gz file.

Any idea what happened? Should I ignore it or did I miss something that you can think of?
  #45  
Old 22nd October 2005, 19:43
ctroyp ctroyp is offline
Senior Member
 
Join Date: Sep 2005
Posts: 292
Thanks: 3
Thanked 2 Times in 1 Post
Default

BTW, for others reading this thread, I had to install http-devel to get aspx2 before configuring the PHP4 install:
Code:
yum install httpd-devel
  #46  
Old 22nd October 2005, 20:00
ctroyp ctroyp is offline
Senior Member
 
Join Date: Sep 2005
Posts: 292
Thanks: 3
Thanked 2 Times in 1 Post
Default

I entered a test .php file to my html directory and opened it in the browser and it seems o be working okay.
Here is the code for the test file test.php:
Code:
<?php

echo phpinfo();

?>
The results:

Code:
PHP Version 4.4.0

System 	                       Linux server1.strec.com 2.6.11-1.1369_FC4 #1 Thu Jun 2 22:55:56 EDT 2005 i686
Build Date 	               Oct 22 2005 12:25:30
Configure Command 	'./configure' '--with-apxs2=/usr/sbin/apxs' '--enable-track-vars' '--enable-sockets' '--with-config-file-path=/etc/php.ini' '--enable-ftp' '--with-mysql'
Server API 	               Apache 2.0 Handler
Virtual Directory Support 	disabled
Configuration File (php.ini) Path 	/etc/php.ini
PHP API 	                      20020918
PHP Extension 	           20020429
Zend Extension 	            20050606
Debug Build 	              no
Zend Memory Manager    enabled
Thread Safety 	             disabled
Registered PHP Streams 	php, http, ftp
I still don't know why I cannot find the php.ini or php.conf file???
  #47  
Old 23rd October 2005, 12:24
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,741 Times in 2,575 Posts
Default

Quote:
Originally Posted by ctroyp
I ran updatedb and searched and it only found one instance of php.ini which is in the PHP-4.4.0 directory which is was was uncompressed from the .gz file.
Copy that php.ini to /etc and customize it to your needs. php.ini isn't copied automatically to the location you specified using ./configure, it just tells PHP where to look for a php.ini. If it doesn't find one there then PHP uses default values.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
  #48  
Old 23rd October 2005, 17:19
ctroyp ctroyp is offline
Senior Member
 
Join Date: Sep 2005
Posts: 292
Thanks: 3
Thanked 2 Times in 1 Post
Default

Quote:
Originally Posted by falko
Copy that php.ini to /etc and customize it to your needs. php.ini isn't copied automatically to the location you specified using ./configure, it just tells PHP where to look for a php.ini. If it doesn't find one there then PHP uses default values.
That was easy enough. Thanks!

I have everything installed now including ISPConfig. Problem is, when I try to access www.mydomain1.com it doesn't open the site. Actually, it doesn't do anything at all; it just stays on the current page I am at--my browser home page. This is what was happening before I had to reinstall???

I can access www.mydomain1.com:81 to get to the ISPConfig panel, phpmyadmin, etc, but I cannot reach the website home page from www.mydomain1.com.

It does the same when I enter the public IP--it doesn't go anywhere even if I enter http://mywanIP:80

I did do a traceroute and it does arrive to my public WAN IP so it looks like the problem is here locally. It must be something in the main Apache install but can't figure out what???

Last edited by ctroyp; 23rd October 2005 at 17:26.
  #49  
Old 23rd October 2005, 17:42
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,046
Thanks: 826
Thanked 5,385 Times in 4,231 Posts
Default

Some questions:

When you setup the website www.mydomain1.com in ISPConfig, you used your internal IP?

When you try to reach the website from inside your network, the DNS system resolves your external router IP? The port 80 is forwared from your router to your ISPConfig server?

If this is all OK, then your router might have a spoofing protection and blocks these requests that come from Internal IP => External IP => Internal IP.

But you can try this: On your windows client PC (I assume its windows?), that is inside your network, find the hosts file.

On my PC its in:

C:\windows\system32\drivers\etc\hosts

Add a line like this:

Code:
192.168.0.55   www.mydomain1.com
where the IP is your internal IP and the domain is your domain. This will override the normal DNS resolution for this PC for the domain. Then try to reach the domain in the browser on this PC.
  #50  
Old 23rd October 2005, 18:08
ctroyp ctroyp is offline
Senior Member
 
Join Date: Sep 2005
Posts: 292
Thanks: 3
Thanked 2 Times in 1 Post
 
Default

Quote:
Originally Posted by till
Some questions:

When you setup the website www.mydomain1.com in ISPConfig, you used your internal IP?
Yes, 192.168.2.50, which is the private IP of my Fedora server.

Quote:
Originally Posted by till
When you try to reach the website from inside your network, the DNS system resolves your external router IP? The port 80 is forwared from your router to your ISPConfig server?
Port 80 is forwarded to 192.168.2.50, yes. When I try to access 192.168.2.50, the Routers WAN IP, www.mydomain1.com, or any other mix on port 80, nothing happens--it doesn't even try to load a page. When I try from another computer on my network, I get "The page cannot be displayed" message. I presume it is the same trying to access from outside my network.

Quote:
Originally Posted by till
If this is all OK, then your router might have a spoofing protection and blocks these requests that come from Internal IP => External IP => Internal IP.

But you can try this: On your windows client PC (I assume its windows?), that is inside your network, find the hosts file.

On my PC its in:

C:\windows\system32\drivers\etc\hosts

Add a line like this:

Code:
192.168.0.55   www.mydomain1.com
where the IP is your internal IP and the domain is your domain. This will override the normal DNS resolution for this PC for the domain. Then try to reach the domain in the browser on this PC.
Yes, I have a WXP client. I tried it and I still get page not found...

On my Fedora server (where ISPConfig is installed), under network configuration, what should be in my hosts file: 127.0.0.1, or 192.168.2.50? Should I do something similar that you explained for the WXP client?
Closed Thread

Bookmarks

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[error] an unkown filter was not added: PHP Arien Installation/Configuration 12 7th October 2006 14:17
PHP not working jefash General 10 28th May 2006 08:48
Cannot compile new PHP with apxs olli Installation/Configuration 11 4th March 2006 15:32
Multiple domains jysse Installation/Configuration 2 10th August 2005 11:22
Apache + PHP lola Server Operation 1 25th April 2005 13:41


All times are GMT +2. The time now is 00:54.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.