PHP - APACHE SERVER PROBLEM

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
shanevella
Forum Newbie
Posts: 6
Joined: Mon Mar 08, 2004 1:03 pm

PHP - APACHE SERVER PROBLEM

Post by shanevella »

Posted: Sun Mar 07, 2004 9:51 am    Post subject: PHP Trouble
------------------------------------------------------------------------
Hello, I am from toronto and I noticed this form over the web..I am a php newbie and recently installed it on my unix box under apache. I have a script that writes data from the web to a local text file on the box. The script works fine on any other box but my own. I'm I missing something in my http.conf or php.ini file. Is there permission or variable I need to turn on the allow me to do this.

Please help

Shane
User avatar
ol4pr0
Forum Regular
Posts: 926
Joined: Thu Jan 08, 2004 11:22 am
Location: ecuador

Post by ol4pr0 »

Did you add the AddType and Addmodule \?
httpd.conf

#AddType application/x-httpd-php .php
#AddType application/x-httpd-php-source .phps


and

LoadModule php4_module modules/libphp4.so
User avatar
ol4pr0
Forum Regular
Posts: 926
Joined: Thu Jan 08, 2004 11:22 am
Location: ecuador

Post by ol4pr0 »

Did you configure php in the right way when you installed it ?
./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql=/usr/local/mysql --with-apache2=/usr/local/apache2 --with-mssql=/usr/local/freetds --enable-ftp
Take out the things you do not need.. ;-)
shanevella
Forum Newbie
Posts: 6
Joined: Mon Mar 08, 2004 1:03 pm

ADDED PHP CALLS IN APACHE

Post by shanevella »

Hello, yes i have all the calls added into my apache file..is there something i need to do to the php.ini file.

thanks

shane
shanevella
Forum Newbie
Posts: 6
Joined: Mon Mar 08, 2004 1:03 pm

MAYBE YOU HAVE A SAMPLE

Post by shanevella »

ol4pr0 wrote:Did you configure php in the right way when you installed it ?
./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql=/usr/local/mysql --with-apache2=/usr/local/apache2 --with-mssql=/usr/local/freetds --enable-ftp
Take out the things you do not need.. ;-)
Is it possibel for me to get an example of a php.ini and see a typical example of how an asp would set up php ?

I am not sure if the above line was run on the box.
User avatar
ol4pr0
Forum Regular
Posts: 926
Joined: Thu Jan 08, 2004 11:22 am
Location: ecuador

Post by ol4pr0 »

Nope ..

Code: Select all

// make a info.php

phpinfo();
http://localhost/info.php What does that do?
shanevella
Forum Newbie
Posts: 6
Joined: Mon Mar 08, 2004 1:03 pm

Whats that do

Post by shanevella »

Whats does the info.php do ?
User avatar
ol4pr0
Forum Regular
Posts: 926
Joined: Thu Jan 08, 2004 11:22 am
Location: ecuador

Post by ol4pr0 »

Yep.. what does it say ?
shanevella
Forum Newbie
Posts: 6
Joined: Mon Mar 08, 2004 1:03 pm

PHP.INFO

Post by shanevella »

It just says phpinfo(); in the browser

I must be doing something wrong...
User avatar
ol4pr0
Forum Regular
Posts: 926
Joined: Thu Jan 08, 2004 11:22 am
Location: ecuador

Post by ol4pr0 »

That means that php isnt installed correctly

What flavor of unix are you using?
And what which apache-version?
shanevella
Forum Newbie
Posts: 6
Joined: Mon Mar 08, 2004 1:03 pm

irix 6.5.14m

Post by shanevella »

i am running irix 6.5.14m.

What did I miss to make the installation incomplete ?
User avatar
ol4pr0
Forum Regular
Posts: 926
Joined: Thu Jan 08, 2004 11:22 am
Location: ecuador

Post by ol4pr0 »

1. gunzip apache_1.3.x.tar.gz
2. tar xvf apache_1.3.x.tar
3. gunzip php-x.x.x.tar.gz
4. tar xvf php-x.x.x.tar
5. cd apache_1.3.x
6. ./configure --prefix=/www
7. cd ../php-x.x.x
8. ./configure --with-mysql --with-apache=../apache_1.3.x --enable-ftp
9. make
10. make install
11. cd ../apache_1.3.x
12. ./configure --activate-module=src/modules/php4/libphp4.a
13. make
14. make install
15. cd ../php-x.x.x
16. cp php.ini-dist /usr/local/lib/php.ini
17. Edit your httpd.conf or srm.conf file and add:
AddType application/x-httpd-php .php

18. Use your normal procedure for restarting the Apache server. (You must
stop and restart the server, not just cause the server to reload by
use a HUP or USR1 signal.)
http://www.php.net i am not sure but you did miss something
User avatar
ol4pr0
Forum Regular
Posts: 926
Joined: Thu Jan 08, 2004 11:22 am
Location: ecuador

Post by ol4pr0 »

http://www.freeware.cgi.com there are some precompiled packages on that site... including apache 2 and php 4+
Post Reply