Jump to content

[SOLVED] How to disable PHP Magic Quotes?


Recommended Posts

Solution

 

Create a php.ini file

 

and put in /public_html/install

 

 

 

; Magic quotes;; Magic quotes for incoming GET/POST/Cookie data.magic_quotes_gpc = Off; Magic quotes for runtime-generated data, e.g. data from SQL, from exec(), etc.magic_quotes_runtime = Off; Use Sybase-style magic quotes (escape ' with '' instead of \').magic_quotes_sybase = Offextension=pdo.soextension=pdo_mysql.so

 

 

Also is the solution for PDO MySQL extension

 

EF2bc.png

php.zip

php.zip

  • Like 1
Link to comment
Share on other sites

  • 9 months later...

<p>Can any body help me?<br />

I force to install and I got message</p>

<p><b>Required parameters:</b> <span style="color:green;font-weight:bold;">OK</span></p>

<p><b>Optional parameters:</b> <span style="color:red">Please fix the following error(s)</span></p>

<ul>

<li>magicquotes</li>

</ul>

 

Link to comment
Share on other sites

Hello Vekia,

I have moved to an vps server, all things going well, but I received the same message in BO.

Now, the vps are new for me and it used the Direct Admin panel.

Now, I want to chance the server setting for this issue, but I don't know how to go inside these settings.

 

Best Regards,

Generaal

Link to comment
Share on other sites

you have to log to your server via SSH, then go to the PHP installation directory, open the php.ini file and change values described several posts above.

 

you have to be familiar with UNIX os (bash commnads)

Link to comment
Share on other sites

Ha ok vekia,

I have try to change the file via FTP and notepad++, but it have to do the change on the server, to solve this error reporting.

I will go for the nessesary documentation to learn something to do from the baseline.

Thanks for the replay.

 

Best Regards,

Generaal

Edited by Generaal (see edit history)
Link to comment
Share on other sites

  • 6 months later...

Alternatively you can create a new file named .htaccess and paste the following code:

<IfModule mod_php5.c>
php_flag magic_quotes_gpc off
</IfModule>

Older PHP versions will require this:

<IfModule mod_php.c>
php_flag magic_quotes_gpc off
</IfModule>

Upload it to the directory of your prestashop files.

Edited by rafaelvidal (see edit history)
  • Like 1
Link to comment
Share on other sites

Ha ok vekia,

I have try to change the file via FTP and notepad++, but it have to do the change on the server, to solve this error reporting.

I will go for the nessesary documentation to learn something to do from the baseline.

Thanks for the replay.

 

Best Regards,

Generaal

You can still do it from Notepad++.

Create a SSH connection to your server, it's pretty much like FTP, but you may use different data (HOST, PORT, USERNAME AND PASSWORD)

 

Host: your host IP

Port: 22 (usually)

Username: root (usually)

Password: your password

 

Then you can browse your directories and edit 'php.ini'.

After that you must login with a shell to restart your apache service: '/etc/init.d/httpd restart' (this command may vary from distros).

Link to comment
Share on other sites

  • 1 year later...

Solution

 

Create a php.ini file

 

and put in /public_html/install

 

 

; Magic quotes
;
; Magic quotes for incoming GET/POST/Cookie data.
magic_quotes_gpc = Off
; Magic quotes for runtime-generated data, e.g. data from SQL, from exec(), etc.
magic_quotes_runtime = Off
; Use Sybase-style magic quotes (escape ' with '' instead of \').
magic_quotes_sybase = Off
extension=pdo.so
extension=pdo_mysql.so
Also is the solution for PDO MySQL extension

 

EF2bc.png

 

 

Hi, what should I do if I already have a php.ini file that has the following code?

 

memory_limit = 512M
zend_extension=/usr/local/php53/lib/php/extensions/ioncube.so
zend_extension=/usr/local/php53/lib/php/extensions/ZendOptimizer.so

I do need some serious help in the email templates... :( Having the same problem reported in https://www.prestashop.com/forums/topic/394827-html-for-default-email-template-not-working/

Link to comment
Share on other sites

  • 1 year later...

I can verify that the fix posted by jpBenfica on 14 September 2012 worked for me:

 

Cut and paste the following code into the php.ini file in public_html: 

 

; Disable PHP magic quotes
magic_quotes_gpc = Off
magic_quotes_runtime = Off
magic_quotes_sybase = Off
; Load PDO MySQL extension
extension=pdo.so
extension=pdo_mysql.so
 
I upgraded to PrestaShop version 1.6.1.4 this weekend. After I went live with the shop, I received a notification from PayPal that an order had been placed and paid for.
I went to PrestaShop Back Office and there was no record of the order. Fortunately, PayPal captured all of the information I needed to ship the product.
 
I edited the php.ini file with the recommended code and uploaded back to the server.
I then created a 35 cent product and purchased the product as a buyer to test the user experience and to ensure the fix worked. I was able to purchase the product using one page checkout and the order was recorded in the Back Office.
 
Thanks for the fix!
Link to comment
Share on other sites

×
×
  • Create New...