Vagrant phpmyadmin php show as plain text issue - php

I'm having some issues with phpmyadmin that i installed on a virtual machine using vagrant. I downloaded the vagrant file from puphpet it's a Centos with php, mysql, nodejs, and apache.
Default installation works fine, already edited my vhost file on my local machine to access centos /var/www folder and php it's working there, but phpmyadmin folder it's showing plain text rather than executing the php code of the index.php, the weird thing is that only phpmyadmin is not executing php code.
My local setup is Mac OS X el capitan, my vhost cents.dev point to /var/www folder.
Couldn't find any solution online.
I installed phpmyadmin using yum command, then made a link in my /var/www folder, that didn't work, the moved the phpmyadmin folder to /var/www and still doesn't work
phpinfo is:
Linux local.puphpet 2.6.32-504.8.1.el6.x86_64
Server API FPM/FastCGI
PHP 5.6.15 (cli)

PhpMyAdmin uses shorttags for php (<? instead of <?php).
Edit your php.ini to support that.
short_open_tag = On
And then restart your webserver
sudo service apache2 restart

Related

Get php7 to work with apache

I am trying to set up PHP7 to work with Apache on macOS sierra. I managed to install correctly (I checked using php -v) but there is no libexec directory where php was installed. This is a problem because I need to link to this folder to get php to work with apache. I can get to /usr/local/Cellar/php71/7.1.6_18. In that directory there are many more directories and files but no libexec directory. How do I configure Apache now?

Why doesn't Apache server MAMP run?

I've downloaded php5.6 from here https://www.mamp.info/en/downloads/ and added it to php folder. After that I can't run Apache server. I removed that folder, but Apache still doesn't work. Files in /Local/logs/ are empty.
Mac OS Mavericks.
Same problem here. A (temporary) solution is to start apache from the terminal:
sudo /Applications/MAMP/Library/bin/apachectl start
MAMP detects it as its status light becomes green! But I cannot explain why MAMP doesn't command apache anymore, with nothing logged.
Tried to modify file /bin/startApache.sh, adding a sudo before start command, without success.

Configure PHP bundled with MAC OS

I want to run my php applications using php bundled with MAC os. I have done some changes and after that i have started my apache server using
sudo apachectl
restart and running localhost now shows pages available at
/Library/WebServer/Documents/index.html.en
where should i keep my custom php application so that it can be viewable by browser on localhost.
Use a Symlink to have a more easily accessible path:
ln -s /Users/NewBee/Desktop/mycustomappinanaccessibleplace /Library/WebServer/Documents/my_app
You may run into permissions problems, make sure you account for that by ensuring the apache user can access the files and symlink.
Your other option is to change the DocumentRoot in your httpd.conf file.

{file} requires the ionCube PHP Loader ioncube_loader_lin_5.5.so to be installed

I am trying to run a site locally on vagrant box. I have all the files downloaded from the clients server and a copy of the database set up locally. I have changed the db settings to map to my local setup.
When I run the site locally I get the above error. I have ionCube installed locally (running php v5.5) and in my php.ini file I have the following line included.
zend_extension = "C:\xampp\htdocs\ioncube\ioncube_loader_win_5.5.dll"
Any ideas?
Thanks
Your zend_extension line is related to windows machine. Vagrant is probably installed with linux in it, so you need to install a separate copy of ioncube loader inside of it and this copy should be built for linux (and, probably, your specific distribution of linux)

with mac's default php and apache installation, where is the www folder equivalent?

When I used to use windows, i just install wamp, and put php code files inside the www folder and navigate to localhost/file_name.php to see that page in action. Now with my new macbook air, php and apache came with the machine, what are the equivalence of "put php files inside www folder" and "navigate to localhost/file_name.php"? How do I do what I used to do in Mac? (also I don't want to reinstall anything, no MAMP please.)
You can look in /etc/apache2/httpd.conf to find more settings and to change it but the default for OSX 10.8 is /Library/WebServer/Documents.
Some more information on how to setup PHP to work with Apache on OSX can be found at: https://discussions.apple.com/docs/DOC-3083

Categories