I am currently using word press latest version. It was working fine yesterday but when i login again today. And when i upload image in the media library it gives this error that
An error occurred in the upload. Please try again later. wordpress
Also my uploaded images are not showing. I have searched for this. My short tags are also on.
[25-Mar-2016 11:50:46 UTC] PHP 1. {main}() E:\designbee\lifeco\wordpress\index.php:0
[25-Mar-2016 11:50:46 UTC] PHP 2. require() E:\designbee\lifeco\wordpress\index.php:17
[25-Mar-2016 11:50:46 UTC] PHP 3. require_once() E:\designbee\lifeco\wordpress\wp-blog-header.php:12
[25-Mar-2016 11:50:46 UTC] PHP 4. require_once() E:\designbee\lifeco\wordpress\wp-load.php:37
[25-Mar-2016 11:50:46 UTC] PHP 5. require_once() E:\designbee\lifeco\wordpress\wp-config.php:89
[25-Mar-2016 11:50:46 UTC] PHP 6. do_action() E:\designbee\lifeco\wordpress\wp-settings.php:376
[25-Mar-2016 11:50:46 UTC] PHP 7. call_user_func_array: {E:\designbee\lifeco\wordpress\wp-includes\plugin.php:525}() E:\designbee\lifeco\wordpress\wp-includes\plugin.php:525
[25-Mar-2016 11:50:46 UTC] PHP 8. lifeco_setup() E:\designbee\lifeco\wordpress\wp-includes\plugin.php:525
this is my log file (Last portion)
There was a div outside of the function in my custom post type.
Related
I am trying to use the following github project in my wordpress plugin:
PHP Object wrapper for the Google Chart API
I tried the following:
require_once(WPPLUGIN_PATH. "gchart/gChartInit.php");
$piChart = new gPieChart(); // <---- here I get the error
$piChart->addDataSet(array(112,315,66,40));
$piChart->setLabels(array("first", "second", "third","fourth"));
$piChart->setLegend(array("first", "second", "third","fourth"));
$piChart->setColors(array("ff3344", "11ff11", "22aacc", "3333aa"));
echo $piChart->getImgCode();
My problem seems to be that when I am using the above code, it jumps at line $piChart = new gPieChart(); into another wordpress-plugins autoloader and does not load the gPieChart.php properly.
The error message is:
[26-Jul-2016 20:39:59 UTC] PHP Fatal error: Class 'gPieChart' not found in /home/ubuntu/workspace/wp-content/plugins/wp-analytics-mail/sendTestMail.php on line 267
[26-Jul-2016 20:39:59 UTC] PHP Stack trace:
[26-Jul-2016 20:39:59 UTC] PHP 1. {main}() /home/ubuntu/workspace/index.php:0
[26-Jul-2016 20:39:59 UTC] PHP 2. require() /home/ubuntu/workspace/index.php:17
[26-Jul-2016 20:39:59 UTC] PHP 3. require_once() /home/ubuntu/workspace/wp-blog-header.php:19
[26-Jul-2016 20:39:59 UTC] PHP 4. include() /home/ubuntu/workspace/wp-includes/template-loader.php:75
[26-Jul-2016 20:39:59 UTC] PHP 5. include() /home/ubuntu/workspace/wp-content/themes/twentysixteen/page-analytics-analytics-mail.php:138
Any suggestions how to make the above code work?
I appreciate your reply!
Here's what you do.
Install Composer as per the doc or, if you're on Windows/Unix, figure out how to install the thing in your environment.
Create new file called composer.json in the root folder of your plugin (in this case wp-analytics-mail)
Again, as per the doc, paste this into the composer.json
{
"require": {
"gchartphp/gchartphp": "dev-master"
}
}
In the command line, get to the plugin folder and run composer update
Put require 'vendor/autoload.php'; somewhere close to the top of your main plugin file (sendTestMail.php)
Lower down in the same file, initialize and use the library:
$piChart = new gchart\gPieChart();
I am using the latest WAMPServer64 with PHP 5.5.12.
What I did: From a webserver (runs PHP 5.4.16) I have copied the modx folders to localhost, then I copied the entire database. I have also changed the database credentials accordingly via manager/includes/confic.inc.php.
When opening the manager login, I see the following:
Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in \manager\includes\extenders\dbapi.mysql.class.inc.php on line 93
When I try to login, the manager does not show up and I get a bunch of errors, content of php_error.log:
PHP Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in manager\includes\extenders\dbapi.mysql.class.inc.php on line 93
PHP Stack trace:
PHP 1. {main}() manager\processors\login.processor.php:0
PHP 2. DBAPI->escape() manager\processors\login.processor.php:51
PHP 3. DBAPI->connect() manager\includes\extenders\dbapi.mysql.class.inc.php:156
PHP 4. mysql_connect() manager\includes\extenders\dbapi.mysql.class.inc.php:93
PHP Notice: Undefined index: captcha_code in manager\processors\login.processor.php on line 53
PHP Stack trace:
PHP 1. {main}() manager\processors\login.processor.php:0
PHP Notice: Undefined index: rememberme in manager\processors\login.processor.php on line 54
PHP Stack trace:
PHP 1. {main}() manager\processors\login.processor.php:0
PHP Notice: Undefined variable: allowed_ip in manager\processors\login.processor.php on line 134
PHP Stack trace:
PHP 1. {main}() manager\processors\login.processor.php:0
PHP Notice: Undefined variable: allowed_days in manager\processors\login.processor.php on line 148
PHP Stack trace:
PHP 1. {main}() manager\processors\login.processor.php:0
PHP Notice: Undefined variable: newloginerror in manager\processors\login.processor.php on line 224
PHP Stack trace:
PHP 1. {main}() manager\processors\login.processor.php:0
PHP Warning: Cannot modify header information - headers already sent by (output started at manager\processors\login.processor.php:54) in manager\processors\login.processor.php on line 298
PHP Stack trace:
PHP 1. {main}() manager\processors\login.processor.php:0
PHP 2. setcookie() manager\processors\login.processor.php:298
PHP Notice: Undefined variable: sql in manager\includes\extenders\dbapi.mysql.class.inc.php on line 276
PHP Stack trace:
PHP 1. {main}() manager\processors\login.processor.php:0
PHP 2. logHandler->initAndWriteLog() manager\processors\login.processor.php:302
PHP 3. logHandler->writeToLog() manager\includes\log.class.inc.php:42
PHP 4. DBAPI->insert() manager\includes\log.class.inc.php:76
I have searched for solutions on the net, some suggested to clear the cache, which is not directly possible since the manager interface does not load. I also tried to upgrade using the default install folder, same problem remains.
So if anyone has a clue how I can solve this without installing an old version of PHP, that would be great.
To get rid of the mysql deprecated warning you have to use Evo 1.0.15+ and you should change
$database_type = 'mysql';
to
$database_type = 'mysqli';
in config.inc.php
The 'only' thing that uses the old mysql_ functions is the installer then. The deprecated warnings are disabled in there for PHP 5.5.
MODx Evolution has a lot of old code in it. As you see by your warnings it is using deprecated mysql-functions. This is long known in the MODx Forums.
As for now you have two possible solutions:
Downgrade your local php version via WAMP to some (best, the same) PHP 5.4 version.
Change your PHP error-reporting level (inside the affected files or in your php.ini) to omit deprecated errors, as long as Evo has this issue.
Can check following solution
https://toster.ru/q/125593
really works !
:)
So I am following this and I'm trying to run his first php example. I get the following error:
PHP Warning: require_once(Zend/Http/Header/HeaderValue.php): failed to open stream: No such file or directory in /opt2/sites/gdataApi/ZendGdata-1.12.13/library/Zend/Http/Client.php on line 45
I checked and the file is in fact not there. So I added it from the minimial 1.12 download. It then says Zend/Xml/Security.php doesn't exist so i add it.
Now I am getting the following error:
PHP Notice: Undefined offset: 1 in /opt2/sites/gdataApi/ZendGdata-1.12.13/library/Zend/Gdata/ClientLogin.php on line 150
PHP Stack trace:
PHP 1. {main}() /opt2/sites/gdataApi/test.php:0
PHP 2. Google_Spreadsheet->__construct() /opt2/sites/gdataApi/test.php:11
PHP 3. Google_Spreadsheet->login()/opt2/sites/gdataApi/Google_Spreadsheet.php:40
PHP 4. Zend_Gdata_ClientLogin::getHttpClient() /opt2/sites/gdataApi/Google_Spreadsheet.php:223
PHP Notice: Undefined variable: php_errormsg in /opt2/sites/gdataApi/ZendGdata-1.12.13/library/Zend/Gdata/App.php on line 834
PHP Stack trace:
PHP 1. {main}() /opt2/sites/gdataApi/test.php:0
PHP 2. Google_Spreadsheet->addRow() /opt2/sites/gdataApi/test.php:24
PHP 3. Google_Spreadsheet->getSpreadsheetId() /opt2/sites/gdataApi/Google_Spreadsheet.php:62
PHP 4. Zend_Gdata_Spreadsheets->getSpreadsheetFeed() /opt2/sites/gdataApi/Google_Spreadsheet.php:252
PHP 5. Zend_Gdata->getFeed() /opt2/sites/gdataApi/ZendGdata-1.12.13/library/Zend/Gdata/Spreadsheets.php:150
PHP 6. Zend_Gdata_App->getFeed() /opt2/sites/gdataApi/ZendGdata-1.12.13/library/Zend/Gdata.php:162
PHP 7. Zend_Gdata_App->importUrl() /opt2/sites/gdataApi/ZendGdata-1.12.13/library/Zend/Gdata/App.php:213
PHP 8. Zend_Gdata_App::importString() /opt2/sites/gdataApi/ZendGdata-1.12.13/library/Zend/Gdata/App.php:792
PHP Fatal error: Uncaught exception 'Zend_Gdata_App_Exception' with message 'DOMDocument cannot parse XML: ' in /opt2/sites/gdataApi/ZendGdata-1.12.13/library/Zend/Gdata/App.php:833
Stack trace:
#0 /opt2/sites/gdataApi/ZendGdata-1.12.13/library/Zend/Gdata/App.php(792): Zend_Gdata_App::importString('', 'Zend_Gdata_Spre...', NULL, NULL)
#1 /opt2/sites/gdataApi/ZendGdata-1.12.13/library/Zend/Gdata/App.php(213): Zend_Gdata_App->importUrl('https://spreads...', 'Zend_Gdata_Spre...', NULL)
#2 /opt2/sites/gdataApi/ZendGdata-1.12.13/library/Zend/Gdata.php(162): Zend_Gdata_App->getFeed('https://spreads...', 'Zend_Gdata_Spre...')
#3 /opt2/sites/gdataApi/ZendGdata-1.12.13/library/Zend/Gdata/Spreadsheets.php(150): Zend_Gdata->getFeed('https://spreads...', 'Zend_Gdata_Spre...')
#4 /opt2/sites/gdataApi/Google_Spreadsheet.php(252): Zend_Gdata_Spreadsheets->getSpreadsheetFeed()
#5 /opt2/sites/gdataApi/Google_Spreadsheet.php(62): Google_Spreadsheet->getSpreadsheetId('test spreadshee...')
#6 /opt2/sites/gdataApi/test.php(24): Google_Spreadsheet in /opt2/sites/gdataApi/ZendGdata-1.12.13/library/Zend/Gdata/App.php on line 833
I have a google spreadsheet that I would like to update programatically using php. Can you tell me whats going wrong with this script? Seems like this is an old article. Are there more recent articles I am missing?
Download Zend framework minimal version. Then extract archive and copy /library/Zend/Http/Header directory to your GData's /Zend/Http/ directory.
Can anybody tell how to get working APIGen on windows. I have installed ApiGen using PEAR and the file of ApiGen resides in
C:\wamp\bin\php\php5.3.13
there are two types of file here one with batch extension and other with file extension both having name apigen.
I am getting below error while using apigen command.
Warning: require(Texy.php): failed to open stream: No such file or directory in C:\wamp\bin\php\php5.3.13\apigen on line 48
Call Stack:
0.0015 792712 1. {main}() C:\wamp\bin\php\php5.3.13\apigen:0
0.0141 1646736 2. class_exists() C:\wamp\bin\php\php5.3.13\apigen:64
0.0142 1647048 3. ApiGen\{closure}() C:\wamp\bin\php\php5.3.13\apigen:0
Fatal error: require(): Failed opening required 'Texy.php' (include_path='.;C:\wamp\bin\php\php5.3.13\pear') in C:\wamp\bin\php\php5.3.13\apigen on line 48
Call Stack:
0.0015 792712 1. {main}() C:\wamp\bin\php\php5.3.13\apigen:0
0.0141 1646736 2. class_exists() C:\wamp\bin\php\php5.3.13\apigen:64
0.0142 1647048 3. ApiGen\{closure}() C:\wamp\bin\php\php5.3.13\apigen:0
PHP Warning: require(Texy.php): failed to open stream: No such file or directory in C:\wamp\bin\php\php5.3.13\apigen on line 48
PHP Stack trace:
PHP 1. {main}() C:\wamp\bin\php\php5.3.13\apigen:0
PHP 2. class_exists() C:\wamp\bin\php\php5.3.13\apigen:64
PHP 3. ApiGen\{closure}() C:\wamp\bin\php\php5.3.13\apigen:0
PHP Fatal error: require(): Failed opening required 'Texy.php' (include_path='.;C:\wamp\bin\php\php5.3.13\pear') in C:\wamp\bin\php\php5.3.13\apigen on line 48
PHP Stack trace:
PHP 1. {main}() C:\wamp\bin\php\php5.3.13\apigen:0
PHP 2. class_exists() C:\wamp\bin\php\php5.3.13\apigen:64
PHP 3. ApiGen\{closure}() C:\wamp\bin\php\php5.3.13\apigen:0
Please follow these step (refer from this page https://github.com/ApiGen/ApiGen/wiki/installation-on-windows)
Install apigen.phar in directory you want. For example: C:\PHPCLI
Add C:\PHPCLI to Windows Path
In case that you or anyone don't know how to add Path in Windows. Right click on My Computer icon on desktop or start menu and click on Properties.
On left side of Windows properties page, click on Advanced system settings.
Click Environment Variables...
You can add C:\PHPCLI to Path in user variables or system variables. Choose one.
Click OK to all.
Open command line and enter cd C:\PHPCLI
Enter in command line again: echo #php "%~dp0apigen.phar" %*>apigen.bat
Close command line and open new command line. Test by enter this command apigen --help
It should display ApiGen help message.
PHPUnit seems to execute properly (appropriate tests are executed & pass), but during code coverage an error is thrown. We are using PHPUnit 3.5 with ZF 1.11. Any insight would be greatly appreciated!
(FYI: I looked at some related StackOverflow posts, but nothing seemed to solve this issue for us.)
[24-Jan-2012 00:11:09 UTC] PHP Fatal error: Cannot redeclare class Zend_View_Helper_FormSpecial in /home/za/application/modules/proposal/views/helpers/FormSpecial.php on line 23
[24-Jan-2012 00:11:09 UTC] PHP Stack trace:
[24-Jan-2012 00:11:09 UTC] PHP 1. {main}() /usr/local/zend/bin/phpunit:0
[24-Jan-2012 00:11:09 UTC] PHP 2. PHPUnit_TextUI_Command::main() /usr/local/zend/bin/phpunit:49
[24-Jan-2012 00:11:09 UTC] PHP 3. PHPUnit_TextUI_Command->run() /usr/local/zend/share/pear/PHPUnit/TextUI/Command.php:129
[24-Jan-2012 00:11:09 UTC] PHP 4. PHPUnit_TextUI_TestRunner->doRun() /usr/local/zend/share/pear/PHPUnit/TextUI/Command.php:188
[24-Jan-2012 00:11:09 UTC] PHP 5. PHP_CodeCoverage_Report_HTML->process() /usr/local/zend/share/pear/PHPUnit/TextUI/TestRunner.php:363
[24-Jan-2012 00:11:09 UTC] PHP 6. PHP_CodeCoverage->getSummary() /usr/local/zend/share/pear/PHP/CodeCoverage/Report/HTML.php:128
[24-Jan-2012 00:11:09 UTC] PHP 7. PHP_CodeCoverage->processUncoveredFilesFromWhitelist() /usr/local/zend/share/pear/PHP/CodeCoverage.php:354
Thanks!
Chris
The error means that /home/za/application/modules/proposal/views/helpers/FormSpecial.php is declaring a class named Zend_View_Helper_FormSpecial which is already declared by some other module--probably .../Zend/View/Helper/FormSpecial.php in the Zend Framework. If you intended to replace Zend's FormSpecial with your own, you need to give it a different class name.
The problem is that PHP_CodeCoverage will load every PHP file in the whitelist that hasn't already been loaded. If one of those modules defines a class with the same name, you get this error.