I've suddenly started having a problem with Apache2 and PHP after a recent update. Apache won't start, giving me the following error:
apache2: Syntax error on line 227 of /etc/apache2/apache2.conf: Cannot load mods-enabled/mod-php5.so into server: /etc/apache2/mods-enabled/mod-php5.so: cannot open shared object file: No such file or directory
I've followed advice on a couple sites, leading me to do the following things:
In apache2.conf:
Changed /etc/apache2/modules to /etc/apache2/mods-enabled
Changing mod-php5.so to mod-php55.sp
Reinstall libapache2-mod-php5
ldconfig
whereis mod-php5.so (no results, also tried mod-php55.so and mod-php.so)
WHere is mod-php*.so located, and why is Apache suddenly not finding it?
EDIT: Sorry, forgot to say I'm running Linux Mint 17 x64.
Related
On MacOSX when using MAMP GUI to start, MySQL starts but Apache doesn't start and gives the following error
Apache couldn't be started. Please check your MAMP installation and configuration
running sudo /Applications/MAMP/Library/bin/apachectl start gives
httpd: Syntax error on line 135 of /Applications/MAMP/conf/apache/httpd.conf: Cannot load /Applications/MAMP/bin/php/php7.0.10/modules/libphp7.so into server: dlopen(/Applications/MAMP/bin/php/php7.0.10/modules/libphp7.so, 10): Library not loaded: /Applications/MAMP/Library/lib/libcrypto.1.0.0.dylib\n Referenced from: /Applications/MAMP/bin/php/php7.0.10/modules/libphp7.so\n Reason: image not found
Additional info
- I've downloaded PHP 7.0.10 from https://www.mamp.info/en/downloads/
- I'm using MAMP not MAMP Pro
EDIT:
I've tried
Renaming the file “envvars” located in /Applications/MAMP/Library/bin into “_envvars”
Changing ports
I was attempting to set-up my local environment for LAMP on my desktop with Guy Nathan's Installing LAMP stack on OSX Mavericks with Homebrew updated guide. Since I'm experienced with RoR, I proceeded with homebrews but along the way, evidently, I misconfigured the /usr/local/etc/apache2/2.2/httpd.conf file because whenever I try to start the apache server with sudo apachectl start or test with sudo apachectl configtest, the following error is invariably returned:
httpd: Syntax error on line 482 of /usr/local/etc/apache2/2.2/httpd.conf: Could not open configuration file /Sites/httpd-vhosts.conf: No such file or directory
Due to the length of the 'http.conf' file, I've created a gist of my 'httpd.conf file' for review.
At this point, I would just like to reset my 'httpd.conf' file, or whatever is necessary so I can properly configure my local environment for LAMP. I've tried other solutions involving a reversion of /private/etc/apache2/httpd.conf.pre-update but was unable to effect. Thank you.
It is failing to start because the httpd.conf file is specifying an include of /Sites/httpd-vhosts.conf which doesn't exist.
Either comment out line 482 by putting a # at the beginning of the line, or create an empty /Sites/httpd-vhosts.conf file so it can be included. If its empty it won't have any effect.
Here are some examples of what would typically go in that file.
Hi I have tryed to install zend framerwork on Ubuntu 14.04.
in installing steps I have changed
/etc/php5/apache2/php.ini
file where I replace
;include_path = ".:/usr/share/php"
TO
include_path = ".:/home/ZendFramework-1.12.3/library"
After than my other php project stoped working.
I got this Error
Warning: require_once(view/display/home .php):
failed to open stream: No such file or directory
in /var/www/html/helix/view/View.php on line 33
Fatal error: require_once():
Failed opening required 'view/display/home .php'
(include_path='.:/usr/share/php:/usr/share/pear/')
in /var/www/html/helix/view/View.php on line 33
Please Help me
You have to restart your php process, or in your case, likely apache -
$ sudo service apache2 restart
In other cases, it could be :
$ sudo service php5-fpm restart
Or I've even seen
$sudo service httpd restart
In both cases, it seams that you have a typo, you try to include a file named:
view/display/home .php
where it should probably read:
view/display/home.php
without the extra space... between home and .php
Check your apache error logs to see if you have another error in your php.ini file. I had an error somewhere else, and apache was pretty much ignoring my ini file after encountering the error.
I know this is my fault. What I did was upgrade my php 5.3 to the latest php5.5. But due to some important reason I need to roll back to my previous php version which is 5.3.10. Upgrading to the latest php5 gave me no sweat but when I roll back it gave me this error:
$ sudo service apache2 start
* Starting web server apache2 apache2: Syntax error on line 210 of /etc/apache2/apache2.conf: Syntax error on line 2 of /etc/apache2/mods-enabled/access_compat.load:
Cannot load /usr/lib/apache2/modules/mod_access_compat.so into server: /usr/lib/apache2/modules/mod_access_compat.so: cannot open shared object file: No such file or directory
Action 'start' failed.
The Apache error log may have more information.
Please help anyone.
Comment line 2 in /etc/apache2/mods-enabled/access_compat.load and all other include problems, 3 for me
I had this problem when downgraded apache from 2.4 to 2.2, so i had to disable the modules there enabled in the 2.4 installation.
a2dismod <module-name>
I installed apache and php, now to use the ZendDebugger I and modified the php.ini how it was described.
When I start apache, I get following error message in the log:
Failed loading /usr/lib/php5/zend/ZendDebugger.so: libssl.so.0.9.8: cannot open shared object file: No such file or directory
I checked and there is only libssl.so.1.0.0 available on my machine.
Can anyone tell me how to proceed to get ZendDebugger working.
Thanks in advance,
max
Obviously the libssl.so.0.9.8 was missing.
sudo apt-get install libssl0.9.8
and a restart did the trick