I've got a CakePHP 1.2-based web site (I know.. too ancient) that I need to upgrade only to whatever is the oldest Cake to support PHP 7.1 (I think roughly Cake 2.8, from what I've seen so far), because my host is upgrading PHP to 7.1 across the board. This site only needs to live maybe 1 more year before we totally replace it, but we don't have time to do that before the host upgrades PHP at end of year.
I am trying to get the web site as-is running in a vagrant VM, so I can go through the upgrade steps there, carefully, and understand exactly what I need to do. My problem now is that I can't get the site to display. More concretely, when I try to load the site with nginx in vagrant, I get nothing but a blank screen with a few PHP warnings (strict standards to the effect of Non-static method Configure::read() should not be called statically), but nothing obviously broken. There's basically nothing in the PHP log, and nothing in the Nginx log. Again, this is the site as currently running (successfully) in production, which means my vagrant PHP is 5.6.38 (the actual production PHP is 5.6.25). Running with php-fpm.
Cake's own logs are only reporting the following, which arises inside a controller method function disableCache(), which is trying to insert headers to prevent the browser from caching the request:
2018-10-22 15:18:57 Warning: Warning (2): Cannot modify header information - headers already sent by (output started at /usr/share/nginx/html/www.mydomain.com/cake/libs/object.php:63) in [CORE/cake/libs/controller/controller.php, line 844]
I have inserted an early return in that method just to stop these warnings.
In PHP, I've got these settings:
error_reporting(E_ALL^E_DEPRECATED);
ini_set('display_errors', 1);
ini_set('error_log', '/var/log/php_errors.log');
In Cake 1.2's app/config/core.php, I've got:
Configure::write('debug', 3);
Database is local MySQL in vagrant, with settings in app/config/database.yml.
Can someone suggest where I should go next in debugging this?
From my own experience, PHP 7.1 and CakePHP 1.2 can work together. You simply need to upgrade your source code to make it compatible with PHP 7.1 but you can continue to have your system in CakePHP 1.2 without having to upgrade CakePHP. Of course, if you can use a newer or the latest version of CakePHP that would be perfect but think of it as a separate project and not something you must do now only because your host is upgrading PHP to 7.1 across the board.
If you can get your Cake project upgraded to 1.3.21 (the last 1.x release), you may be able to use this: https://github.com/littleant/cakephp-1.3.21 instead of upgrading to Cake 2.x. Might buy you a little time!
Related
I inherited a Typo3 site to maintain and have had no trouble until now. When I try login I get this error message:
Oops, an error occured!
PHP Runtime Notice: Declaration of t3lib_userAuthGroup::checkLogFailures() should be compatible with t3lib_userAuth::checkLogFailures() in /home3/onefoug3/public_html/t3lib/class.t3lib_userauthgroup.php line 113
I checked with my hosting service and they say it is an error with the script. I am not a programmer so I do not know how to fix that...not even sure where to start. How do I fix this?
To give you an overview about the situation with your TYPO3 installation I list a few points, some of them where you've to verify more:
TYPO3 in your installation is very old and outdated. You'll get perhaps many hints to update due to security-reasons. This is not wrong but I'd concentrate first on getting it running, perhaps better on a local server.
The Version of your TYPO3 installation is in any case very useful, you should try to provide it.
It's possible that you need an old PHP version to run that site and that the error is just thrown because of a wrong PHP Version. You could try with PHP 5.2.
It's not improbable that something in the TYPO3 core was changed manually. It might be patches or individual but in many versions I never found the mentioned methods in the line 113 like shown in the error-message.
Rarely I changed in the core somethings too, to circumvent some temporary problems, usually that's neither required nor advisable. Nevertheless if it helps you to get the installation locally running - why not.
The more advised step is to download the current version new and replace the existing core with that. Often you can chose the most recent minor version: assume you've Version 4.7.18, then you can download Version 4.7.20 or newer if available.
The link to get the newest Version of that old branch would be https://get.typo3.org/4.7
Better keep the old core till the problem is solved, even if you replace it.
If you follow my hint to get a higher minor version you should have a look in the install-tool, specifically in the update-wizard there.
I'd advise to update the question to include the Versions of TYPO3, PHP and MySQL, then perhaps it will be easier to help more.
As target I see to get the installation locally running and performing an update instead of serving the old site with insecure core. Based on that I answered in point 5 too, on a live-system it's not advisable especially with your limited knowledge.
I recently started coding with Codeigniter, so fairly new, even to php.
I built my first app, installed it on server after Xampp. I got this error
Message: mysqli::real_connect(): Headers and client library minor version mismatch. Headers:50542 Library:50626
After searching online I found that I need php5-mysqlnd. I found this nice article but don't know where all these processes are happening.
Is there a tool in Cpanel where all these codes for updating php5-mysqlnd are taking place?
All I know I have Linux hosting version 5.4.45 with Hostgator.
it looks like I found another way to do it (not like the way that link said).
I was going through my CPanel and found an option to change my PHP version. I clicked and on next page it asked what all components I want to include, I couldn't believe "Mysqlnd" was one of them.
I changed it to 5.6 from 5.4.45. That's all it took.
Thanks a lot.
Firstly forgive me if my terminology isn't entirely accurate. I have only limited knowledge on this subject, but will best try to convey the problems we are having. My server administrator is trying to deploy php 5.5.9 on a live server. Originally the intention was to install php 5.4.x, but we opted for the latest version instead (a manual compile is required regardless due to the o/s)
The O/S is OpenSuse 12.1 and the server is a Plesk server (Plesk Version 11.0.9) with Apache 2.2.1. This particular o/s does not have the ability to update php automatically so everything has to be done manually. Since we didn't want to risk screwing up the server (currently running with php 5.3.8), we opted to install a second version of php alongside the current one. The instructions we followed are outlined here: http://kb.parallels.com/en/114753
After numerous failed attempts due to missing libraries during compilation, we were finally able to compile php 5.5.9 without error and then proceeded to run tests with 'make test'
Unfortunately, the test results came back with 32 failures and 20% of the total tests were skipped. A total of 13011 tests were done, 10410 of which were completed. The TEST SUMMARY can be downloaded from here: http://uploaded.net/file/v6ug55l8
Anyway, deciding we might aswell give it a try, we applied the changes as indicated in the first link above to the vhost.conf. However, it didn't work, and the vhost then returned Internal Server Errors for every page regardless of script or extension. The errors logs sadly do not indicate any errors, only a whole ton of internal server errors recorded by mod_security. We did notice a huge number of these in the error log: Warning: SuexecUserGroup directive requires SUEXEC wrapper. But, it doesn't seem to be related, as the same error goes back several weeks.
So, we're stuck without any idea what to do next. Our next attempt will be to try and compile a php 5.4.x instead, as perhaps something is bumping heads with 5.5.9...
Any and all advice will be appreciated. As per the opening statement, I'm not an expert here, so if you need any additional information about the machine and it's server, feel free to ask. Thankyou for your attention!
Problem solved. The vhost's CGI-BIN needed to be CHMOD 755 and not 775.
I am running a PHP site that uses Ajax and jQuery as well. The site will run fine for quite some time, and suddently my pages (and ajax-retrieved sub-pages) comes back with the message
PHP has encountered an Access Violation at 77FCAFF8
It seems that rebooting the server corrects the issue. Running PHP Version 5.1.6 (Windows NT 5.0 build 2195). I did a some searching on here and some other sites, and there seems to be no fix..
URL REMOVED
UPDATE:
I think I'm on to something.. will get back to you.
UPDATE
After reviewing the IIS setup, i noticed there was no Handler Mapping setup for the website. This, of course begs the question - how did it ever work in the first place, when it was originally setup this way!? I added the handler mapping and it seems to be Okay so far.
UPDATE
The problem popped its heads out again this morning after 36 hours without encounering it. Back to the drawing board.
UPDATE
We ended up just moving the site to a secondary web server where we were able to upgrade PHP without an issue.
This is a PHP issue somewhere. You could spend some time narrowing down which function you're using that is causing the problem. I would instead upgrade to a newer version of PHP. If still no luck, try a slightly older version. There have been significant changes with version 5.3.2.
After some research I think this may be the solution (Taken from http://bugs.php.net/bug.php?id=28929 ):
[2010-06-11 15:12 UTC] in2ishun at yahoo dot com
***************** SOLUTION!!!!
I realize this issue is AGES old, but it still manages to be the top hit on Google searches as of now (6/2010).
I fixed my own instance of seeing this error. W2k3, IIS6, PHP 5.2.6, MySQL 5.1.
The problem is in the pathing. When I used the MSI installer for MySQL without doing an "advanced" installation (where I could manage the install details), it added a path to the system environment that contained spaces. Even after changing the path environment to use the Windows short-name location of the mysql bin directory, it still didn't work.
The solution was for me to reinstall mysql and set the default installation path to just off the root (e.g. C:\mysql). Once I did that the error went away and my app started working.
There are a number of sites with a variety of potential solutions to this issue and several of them mentioned paths and the "libmysql.dll" file (in the "bin" directory of your mysql installation).
If this helps you solve your problem, consider leaving a comment here so others can see that it works.
I've been experiencing a safari problem while building a web application. The screen goes completely blank (white) and refreshing won't help. Going to another page on the site gives the same problem. Then magically, after a little while, everything goes back to normal and pages are rendered correctly!
This started happening around the same time that I SUSPECT my hosting automatically upgraded from PHP 5.2.x to 5.3 (all of a sudden, we got 'deprecated function' errors and the error settings and handling were unchanged)
I also have to mention that this doesn't happen in our dev environment (PHP 5.2.9, Apache 2)
Settings
Safari 4.0.2 and the latest one (don't know the version)
Server side: PHP 5.3, MySQL 5.0.90, Apache is cPanel Easy Apache v3.2.0
Does anyone know why this is happening at all or know how to fix it?
If it happens with other browsers as well as safari it is probably an error message generated but not displayed. Depending on your code these can be time dependent.
If you have an error log file on your server check it's content.
You should also set up a PHP 5.3 development environment as quickly as possible. There are things that can go wrong when upgrading from 5.2. to 5.3 (see this page and yes, you can get angry at your provider, the PHP site does not advice an upgrade without a code check).