OS: macOS Big Sur
PHP version: 7.4.1
Package name and version: google/apiclient: ^2.12.3
Whenever I switch the PHP version to 7.4.1 I get this error
Parse error: syntax error, unexpected 'static' (T_STATIC) in /Users/webtechstreet4/Local Sites/fvtest/app/public/wp-content/plugins/form-vibes-pro/vendor/psr/cache/src/CacheItemInterface.php on line 75
The library works great on PHP 8 but gives the above error when switching to PHP 7.
Screenshot
Actually, I sorted it out by changing the system PHP version and running composer update.
I thought I needed to change the site PHP version but it was actually the system PHP version.
here is the GitHub issue link: https://github.com/googleapis/google-api-php-client/issues/2246
it is because, static return type is available only for PHP 8, I have same issue, just for temporary you can change
.\vendor\psr\cache\src\CacheItemInterface.php
line number 75 just remove return type static like this
public function set($value);
Related
A client’s host has recently updated their server to run PHP 7, which has broken their EE 2.5.5. site (“Call to undefined function mysql_connect()”).
I tried upgrading EE to version 2.11.9 but get errors:
Frontend: can’t find safecracker_lib
Control Panel: PATH_MOD not defined in mod_structure.php, fixing this leads down a rabbit hole starting with an error related to not being able to instantiate the pagination class somewhere.
I just need to get the site running until I build a new site, what is the quickest way I can get the site running with PHP 7?
In your config folder there is a file named database.php
change the line:
$db['expressionengine']['dbdriver'] = 'mysql';
to
$db['expressionengine']['dbdriver'] = 'mysqli';
mysql_connect() has been deprecated since PHP 5 and removed in PHP 7 so you cannot use this function or any of the old mysql functions.
You need to upgrade your codebase, or downgrade your PHP version (highly discouraged).
In regards to your missing pagination class, you may not have implemented core classes that were required when upgrading.
Try running on your command line:
php system/ee/eecms upgrade
You can also read the documentation on how to upgrade the codebase for Expression Engine here.
I am writing a Kohana app that has been dev'd locally on Ubuntu 12.04 LTS (PHP 5.3). It works without issue in this environment, but it throws a fatal error whenever it tries to autoload a classes/Model class on the production server (which is Ubuntu 13.10 running PHP 5.5). The application code is exactly the same. The only difference I could mention is that the apache vhost conf uses the Require directive instead of the Allow/Deny syntax because Ubuntu 13.10 ships with newer version of apache.
I get the following error whenever I hit a controller action that needs to load a model:
ErrorException [ Fatal Error ]: Class 'Model_Event' not found
MODPATH/orm/classes/Kohana/ORM.php [ 46 ]
Interestingly enough, Kohana is evidently able to load the controller classes I wrote without issue.
[source root]/application/classes/Model/Event.php exists and is ugo+rx (as are the parent directories). It contains a valid class definition (this works without issue on my local 12.04/5.3 environment). 'head -n2 [source root]/application/classes/Model/Event.php' is:
<?
class Model_Event extends Model_BaseModel {
I know PHP 5.5 introduced a difference in how it does case-insensitive string comparisons, but the file/folder names and class names are an exact case match so this shouldn't be an issue here.
PHP wasn't respecting the "short_open_tag = On" ini setting.
I just installed Laravel 4 (Illuminate) and as I opened the index.php file in a browser, I was met with this error:
Parse error: syntax error, unexpected 'yield' (T_YIELD), expecting identifier (T_STRING) in /www/Laravel4/vendor/illuminate/view/src/Illuminate/View/Environment.php on line 339
I have fixed the permissions for the meta folder, and installed all the dependencies through Composer. I am running PHP version 5.5.0alpha2 on OSX 10.8.2.
That's because yield became a language construct in PHP 5.5 (used in Generators) - but someone decided that it's a good idea to use this short word to name a function:
public function yield($section)
{
return isset($this->sections[$section]) ? $this->sections[$section] : '';
}
Downgrade to PHP 5.4 (after all, it's the current mainstream version, 5.5 is not even in beta yet) and it should work fine.
Hello
I am using joomla insttalation in WAMP Server 2.2 installation all are the complate, after that i RUN joomla this type of error occur in home page how to remove that.....plz help me
NOTICE:Array to string conversion in C:\wamp\www\joomlawebsite\components\com_banners\models\banners.php on line 44
Array to string conversion in C:\wamp\www\joomlawebsite\components\com_banners\models\banners.php on line 45
If you are using a 5.4 version of PHP, try downgrading to 5.3 (that should fix the issue as per this Joomla thread.)
In my website's cpanel it shows that
Apache version : 2.0.63 PHP version : 5.2.9 MySQL version :
5.0.92-community Operating system : linux
I currently installed a joomla website inside the server. I am using a module named "negetics PSS" as my homepage banner.
Here is the working model of the banner :
http://extensions.negetics.de/negetics-Presentation-Slider-Slim/demo-1.html
as you can see in the demo, the 6 handles of that slider is generated using php imagecreatetruecolor function. Now my problem is that, while i am using this module in my server, the module is generating error in its error log that :
[24-Oct-2011 02:32:27] PHP Fatal error: Call to undefined function
imagecreatetruecolor() in.....
as a result you can imagine, the handles are not generating.
How do i fix this..?
please Help me.
Thanks
Install Gd library. follow the below link. GD library instalation