Problem with PHP5 and Apache

I heve installed apache ok.
I have done the following:

Code:
# cd /usr/ports/lang/php5

Installed

Code:
# make install clean

configured http.conf

Code:
# ee /usr/local/etc/apache22/httpd.conf

add

Code:
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps

we go to the line DirectoryIndex

and add

Code:
DirectoryIndex index.php index.htm index.html

in the apache modules loaded must olready exist

Code:
LoadModule php5_module libexec/apache22/libphp5.so

modified loader.conf

Code:
# ee /boot/loader.conf

and add

Code:
accf_http_load=”YES”

restart the service

we also installed

Code:
/usr/ports/lang/php5-extensions
/usr/ports/databases/php5-mysql
/usr/ports/www/php5-session
/usr/ports/graphics/php5-gd

We check whether we really have php service, for this we will create a file named: test.php in /usr/local/www/apache/data

edit

Code:
# ee / usr/local/www/apache22/data/test.php

In the file put the following code:

Code:
<? Php phpinfo ();?>

and I do not work and I don’t Know why. Can help me please.

Thank you very much
 
"It doesn't work" isn't very helpful and tells us nothing. Tell us exactly what happens.

Can you connect to the webserver? Is there something shown? Does it show the source code for the web page? Does it show anything at all?
 
My problem is that I can not run php5 on Apache22.
I have installed Apache22 working perfectly with .htm and .html files but do not work with .php files.

The sequence of installation I did:
Apache22, php5, mysql5 and then install:

lang/php5-extensions
databases/php5-mysql
www/php5-session
graphics/php5-gd

but when you test a file. php browser gives me error. I do not know if I explained well so I started with free 3 weeks ago.

php5 install it as I have said in previous post.

As always, thank you very much for your attention.
Greetings
 
You just regurgitated what you said before and so we still don't know what happens.
 
I forgot, the index.html file that comes by default in apache in /user/local/www/apache22/data/index.html works perfectly. I deleted that file and I uploaded to that same directory another file index.html (UTF-8) simple, but does not open, but apache does not work if it responds.The same with files .php
What I have installed is

http://www.kitesurfelmedano.com/images/pkg_info.png
 
SirDice said:
Yes, you already said that in post #1 and #3.

Yes.
I have two problems.
1) I have installed php5 and mysql60-server and apache22 do not work with index.php
2) The file .html apache default /usr/local/www/apache22/index.html if it works but I erase and upload the .html and other file server does not work.
 
manyblue said:
1) I have installed php5 and mysql60-server and apache22 do not work with index.php
2) The file .html apache default /usr/local/www/apache22/index.html if it works but I erase and upload the .html and other file server does not work.

Sir: I bought a car, filled it with gas but it doesn't work.
Dealer: What doesn't work?

Sir: I bought a car, went to the gasstation and filled it with gas but it doesn't work.
Dealer: Exactly what doesn't work?

Sir: I bought a BMW, went to a Shell station and filled it with gas but it doesn't work.

Can you tell why the car doesn't work? Me neither.
Perhaps if the Sir told the dealer the check engine light was burning the dealer might know what the problem was.


You're getting an error, don't you think it might be helpful if you actually told us what that error is?
 
Thank you very much for your attention.

I repeat to you:

My problem is:
that I set up a server with FreeBSD, OK, and running the correct operating system, install apache22 and it worked because when you enter the url of the server I get the html test page "it is working", do not try another html file that had not mounted ftp to upload the file to the server, so I figured that was right, OK.

Then install php5, then install mysql and then

lang/php5-extensions
databases/php5-mysql
www/php5-session
graphics/php5-gd

I try the server with a file .php and will not, so I try to test html and will try it out with another html file uploaded by me and not go.
Summary: apache dasen't open php html htm files this is my probleme.
Thank
 
Check the allow deny settings for /usr/local/www/apache22/data/, by default apache installs with deny from all order deny,allow I think. Set to allow from all order allow,deny...

ta Andy.
 
Non-rolling thing, I decided to reinstall everything again.

My goal is to have a server with:

Apache, mysql, php, java, phpmyadmin phpsysinfo and pure-ftpd.

I just installed freeBSD and everything is okay and now I'm installing apache22. when I have done it up and running we'll talk again for php OK for you ????.

