PHP PDO shows "no value" - apache

I've seen many questions describing this issue but none tackling the solution.
Last night I updated PHP from 5.3.2 to 5.4.6 and all of the sudden PDO started acting strange and showing that no drivers were available.
I have necessary DLL (php_pdo_mysql.dll) in ext directory
In php.ini both PDO and database-specific extension are enabled
The following code acts differently when executed from terminal/cmd and from browser:
print_r(PDO::getAvailableDrivers());
in terminal/cmd it shows appropriate driver list while in browser shows empty array.
All this led me to believe that something was not quite right with Apache installation (which is still at 2.2). I've installed version 2.4 just to be sure but nothing has changed.
When called, phpinfo() shows correct php.ini path but is there anything else that could affect proper PDO loading?
Thanks in advance!

Related

Hippo CMS (Bloomreach) On initial setup, essentials page gives a 404

I'm following the Get Started section (v13) in the Bloomreach documentation, and unable to proceed, as the essentials page on my project gives me a 404. I think I've done everything word for word. (Obviously I did not. I apparently glazed over the Java spec, assuming a recent version was good. Anyhow, if anyone makes the same mistake, maybe this will help.)
http://localhost:8080/cms/ works as expected. I can log in and all.
I'm running this on OS X Mojave 10.14.4. Maven 3.6.1. Java 12.0.1.
This is the page I am stuck on because of this, where it calls out navigating to the essentials page: https://documentation.bloomreach.com/trails/getting-started/adding-features-to-a-project.html
Version 12.1 doesn't give me the error from the server, but I get "This localhost page can’t be found" from Chrome.
In the documentation it states that you need Java version 8. I installed JDK 1.8.0_212, and everything started working. I previously had Java 12.x.

Image php5.6-apache. debbuging my code

I'm using docker-compose to create two containers connected between them. (the images are php5.6-apache and mysql).
Everything is running OK. my problem is when i want to start working. i cant see the typical errors in php. (i always worked on xampp). i've seen a lot of documentation how to enable the debugs but i cant find a solution. I tried to find php.ini but apparently it is not in the apache container. I tried to install xdebug as the documentation...
anyone know how to do it?
I need to do it in php 5.6 as my application doesn't work with newer versions.

Outdated version of Zend Engine API

I am hosting a website, using the Symfony framework, on a MAMP server on my Mac, and I'm trying to generate bundles automatically with the help of the terminal.
If it is relevant in any way, here is what I try to type into the terminal:
php -c /Applications/MAMP/bin/php/php5.4.10/conf/php.ini php
app/console generate:bundle
And here is the error I get:
XCache requires Zend Engine API version 220100525. The Zend Engine API
version 220090626 which is installed, is outdated.
Could not open input file: php
Do any of you have an idea of how I could update the Zend Engine API or otherwise fix my problem? That would be of HUGE help!
Edit:
Thanks to the help of whistlergreg I've gotten rid of one of the problems it seems, but I still get the following response:
Could not open input file: php
Edit:
I was told by someone that the second php in my command shouldn't be there. Instead I should write:
php -c /Applications/MAMP/bin/php/php5.4.10/conf/php.ini app/console
generate:bundle
It seems like the second error was caused by a noobish typo by me, and now everything is working.
Note: With Xcache 3.0, xcache.so is no longer a Zend Extension but a PHP extension
remove zend_extension = */xcache.so
load it using extension = xcache.so
This might be why the error is being thrown:
The main cause for the error is because of outdated build of XCache
(not related to its actual version though), that mostly happens when
user upgrades PHP version. When compiling and building XCache, it’s
been associated with the version of Zend Engine API that exists on the
system at the time.
When PHP is updated or upgraded, the Zend Engine API is updated too, causing XCache module to fail as the version no longer matched.
The solution for the Zend Engine API version is newer error is pretty
simple. Just download, compile and install XCache again will fix and
resolve the issue permanently (until new PHP major version update). 1
Switch MAMP to use APC from the MAMP preferences menu, that worked for me! Make sure you restart apache after making the change.

Any luck with mod_libpq under Apache 2.2 and/or win32?

Has anyone had luck compiling mod_libpq for Apache 2? I know there were some fairly major changes so the source might have to be updated, but has it been done already by someone?
Also, has it been compiled for win32 (either version of Apache, or another web server altogether?)
I've written an updated version for Apache2.2 which can be downloaded from
http://asmith.id.au/source/mod_libpq2.c
However, it is my first attempt at writing a module for Apache2 and it is not debugged yet.
Previously I had no use for it as I was still using Apache1.3 but since I am now faced with retiring that old server I guess I'll have to finish off the new version.

Joomla Mootools file getting truncated

I am trying to run Joomla on my local machine. I have installed wamp 2.0 and everything installed ok with it and I managed to see it running. I have now come to install Joomla 1.5.18 but I am having a problem with the mootools file on the installation wizard.
When running through the installation process in FireFox with firebug turned on I get errors about the mootools file missing a }. When I view the file through windows explorer it is complete and everything is fine with it but when I click on the error in firebug to see the error the file is truncated which I assume is why it is not working and complaining about a missing }. To test the file I created a test page which pulls in the same mootools file and this works fine (running locally and not through Joomla ).
Does anyone know why this is happening and how to fix it? I think it must be a problem with wamp as like I said the file is fine and runs ok if I run it from the file system, however I know nothing about servers so this is a guess. Maybe a limit on the size of a file which can be returned as the mootools file is around 7000 characters long.
I have tried un-installing both Joomla and Wamp but none this has not worked and I still get the same error. Thanks
I'm just curious, have you tried installing a newer version of Joomla? 1.5.8 is a little bit old and you may have better luck using something a version or two newer. Alternately speaking, if you're not a big fan of installing WAMP and then manually installing Joomla, you can use a Bitnami Joomla stack. Basically, Bitnami installs Apache, mySQL, PHP, and Joomla all in one quick and easy install.
I hope that some of this helps!
I would suggest that your problem is not with the Mootools package but with your template or modules that are loaded in. Can you turn off all of your modules and reenable them one by one until you see the error again?