Search Results

Search found 31819 results on 1273 pages for 'sphinx php'.

Page 35/1273 | < Previous Page | 31 32 33 34 35 36 37 38 39 40 41 42  | Next Page >

  • How to make a PHP function triggered automatically at a user defined time

    - by mithilatw
    I am developing an internal system for a company with PHP using Zend framework. I need one of its functions to execute on a time specified by user. My research on this matter found me several ways of doing this using CPanel Cron jobs and setting up scheduled tasks on the server. But in this scenario, I don't have a CPanel and I already use scheduled tasks. But my challenge is to provide an interface for the user to specify the time to trigger the function.

    Read the article

  • PHP Fingerprinting CMS Versions by their meta tags [migrated]

    - by Mud
    Hey guys I'm having some issues with the speed of my script. I'm a novice I know so getting past that - what suggestions would you have to speed up my script? I was originally just reading in the index.php and then searching the <head> of the page for an array of strings. Then I read about the get_meta_tags and went that way. Then I had issues with some sites having 300 redirects in place so I used curl to check the URL existed and to speed up things but it's still taking 5 minutes or so to execute. <?php function url_exist($url){ $c=curl_init(); curl_setopt($c,CURLOPT_URL,$url); curl_setopt($c,CURLOPT_HEADER,1); curl_setopt($c,CURLOPT_NOBODY,1); curl_setopt($c,CURLOPT_RETURNTRANSFER,1); curl_setopt($c,CURLOPT_FRESH_CONNECT,1); if(!curl_exec($c)){ return false; }else{ return true; } curl_close($c); } function checkVersion($url){ $tags = get_meta_tags($url); if (is_array($tags) && array_key_exists('generator', $tags)) { $v = "<span style='background-color:#7BF55D;color:#A3A0A0'>".$tags['generator']."</span"; }else{ $v="<span style='background-color:#F55D67;color:#A3A0A0'>Metatag not found!</span>"; } return $v; } $row = 1; echo "<table>"; if (($handle = fopen("url.csv", "r")) !== FALSE) { while (($data = fgetcsv($handle, 1000, ",")) !== FALSE) { $num = count($data); $row++; for ($c=0; $c < $num; $c++) { if(url_exist($data[$c])){ echo "<tr><td>".$data[$c]."</td><td>".checkVersion($data[$c])."</td></tr>"; sleep(2); }else{ echo "<tr><td>".$data[$c]."</td><td><td><span style='background-color:#F55D5D;color:#A3A0A0'>URL not valid!<span></td></tr>"; } } } fclose($handle); } echo "</table>"; ?>

    Read the article

  • Learning PHP from beginner to advanced

    - by Liam
    I've dabbled with PHP for a few years now and I'm capable of most of the basic things, building login forms etc but from my time on here I've noticed there's so much more I need to learn, like best practices, security issues etc and so I want to learn everything from the very basics. In the past I've used forums and browsed the web for snippets of code only I think this has led to my bad practices, can anybody recommend books or Valid, recommended learning sources? Thanks in advance!

    Read the article

  • Most common Apache and PHP configuration for portable Web Applications

    - by Mahan
    I always create web application using PHP but I always distribute and deploy my works to different kinds of server platforms and web server configurations. Thus I always encounter problems in deployment because some features are enabled and others are disabled. And my question, is there a standard web server configuration that is commonly used by most of web servers worldwide? covering the aspects of reliability, security and maintainability?

    Read the article

  • Learning PHP from beginner to advanced [closed]

    - by Liam
    I've dabbled with PHP for a few years now and I'm capable of most of the basic things, building login forms etc but from my time on here I've noticed there's so much more I need to learn, like best practices, security issues etc and so I want to learn everything from the very basics. In the past I've used forums and browsed the web for snippets of code only I think this has led to my bad practices, can anybody recommend books or Valid, recommended learning sources? Thanks in advance!

    Read the article

  • Native PHP vs exec()

    - by resting
    Just wondering, assuming no security issues, that is, you're in total control of the command passed to exec(), is there a difference (in terms of speed or standards) between using exec() vs native PHP? Example just to name a few use cases: Using the DirectoryIterator vs exec(ls -1, $output), to list all files. List 100 files from the 99th file onwards (that is, file 100 to 199) Count total number of files in directory.

    Read the article

  • Problem making system calls with PHP scripts

    - by mazin k.
    I have the following PHP script: <?php $fortune = `fortune`; echo $fortune; ?> but the output is simply blank (no visible errors thrown). However, if I run php -a, it works: php > echo `fortune`; Be careful of reading health books, you might die of a misprint. -- Mark Twain php > Am I missing a config directive or something that would cause this? Edit: So, I tried running my script using $ php-cgi fortunetest.php and it worked as expected. Maybe the issue is with Apache2?

    Read the article

  • Error installing php extension OAuth via pecl

    - by PJ
    I'm trying to install the php extension OAuth in my local environment. php.net suggests it's super easy. You just run pecl install oauth. I tried this, and here is the output in terminal: downloading oauth-1.0.0.tgz ... Starting to download oauth-1.0.0.tgz (42,834 bytes) ............done: 42,834 bytes 6 source files, building running: phpize grep: /usr/include/php/main/php.h: No such file or directory grep: /usr/include/php/Zend/zend_modules.h: No such file or directory grep: /usr/include/php/Zend/zend_extensions.h: No such file or directory Configuring for: PHP Api Version: Zend Module Api No: Zend Extension Api No: Cannot find autoconf. Please check your autoconf installation and the $PHP_AUTOCONF environment variable. Then, rerun this script. ERROR: `phpize' failed Any tips on how to fix the errors and install OAuth succesfully? I'm on Mac OS X 10.6.3 Thanks!

    Read the article

  • [Resolved] Finishing the install of php-xmlrpc on a VPS

    - by wp
    Hi, please help if possible: 1) I was able to completely install php-xmlrpc on a different VPS which uses lxAdmin control panel, without even needing to rebuild php. 2) On a VPS with Direct Admin, I followed detailed instructions (found at the DA site), this included rebuilding php, and after reboot, xml/rpc still doesn't show up in phpinfo.php. Details: centOS 5.3 php5.2.10 php-xmlrpc is installed on the VPS, and the installation "success" was confirmed at the time. Several days later, PHP was rebuilt following detailed instructions (for adding extra modules) provided by direct admin at their site. In the end, xml/rpc still doesn't show up in phpinfo.php. Anyone know how to make this work with Direct Admin? Thank you.

    Read the article

  • CentOS - PHP - Yum Install with Custom ./configure params

    - by Mike Purcell
    I have successfully configured and compiled php on my dev server, and works great, but after talking to a sysadmin buddy, he informed that custom compiles of the latest builds are not recommended for production (or even development) systems. He noted a situation where they custom configured and compiled PHP 5.3.6, only to find that there was some issue with a low-level Postgres driver, so they had to revert back to 5.3.3. So I am considering going back to yum to install PHP, however I have several custom configuration settings and was wondering if it's possible to pass or configure how PHP will be compiled through YUM? My current configure line: Configure Command => './configure' '--with-libdir=lib64' '--prefix=/usr/local/_custom/app/php' '--with-config-file-path=/usr/local/_custom/app/php/etc' '--with-config-file-scan-dir=/usr/local/_custom/app/php/etc/modules' '--disable-all' '--with-apxs2=/usr/sbin/apxs' '--with-curl=/usr/sbin/curl' '--with-gd' '--with-iconv' '--with-jpeg-dir=/usr/lib' '--with-mcrypt=/usr/bin' '--with-pcre-regex' '--with-pdo-mysql=mysqlnd' '--with-png-dir=/usr/lib' '--with-zlib' '--enable-ctype' '--enable-dom' '--enable-hash' '--enable-json' '--enable-libxml' '--enable-mbstring' '--enable-mbregex' '--enable-pdo' '--enable-session' '--enable-simplexml' '--enable-xml' '--enable-xmlreader' '--enable-xmlwriter'

    Read the article

  • PHP-FPM not working with nginx and CentOS

    - by Daniel
    After failing to get FastCGI to work with PHP I have installed the PHP-FPM service which is reported to work out of the box, however PHP files are downloading instead of executing. This is what I have in the nginx.conf file: server { listen 80; server_name pubserver; root /usr/share/nginx/html; location ~ \.php$ { fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME /usr/share/nginx/html$fastcgi_script_name; fastcgi_param PATH_INFO $fastcgi_script_name; include /etc/nginx/fastcgi_params; } } The command netstat -tulpn | grep :9000 displays this which suggests PHP-FPM is running: tcp 0 0 127.0.0.1:9000 0.0.0.0:* LISTEN 1058/php-fpm.conf)

    Read the article

  • Upgrading openSUSE 11.1 with Plesk Panel 9.3 to PHP 5.3

    - by Jonathan
    I'm running a VPS with openSUSE 11.1 (i586). On the VPS is Parallels Plesk Panel 9.3.0 installed. The current PHP-version is PHP 5.2.11. I want to upgrade PHP to PHP 5.3, but I can't find good instructions on how to do this. If I check for updates in Zypper, it says this is the latest release. In the Plesk Updates isn't an update either, both via the webbased interface and the command line interface. On Software.openSUSE.org I can find packages for PHP 5.3.1 in both the server:php/server_apache_openSUSE_11.1-repo and the server:php/openSUSE_11.1-repo (can't post the link because I'm a newbie here). But if I add one of those to Zypper, I still don't see an update. Is there here somebody who knows how to do this? And is it completely safe to update that way? I don't want to end up with a broken VPS... Thanks! Jonathan

    Read the article

  • Problem with running php script using mysql on tomcat

    - by Peter
    I am using tomcat 6 with JavaBridge. I have stored my php script in the following location. C:\Program Files\apache-tomcat-6.0.26\webapps\JavaBridge\project\test.php In test.php I am using curl and mysql. The php.ini in JavaBridge is stored in the following location C:\Program Files\apache-tomcat-6.0.26\webapps\JavaBridge\WEB-INF\cgi\php.ini and its contents are - extension_dir="C:\Program Files\apache-tomcat-6.0.26\webapps\JavaBridge\WEB-INF\cgi\x86-windows\ext" include_path="C:\Program Files\apache-tomcat-6.0.26\webapps\JavaBridge\WEB-INF\pear;." there is also a config file called mysql.ini whose contents are - extension = php_mysql.dll I had also installed wamp earlier so I copied all the dll's from C:\wamp\bin\php\php5.3.0\ext to C:\Program Files\apache-tomcat-6.0.26\webapps\JavaBridge\WEB-INF\cgi\x86-windows\ext When I start tomcat and run my script I get the following error - Fatal error: Call to undefined function mysqli_connect() in C:\Program Files\apache-tomcat-6.0.26\webapps\JavaBridge\project\test.php on line 534 Please help.

    Read the article

  • PHP 5.4 not available for windows + Apache?

    - by user410932
    I'd like to install the new PHP 5.4 on my Windows machine. I'm running Apache 2.2 on it. Reading the info on http://windows.php.net/download/, it says "If you are using PHP with Apache 1 or Apache2 from apache.org you need to use the VC6 versions of PHP". I guess I'm in that case, I just donloaded Apache from apache.org. However, there are no VC6 versions available of PHP 5.4, not even of PHP 5.3. How can I install PHP 5.4 on my Windows machine then ?

    Read the article

  • Errors installing the Curl library with PHP/Apache/Windows

    - by MarathonStudios
    I'm having a hell of a time getting Curl to work with PHP/Apache on my Windows XP 64-bit development box. I have PHP and Apache successfully installed, but when I tried to enable Curl I get the following error (twice) from PHP on Apache startup: "PHP Startup: Unable to load dynamic library 'C:\php\ext\php_curl.dll' - The operating system cannot run %1." I did uncomment the correct line in PHP.ini. I did move the two DLLs (php_curl.dll and ssleay32.dll) into my PHO root, into my System32, even my apache root - but no matter where I put them, PHP can't find them. I keep getting the error above. Anyone have any idea how to remedy this?

    Read the article

  • No input file specified on nginx and php-cgi

    - by Sandeep Bansal
    I'm trying to run nginx and php-cgi on my Windows PC, I've got up to the point where I want to move the html directory back two directory's so I can sort of create a structure. The only problem I have now is that PHP doesn't pick up any .php file. I have tried loading a static html file (localhost/test.html) and it works fine but localhost/info.php doesn't work at all. Can anyone give me some guidance on this? The part of the server block can be found below. server { listen 80; server_name localhost; root ../../www; index index.html index.htm index.php; #charset koi8-r; #access_log logs/host.access.log main; location ~ \.php$ { fastcgi_pass 127.0.0.1:9123; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } Thanks

    Read the article

  • How to set the PHP Api Version for phpize

    - by Tom Frost
    I'm upgrading php on my server but I'm running into a problem with phpize and compiling external modules. phpize -v reports: Configuring for: PHP Api Version: 20041225 Zend Module Api No: 20090115 Zend Extension Api No: 220090115 But on my test server (which I'm trying to replicate) I get this: Configuring for: PHP Api Version: 20090626 Zend Module Api No: 20090626 Zend Extension Api No: 220090626 I'm running debian squeeze, pulling the php 5.3.0-2 packages from the experimental repo. The difference betweent he two servers is that the first server has had old verisons of php on it, and the test server was installed with php 5.3.0-2 from the start. I've attempted uninstalling all PHP packages from the first server (using --purge to get rid of all the config files) and re-installing 5.3 fresh, but I'm still having the same issue. Help!

    Read the article

  • Link mysql with php on apache

    - by Cristy
    THE STORY: I've installed Apache 2.2.17 , PHP 5.2.16 , MySQL 5.5.8 . The PHP woks great, the phpinfo() works on the localhost. THE PROBLEM: The thing is that in phpinfo() there is no mysql mentionened. I've done the following: moved php.ini to C:\windows removed the ";" in front of the mysql extension line ( extension=php_mysql.dll ) copied the libmysql.dll to php folder & windows\system32 checked the extension path in php.ini to be " C:\php\ext" searched the internet for a solution for about 2 hours... ADDITIONAL INFO: In the Apache Enviorment path I have the following: C:\Program Files (x86)\PHP\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\QuickTime\QTSystem\;C:\OJI\MinGWStudio\work\mingw\bin;C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\DTS\Binn\; I think the Microsoft SQL path should be replaced with the MySQL one, but I don't know where to change that...

    Read the article

  • What permissions / ownership to set on PHP Sessions Folder when running FastCGI / PHP-FPM (as user "nobody")?

    - by Professor Frink
    I'm having trouble getting a number of scripts running because PHP-FPM can't write to my session folder: "2009/10/01 23:54:07 [error] 17830#0: *24 FastCGI sent in stderr: "PHP Warning: Unknown: open(/var/lib/php/session/sess_cskfq4godj4ka2a637i5lq41o5, O_RDWR) failed: Permission denied (13) in Unknown on line 0 PHP Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/var/lib/php/session) in Unknown on line 0" while reading upstream" Obviously this is a permission issue; my session folder's owner/group is the webserver's user, NGINX. PHP-FPM runs as nobody though, and hence adding it to the nginx group is not so trivial. A temporary solution is to set the permissions of /var/lib/php/session to 777 - I have a feeling that's not the "best practice" though. What is the best practice when you need to assign a daemon write access to a folder, but it is running as nobody ?

    Read the article

  • Error with Internationalization extension while compiling php 5.4.8

    - by Umakant Patil
    I downloaded latest php version from php.net i.e. PHP 5.4.8 I configured it with following command ./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql --enable-intl --with-libdir=lib64 --with-pear --with-mcrypt --with-mhash --enable-mbstring --with-iconv --with-icu-dir=/usr --with-gettext --with-curl --with-mysqli --with-freetype --with-gd --with-curlwrappers --with-jpeg-dir=/usr --with-png-dir=/usr After this I run 'make' which start building / compiling PHP. After some time It throws me error ext/intl/.libs/php_intl.o: In function `zm_startup_intl': php-5.4.8/ext/intl/php_intl.c:651: undefined reference to `spoofchecker_register_Spoofchecker_class' php-5.4.8/ext/intl/php_intl.c:654: undefined reference to `spoofchecker_register_constants' collect2: ld returned 1 exit status make: *** [sapi/cli/php] Error 1 Spent lots of hours finding solutions. I can't come out of any. Does anyone know what this error exactly means? How to get rid of this error?

    Read the article

  • Updating PHP on a Plesk managed Server

    - by mblaettermann
    I just updated PHP and MySQl on my VPS with the current Versions from Atomic Repo. Everything worked out fine so far. From console I get the new PHP 5.3: [root@server phpMyAdmin]# php -v PHP 5.3.16 (cli) (built: Aug 20 2012 11:18:05) Copyright (c) 1997-2012 The PHP Group Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies with the ionCube PHP Loader v4.0.5, Copyright (c) 2002-2011, by ionCube Ltd. But through Apache I still get the old version (5.1.6). The server is running some old version of crappy Plesk Panel. That gives me the option to choose between Apache Modul, fCGI and CGI-BIN. Any hints, how to update apache, so it will use the new PHP Version? EDIT: I just needed to restart httpd (/etc/init.d/httpd restart)

    Read the article

  • Install additional PHP version in different folder on Ubuntu 8.04

    - by chessweb
    Hi, I'm on a Host Europe VPS running Ubuntu 8.04 server. PHP version is 5.2.4. Now there is an application (Moodle 2.0) that needs at least PHP 5.2.8. I don't want to upgrade serverwide to PHP 5.2.8 because that might impair other applications (e.g. Plesk). The FAQ at Host Europe suggest to install an additional PHP 5.2.8 in /opt/php and I think I can handle that with $ dpkg -i php_..._.deb --root /opt/php (Is that correct, by the way?) However, how do I point Apache to the new PHP installation? Thanks for any advice, Ralf

    Read the article

  • Creating a portable PHP install?

    - by Xeoncross
    I would like to create a folder with a couple versions of PHP that I can start in cgi mode as needed. I use different windows machines for development and I would like to be able to move around computers without needing to install PHP on each one. Something like below F:/PHP /5.3.2 /5.2.8 /5.1.0 Then I could just start each up as needed with something like F:\php\5.3.2\php-cgi.exe -b 127.0.0.1:9000 Which would allow nginx or apache to use the PHP service. This would really help to make my development environment decoupled. Does anyone know how to create a portable PHP install?

    Read the article

  • CURL on PHP 5.2 works in CLI but not in IIS

    - by Ben Reisner
    I have a Windows 2003 Server running IIS with php 5.2.8, I'm trying to use CURL, and it works in CLI mode (if i execute php.exe) but it does not seem to be registered when running under IIS. The output of PHP info in both CLI and IIS show the same 'Loaded Configuration File', but under IIS it does not give the CURL info box. c:\program files\php\php.exe -i shows ... Loaded Configuration File => C:\Program Files\PHP\php.ini ... curl cURL support => enabled cURL Information => libcurl/7.16.0 OpenSSL/0.9.8i zlib/1.2.3 phpinfo() ... Loaded Configuration File => C:\Program Files\PHP\php.ini ... NOTE: This server also runs php 5.3 in c:\program files\php-5.3.0 and CURL does properly work with that installation.

    Read the article

  • Previewing php pages inside Expression Web 3 suddently stopped working

    - by user1660569
    On a Windows 7 development machine, I have expression web 3, PHP 5 installed I have been using expression web and PHP for a while, and previewing php pages etc on pressing F12 (preview using local server). Suddenly on F12 all PHP pages display as blank, even a phpinfo() file. Standard html pages continue to work correctly on F12. If I place the same page php inside the default website on inetpub and browse using localhost then the phpinfo() file works. So I know that php is installed and configured correctly for IIS. Things I've checked: Gone into site settings in Expression web and confirmed that php is selected and it is pointing to the php executable Reinstalled php Checked iis that the php extension is registered. Copied files to a different machine with expression web and php installed and it works on. The strange thing is that it gives a blank (no errors) page inside expression web, but does work inside inetpub This was working up until recently, then suddenly stopped for no reason.

    Read the article

< Previous Page | 31 32 33 34 35 36 37 38 39 40 41 42  | Next Page >