i have a project generated by Phprunner. some pages respond very slow. then i thought i must inspect generated and executed queries somehow. i'v tried searching trough code and i found lot's of execute functions. i don't know which one is the right execute point.
i'm using Phprunner 9.0 ,Php 5.6 and MySQL.
where can i find the log file or the right spot for putting logger?
Related
I am the sole person in charge of a website that keeps track of records that other employees submit and compiles them into nice spreadsheets so that non-technical users can easily read them.
The other guy who used to work here quit unexpectedly, and I have to make a small, one-line change to the PHP code that he wrote, the problem is, when I edit the code, it does not seem to change anything. For example, I can completely delete the code that displays an error message, but that error message will still show up. There are other parts of the project that I CAN modify, like XML files and python programs, but the PHP does not seem to care if it is modified.
I vaguely remember a command like 'php artisan serve' but that doesn't seem to help either
After googling the problem, I came across several other commands like 'npm run production' and 'php artisan optimise' but those didn't work either.
Thanks for your help
Are you changing the code directly on the server? Or are you trying it local first? Is the change on a view-file?
Try php artisan cache:clear. It should clear all the caches and probably show your changes.
I'm trying to install MediaWiki (1.29.1 or 1.27.3) locally with a large Wiktionary dump (3GB).
After converting the xml dump into an sql file and importing the latter into my DB that I create with this script, I followed the MediaWiki installation instructions in the browser to generate my specific "LocalSettings.php". I get the message
There are MediaWiki tables in this database. To upgrade them to MediaWiki 1.29.1, click Continue."
By clicking the "continue" button, the browser stays in loading state forever.
My understanding is that my DB containing the wiktionary dump has some tables that are not compatible with the version of wikimedia that I'm using. Therefore, an update of the DB is required.
I tried to run install.php from the command line to avoid having timeout with the browser. The command didn't return anything (after waiting more than 2 hours).
I tried as well a workaround:
Create my DB with empty Tables
Generate "LocalSettings.php" from the browser (that was fast since the DB is small)
Import the wiki sql dump to my DB
Refresh the index.php page
I got then a blank page with this message
Exception caught inside exception handler.Set $wgShowExceptionDetails
= true; and $wgShowDBErrorBacktrace = true; at the bottom of LocalSettings.php to show detailed debugging information.
All the examples and tutorials that I found online about this matter are assuming/using a small or new created DB.
Any idea what's wrong? Did really someone tried to use an existing wikimedia dump and run it locally? Why is there no such an advanced example?
You wrote "I'm trying to install Wikimedia (1.29.1 or 1.27.3)". I suppose that you are talking about Mediawiki, not Wikimedia. Am I right?
1) You can try parsed version of Wiktionary. It is a little bit old (2014) http://whinger.krc.karelia.ru/soft/wikokit/index.html
2) You can try to use my tutorial about download Wiktionary dump, uploading to MySQL, converting and parsing to something more usefull for work: Getting started Wiktionary parser.
See: MySQL import
The issue in a first level originates from mwdumper which seems to be outdated. An sql DB I generated using mwdumper is missing some tables which should have been though created by running update.php. It was not possible for me to run any php file neither from shell nor from the browser and I suspect the size of the dump to be the cause.
The workaround which by some magic helped to overcome this issue was:
run the update.php from shell with missing db credentials. This somehow enables logs and make the execution of index.php possible through the browser
add manually to the missing table columns claimed in the error messages (the column types here should be respected)
place a LocalSettings.php file, generated easily from a Wiktionary DB with empty tables, in the right directory of the mediawiki installation.
Run index.php from the browser
Et voila! The huge wiktionary mysql dump is queryable now throw the mediawiki interface. Not sure if such a trick could be called a solution but it solved the problem in my case. An explanation for what could have happened in background would be definitely helpful.
I wrote a particularly long migration for my website, and unfortunately was caught altering it quite a bit (I know I'm supposed to write additional migrations, instead of altering preexisting ones, but this wasn't possible in this case).
This is a complex migration, so I wrote it into the safeUp() function, as it should be wrapped in a transaction. When I run the migration, everything seems to work perfectly. It shows me each SQL command as it runs, and then at the end, says it ran successfully. The migration appears correctly in the history. However, when I visit the database, I realize that the migration is only partially done. Which should be impossible because it was written in safeUp().
It should be noted that I was running many migrations at once, and that each one runs successfully. The only time I got it to work, I ran every other migration up until the one in question (using ./yiic migrate to timestamp), and then copy pasted the sql into phpmyadmin, and ran it manually. Boom, perfectly done.
Anyone run into this problem?
-- Edit: I believe the issue here was that Yii parses SQL comments in an interesting way when it runs inside the $this->execute('sql'), so that the SQL it was generating was not identical to the raw SQL.
-- Edit2: This is ages ago now, but I'm now learning about this bug https://github.com/yiisoft/yii2/issues/9894. I think it may apply to Yii1 as well, if anyone out there is reading this.
Im working on a little web based application using php/html and an odbc database. Im trying to figure out how to implement pagination into the application im making, but the only examples I could find were made with mysql and not odbc. I've tried for hours to adapt them, but have come up empty handed so far.
I've replaced every instance of mysql from the script with odbc and dreamweaver is picking them up as valid functions (color highlighting) but the script is producing nothing.
The script I was working off of is located here:
http://www.developphp.com/view_lesson.php?v=289
I appreciate any help, even if its just a link... Been kicking myself in the head over this for too long.
You might find this tutorial useful.
http://www.shotdev.com/php/php-access/php-access-odbc-and-paging-pagination/
I am kinda new to the whole development side, but I want to be good.
In database creation, I used to do this via PHPMyAdmin --> Wamp Server.
I got to learn how to use MySQL Workbench, and I am liking the experience.
The problem is, when I have the .sql file created via use of Work Bench, e.g. data.sql, I cannot import it to PHPMyAdmin, so as to continue in a my developments (web-related) as there are many errors comming up e.g. #1146.
It is really frustrating since I have to do double work and create what I did in Work Bench in PHP MyAdmin.
Is there a simpler way?
Like can I just connect to a .sql file (as the database) and continue with execution of my projects? (Its a bit stupid, but I have been reduced to that.)
Please help.
Thanks in advance.
This post seems like it might help you out, did you check the default encoding of the dump and make sure mysql expects the right type of encoding?
http://forums.mysql.com/read.php?103,275798,275798
Also: Please read the policies of the board before asking your question. It states to do some research before asking questions like this... I googled "mysql workbench dump to phpmyadmin" and the very first item that popped up was a video explaining this EXACT situation. :)