Php5 site is not working..
Hey guys.. Im having a problem in the last few days.. i was gonna use it a register.php page when I saw that my website wasn't working.. that happened suddenly .. ( I can't have access to phpmyadmin's page nor any other .php page)
I already installed apache2 (apt-get install apache2) and php5 (apt-get install php5) and I also installed MySQL Service and the necessary stuff to run a website and a server.
What could've happened?
Re: Php5 site is not working..
This is a general server related question, not pw related, hence this is the wrong place to post...
And apache sucks. lighttpd + php fastcgi for the win.
But if you want to stick with slow apache, check if mod_php is activated and has correct paths to .so since I guess you don't use any form of cgi.
Re: Php5 site is not working..
Quote:
Originally Posted by
haiguri
Hey guys.. Im having a problem in the last few days.. i was gonna use it a register.php page when I saw that my website wasn't working.. that happened suddenly .. ( I can't have access to phpmyadmin's page nor any other .php page)
I already installed apache2 (apt-get install apache2) and php5 (apt-get install php5) and I also installed MySQL Service and the necessary stuff to run a website and a server.
What could've happened?
#/etc/init.d/httpd start
#/etc/init.d/mysqld start
Re: Php5 site is not working..
Quote:
Originally Posted by
hrace009
#/etc/init.d/httpd start
#/etc/init.d/mysqld start
I can't find any of those files in the init.d folder, there's only mysql .
So I runned sudo /etc/init.d/apache2 start and an error appeared:
* Starting web server apache2 apache2: Syntax error on line 203 of /etc/apache2/apache2.conf: Syntax error on line 1 of /etc/apache2/mods-enabled/php5.load: Cannot load /usr/lib/apache2/modules/libphp5.so into server: /usr/lib/apache2/modules/libphp5.so: symbol xmlTextReaderSchemaValidate, version LIBXML2_2.6.20 not defined in file libxml2.so.2 with link time reference
Action 'start' failed.
The Apache error log may have more information.
That's what it's in the .log file:
Quote:
[Mon Dec 10 01:40:02 2012] [notice] child pid 6617 exit signal Segmentation fault (11)
[Mon Dec 10 01:55:37 2012] [notice] child pid 6630 exit signal Segmentation fault (11)
[Mon Dec 10 01:55:41 2012] [error] [client 218.186.9.239] File does not exist: /var/www/favicon.ico
[Mon Dec 10 01:55:43 2012] [notice] child pid 6625 exit signal Segmentation fault (11)
[Mon Dec 10 01:55:43 2012] [notice] child pid 6626 exit signal Segmentation fault (11)
[Mon Dec 10 01:59:38 2012] [notice] child pid 6627 exit signal Segmentation fault (11)
[Mon Dec 10 02:22:40 2012] [notice] child pid 6628 exit signal Segmentation fault (11)
[Mon Dec 10 02:24:01 2012] [notice] child pid 7485 exit signal Segmentation fault (11)
[Mon Dec 10 02:24:04 2012] [error] [client 218.186.9.239] File does not exist: /var/www/favicon.ico
[Mon Dec 10 02:24:08 2012] [notice] child pid 7486 exit signal Segmentation fault (11)
[Mon Dec 10 02:24:09 2012] [notice] child pid 7487 exit signal Segmentation fault (11)
[Mon Dec 10 02:24:13 2012] [notice] child pid 7493 exit signal Segmentation fault (11)
[Mon Dec 10 07:42:11 2012] [notice] caught SIGTERM, shutting down
[Mon Dec 10 07:42:11 2012] [notice] seg fault or similar nasty error detected in the parent process
@Swoosh91
I know that's this is the wrong section, but I couldn't find a proper section for that
Well, after some hours searching, I finally found the solution (reinstalling php5). It actually worked, but every page now is not appearing as a page, but they're being downloaded instead. What's the problem?
Re: Php5 site is not working..
Quote:
Originally Posted by
haiguri
Well, after some hours searching, I finally found the solution (reinstalling php5). It actually worked, but every page now is not appearing as a page, but they're being downloaded instead. What's the problem?
> > > LMGTFY < < <
Your problem could either be chmod or you simply need to restart apache after the reinstall of php5. Of course it could be other things but these are the most common for your issue.
In the end it depends what you're trying to run with your PHP script. You may require a php mod or apache mod. You might consider trying jetty, jakarta / tomcat, or as Swoosh suggested lighttpd instead of just plain apache.
Re: Php5 site is not working..
Quote:
Originally Posted by
blackb0xx
> > > LMGTFY < < <
Your problem could either be chmod or you simply need to restart apache after the reinstall of php5. Of course it could be other things but these are the most common for your issue.
In the end it depends what you're trying to run with your PHP script. You may require a php mod or apache mod. You might consider trying jetty, jakarta / tomcat, or as Swoosh suggested lighttpd instead of just plain apache.
I already tried that, man :/.. can't you help me by Team Viewer?
Re: Php5 site is not working..
Can you be a little bit more specific about what you tried?
First off lets do some tests...
Code:
apt-get update
apt-get install openssh-server apache2 php5 php5-gd php5-mysql php5-pgsql php5-imap php-pear php-auth php5-ming php5-xmlrpc php5-xsl php5-curl php5-mcrypt libapache2-mod-php5 php5-mcrypt php5-mysql
If that command doesn't run for you for some reason you can always break it up like so....
Code:
apt-get update
apt-get install openssh-server
apt-get install apache2
apt-get install php5
apt-get install php5-gd
apt-get install php5mysql
etc. etc.
One of the major packages I can think of that might be causing your error is "libapache2-mod-php5" so you'll want to run this line in particular, it is included in the script above though if you look closely...
Code:
apt-get install libapache2-mod-php5
When doing anything where you change a service it is best to restart it. In this case it would be apache2 so we run...
Code:
/etc/init.d/apache2 restart
Don't forget you either need to be logged in as root, or use sudo command... so if you're not logged in as root it would be...
Code:
sudo /etc/init.d/apache2 restart
One resource you may want to make good use of, especially if you're using Ubuntu is the Ubuntu Forums, in fact someone on there had this same issue...
That should get your issue solved and provide you with a basic understanding of what might have gone wrong but again it all depends what your php script was trying to do in the first place.
Re: Php5 site is not working..
Okay, everything's been ran perfectly with no errors, but...
look at what comes out when I restart the apache2:
Quote:
root@host-virtual-machine:~# /etc/init.d/apache2 restart
apache2: Syntax error on line 203 of /etc/apache2/apache2.conf: Syntax error on line 1 of /etc/apache2/mods-enabled/php5.load: Cannot load /usr/lib/apache2/modules/libphp5.so into server: /usr/lib/apache2/modules/libphp5.so: symbol xmlTextReaderSchemaValidate, version LIBXML2_2.6.20 not defined in file libxml2.so.2 with link time reference
Action 'configtest' failed.
The Apache error log may have more information.
...fail!
root@host-virtual-machine:~# apache2: Syntax error on line 203 of /etc/apache2/apache2.conf: Syntax error on line 1 of /etc/apache2/mods-enabled/php5.load: Cannot load /usr/lib/apache2/modules/libphp5.so into server: /usr/lib/apache2/modules/libphp5.so: symbol xmlTextReaderSchemaValidate, version LIBXML2_2.6.20 not defined in file libxml2.so.2 with link time reference
Action 'configtest' failed.
The Apache error log may have more information.
...fail!
Re: Php5 site is not working..
Those are all referring to lib files except for a conf file. Make sure to install ia32-libs with apt-get. It would be wise to tell us what tutorial you are following as it more than likely will tell you what lib files are needed. Your error mentions specific lib files that are needed but your tutorial will tell you more. You'll need different lib files depending on if it's 64 bit machine and OS you're using or 32 bit. Please post what you've tried and what guide you're using. Good luck.
Re: Php5 site is not working..
Quote:
Originally Posted by
blackb0xx
Those are all referring to lib files except for a conf file. Make sure to install ia32-libs with apt-get. It would be wise to tell us what tutorial you are following as it more than likely will tell you what lib files are needed. Your error mentions specific lib files that are needed but your tutorial will tell you more. You'll need different lib files depending on if it's 64 bit machine and OS you're using or 32 bit. Please post what you've tried and what guide you're using. Good luck.
I'm not following any tutorial, I'm just trying to have my database (phpmyadmin) on the dedicated server. The PWServer is already there, but I need the database working properly to create account in the game. (otherwise there'll be the auth error, that's why I need my website)
I have an Ubuntu 10.04 - 32-BIT.
I don't know what exactly happened, but the website was working fine just before I transferred the PWServer to the dedicated server and I also moved some .lib files to the dedicated server.. I believe that that was the reason why apache isn't working
Re: Php5 site is not working..
Sounds to me like you overwrote the lib files you need with incorrect ones. Any reason why you're using 32 bit Ubuntu instead of 64 bit? Sounds like you're using a release from RZ, that one in particular you will notice issues because it is 32 bit and it sounds like you're copying 64 bit lib files when it should be the other way 'round.
Transferring the PW files to the dedicated server would not cause that issue but moving / copying lib files will.
Re: Php5 site is not working..
I bought the 32 bit Ubuntu version.. yea, in order to run the PWServer I needed some lib files.. so I tried to download it..
What I am suppose to do now?
Re: Php5 site is not working..
First things first and from now on always backup your files before changing anything. Next you'll want those lib files, do a search for 1.4.5 tutorial Ronny style, that pack will have the lib files you need and if it doesn't you'll have instructions for replacing them with what you do need. Do that then let me know how it goes and what errors if any that you get.
Re: Php5 site is not working..
COMMAND~: cp -f /PWServer/.setup/lib/libstdc++.so.5 /usr/lib/libstdc++.so.5
COMMAND~: cp -f /PWServer/.setup/lib/libpcre.so.0 /usr/lib/libpcre.so.0
COMMAND~: cp -f /PWServer/.setup/lib/libtask.so /usr/lib/libtask.so
According to his tutorial, that's what I need to type for the 32bits Ubuntu, right?
I also need to remove completely the Apache2/php5 from my server.
Re: Php5 site is not working..
If you copied the files from one machine to another, double-check the permissions on all the files in PWServer. They should be 755 in order for the server to function properly. Often after copying files permission level or ownership would need to be changed. (Been there, done that, got the t-shirt. =P )
Just a thought.
Re: Php5 site is not working..
Quote:
Originally Posted by
haiguri
COMMAND~: cp -f /PWServer/.setup/lib/libstdc++.so.5 /usr/lib/libstdc++.so.5
COMMAND~: cp -f /PWServer/.setup/lib/libpcre.so.0 /usr/lib/libpcre.so.0
COMMAND~: cp -f /PWServer/.setup/lib/libtask.so /usr/lib/libtask.so
According to his tutorial, that's what I need to type for the 32bits Ubuntu, right?
I also need to remove completely the Apache2/php5 from my server.
Correct, those are the lib files I was talking about but you do not need to delete php5 or apache2. I would say that reinstalling them may not be a bad idea though since you've been messing with files now.
Like SylenThunder said make sure to chmod to 0755. If you extract the files from a compressed archive on the server it should maintain the permissions it had. Make sure to chmod -R 0755 /PWServer like the instructions say.
It looks like you're making good progress though, keep it up!