My intention is to mount after apache mysql and then php in this order, is it OK or NO ???.

Thank you very much for your attention offcorse.

Greetings fron Canary Islans
 
New Here.
I'have installed freeBSD 8.0, apache22, mysql51-server and php5 with php5-extension, php5-mysql, php5-session and php5-gd.
When I install php5-session gave me error 1.
When I install php5-gd gave me error error no number.
Now, go with the browser and open the index.html file there and see what I keep various things that come out

http://manyblue.homeunix.com

I believe and I edit a file test.php and see what comes open

http://manyblue.homeunix.com/test.php

Finally for that in httpd.conf DirectoryIndex index.html and it only appears that I put index.php but index.htm does not appear.

I hope I explained right now.
As always a healthy
 
In regards to your error 1. I imagine you also had a statement that that port was installed.. perhaps as a requirement for another port. The pkg_info command tells you what is installed, I imagibe your php5 installation is broken. You mighjt want o delete all the ports/packages and try again


Your link to index.html shows a default apache index.html. Either you plan to use the default directories or you have not changed the settings in httpd.conf

Your link to the test.php shows that php is not running...

hope that helps
 
I'm OK with the subject, aware.

I'm doing a video with more data (rc.conf, http.conf, pkg_info ...) to upload to internet and give you the URL for to see it.
There is also another option if you want, I have remote assistance enabled sshd access so you will enter and view the teme. As you want but the choice of the video I'm making.

Thank you very much for your attention to see if I can make this work.

Greetings
 
I forgot, the video is in wmv format.
Why is that monkeys have weight. In flv weighs me twice.
If you want in any specific format, let me know.
 
Have you checked the relevant log files, like httpd-error.log and httpd-access.log? Also see what /var/log/messages says when starting Apache, MySQL, etc. We don't need endless configuration files and lists of installed packages, we need errors.
 
AndyUKG said:
Check the allow deny settings for /usr/local/www/apache22/data/, by default apache installs with deny from all order deny,allow I think. Set to allow from all order allow,deny...

ta Andy.

I understand this but I don´t anderstand where must I do it, in httpd.conf ...... line ???

Thank you very much for your atention, forgive my ignorance but I just 3 or 4 weeks with freeBSD so I'm a newbie. But my best to get it is great.
 
I don't know abouyt anyone else, but I have no idea why you atre posting videos of text files... they also don't work

Open your default httpd.conf which should be in /usr/local/etc/apache22 with any editor... I use either ee or bedit. Both of these have search functions.. search for teh etxt.. No one can tell you the line number as that would vary with changes made to the file. Make sure you restart apache (apachectl restart) to allow changes to take place
 
jasonhirsh said:
I don't know abouyt anyone else, but I have no idea why you atre posting videos of text files... they also don't work

Open your default httpd.conf which should be in /usr/local/etc/apache22 with any editor... I use either ee or bedit. Both of these have search functions.. search for teh etxt.. No one can tell you the line number as that would vary with changes made to the file. Make sure you restart apache (apachectl restart) to allow changes to take place

The videos that I send you the URLs with data, the video http://www.abogadosodaly14.com/php5_apache.avi has the httpd.conf but you must put the url directly in the navegator has 80 MB wait a moment for the discharge. The rest go well.

If you want I can send you de user and pass fot to came inside my server with putty or other program and to look it.

I have find to lines with text:

Code:
AddType text/html.shtml
DefaultType text/plain
 
open your httpd.conf with a text editor and search for the text. You must have some form of text editor or you couldn't have gotten the server operating
 
As is before, I reinstalled FreeBSD 8.0 with ports tree,
After I updated and installed the updates of the ports tree using portsnap pre-installation.
And installed after apache2.2.17_1 with httpd.conf configuration.
generating mysql5.5-server after the grant tables to mysql and change the directory owner and group data, applied to rc.conf mysql_enable = "YES".
So far so properly installed and no errors. At the moment Apache works well.

http://manyblue.homeunix.com

First, because in DirectoryIndex, index.html only appears when I installed it for first time appeared me index.htm and index.html??.

Second, the only lines that contain tex as I can find are

Code:
AddType text / html.shtml
DefaultType text / plain

As this updated php5, what would be my next step??

As always thank you very much and sorry for the inconvenience.
Greetings
 
Back
Top