I used to have old version of Portable Xampp, all my codes where running correctly.
Today I installed the latest version - portable (then I tried install).
The pages is giving a lot of errors and the code is not running
something like this:
Notice: Use of undefined constant server_name - assumed 'server_name' in D:\xampp\htdocs\aviaeng\settings.php on line 14
Notice: Use of undefined constant db_name - assumed 'db_name' in D:\xampp\htdocs\aviaeng\settings.php on line 15
Notice: Use of undefined constant username - assumed 'username' in D:\xampp\htdocs\aviaeng\settings.php on line 16
Notice: Use of undefined constant password - assumed 'password' in D:\xampp\htdocs\aviaeng\settings.php on line 17
Notice: Use of undefined constant contact_email - assumed 'contact_email' in D:\xampp\htdocs\aviaeng\settings.php on line 18
and on the browser I have
<? echo $lang[website_name] ?>
which means the PHP is not being read by Xampp.
What am I doing wrong ?
It seems that your code is not compatible syntaxically speaking with the new PHP version you installed.
With patience, you can debug your code to adapt its syntax to your new PHP version. Courage :)
Related
I was trying to upgrade my opencart version 1.5.6.4 to the latest one, 3.0.2.0 and followed all the instructions and was able to do it. I did the install procedure from mysite.com/install but got the error 1051 which i fixed by a solution here.
Anyway, Now I have done everything, I am getting following code on
[homepage][1]:-
Notice: Use of undefined constant DIR_CACHE - assumed 'DIR_CACHE' in /home/msgcl/public_html/ocart/system/library/cache/file.php on line 9
Notice: Use of undefined constant DIR_CACHE - assumed 'DIR_CACHE' in /home/msgcl/public_html/ocart/system/library/cache/file.php on line 25
Notice: Use of undefined constant DIR_CACHE - assumed 'DIR_CACHE' in /home/msgcl/public_html/ocart/system/library/cache/file.php on line 63
Notice: Use of undefined constant DIR_CACHE - assumed 'DIR_CACHE' in /home/msgcl/public_html/ocart/system/library/cache/file.php on line 47
Notice: Use of undefined constant DIR_CACHE - assumed 'DIR_CACHE' in /home/msgcl/public_html/ocart/system/library/cache/file.php on line 25
Error: A theme has not beeareassigned to this store!
There are also two pop-ups I get after I log in from admin page with something like:
Syntax error - unexpected token > in JSON at position 0
any ideas what this could be referring to? Any help would be appreciated.
Not sure if this is the officially approved fix, but the following worked for me:
In your opencart folder, open the config.php and admin/config.php files and add the following lines to both (adjust the file paths for your installation):
define('DIR_MODIFICATION', '/your/Path/To/opencart/system/modification/');
define('DIR_CACHE', '/your/Path/To/opencart/system/cache/');
define('DIR_LOGS', '/your/Path/To/opencart/system/logs/');
I had similar errors for DIR_MODIFICATION and DIR_LOGS, hence three lines.
Also created the directories on the server in the system subfolder.
Credits for the jump start about he DIR_MODIFICATION error to:
http://www.betterhostreview.com/undefined-constant-dir_modification-opencart-error.html
I'm trying to set up WordPress on my laptop running Kali Linux. Everything works until I install WordPress and the theme I am using. I'm trying to use roots sage on bedrock. But after I get through the installation process I get a notice in the admin:
Notice: Undefined index: host in /var/www/html/site/web/wp/wp-includes/theme.php on line 2937
Notice: Undefined index: host in /var/www/html/site/web/wp/wp-includes/theme.php on line 2937
Notice: Undefined index: host in /var/www/html/site/web/wp/wp-includes/theme.php on line 2999
Notice: Undefined index: host in /var/www/html/site/web/wp/wp-includes/theme.php on line 2999
And in the frontend:
Notice: Undefined index: host in /var/www/html/site/web/wp/wp-includes/theme.php on line 2999
Notice: Undefined index: host in /var/www/html/site/web/wp/wp-includes/theme.php on line 2999
Can anyone explain why I'm getting these notices? I must have missed something but I've gone through the instructions several times and I'm out of ideas. Thanks
You can define WP_HOME & WP_SITEURL in wp-config.php
define('WP_HOME','http://localhost/project_folder_name');
define('WP_SITEURL','http://localhost/project_folder_name');
This can also be caused by an error with the siteurl and home options in wp_options table.
Make sure the url's have a host as well, http://example.com not just example.com.
I just now came across this and for me, switching back from PHP 8.x.x to PHP 7.x.x resolved the issue.
I am trying to connect with PHP to SQL server. I have installed Microsoft ODBC Driver 13 for SQL Server and I have test it using 'isql' command. Now when I am trying to connect to the server in PHP it always crashes and says "http error 500". Here is the code:
<?php
$server = merkur.edikt.local;
$database = ITServiceE;
$connection = odbc_connect("Driver={ODBC DRIVER 13 for SQL Server};
Server=$server;Database=$database;",
'user',
'PW'
);
echo "connected";
?>
I am using Ubuntu 16.04 server and Apache2 and PHP 7.
I think it might be problem with permissions for the Apache(if the Apache can access the ODBC Driver) but I am not really sure how this works.
EDIT:
Here is the log from Apache errors:
PHP Notice: Use of undefined constant merkur - assumed 'merkur' in /var/www/html/index.php on line 2
PHP Notice: Use of undefined constant edikt - assumed 'edikt' in /var/www/html/index.php on line 2
PHP Notice: Use of undefined constant local - assumed 'local' in /var/www/html/index.php on line 2
PHP Notice: Use of undefined constant ITServiceE - assumed 'ITServiceE' in /var/www/html/index.php on line 3
PHP Fatal error: Uncaught Error: Call to undefined function odbc_connect() in /var/www/html/index.php:4\nStack trace:\n#0 {main}\n thrown in /var/www/html/index.php on line 4
and the file odbc.ini is empty and odbcinst.ini looks like this:
[ODBC Driver 13 for SQL Server]
Description=Microsoft ODBC Driver 13 for SQL Server
Driver=/opt/microsoft/msodbcsql/lib64/libmsodbcsql-13.0.so.0.0
Threading=1
UsageCount=2
Call to undefined function odbc_connect() means that your PHP system doesn't have any function with that name.
Since it isn't a user function written in pure PHP but a function from a PHP extension, that means that you haven't installed such extension. It's worth noting that the PHP extensions is not the same as the SQL Server driver (you need both).
Your code also contains some undefined constants which I guess are meant to be strings. I strongly recommend you enable full error reporting in your development box so you don't need to check the error logs to learn about simple errors.
i decided to move my 1.1.19 to 2.07 and move to new directory.
but i couldn't upgrade my forum correctly. because:
repair_settings.php - (in bottom of page we got some error)
Notice: Undefined index: database_error in
/homepages/5/d394578306/htdocs/ResidentEvil/Sources/Subs-Db-mysql.php
on line 572
Fatal error: Call to undefined function allowedTo() in
/homepages/5/d394578306/htdocs/ResidentEvil/Sources/Subs-Db-mysql.php
on line 573
Upgrade.php - (we have many error on this page)
Notice: Undefined index: upgrade_progress in
/homepages/5/d394578306/htdocs/ResidentEvil/upgrade.php on line 3488
same error but on different lines.
Seems you're missing some files. Reupload all the Sources dir and the upgrade files with a software like WinSCP. Avoid FileZilla.
I'm trying to get the Ansinerator library to work my on my localhost, but something's amiss.
I'm receiving the following errors:
Notice: Undefined index: hash in ansi.php on line 23 Notice: Undefined index: aml in ansi.php on line 37 Notice: Undefined variable: PNG_DESTRUCT in ansi.php on line 119 Notice: Undefined offset: -1 in ansi.php on line 362 Notice: Trying to get property of non-object in ansi.php on line 362 Notice: Undefined variable: links in ansi.php on line 459 Notice: Trying to get property of non-object in ansi.php on line 677 Notice: Undefined variable: links in ansi.php on line 459 Notice: Undefined variable: map_link in ansi.php on line 687
Any idea where am I going wrong with this one? I've installed the php-gd library, restarted the server, and while runs perfectly on production server, localhost will refuse. Ideas?
Thank you.
Check
- That you've got 'proper' versions of everything installed on localhost. (Compare localhost with production.) There's obviously something different between the 2 servers here, just use phpinfo() to check.
Restart localhost again? (Just kidding...)
Is it possible that you have set different error reporting levels on both servers?
Before anything, put error_reporting(E_ALL); at the top of your script on both servers and see if it runs perfectly. (My guess is you will get errors on both servers)