My Sql extension error in wamp server - wampserver

I'm making a simple login and registration web pages using core php. I'm having problem with the mySql extension problem. I don't know why i'm seeing this php error? and how can I solve this? Please help me you experts.and also I don't have idea how to use mysqli.

This is not an error it is a warning!
the mysql_ database extension, is deprecated (gone for ever in PHP7)
Specially if you are just learning PHP, spend your energies learning the PDO database extensions.
Start here
You can stop this error from being produced by making a change to the php.ini file.
left click wampmanager-> PHP -> php.ini
Find this line, its on line 449 aproximately
error_reporting = E_ALL
and change it to
error_reporting = E_ALL & ~E_DEPRECATED

Related

ExtJs 3.4, ExtDirect, Symfony and PHP 8.2 -> no data is returned

We are currently upgrading PHP form 7.1 to PHP 8.2 for a legacy application which uses Apache, FriendsOfSymfony 1.5.15, ExtJs 3.4 and ExtDirect.
The following problem occurs: Sending a request to the Symfony backend creates the result as expected. The ExtDirect plugin, dsExtDirectPlugin, handles the request and response until a certain point in the dsExtDirectRouter.class.php where the code echos the response from the Symfony endpoint:
echo json_encode(self::$response);
From this point on Symfony shutdowns down logging,... and I expect that the response echod is used in JavaScript from that point on, but in the Firefox development tools, I see "no data available" in the network tab. So the output doesn't seem to come to the frontend / is suppressed from being echod?
Does anyone have a clue what can cause this? Do I need an additional php or apache config?
Thanks and kind regards,
Dirk
I found the solution for my prolbem: fastcgi_finish_request seems to be executed too early. Probably there's still some kind of misconfiguration on the Apache / PHP. If I directly add the fastcgi_finish_request call after the result "echo" and comment out the method call in the sfWebResponse (cached) class, it works. Of course not the final solution to comment something out in a commented class, but at least knowing the problem is a first step to the final solution.

local and remote zend server

I'm learning Zend framework 2 therefore i downloaded the zendstudio IDE included with the zend server as well. I made my little application which is working totally fine on my local zend server. I wanted to try zend PHP cloud as well so i deployed my application there with zend studio. This application didn't work perfectly there. Some of the content is working and the other parts did not load at all only white screen. I checked the server logs and this is what i found there:
Function Name Zend\Loader\StandardAutoloader::loadClass
Error Type E_COMPILE_ERROR
Source File /home/container_name/.apps/http/__default__/0/app/1.0.0/vendor/zendframework/zendframework/library/Zend/Loader/StandardAutoloader.php
Error String Can't use method return value in write context
I thought that there might be an error during file uploading so i re uploaded the files via an ftp client and the problem is still exists.
Any help is greatly appreciated
After a couple of hours of code trace i found the solution:
if($this->request->isPost()){
if(!empty($this->getRequest()->getPost('sg')) <--- this is the line where it dies
Remote wasn't liked the !empty() so i replaced it with !=''

Can't upload attachment on MoinMoin

I have installed MoinMoin on my Windows machine:
MoinMoin 1.9.7,
Python 2.7
However, I can't upload an attachment to any page. I got the following error whenever I click "Upload":
Bad Request
The browser (or proxy) sent a request that this server could not understand.
I've tried Python 2.5 too and the behavior is the same.
well, you don't give enough details so one could really help you.
so I can just say that this is unusual. it is unlikely a problem in moinmoin or in python.
maybe some problem with your installation or web server configuration.
maybe have a look into the web server logs.

ZF2 Fatal error: Class 'Locale' not found in /home/...../Zend/I18n/Translator/Translator.php on line 228

I have a project in my localhost, already running, after modifying the php.ini of my XAMPP server [running on Windows 7] (adding: extension=php-intl.dll).
But when i upload this project to my GoDaddy hosting, it doesn´t works and get the following error:
Fatal error: Class 'Locale' not found in /home/content/41/9674641/html/library/zend.2.0.4/Zend/I18n/Translator/Translator.php on line 228
GoDaddy hosting details:
Php version 5.3
Operating system: Linux
i386-redhat-linux-gnu
Zend Framework details:
Zend Library: 2.0.4
I´ve tried what they say on the following links:
http://support.godaddy.com/help/article/1085/can-i-add-a-php-initialization-file-to-my-hosting-account?locale=en
http://support.godaddy.com/help/article/5647/why-isnt-my-phpini-file-taking-effect?locale=en&ci=46061
Also, i´ve called to 24/7 goDaddy support and they suggested me to create a php5.ini file in the root directory, then, they told me to stop all web services (Cpanel/Stats & Monitors/System Processes/end web), but they didn´t told me what do i need to include in the php5.ini file.
I was reading some links and, as my localhost is a windows one, adding the extension=php-intl.dll to the php.ini file worked. So i´ve tried to include in my godaddy linux server: extension=php-intl.so but doesn´t works (neither extension=php-intl.dll).
The problem with the goDaddy hosting began when i started using ZF2 FORMs.
Updates:
1) I´ve got access to the php5.ini of the goDaddy server (i have made a copy on the root of my hosting) using PUTTY: cp /web/conf/php5.ini /var/chroot/home/content/41/9674641/html
Then i have read it and i could not find the "intl" extension, instead of this, i only could find:
; Windows Extensions
; Note that ODBC support is built in, so no dll is needed for it.
; Note that many DLL files are located in the extensions/ (PHP 4) ext/ (PHP 5)
; extension folders as well as the separate PECL DLL download (PHP 5).
; Be sure to appropriately set the extension_dir directive.
;extension=php_mbstring.dll
;extension=php_bz2.dll
;extension=php_curl.dll
;extension=php_dba.dll
;extension=php_dbase.dll
;extension=php_exif.dll
;extension=php_fdf.dll
;extension=php_filepro.dll
;extension=php_gd2.dll
;extension=php_gettext.dll
;extension=php_ifx.dll
;extension=php_imap.dll
;extension=php_interbase.dll
;extension=php_ldap.dll
;extension=php_mcrypt.dll
;extension=php_mhash.dll
;extension=php_mime_magic.dll
;extension=php_ming.dll
;extension=php_mssql.dll
;extension=php_msql.dll
;extension=php_mysql.dll
;extension=php_oci8.dll
;extension=php_openssl.dll
;extension=php_oracle.dll
;extension=php_pgsql.dll
;extension=php_shmop.dll
;extension=php_snmp.dll
;extension=php_sockets.dll
;extension=php_sqlite.dll
;extension=php_sybase_ct.dll
;extension=php_tidy.dll
;extension=php_xmlrpc.dll
;extension=php_xsl.dll
2) goDaddy response to my formal support request (ticket):
Thank you for contacting Online Support
I understand you are wanting to get Internationalization extension on
to your hosting account. At this time these are not supported in our
systems at this time. We are going to review this with our developers
to more information. You may receive an email us down the road with
addition information about this.
Please let us know if we can assist you in any other way.
Now i'm thinking that i have two problems:
A) Include the line to enable the extension (i don't know how):
Maybe could be:
extension_dir=/var/chroot/home/content/41/9674641/html/library/extensions/php-intl/usr/lib64/php/modules
extension="intl.so"
B) Include the extension in some location inside my hosting (but i don´t know how):
Maybe i could put the extension files inside: /var/chroot/home/content/41/9674641/html/library/extensions/php-intl
Also, i don't know where to acquire the extension files
C) Is there any known update on ZF2 (skeleton, library ..) that solve this issue ?
Please, i need help as soon as possible.
You can manage PHP modules by using the "Change PHP version" feature of the cPanel interface. Select any version other than "native" and a list of checkboxes will appear.
http://support.godaddy.com/help/article/3937/viewing-or-changing-your-php-language-version?pc_split_value=2
Of course, their support might not immediately mention this solution, which should have been in their knowledge base in the first place.

