this is probably something simple but I have a problem with my local server. I set up a local server for building websites about 3 months ago and it worked fine until last evening the php will show as text instead of being executed by apache. I'm on a Mac. When I type:
$ apachectl -S
in terminal I get this error:
httpd: Syntax error on line 173 of /usr/local/etc/httpd/httpd.conf: Cannot load /usr/local/Cellar/php56/5.6.32_8/libexec/apache2/libphp5.so into server: dlopen(/usr/local/Cellar/php56/5.6.32_8/libexec/apache2/libphp5.so, 10): image not found
I have not been able to find a solution. Any help is appreciated.
Related
I have problem with all version of bitnami. When I shut down or restart my pc, WAMP can't connect with MySQL. I closed skype but still have the same problem. I also changed to XAMPP but the problem still there when I shut down. In the end, I revert to bitnami and I still have the same problem. I've watched all the troubleshooting video and do something like changing port to 3307 but I can't resolve this problem.
This is the message I get from bitnami:
Stderr:
Unknown error starting mysql
Starting Apache Web Server...
Exit code: 1
Stdout:
Stderr:
Unknown error starting apache
could you try this?
1.- Go to the control panel->Administrative Tools -> Services,
2.- find web Deployment Service and stop it.
3.- Start the apache server in bitnami
You can check if the port it's in use with the console,
1.- click the Start button,
2.- type cmd
3.- right-click “Command Prompt” when it shows up in the search results. Click “Run as administrator.”
When the console appears copy the next command:
netstat -ab
spent a few hours racking my brains, trying to fix this but I fear I'm not getting anywhere.
I set up localhost as a lamp environment yesterday on Ubuntu 15.10, everything was running fine and I made some good progress. Now I restart this morning and my project which I know I left working is now giving me
Fatal error: Call to undefined function mysqli_connect() in /var/www/html/includes/mysql.php on line 6
Now I know that there isn't a mistake in the code and mysql and apache is definately running.
elliot#elliotsLaptop:~$ mysqladmin -u root -p status
Enter password:
Uptime: 3588 Threads: 1 Questions: 19 Slow queries: 0 Opens: 69
Flush tables: 1 Open tables: 62 Queries per second avg: 0.005.
elliot#elliotsLaptop:~$ service apache2 status
● apache2.service - LSB: Apache2 web server
Loaded: loaded (/etc/init.d/apache2)
Active: active (running) since Wed 2016-04-20 09:02:18 BST; 1h 1min ago
Also I made no changed to the PHP.ini file when I originally set it up, but now both mysqli_connect and mysql_connect are both undefined functions and mysqli is an undefined class.
Fatal error: Class 'mysqli' not found in /var/www/html/includes/mysql.php on line 6
So it seems to be some kind of setting has change inside my php setup but I can't for the life of me figure out what it is.
This is PHP Version 5.6.11. Anyone have any experience with this kind of problem? I'm close to reinstalling PHP but I'd rather understand what is going on or what I may be doing wrong.
Any advice would be severly appreciated.
Try Below Command:
Latest phpMyAdmin versions require mysqli extension and will no longer work with mysql.
sudo apt-get install php5-mysql
Please add below line php.ini
extension=mysqli.so
Please restart server hope this works
For some reason, taking the mysql connection out of an include and putting it directly onto the page that was using it seems to have fixed the problem. I have no real idea why this would be the case but everything now seems to be working as expected.
Thanks a lot to everyone who tried to help me with this.
So, I'm trying to run the Hello World script but whenever I run dev_appserver.py I hit a wall.
Here's the error log from the script:
$ appengine/dev_appserver.py --php_executable_path=/usr/local/bin/php-cgi HelloWorld
...
ERROR 2016-03-29 12:57:30,588 php_runtime.py:348] The PHP runtime
is not available Traceback (most recent call last): File
"/Users//desktop/appengine/google/appengine/tools/devappserver2/php_runtime.py",
line 344, in new_instance
self._check_binaries(php_executable_path, gae_extension_path) File
"/Users//desktop/appengine/google/appengine/tools/devappserver2/php_runtime.py",
line 284, in _check_binaries
cls._check_environment(php_executable_path, env) File "/Users//desktop/appengine/google/appengine/tools/devappserver2/php_runtime.py",
line 259, in _check_environment
raise _PHPEnvironmentError(check_process_stdout)
_PHPEnvironmentError: No input file specified.
As a background to my El Capitan setup...
I've previously updated PHP to 5.5 using:
curl -s http://php-osx.liip.ch/install.sh | bash -s 5.5
But I've also downloaded via HomeBrew php54 and that's what should be running the php-cgi script I've posted in the executable path above.
Any thoughts?
So turns out, the answer was pretty obvious - I'd installed the Go SDK rather than the PHP one! Google's website scrolls to the wrong place when you click PHP. Many hours wasted trying to fix this one - never mind. Hope this helps another as simple as me!
if you already installed google-cloud-sdk run this command :
gcloud components install app-engine-php-darwin
you won't need to specify that path after this
I have standard setup for Ispconfig 3:
https://www.howtoforge.com/perfect-server-debian-wheezy-apache2-bind-dovecot-ispconfig-3
Server is up to date. Everything working fine.
I'm trying to add PHP 5.6.12 following this guide:
https://www.howtoforge.com/how-to-build-php-5.6-fpm-fastcgi-with-zend-opcache-and-apcu-for-ispconfig-3-on-debian-7-wheezy
Everything went ok until start fpm:
/etc/init.d/php-5.6.12-fpm start
Starting php-fpm [02-Sep-2015 18:16:07] ERROR: [/opt/php-5.6.12/etc/php-fpm.conf:540] value is NULL for a ZEND_INI_PARSER_ENTRY
[02-Sep-2015 18:16:07] ERROR: failed to load configuration file '/opt/php-5.6.12/etc/php-fpm.conf'
[02-Sep-2015 18:16:07] ERROR: FPM initialization failed
failed
Problem is when this line is inserted at the end of /opt/php-5.6.12/etc/php-fpm.conf:
include /opt/php-5.6.12/etc/pool.d/*.conf
If I comment this line, fpm starts, but new PHP version in ISPconfig doesn't work.
I found this solution:
serverfault.com/questions/547394/is-there-a-limit-setting-a-php-admin-value-in-php-fpm
and used this fix:
github.com/DaveRandom/php-src/commit/9ad8e89d4f080626a92fc8817ab156c09b6b266a
and compiled again with it. Same result.
Any clue? Please help.
I ran into the same problem today, you need an = just after include
I'm working on Laravel 5 and I'm using PHP function php -S localhost:8888 folder-name - t to show the web site.
Everything is working fine until I updated to Window 10. Now, I try to run the project in my browser, I get a blank page and this message in my cmd:
[Mon Aug 03 00:17:05 2015] PHP Fatal error: Unknown: Failed opening
required 'public' (include_path='.;C:\php\pear\') in Unknown on line 0
What is going wrong?
It sounds like a permissions issue. I don't have much experiencing working with Laravel on Windows, but I just fixed a similar issue on an Ubuntu box.
The source of trouble for me was that I installed composer as root, so I had to remove ./vendor, change the owner and group of ~/.composer to ubuntu:www-data (ubuntu is my user, www-data is the Nginx user), and rerun composer install. I also made sure the ./storage permissions were recursively set to 775, and change the owner of my entire Laravel project to ubuntu:www-data.
Some stuff will definitely be different if you're on Windows, but hope this helps!
It is a permission error actually. But if you try to run directly from your localhost server, it will work.
On windows 10 PHP Server will not be able to access PHP Pear extension that is why it is showing this error.
If you are running XAMPP. you have to go to your apache localhost with http://localhost/laravel-folder/public.