News
: April 3, 2008 - New Contest! -
Win 5 Years of Hosting and $1,000!
May 5, 2008 - May 08 Web Site of the Month? -
Submit your LINKS!!!
Home
Help
Search
Calendar
Login
Register
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email?
May 16, 2008, 03:07:41 PM
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Web Hosting Forum | Lunarpages
>
Lunarpages Web Hosting - Advanced Assistance
>
Lunarpages - Dedicated Web Hosting
>
Lunarpages - General
>
php exec, passthru - 404 - No input file specified.
Pages: [
1
]
Go Down
« previous
next »
Print
Author
Topic: php exec, passthru - 404 - No input file specified. (Read 602 times)
zonathen
Newbie
Offline
Posts: 3
php exec, passthru - 404 - No input file specified.
«
on:
December 12, 2007, 10:10:22 PM »
Hello, I am trying to launch a php script using exec or passthru and I get a 404, no input file specified when I use the exact same script on other hosting and it is fine.
exec("/usr/bin/php /home/domain/public_html/script.php")
script.php exists, it's chmod 755, the same command entered in the command line works fine but when ran via the browser it gives the "No input file specified"
Is there some sort of voodoo necessary to make this work on your servers?
Thanks
Logged
perestrelka
Administrator
Jedi
Offline
Posts: 896
Re: php exec, passthru - 404 - No input file specified.
«
Reply #1 on:
December 14, 2007, 10:43:12 PM »
Hi,
Did you try to modify the php script you try to exec to have the !# construction to cause the script to load php and then just use "exec(/path/to/script.php)" as the execute permissions are already set as per your words.
An example of the !# is shown below:
#!/path/to/php
<?php
// your php code
?>
Please give it a test and let me know about the result.
Logged
Kind Regards,
Vlad Artamonov
zonathen
Newbie
Offline
Posts: 3
Re: php exec, passthru - 404 - No input file specified.
«
Reply #2 on:
December 16, 2007, 09:17:20 PM »
Nope, same result... I didn't realize you could use that !# directive in a php file, I thought that was for perl or shell scripting only. Just to be sure we are on the same page, I am executing the php script from another php script, not perl or shell script. Any other ideas? I swear it works from the command line when I echo the command string and run it manually. Has to be a php related access restriction or something. Do I need a .htaccess with a basedir or any other magic? I'll play around with that in the meantime.
Also, I have to explicitly write php debug statements to an error log in the web folder because I can't find the default php error log anywhere on the system. And when I specify an absolute path to the error log in php.ini and chmod it like I've found in other posts it simply ignores it. And yes, I am sure it's the right php.ini because it's what shows up in phpinfo. log_errors is on and i do the standard reboot of apache after every change to php.ini.
Appreciate the help!
«
Last Edit: December 16, 2007, 09:19:14 PM by zonathen
»
Logged
zonathen
Newbie
Offline
Posts: 3
Re: php exec, passthru - 404 - No input file specified.
«
Reply #3 on:
December 16, 2007, 09:42:52 PM »
Okay, it was a pathing issue to php per this other post. I looked at this post before but didn't notice the path difference to /usr/local/bin/php. Now I am running into other probs. Any help on the error log issue?
http://www.lunarforums.com/lunarpages_php_mysql/php_cron_no_input_file_specified-t44059.0.html
Thanks again!
Logged
perestrelka
Administrator
Jedi
Offline
Posts: 896
Re: php exec, passthru - 404 - No input file specified.
«
Reply #4 on:
December 18, 2007, 11:58:00 PM »
Hi,
PHP error logs also maybe recorded in the apache error log. As for how get separate php error log, can you please specify how PHP is configured in your Apache? Do you run php as mod_php or use suPHP?
Logged
Kind Regards,
Vlad Artamonov
Pages: [
1
]
Go Up
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
Lunarpages Web Hosting - Information & Opportunities
-----------------------------
=> Lunarpages Web Hosting - Announcements
=> Lunarpages Web Hosting - Hosting Plans & Site Information
=> Job Opportunities at Lunarpages Web Hosting
=> Lunarpages Web Hosting - Network Information
=> Lunarpages Web Hosting - Server Information
-----------------------------
Lunarpages Web Hosting - Before Signing Up
-----------------------------
=> Lunarpages Web Hosting Plans - Pre-Sales Questions
-----------------------------
Lunarpages Web Hosting - Online Help Desk
-----------------------------
=> Lunarpages - Webhosting Help
=> Lunarpages - Beginner Assistance
=> Lunarpages - How to's
=> E-mail with your Lunarpages Hosting Plan
=> Lunarpages - CPanel Help
=> Lunarpages - Ecommerce Hosting
=> Lunarpages - FrontPage
=> Lunarpages - DreamWeaver
=> Lunarpages - Message Boards-Forums-Fantastico Scripts
===> Lunarpages - Joomla / Mambo
-----------------------------
Lunarpages Web Hosting - Advanced Assistance
-----------------------------
=> Web Management
=> Lunarpages - Webdesign and HTML
=> Lunarpages - Search Engine Optimization
=> Lunarpages - Animation & Flash
=> Lunarpages - Graphics
=> Lunarpages - Web Hosting, Email & PC Security
=> Lunarpages - Dedicated Web Hosting
=> Lunarpages - Reseller Web Hosting
=> Lunarpages - VPS Hosting
=> Lunarpages - SharePoint Services (Beta)
===> Lunarpages - cPanel & WHM
===> Lunarpages - General
===> Lunarpages - Plesk
===> Lunarpages - Security
===> Lunarpages - Tutorials
===> Lunarpages - Webmin
===> Lunarpages - WHM
-----------------------------
Lunarpages Web Hosting - Coding
-----------------------------
=> Lunarpages - ASP
=> Lunarpages - C++ / PERL / CGI
=> Lunarpages - PHP & MySQL
=> Lunarpages - Java Applets & Javascript
=> Lunarpages - JSP & Servlets
=> Lunarpages - Ruby Hosting
=> Lunarpages - Windows Development & Hosting
-----------------------------
Lunarpages Web Hosting - Entertainment
-----------------------------
=> Lunarpages - Chat & Stuff!
=> Lunarpages - Contests
=> Fun at Lunarpages!!
=> Lunarpages - Online Gaming
-----------------------------
Lunarpages Web Hosting - General
-----------------------------
=> Social Networking
=> Lunarpages Free Web Hosting - Education Program
=> Lunarpages - Affiliate Program
=> Introduce Yourself to the Lunarpages Forum Community!
=> Your Websites & Creations at Lunarpages!
=> Lunarpages Website of the Month
=> Lunarpages - Service and Trade
Loading...