Connection issue in JayBird

I am new to Firebird using its Java version Jaybird, But unable to connect from database (.fdb file). The problem comes like this:
org.firebirdsql.jdbc.FBSQLException: GDS Exception. 335544375. unavailable database
OR
java.lang.RuntimeException: Failed to initilize Jaybird native library. This is most likley due to a failure to load the firebird client library.
Using following code:
Class.forName("org.firebirdsql.jdbc.FBDriver").newInstance();
connection = DriverManager.getConnection("jdbc:firebirdsql://localhost/3050:C:/XLNKREPOS /FIRBIRDXA.FDB", "SYSDBA", "masterkey");
Having following files in build path of Eclipse project:
jaybird-full-2.1.5.jar
jaybird21.dll
fbclient.dll
fbembed.dll
Also using the JVM arguments as -Djava.library.path="D:\Shared\Firebird\Jaybird-2.1.5JDK_1.5"
Tell me what is wrong in my approach?
Thanks RRUZ for giving repsonse.
Actually there was no space after "C:/XLNKREPOS" in my connection string, It was a copy past mistake. Again & again I got the following SQL Exception:
org.firebirdsql.jdbc.FBSQLException: GDS Exception. 335544375. unavailable database
And that database is no where used in other program.
Hope my this post makes you understand my problem.
Thanks
The OP is mixing two jdbc url formats supported by Jaybird.
Either use
jdbc:firebirdsql://[host]{:[port]}/[path]
or
jdbc:firebirdsql:[host]{/[port]}:[path]
{...} used to indicate optional part
I think the problem must be the connection string, there is a blank space after "C:/XLNKREPOS"
Try this
connection = DriverManager.getConnection("jdbc:firebirdsql://localhost/3050:C:/XLNKREPOS/FIRBIRDXA.FDB", "SYSDBA", "masterkey");
Bye.
When I got this error it was because I was using x64 Firebird version instead of the standard x86 version. I thought since I was running a 64bit OS that those embedded binaries corresponded to me... Hopefully that fixes your problem.
Troubleshooting Tips:
I was also able to further diagnose additional Firebird problems by adding the latest log4j jar from apache's site to my project/classpath. I then added a log4j.properties file to my default/root src directory with the following properties set inside:
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=[%c{1},%p] %m%n
log4j.rootCategory=DEBUG, stdout
log4j.category.org.firebirdsql=DEBUG, stdout
I also had to set System.setProperty("FBLog4j", "true"); in my code.
Another thing you can do is make sure you're running the latest and greatest from their repository at http://firebird.cvs.sourceforge.net/viewvc/firebird/client-java/?view=tar
Just unzip the tarball and compile it using their supplied build script (build.bat/build.sh). After compilation look in the 'output/lib' directory and you'll find the latest version of the jaybird jar (as of right now it's 2.2.0). You'll also need the latest jaybird dll (as of right now it's 22) which is located in the 'native' directory. I went through a lot of pain trying to figure this crap out. The documentation on Firebird's site is very outdated and poorly written.
I had the same problem, it was caused by those slashes before localhost.
That URL should be:
jdbc:firebirdsql:localhost/3050:C:/XLNKREPOS/FIRBIRDXA.FDB",

Resources