PDA

View Full Version : PEQ Editor error assistance.


jaspen
05-19-2016, 12:19 PM
I realize this is probably more proper to post on the PEQ forums but I feel comfortable with the community here. If you feel it is out of place, let me know.

I am trying to set up PEQ editor on my server. I downloaded from https://github.com/ProjectEQ/peqphpeditor using git bash. I followed the instructions in the readme, which were the same as the website's, and get the following error.

Fatal error: Call to undefined function mysql_connect() in C:\xampp\htdocs\peqedit\classes\mysql.php on line 6

This is what I have for my index.php setting that has to do with mysql logging in. It is the same information in my eqemu_config.xml

// Database Information:
$dbhost = '127.0.0.1'; (I have tried the actual IP and even localhost here.)
$dbuser = 'root';
$dbpass = 'mypassword'; ( I have omitted the actual password.)
$db = 'peq';
$mysql_class = 'mysql'; // Use mysql or mysqli


Here is an exert from the mysql.ini it is referencing.

class mysql {

function mysql($username, $password, $database, $host) {
mysql_connect("$host", "$username", "$password") (This is actually line 6)
or die('Could not connect: ' . mysql_error());
mysql_select_db("$database")
or die('Could not select database');
}

Feel free to point out my newbish mistake.

NatedogEZ
05-19-2016, 12:37 PM
Go into Xampp and open the php.ini

http://img.prntscr.com/img?url=http://i.imgur.com/5Mkugy8.png


Search for... "php_mysql.dll"

and make sure it doesnt have a ; in the front.

If that was the problem .. save the file and restart Apache.

jaspen
05-19-2016, 01:07 PM
That was it. It actually had two ;. Seems there was extra hate for that one!

Interestingly enough after logging in I presume it wants me to upgrade. It says don't panic, Project Everquest Online Editing Interface, PEQ Official Revision and has a link to 30 March 2016. That link resolves to https://github.com/ProjectEQ/peqphpeditor. That link is the same as you will see in the example below from where I downloaded the files originally. In the upper right it says Version 1.0 in the banner

I used the following command to pull, what I thought to be, the new files. Perhaps, I made a mistake here.

git clone git://github.com/ProjectEQ/peqphpeditor .

EDIT: Made a correction.

NatedogEZ
05-19-2016, 01:30 PM
The github version is the most up to date peq editor so if you have that you should be fine.

jaspen
05-19-2016, 01:40 PM
This is the screen I get after logging in. Perhaps I am missing where to go or what to click to get to the editor itself.

http://img.prntscr.com/img?url=http://i.imgur.com/fvpQJSG.png

wirepuller134
05-19-2016, 02:55 PM
go through the steps on the read me that was downloaded with the editor. That looks to me like you missed step 2.

jaspen
05-19-2016, 03:17 PM
I did read and follow part two. I searched again in the ini file and found that there are two sections that mention the short_open_tag = On. Below, the first part is where I added it. The second part is further down where there was another version that I missed that was already there. I am sure there is a good reason why there are two sections for the same thing. This is what threw me off. Thanks for the help everyone.

; short_open_tag
; Default Value: On
; Development Value: Off
; Production Value: Off
short_open_tag = On


; used regardless of this directive.
; Default Value: On
; Development Value: Off
; Production Value: Off
; http://php.net/short-open-tag
short_open_tag=Off

NatedogEZ
05-19-2016, 05:18 PM
Glad you got it working it is a great tool for server devs.

jaspen
05-19-2016, 07:42 PM
I have been fooling around in the different sections and a couple of spots I have found an error in the page. Most everything appears to be fine. Below are two examples. One is creating a new item. You will see two errors along with the corresponding line code to the right. The other is when I go to tradeskills. You will see a large error at the top of the page and one near the bottom. I also have the corresponding line code for that as well. I know the images are large but I wanted to try and show everything for you.

If this is part of the recommended suppressing NOTICE and WARNING messages under error_reporting, let me know. I looked around and couldn't find a clear example of what to type to do that.

http://img.prntscr.com/img?url=http://i.imgur.com/D5npvjx.png





http://img.prntscr.com/img?url=http://i.imgur.com/dZDpCHr.png

NatedogEZ
05-19-2016, 09:10 PM
Go back inside the php.ini and search for "display_errors" and make sure it is set to Off

Then restart apache and you shouldn't see those warnings anymore.

jaspen
05-19-2016, 10:47 PM
Thanks. So those errors are not anything to worry about then? I didn't want to risk corrupting my database.

Xanathol
05-06-2019, 10:46 AM
Hate to ressurect an old thread but the error I am getting with the latest pull is the same as the start of this thread:

Fatal error: Uncaught Error: Call to undefined function mysql_connect() in
C:\xampp\htdocs\peqeditor\classes\mysql.php:6 Stack trace: #0 C:\xampp\htdocs
\peqeditor\classes\mysql.php(74): mysql->mysql(NULL, NULL, NULL, NULL) #1 C:\
xampp\htdocs\peqeditor\index.php(5): require_once('C:\\xampp\\htdocs...') #2
{main} thrown in C:\xampp\htdocs\peqeditor\classes\mysql.php on line 6

Thing is, I do not have a "php_mysql.dll" anywhere in my php.ini.

Any ideas?

joligario
05-06-2019, 01:02 PM
The latest pull should default to mysqli. Check your editor config to make sure.

Xanathol
05-06-2019, 04:36 PM
Thanks - turns out I only though I was on the latest. I wasn't and once I was, it did not have that set but setting it resolved that issue.

Edit: ran into undefined errors after that but had missed a supression so that's gone now too. Thanks!